Computer Networks & Protocols Overview
Computer Networks & Protocols Overview
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
.IN
C
N
SY
U
VT
A local area network (LAN) is a computer network that is designed for a limited geographic
area such as a building or a campus. Although a LAN can be used as an isolated network to
connect computers in an organization for the sole purpose of sharing resources, most LANs
today are also linked to a wide area network (WAN) or the Internet. Almost every LAN
except Ethernet has disappeared from the marketplace because Ethernet was able to update
itself to meet the needs of the time
.IN
In 1985, the Computer Society of the IEEE started a project, called Project 802, to set
standards to enable intercommunication among equipment from a variety of
C
manufacturers.
Project 802 does not seek to replace any part of the OSI model or TCP/IP protocol suite.
N
Instead, it is a way of specifying functions of the physical layer and the data-link layer of
SY
IEEE has also created several physical-layer standards for different LAN protocols.
.IN
IEEE Project 802 has created a sublayer called media access control that defines the
specific access method for each LAN. For example, it defines CSMA/CD as the media
access method for Ethernet LANs and defines the token-passing method for Token Ring
C
and Token Bus LANs.
N
Part of the framing function is also handled by the MAC layer.
SY
Ethernet Evolution
The Ethernet LAN was developed in the 1970s by Robert Metcalfe and David Boggs.
U
STANDARD ETHERNET
Characteristics
1. Connectionless and Unreliable Service
Ethernet provides a connectionless service, which means each frame sent is
independent of the previous or next frame. Ethernet has no connection establishment
or connection termination phases.
The sender sends a frame whenever it has, the receiver may or may not be ready for it.
The sender may overwhelm the receiver with frames, which may result in dropping
frames. If a frame drops, the sender will not know about it. Since IP, which is using
the service of Ethernet, is also connectionless, it will not know about it either. If the
.IN
transport layer is also a connectionless protocol, such as UDP, the frame is lost and
salvation may only come from the application layer. However, if the transport layer is
TCP, the sender TCP does not receive acknowledgment for its segment and sends it
again.
C
N
Ethernet is also unreliable like IP and UDP. If a frame is corrupted during
transmission and the receiver finds out about the corruption, which has a high level of
SY
probability of happening because of the CRC-32, the receiver drops the frame silently.
It is the duty of high-level protocols to find out about it.
U
2. Frame Format
VT
Start frame delimiter (SFD). This field (1 byte: 10101011) signals the beginning of the
frame. The SFD warns the station or stations that this is the last chance for
synchronization. The last 2 bits are (11)2 and alert the receiver that the next field is the
destination address. This field is actually a flag that defines the beginning of the frame, an
Ethernet frame is a variable-length frame. It needs a flag to define the beginning of the
.IN
frame. The SFD field is also added at the physical layer.
Destination address (DA). This field is six bytes (48 bits) and contains the link layer
C
address of the destination station or stations to receive the packet. When the receiver sees
N
its own link-layer address, or a multicast address for a group that the receiver is a member
of, or a broadcast address, it decapsulates the data from the frame and passes the data to
SY
the upper layer protocol defined by the value of the type field.
Source address (SA). This field is also six bytes and contains the link-layer address of
U
Type. This field defines the upper-layer protocol whose packet is encapsulated in the
frame. This protocol can be IP, ARP, OSPF, and so on. In other words, it serves the same
purpose as the protocol field in a datagram and the port number in a segment or user
datagram. It is used for multiplexing and demultiplexing.
Data. This field carries data encapsulated from the upper-layer protocols. It is a minimum
of 46 and a maximum of 1500 bytes. If the data coming from the upper layer is more than
1500 bytes, it should be fragmented and encapsulated in more than one frame. If it is less
than 46 bytes, it needs to be padded with extra 0s. A padded data frame is delivered to the
upper-layer protocol as it is (without removing the padding), which means that it is the
responsibility of the upper layer to remove or, in the case of the sender, to add the
3. Frame Length
Ethernet has imposed restrictions on both the minimum and maximum lengths of a
frame. The minimum length restriction is required for the correct operation of
CSMA/CD.
.IN
An Ethernet frame needs to have a minimum length of 512 bits or 64 bytes. Part of
this length is the header and the trailer. If we count 18 bytes of header and trailer (6
bytes of source address, 6 bytes of destination address, 2 bytes of length or type, and 4
C
bytes of CRC), then the minimum length of data from the upper layer is 64 − 18 = 46
N
bytes. If the upper-layer packet is less than 46 bytes, padding is added to make up the
difference.
SY
The standard defines the maximum length of a frame (without preamble and SFD
field) as 1518 bytes. If we subtract the 18 bytes of header and trailer, the maximum
U
NOTE:
Minimum frame length: 64 bytes Minimum data length: 46 bytes
Maximum frame length: 1518 bytes Maximum data length: 1500 bytes
Addressing
Each station on an Ethernet network (such as a PC, workstation, or printer) has its own
network interface card (NIC). The NIC fits inside the station and provides the station with a
link-layer address. The Ethernet address is 6 bytes (48 bits), normally written in hexadecimal
notation, with a colon between the bytes. For example, the following shows an Ethernet
MAC address:
[Link]
.IN
the least significant bit is sent first and the most significant bit is sent last. This means that the
bit that defines an address as unicast or multicast arrives first at the receiver. This helps the
receiver to immediately known if the packet is unicast or multicast.
C
N
Example
SY
A source address is always a unicast address, the frame comes from only one station. The
destination address, however, can be unicast, multicast, or broadcast. Figure 4 shows how to
Example
Define the type of the following destination addresses
a. [Link]
b. [Link]
c. [Link]
.IN
Solution: To find the type of the address, we need to look at the second hexadecimal digit
from the left. If it is even, the address is unicast. If it is odd, the address is multicast. If all
digits are Fs, the address is broadcast. Therefore, we have the following:
C
a. This is a unicast address because A in binary is 1010 (even).
N
b. This is a multicast address because 7 in binary is 0111 (odd).
c. This is a broadcast address because all digits are Fs in hexadecimal.
SY
Access Method
U
Since the network that uses the standard Ethernet protocol is a broadcast network, The
standard Ethernet chose CSMA/CD with 1-persistent method, Let us use a scenario to see
VT
Assume station A in Figure.5 has a frame to send to station D. Station A first should
check whether any other station is sending (carrier sense). Station A measures the level of
energy on the medium (for a short period of time, normally less than 100µs). If there is no
signal energy on the medium, it means that no station is sending (or the signal has not
reached station A). Station A interprets this situation as idle medium. It starts sending its
frame. On the other hand, if the signal energy level is not zero, it means that the medium
is being used by another station. Station A continuously monitors the medium until it
becomes idle for 100µs. It then starts sending the frame. However, station A needs to
keep a copy of the frame in its buffer until it is sure that there is no collision.
The medium sensing does not stop after station A has started sending the frame. Station A
.IN
needs to send and receive continuously. Two cases may occur:
(a) Station A has sent 512 bits and no collision is sensed (the energy level did not go
above the regular energy level), the station then is sure that the frame will go through
C
and stops sensing the medium. Where does the number 512 bits come from? If we
N
consider the transmission rate of the Ethernet as 10 Mbps, this means that it takes the
station 512/(10 Mbps) = 51.2 μs to send out 512 bits. With the speed of propagation in
SY
a cable (2 × 108 meters), the first bit could have gone 10,240 meters (one way) or
only 5120 meters (round trip), have collided with a bit from the last station on the
U
cable, and have gone back. In other words, if a collision were to occur, it should occur
by the time the sender has sent out 512 bits (worst case) and the first bit has made a
VT
round trip of 5120 meters, if the collision happens in the middle of the cable, not at
the end, station A hears the collision earlier and aborts the transmission. The above
assumption is that the length of the cable is 5120 meters. The designer of the standard
Ethernet actually put a restriction of 2500 meters because we need to consider the
delays encountered throughout the journey. It means that they considered the worst
case. The whole idea is that if station A does not sense the collision before sending
512 bits, there must have been no collision, because during this time, the first bit has
reached the end of the line and all other stations know that a station is sending and
refrain from sending. In other words, the problem occurs when another station (for
example, the last station) starts sending before the first bit of station A has reached it.
The other station mistakenly thinks that the line is free because the first bit has not yet
reached it. The restriction of 512 bits actually helps the sending station: The sending
.IN
station can wait a backoff time (TB) and restart the process. The station creates a
random number between 0 and 2K − 1, which means each time the collision occurs,
the range of the random number increases exponentially. After the first collision (K =
C
1) the random number is in the range (0, 1). After the second collision (K = 2) it is in
N
the range (0, 1, 2, 3). After the third collision (K = 3) it is in the range (0, 1, 2, 3, 4, 5,
6, 7). So after each collision, the probability increases that the backoff time becomes
SY
longer. This is due to the fact that if the collision happens even after the third or fourth
attempt, it means that the network is really busy; a longer backoff time is needed.
U
The efficiency of the Ethernet is defined as the ratio of the time used by a station to
send data to the time the medium is occupied by this station. The practical efficiency of
standard Ethernet has been measured to be,
Efficiency =
=
The transmission delay is the time it takes a frame of average size to be sent out and the
propagation delay is the time it takes to reach the end of the medium. As the value of
parameter decreases, the efficiency increases. This means that if the length of the media is
shorter or the frame size longer, the efficiency increases. In the ideal case, = 0 and the
efficiency is 1.
Example 13.3
In the Standard Ethernet with the transmission rate of 10 Mbps, we assume that the length of
the medium is 2500 m and the size of the frame is 512 bits. The propagation speed of a signal
in a cable is normally 2 × 108 m/s.
The example shows that a = 0.24, which means only 0.24 of a frame occupies the whole
.IN
medium in this case. The efficiency is 39 percent, which is considered moderate; it means
that only 61 percent of the time the medium is occupied but not used by a station.
Implementation
C
N
The Standard Ethernet defined several implementations, but only four of them became
popular during the 1980s. Table below shows a summary of Standard Ethernet
SY
implementations.
U
VT
In the nomenclature 10BaseX, the number defines the data rate (10 Mbps), the term Base
means baseband (digital) signal, and X approximately defines either the maximum size of the
cable in 100 meters (for example 5 for 500 or 2 for 185 meters) or the type of cable, T for
unshielded twisted pair cable (UTP) and F for fiber-optic. The standard Ethernet uses a
baseband signal, which means that the bits are changed to a digital signal and directly sent on
the line.
.IN
derives from the size of the cable, which is roughly the size of a garden hose and too stiff to
bend with your hands. 10Base5 was the first Ethernet specification to use a bus topology with
C
an external transceiver (transmitter/receiver) connected via a tap to a thick coaxial cable.
Figure 7 shows a schematic diagram of a 10Base5 implementation.
N
SY
U
VT
.IN
Figure 8: 10Base2 implementation
The collision here occurs in the thin coaxial cable. This implementation is more cost effective
C
than 10Base5 because thin coaxial cable is less expensive than thick coaxial and the tee
connections are much cheaper than taps. Installation is simpler because the thin coaxial cable
N
is very flexible. However, the length of each segment cannot exceed 185 m (close to 200 m)
SY
shown in Figure 9.
.IN
C
N
Figure 10: 10Base-F implementation
SY
FDDI and Fiber Channel, appeared on the market. If the Standard Ethernet wanted to survive,
it had to compete with these technologies. Ethernet made a big jump by increasing the
VT
transmission rate to 100 Mbps, and the new generation was called the Fast Ethernet. The
designers of the Fast Ethernet needed to make it compatible with the Standard Ethernet. The
MAC sublayer was left unchanged, which meant the frame format and the maximum and
minimum size could also remain unchanged. By increasing the transmission rate, features of
the Standard Ethernet that depend on the transmission rate, access method, and
implementation had to be reconsidered.
The goals of Fast Ethernet can be summarized as follows:
1. Upgrade the data rate to 100 Mbps.
2. Make it compatible with Standard Ethernet.
3. Keep the same 48-bit address.
4. Keep the same frame format.
.IN
Standard Ethernet.
2. The second solution is to use a link-layer switch with a buffer to store frames and a
full-duplex connection to each host to make the transmission medium private for each
C
host. In this case, there is no need for CSMA/CD because the hosts are not competing
N
with each other. The link-layer switch receives a frame from a source host and stores
it in the buffer (queue) waiting for processing. It then checks the destination address
SY
and sends the frame out of the corresponding interface. Since the connection to the
switch is full-duplex, the destination address can even send a frame to another station
U
at the same time that it is receiving a frame. In other words, the shared medium is
changed to many point-to- point media, and there is no need for contention.
VT
Auto negotiation
A new feature added to Fast Ethernet is called auto negotiation. It allows a station or a
hub a range of capabilities. Auto negotiation allows two devices to negotiate the mode or
data rate of operation. It was designed particularly to allow incompatible devices to
connect to one another.
It was designed particularly for these purposes:
To allow incompatible devices to connect to one another. For example, a device with
a maximum capacity of 10 Mbps can communicate with a device with a 100 Mbps
capacity (but which can work at a lower rate).
To allow one device to have multiple capabilities.
To allow a station to check a hub’s capabilities.
.IN
C
N
SY
U
VT
.IN
been wired for voice-grade twisted-pair (category 3).
3. 100Base-T4, was designed to use category 3 or higher UTP. The implementation uses
four pairs of UTP for transmitting 100 Mbps. Encoding/decoding in 100Base-T4 is
C
more complicated. As this implementation uses category 3 UTP, each twisted-pair
N
cannot easily handle more than 25 Mbaud. In this design, one pair switches between
sending and receiving. Three pairs of UTP category 3, however, can handle only 75
SY
Mbaud (25 Mbaud) each. We need to use an encoding scheme that converts 100 Mbps
to a 75 Mbaud signal. 8B/6T satisfies this requirement. In 8B/6T, eight data elements
U
are encoded as six signal elements. This means that 100 Mbps uses only (6/8) × 100
Mbps, or 75 Mbaud.
VT
GIGABIT ETHERNET
The need for an even higher data rate resulted in the design of the Gigabit Ethernet Protocol
(1000 Mbps). The IEEE committee calls it the Standard 802.3z. The goals of the Gigabit
Ethernet were to upgrade the data rate to 1 Gbps, but keep the address length, the frame
format, and the maximum and minimum frame length the same. The goals of the Gigabit
Ethernet design can be summarized as follows:
MAC Sublayer
A main consideration in the evolution of Ethernet was to keep the MAC sublayer untouched.
However, to achieve a data rate of 1 Gbps, this was no longer possible. Gigabit Ethernet has
two distinctive approaches for medium access: half-duplex and fullduplex. Almost all
.IN
implementations of Gigabit Ethernet follow the full-duplex approach, so we mostly ignore
the half-duplex mode.
Full-Duplex Mode
C
In full-duplex mode, there is a central switch connected to all computers or other switches. In
N
this mode, for each input port, each switch has buffers in which data are stored until they are
SY
transmitted. Since the switch uses the destination address of the frame and sends a frame out
of the port connected to that particular destination, there is no collision. This means that
CSMA/CD is not used. Lack of collision implies that the maximum length of the cable is
U
determined by the signal attenuation in the cable, not by the collision detection process.
VT
NOTE: In the full-duplex mode of Gigabit Ethernet, there is no collision; the maximum
length of the cable is determined by the signal attenuation in the cable.
Half-Duplex Mode
The half-duplex approach uses CSMA/CD. the maximum length of the network in this
approach is totally dependent on the minimum frame size.
Three methods have been defined:
Traditional
Carrier extension, and
Frame bursting.
.IN
the minimum length is 8 times longer. This method forces a station to add extension bits
(padding) to any frame that is less than 4096 bits. In this way, the maximum length of the
network can be increased 8 times to a length of 200 m. This allows a length of 100m from the
C
hub to the station.
N
Frame Bursting
Carrier extension is very inefficient if we have a series of short frames to send; each frame
SY
carries redundant data. To improve efficiency, frame bursting was proposed. Instead of
adding an extension to each frame, multiple frames are sent. However, to make these multiple
U
frames look like one frame, padding is added between the frames (the same as that used for
the carrier extension method) so that the channel is not idle. In other words, the method
VT
deceives other stations into thinking that a very large frame has been transmitted.
Physical Layer
The physical layer in Gigabit Ethernet is more complicated than that in Standard or Fast
Ethernet.
Topology
Gigabit Ethernet is designed to connect two or more stations. If there are only two stations,
they can be connected point-to-point. Three or more stations need to be connected in a star
topology with a hub or a switch at the center.
Implementation
Gigabit Ethernet can be categorized as either a two-wire or a four-wire implementation. The
two-wire implementations use fiber-optic cable (1000Base-SX, short-wave, or 1000Base-
Encoding
.IN
C
N
SY
Gigabit Ethernet cannot use the Manchester encoding scheme because it involves a very
high bandwidth (2 GBaud).
VT
The two-wire implementations use an NRZ scheme, but NRZ does not self-synchronize
properly. To synchronize bits, particularly at this high data rate, 8B/10B block encoding,
is used. This block encoding prevents long sequences of 0s or 1s in the stream, but the
resulting stream is 1.25 Gbps. In this implementation, one wire (fiber or STP) is used for
sending and one for receiving.
In the four-wire implementation it is not possible to have 2 wires for input and 2 for
output, because each wire would need to carry 500 Mbps, which exceeds the capacity for
category 5 UTP. As a solution, 4D-PAM5 encoding, is used to reduce the bandwidth.
Thus, all four wires are involved in both input and output; each wire carries 250 Mbps,
which is in the range for category 5 UTP cable.
10 GIGABIT ETHERNET
The IEEE committee created 10 Gigabit Ethernet and called it Standard 802.3ae.
The goals of the 10 Gigabit Ethernet design can be summarized as upgrading the data rate
to 10 Gbps, keeping the same frame size and format, and allowing the interconnection of
LANs, MANs, and WAN possible.
This data rate is possible only with fiber-optic technology at this time. The standard
defines two types of physical layers: LAN PHY and WAN PHY. The first is designed to
support existing LANs; the second actually defines a WAN with links connected through
SONET OC-192.
Implementation
10 Gigabit Ethernet operates only in full-duplex mode, which means there is no need for
.IN
contention; CSMA/CD is not used in 10 Gigabit Ethernet.
Four implementations are the most common:
1. 10GBase-SR
C
2. 10GBase-LR
N
3. 10GBase-EW and
SY
4. 10GBase-X4.
U
VT