- LAN -- Local Area Network
- Popular technologies
- Ethernet -- 10 Mbps
- Token Ring -- 4 and
- FDDI (Fiber
Distributed Data Interface) -- 100 Mbps
- WAN -- Wide Area Network
- Usually leased
- Slower than LANs
- MAN -- Metropolitan Area
- Usually co-axial
cable (similar to cable TV)
- Host -- a computer on a
- Router -- A host connected
to two networks that can forward network messages from one network to
- User -- A human that logs
into a host
- Networking Application --
Software that provides service over the network. Networking applications
generally interface with the Transport Layer.
- Little-endian byte order
- The most-significant
byte (i.e., the byte that remains constant the most as the value
increases) is in the highest memory location
- Big-endian byte order
- The most significant
byte is in the lowest memory location
- IBM 370, Motorola
Out-of-Band Data (or expedited data)
- Data that is sent ahead of
- Treated specially
- Consider a "break"
key to stop data
- Many transport providers
supply several "bands" that you can send data to. Normal data is
in band 255. Out-of-band data is in band 0-254.
In order to communicate, host must speak the same protocol.
Each layer of the OSI Model has it's own protocol.
- For example, all must run
Ethernet at Data Link Layer
- All must run IP and Network
- All must run TCP and the
If you change the protocol at one layer on a host, you must
change it on all other hosts.
Let's look at a Physical and Data-Link
- You do not use these
directly from Networking Applications.
- They are used by the
Networking Layer Software
- Each machine has Ethernet
hardware (a Ethernet card and an Ethernet wire).
- Each Ethernet card has a
48-bit Ethernet address.
- For example, 08 00 23 34 23 F7
- This can be changed with
software in some OSs
- But very dangerous!
- Used for
- A machine delivers packets
with two addresses:
- The Ethernet address
of the receiver
- The Ethernet address
of the sender
- All machines see the packet.
- The machine with the
receiver's Ethernet addresses takes in the packet and passes it up to the
- Special address: FF FF FF FF FF FF
- Read by all hosts on
- All hosts pass it to
the network layer
- If two hosts try to send a
packet simultaneously, a collision occurs.
- Both hosts wait
before trying again.
- They each wait a
- Sort of like polite
guests at a dinner party
Details of TCP/IP:
- The term ``TCP/IP'' refers
to an entire communication protocol family based on the Transmission
Control Protocol and the Internet Protocol.
- It defines protocols at the
network layer and the transport layer.
- TCP/IP can be configured to
run over almost any type of communications media, including
- Ethernet local area
- Token Ring local
- X.25 public data
- and point-to-point
- The functionality of TCP/IP
is divided into well-defined distinct layers.
- The TCP/IP model has six
- The Transmission
Control Protocol (TCP),
- The User Datagram
- The Internet
- Auxiliary protocols
like the Internet Control Message Protocol (ICMP) and the Address
Resolution Protocol (ARP)
- and one or more
network device drivers.
- IP routes packets.
- When an application sends a
data packet to another machine, IP determines to which network the packet
should go, and if necessary, routes the packet from one network to
- IP figures out where to
send a packet based on the IP address of the recipient.
- Every machine running TCP/IP
has a 32-bit IP address.
- When an application sends
data to a remote machine, it must specify the IP address of the recipient.
- An IP address has two parts:
a network number and a host number.
- The network number
identifies the network a machine is on, and the host number identifies a
machine on that network.
- The number of bits
representing the network number depends upon the class of the address,
which is determined by the high-order bits.
- There are three primary
classes of addresses: Class A, Class B, and Class C.
- If the first bit of an IP
address is 0,
then the IP address is a Class A address.
- A Class A address has
the network number in the next 7 bits and the host number in the
remaining 24 bits.
- If the first 2 bits of the
address are 10,
then the IP address is a Class B address
- The next 14 bits for the
network number and the remaining 16 bits for the host number.
- If the first 3 bits are 110, then
the IP address is a Class C address
- Next 21 bits for the
network number and the remaining 8 bits for the host number.
- The IP module uses the
network number of the address to figure out which network the destination
machine is on and passes the packet to the device driver for that network.
- If the destination is not on
a directly accessible network, IP consults internal tables to select a
machine that can complete the delivery and forwards the packet to that
- It is essential that no two
machines have the same IP address.
- If a machine wants to join
the Internet special actions must be taken to ensure uniqueness of IP
- Network administrator must
request a network number from the Network Information Center (NIC) at
Network Solutions, Inc, located in Chantilly, Virginia.
- The NIC is the
central authority that assigns network numbers.
- See http://rs.internic.net/rs-internic.html
- Once the network number is
obtained, the network administrator creates IP addresses by assigning host
numbers to individual machines on the network.
- The class of the address
directly relates to the size of the network.
- Class A networks have
24 bits to use for host numbers,
- Class B networks have
- Class C networks have
- IP addresses are usually
represented in ``decimal-dot'' notation.
- Decimal-dot notation is a
period-separated sequence of bytes, where each byte is specified in
1100 0000 0000 1010 0001 0101 0001 1011
has the hexadecimal representation of
C0 0A 15 1B
and therefore would be written as
- As mentioned before, the
network number identifies the network a machine is on, and the host number
identifies a machine on that network.
- So, a single machine
attached to several networks will have several IP addresses.
- This poses a problem for
applications: If a server machine has several IP addresses, which address
should you use?
- The answer: You can use any
IP address of the server, since IP forwards packets that are not on a
directly accessible network.
- However, for performance
considerations, you should try to figure out if the server machine is on a
network attached to your machine, and use the address corresponding to
- Unfortunately, UNIX
does not provide routines to help you figure this out. So, given a list
of addresses for a server, most applications simply use the first IP
address in the list.
- TCP/IP places special
meaning on some addresses.
- An address with all bits 0
- Neither the network
number nor the host number can be zero.
- A value of zero is
interpreted to be ``this host.''
- An address with the host
number of all bits 1
- A host number with
all bits 1 is reserved as a ``broadcast address.''
- So, sending a
message to address 22.214.171.124 means ``send the message to all machines
on Class C network 126.96.36.199''
- Similarly, sending a
message to address 188.8.131.52 means ``send the message to all
machines on the Class A network 184.108.40.206''
- The address with all bits 1
- The special address
255.255.255.255 refers to ``all machines on every directly attached
- TCP/IP supports another
address called a multicast address.
- A packet sent to a
multicast address is delivered to a set of machines in a specified group.
- A multicast address
has its own class (Class D) and has the following form:
Class Leading Bits
Group Identification (28 bits)