You are on page 1of 28

COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

UNIT 3
LANs AND NETWORK LAYER

SYLLABUS
Ethernet Protocol, Standard Ethernet: Characteristics, Addressing, Access
Method, Efficiency of Standard Ethernet, Implementation, Changes in the
Standard, Fast Ethernet (100 MBPS): Access Method, Physical Layer, 10
Gigabit Ethernet, Introduction to Network Layer, Networks- Layer Services:
Packetizing, Routing and Forwarding, Packet Switching: Datagram
Approach, Virtual-Circuit Approach, Network Layer Performance: Delay
Throughput, Packet Loss, Congestion Control, IPV4 Addresses.

Ethernet Protocol:
Ethernet is the traditional technology for connecting devices in a wired local
area network (LAN) or wide area network (WAN).
It enables devices to communicate with each other via a protocol, which is a
set of rules or common network language.
The Ethernet LAN was developed in the 1970s by Robert Metcalfe and David
Boggs.
Since then, it has gone through four generations:
1. Standard Ethernet (10 Mbps)
2. Fast Ethernet (100 Mbps)
3. Gigabit Ethernet (1 Gbps)
4. 10 Gigabit Ethernet (10 Gbps), as shown in below diagram.

Standard Ethernet:
A standard Ethernet network can transmit data at a rate up to 10 Megabits
per second (10 Mbps).

Characteristics:
Characteristics of the Standard Ethernet are
1. Connectionless and Unreliable Service
2. Frame Format
3. Frame Length

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.
Ethernet is also unreliable like IP and UDP.

BHAVYA G 1
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

If a frame is corrupted during transmission and the receiver finds 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 find out about it.

2. Frame Format:
The Ethernet frame contains seven fields, as shown in following
diagram.

a. Preamble:
This field contains 7 bytes (56 bits) of alternating 0s and 1s that alert
the receiving system to the coming frame and enable it to
synchronize its clock if it’s out of synchronization.
The pattern provides only an alert and a timing pulse.
The 56-bit pattern allows the stations to miss some bits at the
beginning of the frame.
The preamble is actually added at the physical layer and is not
(formally) part of the frame.

b. 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.
We need to remember that an Ethernet frame is a variable-length
frame.
It needs a flag to define the beginning of the frame.
The SFD field is also added at the physical layer.

c. Destination address (DA)


This field is six bytes (48 bits) and contains the link layer address of
the destination station or stations to receive the packet.
We will discuss addressing shortly.
When the receiver sees 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 the upper layer protocol defined by the value of the type
field.

BHAVYA G 2
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

d. Source address (SA)


This field is also six bytes and contains the link-layer address of the
sender of the packet. We will discuss addressing shortly.
e. 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.
f. Data
This field carries data encapsulated from the upper-layer protocols.
It is a minimum of 46 and a maximum of 1500 bytes.
We discuss the reason for these minimum and maximum values
shortly.
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 padding.
The upper-layer protocol needs to know the length of its data.
For example, a datagram has a field that defines the length of the
data.
g. CRC
The last field contains error detection information, in this case a
CRC-32.
The CRC is calculated over the addresses, types, and data field.
If the receiver calculates the CRC and finds that it is not zero
(corruption in transmission), it discards the frame.

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, as we will see shortly.
An Ethernet frame needs to have a minimum length of 512 bits or
64 bytes.
In 64 bytes 18 bytes occupies the header and trailer part.
In 18 bytes:
1. 6 bytes occupies source address
2. 6 bytes occupies destination address
3. 2 bytes occupies length or type
4. 4 bytes occupies the CRC.
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
make up the difference.

BHAVYA G 3
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

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
length of the payload is 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:
4A:30:10:21:10:1A

Transmission of Address Bits


The way the addresses are sent out online is different from the way they are
written in hexadecimal notation.
The transmission is left to right, byte by byte.
However, for each byte, 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.
Example
Show how the address 47:20:1B:2E:08:EE is sent out online.
Solution
The address is sent left to right, byte by byte; for each byte, it is sent right to
left, bit by bit, as shown below:

Unicast, Multicast, and Broadcast Addresses


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.
Following figure shows how to distinguish a unicast address from a multicast
address.
If the least significant bit of the first byte in a destination address is 0, the
address is unicast; otherwise, it is multicast.
Note that with the way the bits are transmitted, the unicast/multicast bit is the
first bit which is transmitted or received.
The broadcast address is a special case of the multicast address:
The recipients are all the stations on the LAN.
A broadcast destination address is forty-eight 1s.

BHAVYA G 4
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

Example
Define the type of the following destination addresses:
a. 4A:30:10:21:10:1A
b. 47:20:1B:2E:08:EE
c. FF:FF:FF:FF:FF:FF
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:
a. This is a unicast address because A in binary is 1010 (even).
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.

Distinguish Between Unicast, Multicast, and Broadcast Transmission


The actual unicast, multicast, and broadcast transmissions are distinguished
from each other.
The answer is in the way the frames are kept or dropped.
• In a unicast transmission, all stations will receive the frame, the
intended recipient keeps and handles the frame; the rest discard it.
• In a broadcast transmission, all stations (except the sender) will
receive the frame and all stations (except the sender) keep and handle
it.
• In a broadcast transmission, all stations (except the sender) will
receive the frame and all stations (except the sender) keep and handle
it.

Access Method:
Since the network that uses the standard Ethernet protocol is a broadcast
network,
we need to use an access method to control access to the sharing medium.
The standard
Ethernet chose CSMA/CD with 1-persistent method.
Let us use a scenario to see how this method works for the Ethernet protocol.
• Assume station A in Figure 13.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

BHAVYA G 5
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

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.
When station A is sure of this is the subject we discuss next.
• The medium sensing does not stop after station A has started sending
the frame.
Station A 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 and stops sensing the
medium.
Where does the number 512 bits come from?
If we 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 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 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 round trip of 5120 meters.
We should know that if the collision happens in the middle of the
cable, not at the end, station A hears the collision earlier and
aborts the transmission.
We also need to mention another issue. 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 reader should notice that the restriction of 512 bits actually
helps the sending station.
The sending station is certain that no collision will occur if it is
not heard during the first 512 bits, so it can discard the copy of
the frame in its buffer.
b. Station A has sensed a collision before sending 512 bits.

BHAVYA G 6
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

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
buffer for resending when the line becomes available.
However, to inform other stations that there is a collision in the
network, the station sends a 48-bit jam signal.
The jam signal is to create enough signal (even if the collision
happens after a few bits) to alert other stations about the
collision.
After sending the jam signal, the stations need to increment the
value of K (number of attempts).
If after increment K = 15, the experience has shown that the
network is too busy, the station needs to abort its effort and try
again.
If K < 15, the station can wait a backoff time (TB in Figure 12.13)
and restart the process.
As Figure 12.13 shows, 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 = 1) the random number is in the range
(0, 1).
After the second collision (K = 2) it is in 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 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.

Efficiency of Standard Ethernet


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. T
he practical efficiency of standard Ethernet has been measured to be
Efficiency 5 1 / (1 1 6.4 3 a)
in which the parameter “a” is the number of frames that can fit on the
medium.
It can be calculated as a = (propagation delay)/(transmission delay) because
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.
Note that as the value of parameter a 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, a = 0 and the efficiency is 1.

Example

BHAVYA G 7
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

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 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:
The Standard Ethernet defined several implementations, but only four of them
became popular during the 1980s.
Following diagram shows a summary of Standard Ethernet implementations.

summary of Standard Ethernet implementations

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 fibre-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.

Encoding and Decoding


All standard implementations use digital signalling (baseband) at 10 Mbps. At
the sender, data are converted to a digital signal using the Manchester
scheme
At the receiver, the received signal is interpreted as Manchester and
decoded into data.
Manchester encoding is self-synchronous, providing a transition at each
bit interval.
Following diagram shows the encoding scheme for Standard Ethernet.

1. 10Base5: Thick Ethernet

BHAVYA G 8
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

The first implementation is called 10Base5, thick Ethernet, or Thicknet.


The nickname 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 an
external transceiver (transmitter/receiver) connected via a tap to a
thick coaxial cable.
Following diagram shows a schematic diagram of a 10Base5
implementation.

The transceiver is responsible for transmitting, receiving, and


detecting collisions.
The transceiver is connected to the station via a transceiver cable that
provides separate paths for sending and receiving.
This means that collision can only happen in the coaxial cable.
The maximum length of the coaxial cable must not exceed 500 m,
otherwise, there is excessive degradation of the signal.
If a length of more than 500 m is needed, up to five segments, each a
maximum of 500 meters, can be connected using repeaters.

2. 10Base2: Thin Ethernet


The second implementation is called 10Base2, thin Ethernet, or
Cheapernet.
10Base2 also uses a bus topology, but the cable is much thinner and
more flexible.
The cable can be bent to pass very close to the stations.
In this case, the transceiver is normally part of the network interface
card (NIC), which is installed inside the station.
Following diagram shows the schematic diagram of a 10Base2
implementation.

Note that the collision here occurs in the thin coaxial cable. This
implementation is more cost effective 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 is very flexible.
However, the length of each segment cannot exceed 185 m (close to
200 m) due to the high level of attenuation in thin coaxial cable.

3. 10Base-T: Twisted-Pair Ethernet

BHAVYA G 9
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

The third implementation is called 10Base-T or twisted-pair Ethernet.


10Base-T uses a physical star topology.
The stations are connected to a hub via two pairs of twisted cable, as
shown in following diagram.

Note that two pairs of twisted cable create two paths (one for sending
and one for receiving) between the station and the hub.
Any collision here happens in the hub.
Compared to 10Base5 or 10Base2, we can see that the hub actually
replaces the coaxial cable as far as a collision is concerned.
The maximum length of the twisted cable here is defined as 100 m, to
minimize the effect of attenuation in the twisted cable.
4. 10Base-F: Fibre Ethernet
Although there are several types of optical fibre 10-Mbps Ethernet, the
most common is called 10Base-F.
10Base-F uses a star topology to connect stations to a hub. The
stations are connected to the hub using two fibre-optic cables, as
shown in following diagram.

Changes in the Standard:


The 10-Mbps Standard Ethernet has gone through several changes before
moving to the higher data rates.
These changes actually opened the road to the evolution of the Ethernet to
become compatible with other high-data-rate LANs.
1. Bridged Ethernet
The first step in the Ethernet evolution was the division of a LAN by
bridges.
Bridges have two effects on an Ethernet LAN:
They raise the bandwidth and they separate collision domains.
a. Raising the Bandwidth
In an unbridged Ethernet network, the total capacity (10 Mbps) is
shared among all stations with a frame to send.
The stations share the bandwidth of the network.
If only one station has frames to send, it benefits from the total
capacity (10 Mbps).

BHAVYA G 10
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

But if more than one station needs to use the network, the capacity
is shared.
For example, if two stations have a lot of frames to send, they
probably alternate in usage. When one station is sending, the other
one refrains from sending.

A bridge divides the network into two or more networks.


Bandwidth-wise, each network is independent.
A network with 12 stations is divided into two networks, each with 6
stations.
Now each network has a capacity of 10 Mbps.
The 10-Mbps capacity in each segment is now shared between 6
stations (actually 7 because the bridge acts as a station in each
segment), not 12 stations.
In a network with a heavy load, each station theoretically is offered
10/6 Mbps instead of 10/12 Mbps, assuming that the traffic is not
going through the bridge.

b. Separating Collision Domains


Another advantage of a bridge is the separation of the collision
domain.
The collision domain becomes much smaller and the probability of
collision is reduced tremendously.
Without bridging, 12 stations contend for access to the medium; with
bridging only 3 stations contend for access to the medium.

2. Switched Ethernet
The idea of a bridged LAN can be extended to a switched LAN.
Instead of having two to four networks. The bandwidth is shared only
between the station and the switch (5 Mbps each).
In addition, the collision domain is divided into N domains.
A layer 2 switch is an N-port bridge with additional sophistication that
allows faster handling of the packets.
Evolution from a bridged Ethernet to a switched Ethernet was a big step
that opened the way to an even faster Ethernet.

BHAVYA G 11
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

3. Full-Duplex Ethernet
One of the limitations of 10Base5 and l0Base2 is that communication is
half-duplex, a station can either send or receive, but may not do both at
the same time.
The next step in the evolution was to move from switched Ethernet to
full-duplex switched Ethernet.
The full-duplex mode increases the capacity of each domain from 10 to
20 Mbps.

Fast Ethernet (100 MBPS):


Fast Ethernet was designed to compete with LAN protocols such as FDDI or
Fibre Channel. IEEE created Fast Ethernet under the name 802.3u. Fast
Ethernet is backward-compatible with Standard Ethernet, but it can transmit
data 10 times faster at a rate of 100 Mbps. 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.
5. Keep the same minimum and maximum frame lengths.

MAC Sublayer
A main consideration in the evolution of Ethernet from 10 to 100 Mbps was to
keep the MAC sublayer untouched.

BHAVYA G 12
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

However, a decision was made to drop the bus topologies and keep only the
star topology.
For the star topology, there are two choices, as we saw before: half duplex
and full duplex.
In the half-duplex approach, the stations are connected via a hub; in the full-
duplex approach, the connection is made via a switch with buffers at each
port.

Access Method
We remember that the proper operation of the CSMA/CD depends on the
transmission rate, the minimum size of the frame, and the maximum network
length.
If we want to keep the minimum size of the frame, the maximum length of the
network should be changed.
In other words, if the minimum frame size is still 512 bits, and it is transmitted
10 times faster, the collision needs to be detected 10 times sooner, which
means the maximum length of the network should be 10 times shorter (the
propagation speed does not change).
So, the Fast Ethernet came with two solutions (it can work with either choice):
1. The first solution was to totally drop the bus topology and use a passive
hub and star topology but make the maximum size of the network 250
meters instead of 2500 meters as in the Standard Ethernet.
This approach is kept for compatibility with the 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 host. In this case, there is no
need for CSMA/CD because the hosts are not competing 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 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 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.
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.

Physical Layer:
Fast Ethernet implementation at the physical layer can be categorized as
either two-wire or four-wire.
The two-wire implementation can be either category 5 UTP (100 Base-TX) or
fibre-optic cable (100Base-FX).

BHAVYA G 13
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

The four-wire implementation is designed only for category 3 UTP (l00Base-


T4).

Encoding
Manchester encoding needs a 200-Mbaud bandwidth for a data rate of 100
Mbps, which makes it unsuitable for a medium such as twisted-pair cable.
For this reason, the Fast Ethernet designers sought some alternative
encoding/decoding scheme.
However, it was found that one scheme would not perform equally well for all
three implementations.

1. 100 Base-TX
Uses two pairs of twisted-pair cable (either category 5 UTP or STP).
For this implementation, the MLT-3 scheme was selected since it has
good bandwidth performance.
However, since MLT-3 is not a self-synchronous line coding scheme,
4B/5B block coding is used to provide bit synchronization by
preventing the occurrence of a long sequence of 0s and 1s.
This creates a data rate of 125 Mbps, which is fed into MLT-3 for
encoding.

2. 100 Base-FX
Uses two pairs of fibre-optic cables. Optical fibre can easily handle
high bandwidth requirements by using simple encoding schemes.
The designers of 100Base-FX selected the NRZ-I encoding scheme for
this implementation.
However, NRZ-I has a bit synchronization problem for long sequences
of 0s.

BHAVYA G 14
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

3. A 100 Base-TX
This network can provide a data rate of 100 Mbps, but it requires the
use of category 5 UTP or STP cable.
This is not cost-efficient for buildings that have already been wired for
voice-grade twisted-pair (category 3).
A new standard, called 100Base-T4 was designed to use category 3 or
higher UTP.

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 fibre-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 contention.
CSMA/CD is not used in 10 Gigabit Ethernet.
Four implementations are the most common:
1. 10GBase-SR
2. 10GBase-LR
3. 10GBase-EW
4. 10GBase-X4.
Following diagram shows a summary of the 10 Gigabit Ethernet
implementations.

Introduction to Network Layer:


The network layer in the TCP/IP protocol suite is responsible for the host-to-
host delivery of datagrams.
It provides services to the transport layer and receives services from the
data-link layer.
• The Network Layer is the third layer of the OSI model.
• It handles the service requests from the transport layer and further
forwards the service request to the data link layer.

BHAVYA G 15
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

• The network layer translates the logical addresses into physical


addresses.
• It determines the route from the source to the destination and also
manages the traffic problems such as switching, routing and controls
the congestion of data packets.
• The main role of the network layer is to move the packets from sending
host to the receiving host.

Network-Layer Services:
The network-layer services that, in general, are expected from a network-
layer protocol.
The services of the network layer are:
1. Packetizing
2. Routing and Forwarding
3. Other Services
a. Error Control
b. Flow Control
c. Congestion Control

Packetizing:
• The process of encapsulating the data received from upper layers of
the network (also called as payload) in a network layer packet at the
source and decapsulating the payload from the network layer packet
at the destination is known as packetizing.
• The source host adds a header that contains the source and
destination address and some other relevant information required by
the network layer protocol to the payload received from the upper
layer protocol, and delivers the packet to the data link layer.
• The destination host receives the network layer packet from its data
link layer, decapsulates the packet, and delivers the payload to the
corresponding upper layer protocol.
• The routers in the path are not allowed to change either the source or
the destination address.
• The routers in the path are not allowed to decapsulate the packets
they receive unless they need to be fragmented.

Routing and Forwarding:


These are two other services offered by the network layer.
In a network, there are a number of routes available from the source to the
destination.
The network layer specifies has some strategies which find out the best
possible route. This process is referred to as routing.
There are a number of routing protocols which are used in this process and
they should be run to help the routers coordinate with each other and help
in establishing communication throughout the network.
Forwarding is simply defined as the action applied by each router when a
packet arrives at one of its interfaces.

BHAVYA G 16
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

When a router receives a packet from one of its attached networks, it needs
to forward the packet to another attached network (unicast routing) or to
some attached networks (in case of multicast routing).

Some of the other services which are expected from the network layer are:
1. Error Control
Although it can be implemented in the network layer, but it is usually
not preferred because the data packet in a network layer maybe
fragmented at each router, which makes error checking inefficient in
the network layer.

2. Flow Control
It regulates the amount of data a source can send without overloading
the receiver.
If the source produces a data at a very faster rate than the receiver
can consume it, the receiver will be overloaded with data.
To control the flow of data, the receiver should send feedback to the
sender to inform the latter that it is overloaded with data.
There is a lack of flow control in the design of the network layer.
It does not directly provide any flow control. The datagrams are sent
by the sender when they are ready, without any attention to the
readiness of the receiver.

3. Congestion Control
Congestion occurs when the number of datagrams sent by source is
beyond the capacity of network or routers.
This is another issue in the network layer protocol.
If congestion continues, sometimes a situation may arrive where the
system collapses and no datagrams are delivered.
Although congestion control is indirectly implemented in network
layer, but still there is a lack of congestion control in the network
layer.

Packet Switching:
Packet switching is a connectionless network switching technique.
Here, the message is divided and grouped into a number of units called
packets that are individually routed from the source to the destination.
There is no need to establish a dedicated circuit for communication.
packet-switched network can use two different approaches to route the
packets
1. The datagram approach
2. The virtual circuit approach

Datagram Approach (Connection-Less Services):


In this approach, the packets in a message may or may not travel the same
path to their destination. Following diagram shows the idea.
When the network layer provides a connectionless service, each packet
traveling in the Internet is an independent entity.
There is no relationship between packets belonging to the same message.
The switches in this type of network are called routers.

BHAVYA G 17
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

A packet belonging to a message may be followed by a packet belonging to


the same message or to a different message.
A packet may be followed by a packet coming from the same or from a
different source.

Each packet is routed based on the information contained in its header:


source and destination addresses.
The destination address defines where it should go; the source address
defines where it comes from.
The router in this case routes the packet based only on the destination
address.
The source address may be used to send an error message to the source if
the packet is discarded.
Following diagram shows the forwardin
g process in a router in this case. We have used symbolic addresses such as
A and B.

In the datagram approach, the forwarding decision is based on the


destination address of the packet.

Virtual-Circuit Approach (Connection Oriented Services):


In a connection-oriented service (also called virtual-circuit approach), there
is a relationship between all packets belonging to a message.
Before all datagrams in a message can be sent, a virtual connection should
be set up to define the path for the datagrams.
After connection setup, the datagrams can all follow the same path.

BHAVYA G 18
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

In this type of service, not only must the packet contain the source and
destination addresses, it must also contain a flow label, a virtual circuit
identifier that defines the virtual path the packet should follow.

Each packet is forwarded based on the label in the packet.


To follow the idea of connection-oriented design to be used in the Internet.
We assume that the packet has a label when it reaches the router.
In this case, the forwarding decision is based on the value of the label, or
virtual circuit identifier, as it is sometimes called.
To create a connection-oriented service, a three-phase process is used:
1. Setup
2. Data transfer
3. Teardown.
In the setup phase, the source and destination address of the sender and
receiver are used to make table entries for the connection-oriented service.
In the teardown phase, the source and destination inform the router to delete
the corresponding entries.
Data transfer occurs between these two phases.

1. Setup:
In the setup phase, a router creates an entry for a virtual circuit.
For example, suppose source A needs to create a virtual circuit to
destination B.
Two auxiliary packets need to be exchanged between the sender and
the receiver
a. Request packet.
b. Acknowledgment packet.
a. Request Packet
A request packet is sent from the source to the destination.
This auxiliary packet carries the source and destination addresses.
b. Acknowledgement Packet
A special packet, called the acknowledgment packet, completes the
entries in the switching tables.

BHAVYA G 19
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

2. Data Transfer:
The second phase is called the data-transfer phase.
After all routers have created their forwarding table for a specific
virtual circuit, then the network-layer packets belonging to one
message can be sent one after another.

3. Teardown Phase:
In the teardown phase, source A, after sending all packets to B, sends
a special packet called a teardown packet.
Destination B responds with a confirmation packet.
All routers delete the corresponding entries from their tables.

Network Layer Performance:


The upper-layer protocols that use the service of the network layer expect to
receive an ideal service, but the network layer is not perfect.
The performance of a network can be measured in terms of
1. Delay
2. Throughput
3. Packet loss
4. Congestion control
Is an issue that can improve the performance.

Delay:
All of us expect instantaneous response from a network, but a packet, from
its source to its destination, encounters delays.
The delays in a network can be divided into four types
a. Transmission delay
b. Propagation delay
c. Processing delay
d. Queuing delay
e. Total delay
Let us first discuss each of these delay types and then show how to
calculate a packet delay from the source to the destination.

a. Transmission Delay
A source host or a router cannot send a packet instantaneously.
A sender needs to put the bits in a packet on the line one by one.
If the first bit of the packet is put on the line at time t1 and the last bit is
put on the line at time t2, transmission delay of the packet is (t2 − t1).
Definitely, the transmission delay is longer for a longer packet and
shorter if the sender can transmit faster.
In other words, the transmission delay is
Delaytr = (Packet length) / (Transmission rate)
For example, in a Fast Ethernet LAN (see Chapter 13) with the
transmission rate of 100 million bits per second and a packet of 10,000
bits, it takes (10,000) / (100,000,000) or 100 microseconds for all bits of
the packet to be put on the line.

BHAVYA G 20
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

b. Propagation Delay
Propagation delay is the time it takes for a bit to travel from point
A to point B in the transmission media.
The propagation delay for a packet-switched network depends on the
propagation delay of each network (LAN or WAN).
The propagation delay depends on the propagation speed of the media,
which is 3 × 108 meters/second in a vacuum and normally much less in
a wired medium.
It also depends on the distance of the link.
In other words, propagation delay is
Delaypg = (Distance) / (Propagation speed)

c. Processing Delay
The processing delay is the time required for a router or destination
host to receive a packet from its input port, remove the header,
perform an error detection procedure, and deliver the packet to the
output port (in the case of a router) or deliver the packet to the
upper-layer protocol (in the case of the destination host).
The processing delay may be different for each packet, but normally is
calculated as an average.
Delaypr = Time required to process a packet in a router or a
destination host
d. Queuing Delay
Queuing delay can normally happen in a router.
As we discuss in the next section, a router has an input queue
connected to each of its input ports to store packets waiting to
be processed.
The router also has an output queue connected to each of its output
ports to store packets waiting to be transmitted.
The queuing delay for a packet in a router is measured as the time a
packet waits in the input queue and output queue of a router.
We can compare the situation with a busy airport.
Some planes may need to wait to get the landing band (input delay).
Some planes may need to wait to get the departure band (output delay).
Delayqu = The time a packet waits in input and output queues in a
router
e. Total Delay
Assuming equal delays for the sender, routers, and receiver, the total
delay (source-to-destination delay) a packet encounters can be
calculated if we know the number of routers, n, in the whole path.
Total delay = (n + 1) (Delaytr + Delaypg + Delaypr) + (n) (Delayqu)

Throughput:
Throughput at any point in a network is defined as the number of bits passing
through the point in a second, which is actually the transmission rate of data
at that point.

BHAVYA G 21
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

In a path from source to destination, a packet may pass through several links
(networks), each with a different transmission rate. How, then, can we
determine the throughput of the whole path?
To see the situation, assume that we have three links, each with a different
transmission rate, as shown in following diagram.

In this figure, the data can flow at the rate of 200 kbps in Link1. However,
when the data arrives at router R1, it cannot pass at this rate. Data needs to
be queued at the router and sent at 100 kbps.
When data arrives at router R2, it could be sent at the rate of 150 kbps, but
there is not enough data to be sent. In other words, the average rate of the
data flow in Link3 is also 100 kbps.
We can conclude that the average data rate for this path is 100 kbps, the
minimum of the three different data rates.
The figure also shows that we can simulate the behaviour of each link with
pipes of different size.
The average throughput is determined by the bottleneck, the pipe with the
smallest diameter.
In general, in a path with n links in series, we have
Throughput = minimum {TR1, TR2, . . . TRn}

Packet Loss:
Another issue that severely affects the performance of communication is the
number of packets lost during transmission.
When a router receives a packet while processing another packet, the
received packet needs to be stored in the input buffer waiting for its turn.
A router, however, has an input buffer with a limited size.
A time may come when the buffer is full and the next packet needs to be
dropped.
The effect of packet loss on the Internet network layer is that the packet
needs to be resent, which in turn may create overflow and cause more packet
loss.
A lot of theoretical studies have been done in queuing theory to prevent the
overflow of queues and prevent packet loss.

Congestion Control:
Congestion control is a mechanism for improving performance.
Congestion at the network layer is not explicitly addressed in the Internet
model, the study of congestion at this layer may help us to better understand
the cause of congestion at the transport layer and find possible remedies to
be used at the network layer.

BHAVYA G 22
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

Congestion at the network layer is related to two issues, throughput and


delay, which we discussed in the previous section.
Following diagram shows these two performance measures as functions of
load.
When the load is much less than the capacity of the network, the delay is at a
minimum.
This minimum delay is composed of propagation delay and processing delay,
both of which are negligible.
However, when the load reaches the network capacity, the delay increases
sharply because we now need to add the queuing delay to the total delay.
Note that the delay becomes infinite when the load is greater than the
capacity.
When the load is below the capacity of the network, the throughput increases
proportionally with the load.
We expect the throughput to remain constant after the load reaches the
capacity, but instead the throughput declines sharply.
The reason is the discarding of packets by the routers.
When the load exceeds the capacity, the queues become full and the routers
have to discard some packets.
Discarding packets does not reduce the number of packets in the network
because the sources retransmit the packets, using time-out mechanisms,
when the packets do not reach the destinations.

In general, we can divide congestion control mechanisms into two broad


categories:
1. Open-loop congestion control (prevention)
2. Closed-loop congestion control (removal)

1. Open-Loop Congestion (Prevention)


In open-loop congestion control, policies are applied to prevent
congestion before it happens.
In these mechanisms, congestion control is handled by either the
source or the destination.
We give a brief list of policies that can prevent congestion.
a. Retransmission Policy
b. Window Policy
c. Acknowledgement Policy
d. Discarding Policy
e. Admission Policy
2. Close-Loop Congestion (Removal)
Closed-loop congestion control mechanisms try to alleviate congestion
after it happens.

BHAVYA G 23
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

Several mechanisms have been used by different protocols, few of


them are listed here
a. Backpressure
b. Choke Packet
c. Implicit Signalling
d. Explicit Signalling

IP Address
IP address stands for “Internet Protocol”, it is a unique identification number
provided to each and every device.
Device may be like desktop or laptop or mobile etc.
It is in the form of integer number which is separated by dot (.)

There are two types of IP address versions:


• IPv4
• IPv6

IPV4 Address
IPv4 is a version 4 of IP. It is a most commonly used IP address.
Total length of IPv4 is 32 bits.
All 32 bits are divided into 4 octets or parts.
Each octet will have 8 bits and each octet will be separated by Dot.
Each number in an octet is in the range from 0 to 255.
The IPv4 consists of four sets, and these sets represent the octet.
The total 2 32 IP addresses are going to be generated in this.

Address Format of IPv4

IPv4 address is divided into two parts:


• Network ID
• Host Id

Classes of IP Address
• Class A
• Class B
• Class C
• Class D
• Class E

BHAVYA G 24
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

• Class A

Total length of this class “A” in IPV4 is 32 bits.


Out of these 32 bits, the first octet means first 8 bits are represented by
“Network ID” and the next 3 octets means next 24 bits are represented by
“Host ID”.
In class A the leading bit only one bit that is Zero (0).
First octet first becomes zero only.
Range of class A is 0 to 127.
Starting No : 00000000. 00000000. 00000000. 00000000 = 0
Ending No : 01111111. 00000000. 00000000. 00000000 = 127

BHAVYA G 25
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

In Class A, the first bit in first octet is set to 0 and the remaining 7 bits
determine the network ID.
The 24 bits determine the host ID in any network.

The total number of networks in Class A = 27 (128) network address


The total number of hosts in Class A = 224 host address

• Class B

Total length of this class “B” in IPV4 is 32 bits.


Out of these 32 bits, the first 2 octets means first 16 bits are
represented by “Network ID” and the next 2 octets means next 16 bits
are represented by “Host ID”.
In class B the leading bits are 2 bits they are 10.
First octet first 2 bits becomes 10 only.
Range of class A is 128 to 191.
Starting No : 10000000. 00000000. 00000000. 00000000 = 128
Ending No : 10111111. 00000000. 00000000. 00000000 = 191
In Class B, the first 2 bits in first octet is set to 10 and the remaining 14
bits determine the network ID.
The 16 bits determine the host ID.

The total number of networks in Class B = 214 network address


The total number of hosts in Class B = 216 host address

• Class c

Total length of this class “C” in IPV4 is 32 bits.


Out of these 32 bits, the first 3 octets means first 24 bits are
represented by “Network ID” and the last octets means last 8 bits are
represented by “Host ID”.
In class C the leading bits are 3 bits they are 110.

BHAVYA G 26
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

First octet first 3 bits becomes 110.


Range of class A is 192 to 223.
Starting No : 11000000. 00000000. 00000000. 00000000 = 192
Ending No : 11011111. 00000000. 00000000. 00000000 = 223
In Class C, the first 3 bits in first octet is set to 110 and the remaining 21
bits determine the network ID. The 8 bits of the host ID determine the
host in a network.

The total number of networks = 221 network address


The total number of hosts = 28 host address

• Class D
Total length of this class “D” in IPV4 is 32 bits.
In Class D, an IP address is reserved for multicast addresses.
It does not possess sub networking.
In class C the leading bits are 4 bits they are 1110.
First octet is always set to 1110, and the remaining bits determine the
host ID in any network.

• Class E
Total length of this class “E” in IPV4 is 32 bits.
In Class E, an IP address is reserved for the research and
developments.
It does not possess sub networking.
In class E the leading bits are 4 bits they are 1111.
First octet first 4 bits are always set to 1111, and the remaining bits
determines the host ID in any network.

BHAVYA G 27
COMPUTER NETWORKS JSS COLLEGE OF ARTS, COMMERECE AND SCIENCE

Drawback of IPv4
Currently, every user is having more than one device connected with the
internet.
As we know that IPv4 produces 4 billion addresses, which are not enough for
each device connected to the internet.
This is in sufficient, so it gave rise to the development of the next generation
of IP addresses, i.e., IPv6.

IPv6:
• IPv4 is a version 6 of IP. It is a most recently used IP address.
• Total length of IPV6 is 128 bits.
• All 128 bits are divided into 8 octets or parts.
• Each octet will have 16 bits and each octet will be separated by Dot.
• Each number in an octet is in the range from 0 to FFFF.
• The total 2128 IP addresses are going to be generated in this.

Address Format of IPv6

BHAVYA G 28

You might also like