Lec 3
Lec 3
Lecture - 03
Basic Concepts of Networking (Part II)
So, we continuing with our discussion on the Basics of Computer Networking. So, this is
the second part of this lecture on basic concepts of networking. Now, if you recall in our
last lecture, we had talked about the broad approaches of data transmission over a network.
We are talking about something called packet switching, we mentioned the virtual circuit
approach, where some dedicated path gets established, a fixed path get established called
a virtual circuit, all packets will be following that path. Today we shall be starting with the
other alternative which is the so called datagram approach.
So, in this lecture we shall be talking about first the datagrams, some issues relating to that
and then we shall be talking about layered network architecture, which is a very commonly
used popular architecture for designing networking systems ok.
(Refer Slide Time: 01:27)
Let us look at the datagram approach, well, if you compare with the virtual circuit
approach, the main difference comes here that no route is established beforehand. This is
one difference or advantage you can say, you have here advantage in the sense that there
is no initial delay. In virtual circuit because of the route establishment, there was an initial
delay and once the route is established, then only the packets can be transmitted. Now,
here because there is no route established, so each packet is transmitted as independent
entities.
Just like you think of a postal system as an analogy, I am talking about a postal system.
When you drop a letter in a letter box, each letter is sent or is being you can say despatched
as an independent entity. So, you do not know which path the letter is following or actually
how it is going ok. So, that you do not know, but one thing you know is that, that when
you post a letter, you specify some kind of an address, their destination address. So, here
also when you transmit a packet, the packet must carry the address of the destination node
along with it.
Because, it is being sent as an independent entity, you must have the address ok. And, it
does not maintain any kind of history like, there is no concept of a path that is established
and so on. So, in that sense, there is no history of data communication or transmission that
is maintained in this case. Each packet is being routed as an independent entity fine.
(Refer Slide Time: 03:29)
So, here the difference is, here every intermediate node will be taking some dynamic
decisions, it will be maintaining something called a routing table. So, you see if you think
of a scenario, where there is a node A, there is a node B, and there is a node C. So, you are
sending data from node A to node B and then node B to node C.
Now, this node B will be having some kind of a table that it maintains, the table contain
some relevant information. And what kind of information it contains? It contains
information like, like whenever an incoming packet comes, so, it will contain information
like, where this packet has to be forwarded to ok.
There can be multiple outgoing links from B and to take this decision, what is required is
that when you are thinking about 1 packet, I mentioned that each packet will be containing
a header. In this header there must be a source address and also a destination address. Just
like a letter, when you post a letter, you give the address where you want to send the letter
to and in case the letter cannot be delivered, you also give your own address, so that the
letter can come back to you.
In a same way in the header there are other information also, but the most important one
is source address, the person who is sending and the destination address where you are
sending right. Now, just like the normal postal system, here there can be some problems.
Like, when you post letters, there is no guarantee that the order you are posting the letters,
the letters will get delivered in the same order, there is no guarantee regarding that,
courtesy of our postal system or the way the letters are sorted and delivered. So, packets
may be delivered out of order, why? Because each packet is being routed as an independent
entity, there is no guarantee that all packets are flowing or following the same path. Some
packet may be following a shorter path, some packet may be following a longer path. So,
the delays of each packet can be different ok.
So, the delivery of the packet can be out of order. Similarly, if some of the intermediate
node temporally goes down, all packets which are stored in buffer, will get lost. So, some
packets might get lost also. This also happens in a postal system, sometimes a letter never
gets delivered, but something which happens here, which is not there in a postal system,
is that, sometimes duplicate packets may get generated.
Like for every link, suppose there is a link between a node to the next node. This node will
be sending some packets to the next node and will be expecting some acknowledgement
to come, that well I have received the packets correctly.
If the acknowledgement does not come, this sender will assume, there is some something
wrong, let me send it again ok. But it may so happen that because of some other problem,
the acknowledgement got delayed, but if this sender sends the same packet again, there
will be duplicate which will be generated right. So, some duplicate packets might get
generated ok.
(Refer Slide Time: 07:45)
Now, talking about the advantages of this approach, datagram approach; first thing is that
if the number of packets is not very large, this will be faster than the virtual circuit
approach, because in the virtual circuit approach, there is an initial overhead of connection
establishment. But once the connection establishment is over, packet transmission will be
very fast. So, if there are large number of packets, then virtual circuit can be faster overall
ok.
Datagram approach does not need any route establishment in the beginning or termination
at the end, it does not require these. So, in that sense it is more flexible. Packets can follow
different paths, if sum of the links get overloaded, then the packets can follow an alternate
path, these flexibilities are there ok. So, this as I mentioned, it can handle congestion in
the links or some of the links may fail altogether, then an alternate link may be used which
was not there for a virtual circuit all right.
(Refer Slide Time: 09:01)
Now, if you just compared these approaches which we have talked about, now for
comparison we usually compare with respect to some parameters; one is called
propagation delay. Like you see when we talk about a communication between two nodes;
propagation delay is the signal delay from source to the destination. How much time a
single signal transition takes to move from this place to this place.
If, it is a copper link, it can be something, if it is a fibre optic link, it can be different, if it
is a satellite link, it can be different. So, depending on the type of link, how much time
suppose you send one bit of data? How much time that one bit will take to reach the other
end, it depends on the medium. Suppose, you are using a satellite, then it will be taking a
fraction of a second to go up to the satellite and again come back ok.
So, it depends on the medium, but transmission time is different. Transmission time
depends on the bandwidth of the link, well you know that links are categorised by the
speeds, kilobytes per second, megabits per second, gigabits per second. Suppose it is a 1
megabit per second, link 1 Mbps. So, 1 million bits can be sent per second. So, if there are
1000 bits you are trying to send, so, here how much time will it take? Here every bit will
take 1 microsecond 1 by mega.
So, 1000 bits will take one millisecond that is the transmission time. It depends on the size
of the message, how many bits are there and the bandwidth of the link. It does not depend
on the propagation delay; whether it is a satellite link or a copper link whatever.
So, these two are two separate things and finally, processing delay. If your communication
is going via intermediate nodes and you know, here we use something called store and
forward approach. So, these intermediate nodes will also take some time to receive a
packet, store it, consult the routing table, take some decision and then forward it. So, it
will take some small time for that. So, that is the processing delay. So, these are the
different components of delay in a typical network communication.
Now, talking about circuit switching, here only this initial circuit establishment phase is
there, but once this phase is over, this delay is over; you have a dedicated connection from
source to destination, data transmission can proceed in the maximum speed continuously
without delay. Because, you know, you have a guaranteed bandwidth, you can send the
bits continuously.
(Refer Slide Time: 12:13)
Now, talking about virtual circuit, well during the initial virtual circuit establishment phase
a special packet is usually sent, I am not going into the detail, which is called call request
packet. This call request packet is responsible for establishing the virtual circuit and setting
up the routing tables of all the intermediate nodes, corresponding to this particular virtual
circuit number ok.
Now, once the virtual circuit has been established and acknowledgement signal or packet
will be traversing along the same path back, this is called a call accept packet. So, that the
sender and all the intermediate nodes will know that the circuit has been established. Now,
the packets can flow, now the packets can be sequentially one after the another in a pipeline
fashion using store and forward approach, this is how virtual circuit will work.
(Refer Slide Time: 13:17)
Now, talking about the datagram packet switching, because there is no connection
establishment phase, so there is no initial delay ok. The packets are sent out independently,
may follow different path and this also follows store and forward concept, but if the
number of packet is very large, then the total time required here maybe more as compared
to virtual circuit, but here you have lot of flexibility.
You can share the links, if there are some link failures, link congestion, you can overcome
those problems. So, those flexibilities are there and because of that, this datagram approach
is the most widely used approach in the internet today ok.
(Refer Slide Time: 14:09)
Now, let us talk about something called layered network architecture. Now, see a
networking system has a number of responsibilities. Broadly speaking it is data
communication, but if you look into the detail, there are a number of steps which are
involved in the process. Now, I mean in order to design a networking system in a flexible
way, a conceptual layering has come in. Layering means you divide the total functionality
into a number of levels, where the function of each of the level is very well defined ok.
Now, a very well-known model is the so, called OSI model. This is open systems
interconnection model, this was proposed by international systems organisation, ISO. This
is called ISOs OSI model, it is called, there are 7 layers in this model. I shall show the
layers very shortly and there is a hierarchical relationship among these layers. The main
objective of this layering is, as I mentioned, if you divide the functionality into well-
defined layers, it becomes much more systematic.
Your design of the networking software becomes much more systematic. Not only that
you may choose to modify the design of one of the layers without touching the other layers.
So, one of the layers may use a different technology, but you do not modify the other
layers, that way you can say the maintainability of the entire networking system becomes
also better ok. These are the some of the advantages.
(Refer Slide Time: 16:07)
Now, talking about these 7-layers, you see these are the 7 layers; starting from the lowest
point physical, data link, network, transport, session, presentation, application. Now you
see, if you think of a network like this, well I am only showing one path, there can be other
paths also, I am just showing one path.
Let us from a source S to a destination D this is the path which is followed. Now, you see
some of these layers are called host to host and some of the layers are designated as point
to point, host to host means the upper 4 layers, they will exist only in the source and the
final destination.
They will not exist in the intermediate nodes. Point to point means 2 nodes which are
directly connected by a link is called a point to pint connection. So, there is 1, 2 and 3.
There are 3 point to point connections here. There are 3 point to point links and the lower
3 layers physical data link and network, they will be active in all these intermediate nodes
also, but the upper 4 will be active only in the source and the destination, I will show a
diagram ok.
(Refer Slide Time: 17:45)
Now, first let me briefly talk about the function of the different layers. The lowermost
layer the physical layer, this actually concerns about the electrical or means in whatever
way you are sending, either using electrical signals or using optics, fibre optics, using
optical signals, this concerns the transmit of the raw bits that constitutes your data over the
channel, whatever channel it is. Some kind of physical medium, it can be a copper, it can
be a fibre optic cable, it can be a microwave link, it can be Bluetooth, it can be anything
ok. This is a physical layer.
Physical layer establishes a physical connection between two directly connected link
points. Data link layer ensures that link is reliable to some extent, it tries to detect some
errors in communication, if some error takes place, it will try to re transmit the data again
ok. Data link layer is responsible for reliable transfer of data, now at this level, the data
unit is called a frame over a point to point link well. It also takes into account flow control;
that means, if there is a speed mismatch, it can slow down or make it faster, the rate of
data transfer.
If there are some errors, it will try to handle error, it will try to retransmit that frame again
and so on. Now, in the next higher layer which is the network layer, here the packet routing
or the transmission of the packets is the main concern. Establishing, maintaining
terminating connections and routing packets, there may be several point to point links, but
I want to transmit a packet from let us say myself to your computer, but there can be 100
intermediate computers. So, all the network layers in this 100 computers must be
responsible to forward the packet in the right direction, so that ultimately it can reach you
ok. That is the responsibility of the network layer.
Now, the upper 4 layers, these are end to end layer; that means, the point to point links are
not aware of this layers, it is directly between the source and the final destination.
Transport layer talks about end to end reliable data transfer like, I am concerned with, I
am trying to send a data to you, I am asking you, have you received the data correctly, you
tell me no, then I will send the data again. I am not worried about what intermediate nodes
are there. This is a direct host to host link. Session, session layer is responsible for
managing sessions; you know that there are many applications where there is a concept of
a session.
You do some kind of a login, the session remains active during the period of login, then
you logout, the entire period is called, referred to as a session. The session layer is
responsible for maintaining such sessions. Presentation layer is used, is an optional layer
of course, sometimes if you are using some kind of codes which are not compatible, you
can do some code conversion, you can do some error detection correction, error detecting
correcting code, some encryption, you can, you can add something extra in this
presentation layer before you can transmit the data.
Like I want that my data transmission secure, I can do some encryption, encrypt my data
before I can actually send, that will be done in the presentation layer. And application layer
is almost any application you can think of some application, which wants to use the
network for data transmission right.
Now, the way data flows, it can be clear from this picture, you see this is the source, this
is the final destination. So, the data starts from the application, it flows through these 7
layers, application to presentation, to session, to transport, network, data link, physical.
And, once it reaches the physical layer, it actually gets physically transmitted to the next
node A.
In the next node, it goes to the data link layer to check whether there is an error to network
layer, to check what to forward it next, then it takes the decision again, comes back to the
physical layer and forwards it to the right next one, because there can be some other node
also connected to this. So, it will decide what to forward it.
So, again this node B will have this physical, data link and network layer, it will go up to
that again, come down and it will in this way finally, reach the destination, in the
destination data will flow in the reverse direction from physical to data link to network up
to application.
So, roughly this is how data flows through this network so called stack. Because, the order
in which the data is going down, the reverse way it is going up that is it is like a stack. So,
this is sometimes also referred to as a network stack.
Now, talking about some of the internetworking devices, well we use hubs, bridges or
layer-2 switches, routers or layer 3-switches, we shall come to these three things later.
They are different, you can say equipments, their pictures are shown, you see pictorially
they all look similar.
But, their functions are different. The first one is a hub, this is a layer 2 switch and this is
a router or a layer 3 switch, their functions are different, layer 3 switch works at the IP
layer level. So, we shall be discussing this later. Bridge works at the data link layer level
and hub works at the physical link level.
(Refer Slide Time: 24:15)
So, here I am showing a typical diagram that, how this networking devices can be
interconnected in a real scenario? So, you see, this is your outside world, your connections
to the outside world and you will be having a router here.
Typically routers are used to connect a network with other networks ok. And, inside your
organisation there can be a main switch, this is a layer 3 switch, layer 3 switch is very
similar to a router, this is internal to your organisation. And, in the different sections of the
departments, you can have smaller switches, these are the layer 2 switches and the hubs I
am not showing. So, under this layer 3 switches, you can have hubs and finally, you can
make connections to the actual individual computers or the nodes. So, this is how a typical
network looks like.
There will be hubs at the lowest level, layer 2 switches at the next level, layer 3 switches
or routers at the next level, and to connect to the outside world, you will be finally having
some routers which have connections to the outside world right. So, with this we come to
the end of this lecture. We basically mentioned and talked about the networking layer, the
7 layer protocol and so on. In our next lecturer we shall be seeing some specific network
protocol stack that is followed in the internet which is called TCP/IP.
TCP/IP is a very well-known protocol stack that is widely used in internet. In fact, the
entire internet is based on this standard. So, we shall be looking into some details on that
and other related issues.
Thank you.