0% found this document useful (0 votes)
31 views53 pages

Network Layer PDF

The document discusses several key topics related to network layer design: 1. It describes store-and-forward packet switching and how packets are routed independently through the network. 2. It explains the services provided by the network layer to the transport layer, including using a uniform addressing plan. 3. It compares connectionless and connection-oriented implementations, how datagrams and virtual circuits establish paths for packets. 4. It discusses routing algorithms, both static and adaptive, and concepts like shortest path routing using Dijkstra's algorithm. Flooding is also summarized as a basic routing technique.

Uploaded by

Aravinda A Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views53 pages

Network Layer PDF

The document discusses several key topics related to network layer design: 1. It describes store-and-forward packet switching and how packets are routed independently through the network. 2. It explains the services provided by the network layer to the transport layer, including using a uniform addressing plan. 3. It compares connectionless and connection-oriented implementations, how datagrams and virtual circuits establish paths for packets. 4. It discusses routing algorithms, both static and adaptive, and concepts like shortest path routing using Dijkstra's algorithm. Flooding is also summarized as a basic routing technique.

Uploaded by

Aravinda A Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

NETWORK LAYER

NETWORK LAYER DESIGN ISSUES

• Store-and-Forward Packet Switching


• Services Provided to the Transport Layer
• Implementation of Connectionless Service
• Implementation of Connection-Oriented Service
• Comparison of Virtual-Circuit and Datagram Subnets
Store-and-Forward Packet Switching

The Major Components of N/W layer are


the ISP’s equipment (routers connected by
transmission lines), and the customers’
equipment, Host.

‘A’ is ISP’s Router and ‘F’ is customer router


and connected to ISP’s router
Packet Switching uses Store and Forward technique
while switching the packets; while forwarding the packet
each hop first store that packet then forward. Each pair of
source and destination may have more than one
route. Each packet contains Source and destination address
using which they independently travel through the
network.
Services Provided to the Transport Layer
The network layer provides services to the transport layer at the network layer/transport layer
interface and need to be carefully designed with the following goals in mind:

1. The services should be independent of the router technology.


2. The transport layer should be shielded from the number, type, and topology of the
routers present.
3. The network addresses made available to the transport layer should use a uniform
numbering plan, even across LANs and WANs.
Implementation of Connectionless Service
• Packets are injected into the network individually and
routed independently of each other. No advanced
setup is required.
• Packets are frequently called datagrams and the
network is called a datagram network

• Process P1 in Figure has a long message for P2. It


hands the message to the transport layer, with
instructions to deliver it to process P2 on host H2.
At A, packets 1, 2, and 3 are stored , having arrived on the incoming link and had
their checksums verified. Then each packet is forwarded according to A’s table,
onto the outgoing link to C within a new frame. Packet 1 is then forwarded to E
and then to F. When it gets to F, it is sent within a frame over the LAN to H2.
Packets 2 and 3 follow the same route. However, something different happens to
packet 4. When it gets to A it is sent to router B, even though it is also destined for
F. The algorithm that manages the tables and makes the routing decisions is called
Routing within a diagram subnet.
the Routing Algorithm.
Implementation of Connection-Oriented Service
In connection-oriented service, a path will be established
from the source router all the way to the destination router
before any data packets can be sent. This connection is
called a VC (virtual circuit), and the network is called a
Virtual-circuit Network.

Host H1 has established connection 1 with host H2. This


connection is remembered as the first entry in each of the
routing tables.
If H3 also wants to establish a connection to H2. It chooses
connection identifier 1 because A can easily distinguish
connection 1 packets from H1 from connection 1 packets
from H3, C cannot do this. So A assigns a different
connection identifier to the outgoing traffic for the second
Routing within a virtual-circuit subnet. connection.
Comparison of Virtual-Circuit and Datagram Subnets
Routing Algorithm
• The part of the network layer software responsible for deciding which output line an incoming packet
should be transmitted on is called Routing Algorithm
• If the network uses datagrams internally, a new decision must be made for every arriving data packet.
• If the network uses virtual circuits internally, routing decisions are made only when a new virtual
circuit is being set up and all packets just follow the same path. It is sometimes called Session
Routing.
• Regardless of datagram or virtual circuit some properties are desirable in a routing algorithm:
Correctness, Simplicity, Robustness, Stability, Fairness, and Efficiency.
• Robustness: Once a major network comes on the air, it may be expected to run continuously for years
without system-wide failures, in spite of change of topology due to repeated failure of Hosts, routers,
and lines.
• Stability: Routing algorithms that never converge to a fixed set of paths, It should converge quickly
too, since communication may be disrupted until the routing algorithm has reached equilibrium.

Fairness & Efficiency:


Evidently, some compromise between
global efficiency and fairness to
individual connections is needed
Routing Types
Non-adaptive Routing:
• Also called Static Routing, routing decisions are not made based on network traffic
and topology.
• The choice of the route between source and destination is computed in advance,
offline, and downloaded to the routers when the network is booted.
• Non-adaptive routing algorithms are simple as compared to Adaptive routing
algorithm in terms of complexity. Example Flooding
Adaptive Routing:
• Also called Dynamic routing, change their routing decisions to reflect changes in
the topology, and traffic.
• In adaptive routing algorithms distance, hop, estimated transit time and count,
parameters are used find the best path.

Optimality Principle (Bellman)


It states that if router J is on the optimal path from router I to router K, then the
optimal path from J to K also falls along the same route.
Shortest Path Routing
• It is a Static routing algorithm.
• Build a graph of the network, with each node of the graph representing a router and
each edge of the graph representing a communication line, or link.
• The parameters for measuring path length is the number of hops, distance, avg., traffic,
bandwidth, delay.
• Dijkstra algorithm (1959) is one which finds the shortest paths between a source and
destination.
• The Dijkstra algorithm creates a shortest path tree from a graph. The algorithm divides
the nodes into two sets: tentative and permanent. It finds the neighbors of a current
node, makes them tentative, examines them, and if they have low cost, makes them
permanent.
Shortest Path Routing (Cont.,)

Step 1 Step 2 Step 3


Tentative nodes directly linked to
working node A are (B, C), since B has Tentative nodes that have a direct link to working-
less weight, it has been chosen as node B are (D, E), since D has less weight, it has
Working -node and its label has changed been chosen as working -node and its label has
changed to permanent.
to permanent

Step 4
we don't have any tentative nodes, so we So the best route is ABDE. In this case, the total weigh is 4 (1+2+1).
just identify the next T-node. Since E has
the least weight, it has been chosen as T-
node
Shortest Path Routing Example
FLOODING
• Routing decision will be made based on the local knowledge, not on the complete
topology of the network.
• Every incoming packet is sent out on every outgoing line except the one it arrived on.
• Generates huge numbers of duplicate packets.
• Header of each packet will have a hop counter that is decremented at each hop, with
the packet being discarded when the counter reaches zero.

• Ideally, the hop counter should be initialized to the length of the path from source to
destination. If the sender does not know how long the path is, it can initialize the
counter to the worst case, with the full diameter of the network, but still flooding
generates duplicate packets..

• For avoiding the flood the better way is to have sources router to put sequence
number and the flooding routers keep track of which packets have been flooded, to
avoid sending them out a second time.
Dynamic Routing Algorithms

• Dynamic routing algorithms are more complex, but more efficient because they find
shortest paths for the current topology.

• The popular dynamic algorithms are Distance Vector Routing and Link State Routing.

• DVR maintains a table (i.e., a vector) at every router with two parts: preferred outgoing
line for destination and an estimate of the distance to that destination.

• Tables are updated by exchanging information with the neighbors.

• DVR is also called as distributed Bellman-Ford routing algorithm.


Distance Vector Routing
Step-01: Each router prepares its routing table using its local knowledge.
Step-02: Each router exchanges its distance vector obtained in Step-01 with its neighbors.
After exchanging the distance vectors, each router prepares a new routing table with low cost.
Step-03: Each router exchanges its distance vector obtained in Step-02 with its neighboring routers.
After exchanging the distance vectors, each router prepares a new routing table.
Note :The algorithm keeps on repeating periodically and never stops.
• Update the shortest path in case any link goes down or topology changes or periodically
• Routing tables are prepared total (n-1) times if there are n routers in the given network, because
shortest path between any 2 nodes contains at most n-1 edges if there are n nodes in the graph.
• Distance Vector Routing suffers from count to infinity problem.
• Distance Vector Routing uses UDP at transport layer.
Distance Vector Routing Example
Step-01: Each router prepares its routing table using its local knowledge.

Destination Distance Next Hop Destination Distance Next Hop

A 0 A A 2 A

B 2 B B 0 B

C ∞ – C 3 C

D 1 D D 7 D
Routing table of A Routing table of B

Destination Distance Next Hop Destination Distance Next Hop

A ∞ – A 1 A
B 3 B B 7 B
C 0 C C 11 C
D 11 D D 0 D
Routing table of C Routing table of D
Distance Vector Routing Example
Step-02:
•Each router exchanges its distance vector obtained in Step-01 with its neighbors.
•After exchanging the distance vectors, each router prepares a new routing table.
Cost(src,dst)=min{cost(src, adjc-1)+(adjc-1, dst), cost(src, adjc-2)+(adjc-2, dest), cost(src, adjc-N)+ adjc-N, dest) }

Cost A B =min { (A-B)+(B-B), (A-D)+(D-B)} = min { 2+0 , 1+7 } = 2 via B.


Cost A C =min{ (A-B)+(B-C), (A-D)+(D-C)} = min { 2+3 , 1+11 } = 5 via B.
Cost A D = min{(A-B)+(B-D), (A-D)+(D-D)}= min { 2+7 , 1+0 } = 1 via D.
New routing table at A

Destination Distance Next Hop

A 0 A
B 2 B
@router A:
C 5 B
Router A receives distance vectors from its neighbors B and D.
Router A prepares a new routing table as- D 1 D
Distance Vector Routing Example

@router B:
Router B receives distance vectors from its neighbors A, C and D.

•Cost B A= min{(B-A)+(A-A), (B-C)+(C-A), (B-D)+(D-A)}=min { 2+0 , 3+∞ , 7+1 } = 2 via A.


•Cost B C = min {(B-A)+(A-C), (B-C)+(C-C), (B-D)+(D-C)}=min { 2+∞ , 3+0 , 7+11 } = 3 via C.
•Cost B D= min {(B-A)+(A-D), (B-C)+(C-D), (B-D)+(D-D)}=min { 2+1 , 3+11 , 7+0 } = 3 via A.
New routing table at B
Destination Distance Next Hop

A 2 A
B 0 B
C 3 C
D 3 A
@router C:

Router C receives distance vectors from its neighbors B and D.

Cost of C A= min {(C-B)+(B-A), (C-D)+(D-A)}= min { 3+2 , 11+1 } = 5 via B.


Cost of C B = min {(C-B)+(B-B), (C-D)+(D-B)}= min { 3+0 , 11+7 } = 3 via B.
Cost of C D= min {(C-B)+(B-D), (C-D)+(D-D)} =min { 3+7 , 11+0 } = 10 via B.

New routing table at C


Destination Distance Next Hop

A 5 B
B 3 B
C 0 C
D 10 B
Distance Vector Routing Example
@router D:
Router D receives distance vectors from its neighbors A, B and C.

•Cost of D A= min{(D-A)+(A-A), (D-B)+(B-A), (D-C)+(C-A)=min { 1+0 , 7+2 , 11+∞ } = 1 via A.


•Cost of D B = min{(D-A)+(A-B), (D-B)+(B-B), (D-C)+(C-B)= min { 1+2 , 7+0 , 11+3 } = 3 via A.
•Cost of D C= min{(D-A)+(A-C), (D-B)+(B-C), (D-C)+(C-C)= min { 1+∞ , 7+3 , 11+0 } = 10 via B.
New routing table at D
Destination Distance Next Hop

A 1 A
B 3 A
C 10 B
D 0 D
Distance Vector Routing Example
Step-03:
Each router exchanges its distance vector obtained in Step-02 with its neighboring routers.
After exchanging the distance vectors, each router prepares a new routing table.
Destin Dista Next
@ Router A: ation nce Hop
•Cost of A to B = min { 2+0 , 1+3 } = 2 via B.
•Cost of A to C = min { 2+3 , 1+10 } = 5 via B. A 0 A
•Cost of A to D = min { 2+3 , 1+0 } = 1 via D. B 2 B

C 5 B
@ Router B:
•Cost of B to A = min { 2+0 , 3+5 , 3+1 } = 2 via A. D 1 D
•Cost of B to C = min { 2+5 , 3+0 , 3+10 } = 3 via C.
•Cost of B to D = min { 2+1 , 3+10 , 3+0 } = 3 via A.

Destination Distance Next Hop

A 2 A

B 0 B

C 3 C

D 3 A
Destinatio
@ Router C: Distance Next Hop
n
•Cost of C to A = min { 3+2 , 10+1 } = 5 via B.
•Cost of C to B = min { 3+0 , 10+3 } = 3 via B. A 5 B
•Cost of C to D = min { 3+3 , 10+0 } = 6 via B.
B 3 B

C 0 C

@ Router D: D 6 B
•Cost of reaching destination A from router D = min { 1+0 , 3+2 , 10+5 } = 1 via A.
•Cost of reaching destination B from router D = min { 1+2 , 3+0 , 10+3 } = 3 via A.
•Cost of reaching destination C from router D = min { 1+5 , 3+3 , 10+0 } = 6 via A.
Destination Distance Next Hop

A 1 A

B 3 A

C 6 A

D 0 D
The Count-to-Infinity Problem
• DVR reacts rapidly to good news, but leisurely to bad news
• Routing loops during the time between when the first router realizes a route has failed
until all the routers know that the route has failed. Without the loop-prevention
mechanisms, distance vector protocols can experience a problem called counting to
infinity.
• Routing loops usually occur when any interface goes down

Here each router, will have entries for each other. B will know that it can get to C at a
cost of 1, and A will know that it can get to C via B at a cost of 2.
If the link between B and C is disconnected, then B will know that it can no longer get
to C via that link and will remove it from it’s table. Before it can send any updates it’s
possible that it will receive an update from A which will be advertising that it can get
to C at a cost of 2. B can get to A at a cost of 1, so it will update a route to C via A at a
cost of 3. A will then receive updates from B later and update its cost to 4. They will
then go on feeding each other bad information toward infinity which is called
as Count to Infinity problem.
Link State Routing Algorithm

It is intra-domain routing protocol , the implementation of Link state is Open Shortest Path First (OSPF)
Link State has FIVE steps
1. Discover its neighbors and learn their network addresses.
2. Set the distance or cost metric to each of its neighbors.
3. Construct a packet telling all it has just learned.
4. Send this packet to and receive packets from all other routers.
5. Compute the shortest path to every other router.

Learning about the Neighbors


Every router on booting sends special HELLO packet on each point-to-point line, the receiving router send back
a reply giving its name.
Setting Link Costs:
The cost to reach neighbors can be set automatically, or configured by the network operator. Cost may be based
on the Band width like 1-Gbps Ethernet may have a cost of 1 and 100-Mbps Ethernet a cost of 10, or based on
the delay of the link between the routers.
Link State Routing Algorithm (Contd.,)

Building Link State Packets:


• Once the information needed for the exchange has been collected, each router builds a packet containing
all the datails like Sender Identity, Sequence number, Age and List of neighbors with cost.
• Link state packets are build at regular intervals or at the occurrence of some events like neighbor going
down or coming back up again or changing its properties appreciably

(a) A subnet. (b) The link state packets for this subnet.
Link State Routing Algorithm (Contd.,)
Distributing the Link State Packets:
• In this part all the routers gets LSP quickly and reliably
• Uses flooding to distribute the link state packets to all routers
• To keep the flood in check, each packet contains a sequence number that is incremented for each
new packet sent.
• Every Routers keep track of all the (source router, sequence) pairs they received. If new LSP
comes in it is checked against already received , If it is new, it is forwarded on all lines except the
one it arrived on otherwise discarded if duplicate.
• If a packet with a sequence number lower than the highest one seen so far ever arrives, it is
rejected as being obsolete as the router has more recent data.
Problems of LSP:
• First, if the sequence numbers wrap around, confusion will reign. The solution here is to use a 32-
bit sequence number.
Computing the New Routes:
• Dijkstra’s algorithm can be run locally to construct the shortest paths to all possible destinations . The
results of this algorithm tell the router which link to use to reach each destination. This information is
installed in the routing tables, and normal operation is resumed
Hierarchical Routing

• Routing table at the router increases as the network size increases


• Needs more memory to store routing tables and also consumes more CPU time to scan tables &
process.
• Needs more bandwidth to exchange the status information between routers

• In hierarchal routing routers are divided into to regions


• Each router stores the details about how to route packets to destinations within its own region, so
it avoids the routers having the address details of internal structure of other region network
• For huge networks regions may be grouped into clusters, the clusters into zones, the zones into
groups
Hierarchical Routing (Contd.,)

Figure gives a quantitative example of routing in a two-level hierarchy with five regions.
Congestion Control
• The presence of too many (excess) packets in (a part of) the network which leads to degradation of
network performance by packet delay and loss is called Network Congestion.
• The responsibility of congestion is shared among Network and Transport layer
• Congestion occurs if network load is greater than the packet handling capacity of the available
resources
• The general solution is to increase the recourse or decrease the load
Congestion Control Techniques

• Links and Routers that are regularly heavily utilized are upgraded at the earliest opportunity. This is
called provisioning.
• Routes may be changed to shift traffic away from heavily used paths by changing the shortest path
weights. This is called Traffic-aware routing.
• In a virtual-circuit network, new connections can be refused if they would cause the network to
become congested. This is called Admission control. These are Open Loop Congestion Control
Congestion Control Techniques (Traffic Throttling)
Traffic Throttling: Reducing the load

Choke Packets :In this approach, the router selects a


congested packet and sends a choke packet back to the
source host, giving it the destination found in the
packet

When the source host gets the choke packet, it is


required to reduce the traffic sent to the
specified destination, for example, by 50%.
Congestion Control Techniques (Traffic Throttling)
Explicit Congestion Notification(ECN):
When the network delivers the packet, the destination can note that there is congestion and
inform the sender when it sends a reply packet. The sender can then throttle its transmissions.
This design is called ECN (Explicit Congestion Notification) and is used in the Internet
The difference between choke packet and explicit signaling is that the signal is included in the
packets that carry data rather than creating different packet as in case of choke packet
technique.
Congestion Control Techniques (Traffic Throttling)
Hop-by-Hop Backpressure:
At high speeds or over long distances, many new packets may be transmitted after congestion has
been signaled because of the delay before the signal takes effect. An alternative approach is to have
the choke packet take effect at every hop it passes through.

Here, as soon as the choke packet reaches F, F is required


to reduce the flow to D. It gives D immediate relief

In the next step, the choke packet reaches E, which tells


E to reduce the flow to F. Finally, the choke packet
reaches A and the flow genuinely slows down.

The net effect of this hop-by-hop scheme is to provide


quick relief at the point of congestion, at the price of
using up more buffers upstream.
Congestion Control Techniques (Load Shedding)
Load shedding is a fancy way of saying that when routers are being inundated by packets
that they cannot handle, they just throw them away.

The key question for a router drowning in packets is which packets to drop. The preferred
choice may depend on the type of applications that use the network. For a file transfer, an
old packet is worth more than a new one, i.e dropping packet 6 and keeping packets 7
through 10 needs receiver to buffer the packet. This is often called wine

In contrast, for real-time media, a new packet is worth more than an old one. This is
because packets become useless if they are delayed and miss the time at which they must
be played out to the user. This is often called milk

Random Early Detection (RED): In this method routers drop packets early, before the situation has
become hopeless. To determine when to start discarding, routers maintain a running average of their
queue lengths. When the average queue length on some link exceeds a threshold, the link is said to be
congested and a small fraction of the packets are dropped at random.
IPv4 Header Format
IPv4 Header Format

Version: is a 4 bit field that indicates the IP version used. The most popularly used IP versions
are version-4 (IPv4) and version-6 (IPv6). It contains the decimal value 4.
Header length:
• i is a 4 bit field that contains the length of the IP header. It helps in knowing from where the
actual data begins.
• The initial 5 rows of the IP header are always used, So, minimum length of IP header = 5 x 4
bytes = 20 bytes.
• The size of the 6th row representing the Options field vary, The size of Options field can go
up to 40 bytes, So, maximum length of IP header = 20 bytes + 40 bytes = 60 bytes.
Type of service: is a 8 bit field that is used for Quality of Service (QoS) like Low Delay, High
Throughput, Reliability.
Total length: is a 16 bit field that contains the total length of the datagram (in bytes), Length of
header + Data, which has a minimum value 20 bytes and the maximum is 65,535 bytes.
Identification: is a 16 bit field. Unique Packet Id for identifying the group of fragments of a
single IP datagram It is used for the identification of the fragments of an original IP datagram.
IPv4 Header Format

DF bit: stands for Do Not Fragment bit. Its value may be 0 or 1. It indicates the intermediate devices not to
fragment the IP datagram at any cost.
MF bit : stands for More Fragments bit. Its value may be 0 or 1. MF bit = 0, It indicates to the receiver that the
current datagram is either the last fragment in the set or that it is the only fragment. MF bit = 1, It indicates to
the receiver that the current datagram is a fragment of some larger datagram. More fragments are following.
MF bit is set to 1 on all the fragments except the last one. Last Mf=0
Fragment Offset: is a 13 bit field. It indicates the position of a fragmented datagram in the original un-
fragmented IP datagram. The first fragmented datagram has a fragment offset of zero.
Time to live (TTL): is a 8 bit field. It indicates the maximum number of hops a datagram can take to reach the
destination. The main purpose of TTL is to prevent the IP datagrams from looping around forever in a routing
loop.
Protocol: is a 8 bit field. It tells the network layer at the destination host to which protocol the IP datagram
belongs to. In other words, it tells the next level protocol to the network layer at the destination side.
Protocol number of ICMP is 1, IGMP is 2, TCP is 6 and UDP is 17.
Header checksum: is a 16 bit field. It contains the checksum value of the entire header. The checksum value
is used for error checking of the header.
Source IP Address: is a 32 bit field. It contains the logical address of the sender of the datagram.
Destination IP Address: is a 32 bit field. It contains the logical address of the receiver of the datagram.
Quality Of Services (QoS)
QoS is the concept for specifying how “good” the offered services are. Quality of
service is based on the applications using the computer network, the network
performance requirement may vary from application to application

Throughput – the total amount of work completed during a specific time


interval.
Delay – the elapsed time from when a request is first submitted to when the
desired result is produced.
Jitter – The variation (i.e., standard deviation) in the delay or packet arrival
times is called Jitter. Measured in milliseconds, and problematic for real-
time applications, like streaming, games etc.
Reliability – how errors are handled during transmission and processing of
continuous media.
Application Requirements of QoS
Quality Of Services (QoS)
Traffic shaping is a technique for regulating the average rate and bustiness of a flow of data that
enters the network. The goal is to allow applications to transmit a wide variety of traffic that suits
their needs, including some bursts, and simple. It provides congestion control and QoS
Leaky Buckets: Each host is connected to the network by an interface containing a leaky bucket, i.e. a finite internal
queue. If a packet arrives at the queue when it is full, the packet is discarded. This arrangement can be built into the
hardware interface. It was first proposed by turner and is called leaky bucket algorithm

Advantage: This algorithm smoothens the bursts and


greatly reduces the chances of congestion.
Disadvantages
1. When the queue is full, packets are discarded.
2. Sometimes it is necessary to speed up the output
which is not possible in leaky bucket algorithm.
Quality Of Services (QoS)
Token Bucket Algorithm: The leaky bucket algorithm has a rigid output pattern at the
average rate, no matter how bursty the traffic is. In many applications, it is better to allow
the output to speed up somewhat when large bursts arrive so a more flexible algorithm is
needed, preferably one that never losses data one such algorithm is token bus algorithm.

In token bucket algorithm, the leaky bucket holds ‘tokens’ generated


by a clock at the rate of one token every DT sec. The figure shows
bucket holding three tokens, with five packets waiting to be
transmitted. For a packet to be transmitted, it must capture and
destroy one token. Three of fine packets have gone through, but other
two are waiting for tokens to be generated.
Internetworking
Interconnection of two or more networks makes an internetwork. Some issues
arise when two or more networks are connected to form an internetwork.
How Networks Differs
How Networks Can Be Connected

Different N/W will have different packet size. To handle this problem, the packet is divided into
fragments, and each fragment is sent separately. When the fragments reach the destination, they are
reassembled. Then the packet has completed its journey.
Tunneling
Packet Fragmentation
Each network or link imposes some maximum size on its packets. These limits have
various causes, among them

1. Hardware (e.g., the size of an Ethernet frame).


2. Operating system (e.g., all buffers are 512 bytes).
3. Protocols (e.g., the number of bits in the packet length field).
4. Compliance with some (inter)national standard.
5. Desire to reduce error-induced retransmissions to some level.
6. Desire to prevent one packet from occupying the channel too long.
Packet Fragmentation

(a) Transparent fragmentation. (b) Non-transparent fragmentation.


Packet Fragmentation

Identification Fragment Offset End of the fragment Data byte depending on


fragment size

(a)

(b)
Packet Fragmentation

(c)
(a) Original packet, containing 10 data bytes. (b) Fragments after passing through a network
with maximum packet size of 8 payload bytes plus header. (c) Fragments after passing through
a size 5 gateway.
Internet Control Protocols
Dynamic Host Configuration Protocol:
• Every computer in a network has a built-in Ethernet or other link layer address embedded
in the NIC, but no IP address. Assigning IP address manually is tedious and error-prone.
So the better way is to use DHCP (Dynamic Host Configuration Protocol) Server in a
network

• When a computer in a network is switched ON, it broadcasts a request for an IP address


on its network using a DHCP DISCOVER packet.

• When the server receives the request, it allocates a free IP address and sends it to the host
in a DHCP OFFER packet

• If a host leaves the network and does not return its IP address to the DHCP server, that
address will be permanently lost. After a period of time, many addresses may be lost. IP
address assignment may be for a fixed period of time, a technique called Leasing. Just
before the lease expires, the host must ask for a DHCP renewal.
Internet Control Protocols
ARP—The Address Resolution Protocol:
• Every machine on the Internet has one or more IP addresses, but these addresses are not
sufficient for communicating packets on the network.
• The NICs send and receive frames based on 48-bit Ethernet (MAC) addresses, and NIC
knows nothing about 32-bit IP addresses. So IP address should be mapped on to the MAC
address.
• The Address Resolution Protocol (ARP) is a communication protocol used for discovering
the link layer address, such as a MAC address, associated with a given internet layer address,
typically an IPv4 address.
• The System will then send a broadcast packet to the network using the ARP protocol to ask
"who has This-IP". This broadcast packet, is sent to all all machines on the network to
receive it. Any machine with the requested IP address will reply with an ARP packet that
says "I am having This-IP", and this includes the MAC address which can receive packets
for that IP.
• Systems keep an ARP look-up table where they store information about what IP addresses
are associated with what MAC addresses.
Internet Control Protocols
IMCP—The Internet Control Message Protocol:
When something unexpected occurs during packet processing at a router, the event is reported
to the sender by the ICMP (Internet Control Message Protocol).
ICMP is also used to test the Internet.

You might also like