0% found this document useful (0 votes)
12 views11 pages

CN Lecture 21

Lecture notes
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)
12 views11 pages

CN Lecture 21

Lecture notes
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/ 11

LECTURE - 21

COMPUTER NETWORKS

Manisha Fal Dessai


2. Services Provided to the Transport
Layer
· The network layer provides services to the transport layer at the network layer/transport layer interface. An important
question is what kind of services the network layer provides to the transport layer.
· The network layer services have been 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.
Given these goals, the designers of the network layer have a lot of freedom in writing detailed specifications of the
services to be offered to the transport layer. This freedom often degenerates into a raging battle between two warring
factions.
The other camp argues that the subnet should provide a reliable, connection-oriented service. They claim that 100
years of successful experience with the worldwide telephone system is an excellent guide. In this view, 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.
These two camps are best exemplified by the Internet and ATM. The Internet offers connectionless network-layer
service; ATM networks offer connection-oriented network-layer service. However, it is interesting to note that as
quality-of-service guarantees are becoming more and more important, the Internet is evolving.
3. Implementation of Connectionless
Service
• Two different organizations are possible, depending on the type of service offered. If connectionless service is offered,
packets are injected into the subnet individually and routed independently of each other. No advance setup is needed.
In this context, the packets are frequently called datagrams (in analogy with telegrams) and the subnet is called a datagram
subnet. If connection-oriented service is used, a path from the source router to the destination router must be established
before any data packets can be sent.
This connection is called a VC (virtual circuit), in analogy with the physical circuits set up by the telephone system, and the
subnet is called a virtual-circuit subnet. In this section we will examine datagram subnets; in the next one we will examine
virtual-circuit subnets.
Let us now see how a datagram subnet works. Suppose that the process P1 in Fig. 3-2 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.
The transport layer code runs on H1, typically within the operating system. It prepends a transport header to the front of
the message and hands the result to the network layer, probably just another procedure within the operating system.


Let us assume that the message is four times longer than the maximum packet size, so the network layer has to break it
into four packets, 1, 2, 3, and 4 and sends each of them in turn to router A using some point-to-point protocol, for example,
PPP.
At this point the carrier takes over. Every router has an internal table telling it where to send packets for each possible
destination. Each table entry is a pair consisting of a destination and the outgoing line to use for that destination.
Only directly-connected lines can be used. For example, in Fig. 5-2, 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. A's initial
routing table is shown in the figure under the label ''initially.''
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.
4. Implementation of Connection-
Oriented Service

For connection-oriented service, we need a virtual-circuit subnet. The idea behind virtual circuits is to avoid having to choose a new route for every
packet sent, as in Fig. 3-2.
Instead, 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. As an example, consider the situation of Fig. 3-3. Here, 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.
Figure 3-3. Routing within a virtual-circuit subnet.


Now let us consider what happens if H3 also wants to establish a connection to H2. It chooses connection identifier 1 and 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.
5. Comparison of Virtual-Circuit and
Datagram Subnets
• Both virtual circuits and datagrams have their
supporters and their detractors. We will now
attempt to summarize the arguments both
ways. The major issues are listed in Fig. 3-4,
although purists could probably find a
counterexample for everything in the figure.

You might also like