Networking in UNIX
A brief review and frequently used commands
1.Overview of Network Concept
• A network is an interconnected system of cooperating computers.
• UNIX had a huge explosion of network applications in early 1990’s.
• Example: Clients-server systems
Common Network Terminology
• LAN
• WAN
• INTERNET
• WWW
Different Topologies
• BUS
• RING
• STAR
Ethernet
• First developed by Xerox Corporation.
• It works like this:
• 1. Each computer contains an Ethernet card, and each card has a unique Ethernet address.
• 2. Every computer’s Ethernet card is connected to the same single piece wire (Ethernet cable).
Ethernet…
• 3. A computer broadcasts its message onto the Ethernet a particular Ethernet address along with Ethernet header and trailer information. Only that computer Ethernet card has the same address accepts the message.
• 4. In case of collision-two or more computers broadcast to the Ethernet at the same time, they will wait a random period of time and then try again.
Ethernet…
• .
Ethernet Cable
Bridges
• Because there is a length limit on how long an Ethernet cable can be, we need some special devices to connect different Ethernet network together when the limit is exceeded.
• Ethernet Standard: IEEE 802.3
• See document: TechFest on my web site
Cable Bus Length Limit
• See Document: Cable Buses on my web site
Diagram• .
Routers
• Routers are introduced to connect multi-LANs together in a more efficient way.
• Example: Connect four LAN together.
•
Gateways
• To connect several LAN into a single large wide area network (WAN), we need several high-capacity routers, which we call gateways to realize this goal.
• Example: Each corporation (a University can be considered as a corporation) tie their LAN through the nearest gateway.
Protocols
• TCP/IP
• Transmission Control and Internet Protocols
The Five-Layer TCP/IP Internet Protocol Hierarchy
Physical Layer
• Protocols govern the exchange of binary digits across a physical communication channel
• Goal: create a “bit pipe” between two computers
Data Link Layer
• Protocols carry out
– Error handling
– Framing
• Creates an error-free “message pipe”
• Composed of two services
– Layer 2a: medium access control
– Layer 2b: logical link control
Data Link Layer (continued)
• Medium access control protocols
– Determine how to arbitrate ownership of a shared line when multiple nodes want to send at the same time
• Logical link control protocols
– Ensure that a message traveling across a channel from source to destination arrives correctly
Network Layer
• Delivers a message from the site where it was created to its ultimate destination
• Critical responsibilities
– Creating a universal addressing scheme for all network nodes
– Delivering messages between any two nodes in the network
Network Layer (continued)
• Provides a true “network delivery service”
– Messages are delivered between any two nodes in the network, regardless of where they are located
• IP (Internet Protocol) layer
– Network layer in the Internet
Transport Layer
• Provides a high-quality, error-free, order preserving end-to-end delivery service
• TCP (Transport Control Protocol)
– Primary transport protocol on the Internet
– Requires the source and destination programs to initially establish a connection
Application Layer
• Implements the end-user services provided by a network
• There are many application protocols, including:
– HTTP
– SMTP
– POP3
– IMAP
– FTP
Some Popular Application Protocols on the Internet
Application Layer (continued)
• Uniform Resource Locator (URL)
– A symbolic string that identifies a Web page
– Form
protocol://host address/page
– The most common Web page format is hypertext information
• Accessed using the HTTP protocol
Internet Address
• An IP address is a 32-bits value that is written as four dot-separated numbers (4 dot-separated bytes) from 0-255
• Newer IPv6 will define 128-bit IP addresses.
UNIX Utilities on Networking
• 1. users
Who And W
• who – displays every user on your local host.
• w – similar to who and it gives you a little more information on each user.
hostname
• hostname – displays the name of your local host
finger
• finger [userid] displays information about a list of users with more information.
• Example: finger zhang
• Pay attention about the extra information it displays.
Write, talk, walk, and mail
• write – sending a line a time
• You already saw talk and walk briefly before.
• mail is an old command we used a lot even before the WWW
The mesg command
• If one does not want be bothered with the public information (it almost like the pop-ups in the Internet), one can disable them by set the mesg n command.
• Example: mesg n or mesg y
ftp command