0% found this document useful (0 votes)
48 views

Network Layer: - It Is - For This It May

The network layer is responsible for end-to-end transmission of packets by routing them through intermediate routers. It must choose appropriate paths while avoiding overloading some lines. The services provided to the transport layer include connectionless and connection-oriented models. Connectionless service routes each packet independently as a datagram while connection-oriented service establishes virtual circuits to route all packets of a connection along the same path. Virtual circuits require less overhead per packet but more router memory while datagrams require more overhead but allow dynamic routing.

Uploaded by

Anurag Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Network Layer: - It Is - For This It May

The network layer is responsible for end-to-end transmission of packets by routing them through intermediate routers. It must choose appropriate paths while avoiding overloading some lines. The services provided to the transport layer include connectionless and connection-oriented models. Connectionless service routes each packet independently as a datagram while connection-oriented service establishes virtual circuits to route all packets of a connection along the same path. Virtual circuits require less overhead per packet but more router memory while datagrams require more overhead but allow dynamic routing.

Uploaded by

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

Network layer

• It is concerned with getting packets from the source all the way
to the destination.
• For this it may require making many hops at intermediate
routers along the way.
• The network layer is the lowest layer that deals with end-to-end
transmission.
• To achieve its goals, the network layer must know about the
topology of the communication subnet (i.e., the set of all routers)
and choose appropriate paths.
• It must also take care to choose routes to avoid overloading some
of the communication lines and routers while leaving others idle
Network Layer Design Issues

• issues include the service provided to the transport layer and


the internal design of the subnet.
1. Store-and-Forward Packet Switching
2. Services Provided to the Transport Layer
3. Implementation of Connectionless Service
4. Implementation of Connection-Oriented Service
Store-and-Forward Packet
Switching
Store-and-Forward Packet
Switching
• The major components of the system are
• The carrier's equipment (routers connected by transmission
lines), shown inside the shaded oval,
• The customers' equipment, shownoutside the oval.
• Host H1 is directly connected to one of the carrier's routers,
A, by a leased line.
• H2 is on a LAN with a router, F, owned and operated by the
customer.
Store-and-Forward Packet
Switching
• A host with a packet to send transmits it to the nearest
• router, either on its own LAN or over a point-to-point link to
the carrier.
• The packet is stored there until it has fully arrived so the
checksum can be verified.
• Then it is forwarded to the next router along the path until it
reaches the destination host, where it is delivered
Services Provided to the Transport
Layer
• The network layer provides services to the transport layer at
the network layer/transport layer interface.
• Services are :
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.
Services Provided to the Transport
Layer
• Two points in front of us while studying the network layer:

1. The routers' job is moving packets around and nothing else.


– Hence host should accept the fact that the network is
unreliable and do error control (i.e., error detection and
correction) and flow control themselves.
– Therefore the network service should be connectionless,
with primitives SEND PACKET and RECEIVE
PACKET and little else.
Services Provided to the Transport
Layer
2. The subnet should provide a reliable, connection-oriented
service.
i.e Quality of service is the dominant factor, and without
connections in the subnet, quality of service is very
• difficult to achieve, especially for real-time traffic such as
voice and video.
Implementation of Connectionless
Service
• If connectionless service is offered, packets are injected into
the subnet individually and routed independently of each
other.
• the packets are frequently called datagrams (in analogy
with telegrams) and
• The subnet is called a datagram subnet.
• Suppose that the process P1 send a message to P2.
• It hands the message to the transport layer with the
instruction to deliver it to process P2 on host H2.
Implementation of Connectionless
Service
Implementation of Connectionless
Service
• A has only two outgoing lines—to B and C—so every
incoming packet must be sent to one of these routers, even if
the ultimate destination is some other router.
• As they arrived at A, packets 1, 2, and 3 were stored briefly
(to verify their checksums).
• Then each was forwarded to C according to A's table. Packet
1 was then forwarded to E and then to F.
• When it got to F, it was encapsulated in a data link layer
frame and sent to H2 over the LAN.
• Packets 2 and 3 follow the same route.
Implementation of Connectionless
Service
• However, something different happened to packet 4.
• When it got to A it was sent to router B, even though it is
also destined for F.
• For some reason, A decided to send packet 4 via a different
route than that of the first three.
• Perhaps it learned of a traffic jam somewhere along the
ACE path and updated its routing table, as shown under the
label ''later.‘’
• The algorithm that manages the tables and makes the
routing decisions is called the routing algorithm
Implementation of Connection-
Oriented Service
• For connection-oriented service, we need a virtual-circuit subnet.
• Let us see how that works.
• The idea behind virtual circuits is to avoid having to choose a new
route for every packet sent.
• When a connection is established, a route from the source machine to
the destination machine is chosen as part of the connection setup and
stored in tables inside the routers.
• That route is used for all traffic flowing over the connection, exactly
the same way that the telephone system works.
• When the connection is released, the virtual circuit is also terminated.
• With connection-oriented service, each packet carries an identifier
telling which virtual circuit it belongs to.
Implementation of Connection-
Oriented Service
Implementation of Connection-
Oriented Service
• host H1 has established connection 1 with host H2.
• It is remembered as the first entry in each of the routing
tables.
• The first line of A's table says that if a packet bearing
connection identifier 1 comes in from H1, it is to be sent to
router C and given connection identifier 1.
• Similarly, the first entry at C routes the packet to E, also
with connection identifier 1.
Implementation of Connection-
Oriented Service
• Now let us consider what happens if H3 also wants to establish a connection to
H2.
• It chooses connection identifier 1 (because it is initiating the connection and this
is its only connection)
• Tells the subnet to establish the virtual circuit.
• This leads to the second row in the tables.
• Note that we have a conflict here because although A can easily distinguish
connection 1 packets from H1 from connection 1 packets from H3, C cannot do
this.
• For this reason, A assigns a different connection identifier to the outgoing traffic
for the second connection.
• Avoiding conflicts of this kind is why routers need the ability to replace
connection identifiers in outgoing packets.
• In some contexts, this is called label switching.
• Connectionless Service
– Packets are called Datagrams
– Hence the Network is called the Datagram Network
• Connection Oriented Service
– The connections are called Virtual Circuits
– The Network is called Virtual Circuit Network
Comparison of Virtual Circuit and
Datagram Subnet
Comparison of Virtual Circuit and
Datagram Subnet
1. One tradeoff is between router memory space and bandwidth. Virtual circuits allow packets to contain
circuit numbers instead of full destination addresses. If the packets tend to be fairly short, a full destination
address in every packet may represent a significant amount of overhead and hence, wasted bandwidth. The
price paid for using virtual circuits internally is the table space within the routers.
2. Using virtual circuits requires a setup phase, which takes time and consumes resources.
3. In a datagram subnet, a more complicated lookup procedure is required to locate the entry for the
destination.
4. The amount of table space required in router memory. A datagram subnet needs to have an entry for every
possible destination, whereas a virtual-circuit subnet just needs an entry for each virtual circuit.
5. Virtual circuits have some advantages in guaranteeing quality of service and avoiding congestion within the
subnet because resources (e.g., buffers, bandwidth, and CPU cycles) can be reserved in advance, when the
connection is established. Once the packets start arriving, the necessary bandwidth and router capacity will
be atagram subnet, congestion avoidance is more difficult.
6. Virtual circuits also have a vulnerability problem. If a router crashes and loses its memory, even if it comes
back up a second later, all the virtual circuits passing through it will have to be aborted.
7. The loss of a communication line is fatal to virtual circuits using it but can be easily compensated for if
datagrams are used. Datagrams also allow the routers to balance the traffic throughout the subnet, since
routes can be changed partway through a long sequence of packet transmissions.

You might also like