Computer Networks Computer Networks: Taiz University, 2021 Taiz University, 2021
Computer Networks Computer Networks: Taiz University, 2021 Taiz University, 2021
Computer Networks Computer Networks: Taiz University, 2021 Taiz University, 2021
Lecture 2
Dr. Abdulmalek Akqobaty
Taiz University, 2021
Wired LANs
Ethernet Protocol
Ethernet Protocol
One of the main features of both OSI and TCP/IP protocol suite is that they do
not de ne any protocol for the data-link or the physical layer. This gives the
two models some exibility to accept any protocol at these layers to provide
services to the network layer. As a result, we can use wired or wireless
networks in these two layers.
However, the data-link layer and the physical layer are actually the region of
the local area networks (LANs) and wide area networks (WANs).
A LAN is de ned as a computer network that is designed for a limited
geographic area such as a building or a campus. It consists of shared
transmission medium and a set of hardware and so ware for inte acing
devices to the medium and regulating the ordering access to the medium.
Generally LAN owned, and operated by a single organization, to be used to
connect computers in an organization for the sole purpose of sharing
resources. However, most LANs today are also linked to a WAN or Internet.
Although, several LANs are used, all of them used a media-access method to
be able to share the media. For example, the Ethernet used the CSMA/CD
approach while the Token Ring, Token Bus, and Fiber Distribution Data
Inte ace (FDDI) used the token-passing approach. Another LAN technology,
which is ATM LAN deployed the high speed WAN technology (ATM).
Many of the designs for local area networks have been standardized under
the name of IEEE 802. The most impo ant of the survivors are 802.3 Ethernet
(wired LAN) and 802.11 (wireless LAN).
Ethernet Protocol
1 Ethernet Standards
In 1985, the Computer Society of the IEEE sta ed a project, called Project 802,
to set LAN standards. The commi ee came up with a bunch of LAN standards
collectively known as IEEE 802 LANs to satisfy diverse requirements. The
standard includes CSMA/CD, Token bus, Token Ring medium access control
techniques along with di erent topologies. All these standards di er at the
physical layer and MAC sublayer, but are compatible at the data link layer.
Figure 3.1 shows the relationship of the 802 Standard to the OSI model and
TCP/IP protocol suite. The IEEE Standard has divided the data-link layer into
two sublayers: logical link control (LLC) and media access control (MAC). In
addition, IEEE standard has created several physical-layer standards for
di erent LAN topologies.
2 Ethernet Evolution
Since it sta ed, Ethernet, which has passed through the following four
generations, is currently de ned to operate over optical ber and twisted-pair
cables to suppo four data rates:
Standard Ethernet
The original Ethernet technology, which covered by the IEEE 802.3 and uses
CSMA/CD with the data rate of 10 Mbps, is referred to as the Standard
Ethernet. Although, the standard Ethernet is sta ed at mid of 1970s, it is
designed in such a way that they could evolve with the demand for higher
transmission rates. With the need to high data rates, most implementations
have moved to other technologies in the Ethernet evolution. But, still, there are
some features of the original Ethernet that have not been changed through
the evolution.
For this reason, and to pave the way for understanding the other three
technologies, we here discuss the original version of Ethernet standard.
Ethernet Protocol
1 Characteristics
Let us rst discuss some characteristics of the original Ethernet.
Provided Service: Ethernet is also unreliable like IP and UDP. If a frame is
corrupted during transmission and the receiver nds out about the
corruption, which has a high level of probability of happening because of
the CRC-32, the receiver drops the frame silently. It is the duty of high-level
protocols to nd out about it.
Frame Format: The IEEE 802.3 standard de nes a basic data frame format
that is required for all MAC implementations, in addition to several
additional optional formats that are used to extend the protocol's basic
capability. Figure 3.2 shows the Ethernet frame format that contains seven
elds.
Ethernet Protocol
1 Characteristics
Length/Type: It consists of 2 bytes. This eld indicates either the number of
MAC-client data bytes that are contained in the data eld of the frame, or
the frame type ID if the frame is assembled using an optional format.
o If the Length/Type eld value is less than or equal to 1500, the number of
LLC bytes in the Data eld is equal to the Length/Type eld value.
o If the Length/Type eld value is greater than 1536, the frame is an
optional type frame, and the Length/Type eld value identi es the
pa icular type of frame being sent or received.
Data: This eld 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. In case when a data is padded, then frame is
delivered to the upper-layer protocol without removing the padding. It is
the responsibility of the upper layer to remove the padding. To remove the
padding, the upper-layer protocol needs to know the length of its data
using the length type eld.
Characteristics
Finally, there are two impo ant points that are brie y discussed below.
Inter-frame Gap: There is mandatory requirement of 9.6 ms (96 bit-time
delay) interval between two frames to enable other stations wishing to
transmit to take over a er a frame transmission is over.
Frame Size: As shown in the Figure 3.2, the frame size includes source and
destination address, of length or type, data, and FCS.
o The minimum length is required for the correct operation of CSMA/CD.
An Ethernet frame needs to have a minimum length of 512 bits or 64
bytes. The reason is that, a sender needs more than 2τ time to conclude
that the frame was successfully sent, where τ is the propagation time.
This slot time is 51.2μsec corresponding to 512 bit = 64 bytes. Therefore
the minimum frame length is 64 bytes. If the size of the header and
trailer is 18 bytes, then the minimum length of data from the upper layer
is 64 − 18 = 46 bytes. If the upper-layer packet is less than 46 bytes,
padding is added to cover the di erence.
o On the other hand, the maximum length of a frame as 1518 bytes, where
the header size is 18 bytes and the maximum length of the payload is
1500 bytes. Note that, the maximum length restriction has two reasons.
The maximum length restriction helps to reduce the size of the bu er
and prevents one station to monopolize the shared medium and
blocking other stations.
Ethernet Protocol
2 Addressing
To connect to the Ethernet network, each station such as a PC, workstation,
or printer must have a network inte ace card (NIC). The NIC ts inside the
station and provides the station with a link-layer address. The Ethernet link-
layer address, which is also called MAC address, is 6 bytes (48 bits). It is
normally wri en in hexadecimal notation, with a colon between the bytes. For
example, 39:40:2A:EE:16:AA can represent an Ethernet MAC address.
For example, when the address 39:40:2A:EE:16:AA is transmi ed, it is
transmi ed from le to right, byte by byte and each byte is
transmi ed from right to le , bit by bit, as shown below:
Hexadecimal 39 40 2A EE 16 AA
Binary 00111001 01000000 00101010 11101110 00010110 10101010
Transmi ed ← 10011100 00000010 01010100 01110111 01101000 01010101
Ethernet Protocol
Address Types
o The frame is always sent by one sender, and then a source address is always
a unicast address. However, the destination address can be unicast,
multicast, or broadcast. The destination eld identi es which station or
stations should receive the frame.
o The le -most bit in the sent destination address eld indicates whether the
address is an individual address or a group address. When this bit is 0 the
destination address is a unicast address, otherwise, the destination
address is a multicast address.
o The second bit in the sent destination address eld indicates whether the
destination address is globally or locally administered. When it is 0, it is
globally administered; otherwise, it is locally administered. The remaining
46 bits are a uniquely assigned value that identi es a single station, a
de ned group of stations, or all stations on the network as shown in the
gure below.
Ethernet Protocol
Address Types
Note that, the standard Ethernet is always broadcast, regardless of the type of
destination address or the network topology.
o In the bus topology, when station A sends a frame to station E, all stations will
receive it.
o In the star topology, when station A sends a frame to station E, the hub will
receive it. The hub does not check the destination address of the frame. In case
of weak signals, it just regenerates the bits signals and sends them to all stations
except station the sender one.
In fact, the actual unicast, multicast, and broadcast transmissions can be done
Ethernet Protocol
3 Access Method
The standard Ethernet protocol is a broadcast network, in which the medium
is shared among the nodes. Hence, a network needs to use an access method
to control access to the sharing medium. The standard Ethernet chose CSMA/
CD with 1-persistent method. In CSMA/CD, the station does a carrier sense to
see the state or the medium. When the carrier in an idle case it sta s sending
the data frame. The scenario is discussed using the gure above.
Carrier sense case: Assume station A has a frame to send to station D. First,
station A should check if there is any other station is sending. This is called
carrier sense. To sense the carrier, station A measures the level of energy on
the medium for a sho period of time (normally less than 100 μs).
o When the signal energy level is not zero, it means that another station uses
the medium. In such case, station A continuously observes the medium until
it becomes idle for 100 μs.
o Otherwise, either no station is sending or the signal has not reached station
A yet. From station A view of point the medium is idle. Then, it sta s
sending its frame.
Access Method
Frame sending: A er station A has sta ed sending the frame, the medium
sense does not stop. Note that, station A needs to send and receive
continuously. The following two cases, collision and collision-free, may occur:
A collision-free case: Station A has sent 512 bits and the energy level did not
go above the regular energy level. This means that no collision is detected
and the station then is sure that the frame will go through and stops sensing
the medium. The number 512 bits is related to the minimum size of the frame.
In this transmission rate, a station takes 512/(10 Mbps) = 51.2 μs to send out
512 bits. With the speed of propagation in a cable (2 × 108 meters), the rst
bit could travel 10,240 (2 × 108 meters/s × 51.2 μs) meters for a one way or
only 5120 meters for a round trip. In case of collision, the rst bit could has
traveled 5120 meters, has collided with a bit from the last station on the
cable, and the collision signal has gone back another 5120 meters. Note that,
if the collision happens in other place that the end of transmission medium,
station A hears the collision earlier and abo s the transmission. Remember
that, the above assumption is that the length of the cable is 5120 meters. To
consider the worst case, the designer of the standard Ethernet actually put a
restriction of 2500 meters because to consider the delays encountered throughout
the round trip journey. In fact, the when station A does not sense the collision
before sending 512 bits, there collision must not be expected. The reason is
that during time of sending 512 bits, the rst bit has reached the end of the
line and all other stations know that a station is sending and refrain to send.
Access Method
A collision case. Station A has detected a collision before sending 512 bits.
This means that one of the previous bits has collided with a bit sent by
another station. In this case both stations should refrain from sending and
keep the frame in their bu er for resending when the medium becomes idle.
However, to inform other stations that a collision is occurred in the network,
the station sends a 48-bit jam signal, which creates enough signal to ale
other stations about the collision. A er sending the jam signal, the stations
need to increment the value of number of a empts (K).
A er increment, if K = 15, this means that the network is too busy, therefore,
the station needs to abo and try again later. In other case, if K < 15, the
station can wait a backo time (TB) and resta the process. The station can
generate a backo time, which is a random number selected between 0 and
2K – 1. This means that each time the collision occurs, the range of the
random number increases exponentially. A er the rst collision (K = 1) the
random number is in the range (0, 1). A er the second collision (K = 2) it is in
the range (0, 1, 2, 3). A er the third collision (K = 3) it is in the range (0, 1, 2, 3,
4, 5, 6, 7) and so on. Thus, a er each collision, the backo time becomes
longer. The reason is that if the collision happens even a er the third or
fou h a empt, it indicates that the network is congested.
Ethernet Protocol
4 Standard Ethernet E ciency
In standard Ethernet, the e ciency is de ned as the ratio of the time used by
a station to send data to the time the medium is occupied by this station.
Practically, standard Ethernet e ciency has been measured by the following
relation:
E ciency = 1 / (1 + 6.4 x a)
where “a” is the number of frames that can t on the medium.
a = (propagation delay)/(transmission delay).
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. In the ideal case, a = 0 and the e ciency is 1.
10Base-T implementation
Ethernet Protocol
10Base 2 implementation
Ethernet Protocol
10Base-T implementation
Ethernet Protocol
10Base-F implementation
Ethernet Protocol
6 Successors of Ethernet
Bridged Ethernet
The rst step for the Ethernet evolution was by using bridges to divide LAN.
Using bridges for dividing LANs, leads to increase the bandwidth and
separates the collision domains.
Ethernet Protocol
Increasing Bandwidth:
In a standard Ethernet, the total capacity is 10 Mbps shared among all stations
with a frame to send. All stations in the network share the bandwidth of the
network. If only one station has frames to send, it bene ts from the total
capacity , otherwise, the capacity is shared.
The gure below shows an example with a standard Ethernet network with 12
stations. The network bandwidth is 10Mbps. This network is divided into two
networks, each with 6 stations. Now each of the two networks has a
bandwidth of 10 Mbps. The 10-Mbps bandwidth in each segment is now
shared between 7 stations because the bridge acts as a station in each
segment. In a network with a heavy load, each station theoretically has a
bandwidth of 10/7 Mbps instead of 10/12 Mbps.
Fast Ethernet
In the 1990s, some LAN technologies with transmission rates higher than 10
Mbps, such as FDDI and Fiber Channel, appeared on the market. In this time,
for Standard Ethernet to survive, it had to increase the transmission rate to 100
Mbps. The IEEE 802.3 commi ee developed a set of speci cations called the
Fast Ethernet.
The designers needed to develop Fast Ethernet for providing a low-cost,
Ethernet-compatible LAN operating at 100 Mbps. However, the MAC sublayer
was le unchanged. This meant that, the frame format and size could remain
unchanged.
Note that, the features of the Standard Ethernet that depend on the
transmission rate were access method and physical layer. Therefore, to
increase the transmission rate, the access method and physical layer had to be
redesigned.
Fast Ethernet
1 Access Method
As we discussed in frame size, the correct operation of the CSMA/CD
depends on the minimum size of the frame, the transmission rate, and the
maximum network length.
In fast internet, we want to keep the minimum size of the frame, to increase
the transmission rate to 100 Mbps, therefore, the maximum length of the
network should be changed.
This means that, we want to keep the minimum frame size at 512 bits, that it is
transmi ed 10 times faster, therefore, if the propagation speed does not
change, the collision must be detected 10 times faster. This can be achieved
by reducing the maximum length of the network to one tenth.
Fast Ethernet
1 Access Method
The Fast Ethernet came with two solutions that it can work with either of
them. Both of these solutions dropped the bus topology.
The rst solution was to use a passive hub and star topology. In addition, it
make the maximum size of the network is one tenth of the standard
Ethernet, by using 250 meters instead of 2500 meters. This approach is
kept for compatibility with the Standard Ethernet.
The second solution is based on using a link-layer switch (layer 2 switch)
with a bu er and a full-duplex connection to each host. Using full-duplex
connection makes the transmission medium private for each host. This
means that, the shared medium between link-layer switch and hosts is
changed to many point-to-point media, and then no contention between
sending and receiving in each host. In this solution, as we mentioned, the
hosts are not competing with each other, and then there is no need for
using CSMA/CD. Note that, using the full-duplex connection between link-
layer switch and stations allows the destination address to send a frame to
another station at the same time that it is receiving a frame.
Access Method
To maintain the compatibility, another problem is, in Fast Ethernet, how the
incompatible devices can connect each other. In other words, how a device
with a maximum data rate of 10 Mbps can communicate with a device with a
100 Mbps data rate?
To solve this problem, a new feature added to Fast Ethernet is called auto-
negotiation. It was designed pa icularly to allow incompatible devices to
connect to one another. Auto-negotiation allows a station or a hub to
negotiate a range of capabilities. It allows two devices to negotiate the mode
or data rate of operation. For example, a device with a maximum data rate of
10 Mbps can communicate with a device with a 100 Mbps data rate, but they
can work at a lower rate. Finally, it allows a station to check capabilities of the
hub.
Fast Ethernet
2 Physical Layer
To be able to handle a 100 Mbps data rate, several changes need to be made at
the physical layer. These changes have been done at topology, data encoding/
decoding, and in the physical layer implantations.
Fast Ethernet is designed to connect stations in a star topology with a hub or a
switch at the center. On the other hand, Manchester encoding, which was
used with standard Ethernet, is unsuitable for Fast Ethernet with twisted-pair
cable because it needs a 200-Mbaud bandwidth for a data rate of 100 Mbps.
Hence, the Fast Ethernet designers selected three di erent encoding/
deconding schemes.
The physical layer implementations, in Fast Ethernet, can use either two-wire
or four-wire. Table 3.2 summarizes key characteristics of the physical layer
implementations. The two-wire, also can be called 100BASE-X,
implementation can be either shielded twisted pair (STP), which is called
100Base-TX, or ber-optic cable, which is called 100Base-FX. The four-wire
implementation is designed only for unshielded twisted pair (UTP), which is
called 100Base-T4. 100BASE-X refers to a set of options that use two physical
links between nodes: one for transmission and one for reception. 100BASE-TX
uses shielded twisted pair (STP) or high-quality (Category 5) unshielded
twisted pair (UTP). 100BASE-FX uses optical ber.
Physical Layer
The physical layer implementations, in Fast Ethernet, can use either two-wire
or four-wire. The table below summarizes key characteristics of the physical
layer implementations.
100BASE-X refers to a set of options that use two physical links between
nodes: one for transmission and one for reception. 100BASE-TX uses
shielded twisted pair (STP) or high-quality (Category 5) unshielded twisted
pair (UTP). 100BASE-FX uses optical ber.
The two-wire, also can be called 100BASE-X, implementation can be either
shielded twisted pair (STP), which is called 100Base-TX, or ber-optic cable,
which is called 100Base-FX.
The four-wire implementation is designed only for unshielded twisted pair
(UTP), which is called 100Base-T4.
Physical Layer
Line Coding:
Gigabit Ethernet
In mid 1990s, the IEEE 802.3 commi ee formed a High-Speed Study Group to
investigate means for transmi ing packets in Ethernet format at data rate in
the gigabits per second range. The IEEE commi ee calls it the Standard 802.3z.
While de ning a new medium and transmission speci cation, Gigabit Ethernet
retains the CSMA/CD protocol and Ethernet format of its 10-Mbps and 100-
Mbps predecessors.
The group needed to develop Gigabit Ethernet for providing an Ethernet LAN
operating at 1Gigabit per second (1000Mbps), which is compatible with
10Mbps and 100Mbps Ethernet LANs and retained the MAC sublayer
unchanged. This meant that, the frame format and size could remain
unchanged. In other words, the Gigabit Ethernet aimed to upgrade the data
rate to 1000 Mbps with keeping it compatible with Standard and Fast Ethernet
by using same addressing technique, frame format, frame size limitations, and
suppo s auto-negotiation used in Fast Ethernet.
The gure below shows a typical application of Gigabit Ethernet. A 1-Gbps
switching hub provides backbone connectivity for central servers and high-
speed workgroup hubs. Each workgroup LAN switch suppo s both 1-Gbps
links, to connect to the backbone LAN switch and to suppo high-
pe ormance workgroup servers, and 100-Mbps links, to suppo high-
pe ormance workstations, servers, and 100-Mbps LAN switches.
Gigabit Ethernet
1 MAC Sublayer
The 1000-Mbps speci cation keeps the same CSMA/CD frame format and
MAC protocol as used in the 10-Mbps and 100-Mbps version of IEEE 802.3.
However, to achieve a data rate of 1 Gbps with same standard was no longer
possible. To access a medium, Gigabit Ethernet has two di erent modes: half-
duplex and full-duplex. Almost, all physical layer implementations of Gigabit
Ethernet use the full-duplex mode. Hence, we mostly ignore the half-duplex
mode.
In full-duplex mode, a central switch is used to connect all computers or other
switches. For each input po in full-duplex mode, each switch has bu ers to
store data are until they are transmi ed. However, the switch uses the
destination address of the frame to send a frame out through the po
connected to that pa icular destination. As a result, no collision can occur and
also the CSMA/CD is not used. Due to lack of collision, the maximum length of
the cable, in this mode, is determined by the signal a enuation in the cable,
instead of the collision detection process.
MAC Sublayer
2 Physical Layer
The 1-Gbps speci cation for IEEE 802.3 includes four physical layer
alternatives. Three of them use a two-wire and one uses four-wire
implementation. The two-wire implementations, also can be called 1000BASE-
X, use ber-optic cable (1000Base-SX, sho -wave, or 1000Base-LX, long-
wave), or STP (1000Base-CX). The four-wire version uses category 5 twisted-
pair cable (1000Base-T). This implementation was designed to suppo users
who had already wired by category 5 twisted-pair cable for other purposes
such as Fast Ethernet or telephone services. A summary of the four physical
layer implementations is shown in Table 3.3. Note that, in the table, S-W and
L-W mean sho -wave and long-wave respectively.
Physical Layer
The four physical layer implementation used by 1-Gbps speci cation are
brie y described below.
1000BASE-X: In all of the transmission media speci ed under 100BASE-X, a
1-Gbps is achieved by using two physical links (twisted pair or optical ber)
between nodes: one for transmission and one for reception. A 1000BASE-X
group, which includes 1000Base-SX, 1000Base-LX, and STP 1000Base-CX,
uses two-wire implementations.
1000BASE-SX uses ber-optic cable sho -wavelength option that
suppo s full-duplex links of up to 275 m, using 62.5-μm multimode, or up
to 550 m using 50-μm multimode ber.
1000BASE-LX uses ber-optic cable long-wavelength option, which
suppo s full-duplex links of up to 550 m, using 62.5-μm or 50-μm
multimode ber, or 5000 m of 10-μm single-mode ber.
Physical Layer
1000BASE-CX uses shielded twisted pair (STP) option that suppo s 1-Gbps
links among devices located within a single room or equipment rack, using
copper jumpers, which is a specialized STP cable that spans no more than
25 m. Note that, each link is composed of a separate shielded twisted pair
running in each direction.
The two-wire implementations use an NRZ scheme, but NRZ, which does
not self-synchronize properly. To synchronize bits, pa icularly 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.
1000BASE-T: 1000BASES-T makes use of four pairs of Category 5
unshielded twisted pair (UTP) to suppo devices over a range of up to 100
m. In the four-wire implementation it is not possible to use 2 wires for input
and 2 for output, because each wire could not carry 500 Mbps, which
exceeds the capacity for category 5 UTP. In this case, the solution was to
use 4D-PAM5 encoding to reduce the bandwidth. Thus, all four wires are
used for both input and output. Whit this encoding method, each wire
carries 250 Mbps, which can be handled by category 5 UTP cable. 4D-PAM5
is a complex scheme whose description is beyond our scope.
10 Gigabit
Ethernet
10 Gigabit Ethernet
10 Gigabit Ethernet
The IEEE commi ee created 10 Gigabit Ethernet Standard and called it
802.3ae. Brie y, the goals of the 10 Gigabit Ethernet design include
upgrading the data rate to 10 Gbps, keeping the same frame size and format,
and making the interconnecting LANs, MANs, and WAN possible. Note that,
this data rate can be achieved only with ber-optic technology at this time.
Thus, the standard de nes two types of physical layers: LAN PHY to suppo
existing LANs and WAN PHY, which actually de nes a WAN with links
connected through SONET OC-192.
Initially 10 Gigabit Ethernet can be used by network managers to provide
high-speed, local backbone interconnection between large-capacity
switches. It will be deployed throughout the entire network and will include
server farm, backbone, and campus-wide connectivity as shown in the gure
below. On the other hand, 10 Gigabit Ethernet technologies enable Internet
service providers (ISPs) and network service providers (NSPs) to create very
high-speed links at a low cost, between switches and routers. These
technologies also allow the construction of metropolitan area networks
(MANs) and WANs that connect geographically dispersed LANs between
campuses or points of presence (PoPs). Thus, Ethernet begins to compete
with other wide area transmission and networking technologies such as ATM.
10 Gigabit Ethernet