Cn-Mod3 Notes DRKVR
Cn-Mod3 Notes DRKVR
Cn-Mod3 Notes DRKVR
Internetworking
In the previous chapter, we saw how to connect one node to another or to an existing network.
Single Ethernet can interconnect no more than 1024 hosts; a point-to-point link connects only two.
Wireless networks are limited by the ranges of their radios. To build a global network, we need a
way to interconnect these different types of links and networks. The concept of interconnecting
different types of networks to build a large, global network is the core idea of the Internet and is
often referred to as internetworking.
Devices that interconnect links of the same type are often called switches, A particularly important
class of switches today are those used to interconnect Ethernet segments; these switches are also
sometimes called bridges. The core job of a switch is to take packets that arrive on an input and
forward (or switch) them to the right output so that they will reach their appropriate destination.
Even though a switch has a fixed number of inputs and outputs, which limits the number
of hosts that can be connected to a single switch, large networks can be built by
interconnecting a number of switches.
We can connect switches to each other and to hosts using point-to-point links, which
typically means that we can build networks of large geographic scope.
Adding a new host to the network by connecting it to a switch does not necessarily reduce
the performance of the network for other hosts already connected.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
A switch’s primary job is to receive incoming packets on one of its links and to transmit them on
some other link. This function is sometimes referred to as either switching or forwarding, and in
terms of the Open Systems Interconnection (OSI) architecture, it is the main function of the
network layer.
The question, then, is how does the switch decide which output link to place each packet on? The
general answer is that it looks at the header of the packet for an identifier that it uses to make the
decision. The details of how it uses this identifier vary, but there are three common approaches.
The first is the datagram or connectionless approach. The second is the virtual circuit or
connection-oriented approach. The third approach, source routing, is less common than these
other two, but it does have some useful applications.
3.1.1 DATAGRAM
The idea behind datagrams is incredibly simple: You just include in every packet enough
information to enable any switch to decide how to get it to its destination. Consider the example
network illustrated in Figure 3.2, in which the hosts have addresses A, B, C, and so on. To decide
how to forward a packet, a switch consults a forwarding table (sometimes called a routing table),
an example of which is depicted in
Table 3.1. This particular table shows
the forwarding information that
switch 2 needs to forward datagrams
in the example network. It is pretty
easy to figure out such a table when
you have a complete map of a simple
network like that depicted here; we could imagine a
network operator configuring the tables statically.
Datagram networks have the following characteristics:
A host can send a packet anywhere at any time, since any packet that turns up at a switch
can be immediately forwarded (assuming a correctly populated forwarding table). For this
reason, datagram networks are often called connectionless; this contrasts with the
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
connection-oriented networks described below, in which some connection state needs to
be established before the first data packet is sent.
When a host sends a packet, it has no way of knowing if the network is capable of
delivering it or if the destination host is even up and running.
Each packet is forwarded independently of previous packets that might have been sent to
the same destination. Thus, two successive packets from host A to host B may follow
completely different paths (perhaps because of a change in the forwarding table at some
switch in the network).
A switch or link failure might not have any serious effect on communication if it is possible
to find an alternate route around the failure and to update the forwarding table accordingly.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
The semantics of one such entry is as follows: If a packet arrives on the designated incoming
interface and that packet contains the designated VCI value in its header, then that packet should
be sent out the specified outgoing interface with the specified outgoing VCI value having been
first placed in its header.
Let’s assume that a network administrator wants to manually create a new virtual connection from
host A to host B. First, the administrator needs to identify a path through the network from A to
B. In the example network of Figure 3.5, there is only one such path, but in general this may not
be the case. The administrator then picks a VCI value that is currently unused on each link for the
connection. For the purposes of our example, let’s suppose that the VCI value 5 is chosen for the
link from host A to switch 1, and that 11 is chosen for the link from switch 1 to switch 2. In that
case, switch 1 needs to have an entry in its VC table configured as shown in Table 3.2.
There are two broad approaches to establishing connection state. One is to have a network
administrator configure the state, in which case the virtual circuit is “permanent.” Of course, it can
also be deleted by the administrator, so a permanent virtual circuit (PVC) might best be thought
of as a long-lived or administratively configured VC. Alternatively, a host can send messages into
the network to cause the state to be established. This is referred to as signaling VC, and the
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
resulting virtual circuits are said to be switched. The salient characteristic of a switched virtual
circuit (SVC) is that a host may set up and delete such a VC dynamically without the involvement
of a network administrator. Note that an SVC should more accurately be called a signalled VC
since it is the use of signalling (not switching).
Note: X.25 and ATM are well known virtual circuit based networking technologies.
Asynchronous Transfer Mode (ATM) is probably the most well-known virtual circuit-based
networking technology, although it is now somewhat past its peak in terms of deployment. ATM
became an important technology in the 1980s and early 1990s for a variety of reasons, not the least
of which is that it was embraced by the telephone industry, which had historically been less than
active in data communications (other than as a supplier of links from which other people built
networks). The picture of the ATM packet format—more commonly called an ATM cell—in
Figure 3.6 will illustrate the main points.
GFC - the Generic Flow Control field provides local functions such as identifying
multiple stations that share a single ATM interface (it is typically not used, and is
set to a default value of 0).
VPI - the Virtual Path Identifier is used together with the Virtual Channel
Identifier (VCI) to identify the virtual circuit along which the cell will be directed
as it passes through an ATM network on the way to its destination.
VCI - the Virtual Channel Identifier is used together with the Virtual Path
Identifier (VPI) to identify the virtual circuit along which the cell will be directed
as it passes through an ATM network on the way to its destination (values of 0 to
31 are reserved).
Type - the first bit of the Payload Type field indicates whether the cell contains
user data (0) or control data (1). The second bit indicates whether there is
congestion (0 = no congestion, 1 = congestion), and the third bit indicates whether
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
or not the cell is the last in a series of cells representing a single AAL5 frame (1 =
last cell for the frame).
CLP - the Cell Loss Priority bit field indicates whether the cell should be
discarded if it encounters extreme congestion as it moves through the network. If
set to 1, the cell should be discarded before cells that have the bit set to 0.
HEC - the Header Error Control field contains a checksum calculated on the first
4 bytes of the header. It can be used to correct a single bit error in these bytes,
preserving the cell rather than discarding it, or to detect multi-bit header errors (in
which case the cell is dropped).
A third approach to switching that uses neither virtual circuits nor conventional datagrams is
known as source routing. All the information about network topology that is required to switch a
packet across the network is provided by the source host.
There are various ways to implement source routing. One would be to assign a number to each
output of each switch and to place that number in the header of the packet. The switching function
is then very simple: For each packet that arrives on an input, the switch would read the port number
in the header and transmit the packet on that output. However, since there will in general be more
than one switch in the path between the sending and the receiving host, the header for the packet
needs to contain enough information
to allow every switch in the path to
determine which output the packet
needs to be placed on. One way to do
this would be to put an ordered list of
switch ports in the header and to
rotate the list so that the next switch
in the path is always at the front of the
list. Figure 3.7 illustrates this idea.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
We show these three approaches in Figure 3.8. In each case, the entry that this switch needs to read
is A, and the entry that
the next switch needs to
read is B. Circuit
networks. For example,
the Internet Protocol,
which is a datagram
protocol, includes a
source route option that allows selected packets to be source routed, while the majority are
switched as conventional datagrams. Source routing is also used in some virtual circuit networks
as the means to get the initial setup request along the path from source to destination. Source routes
are sometimes categorized as “strict” or “loose.” In a strict source route, every node along the path
must be specified, whereas a loose source route only specifies a set of nodes to be traversed,
without saying exactly how to get from one node to the next. A loose source route can be thought
of as a set of waypoints rather than a completely specified route. The loose option can be helpful
to limit the amount of information that a source must obtain to create a source route. In any
reasonably large network, it is likely to be hard for a host to get the complete path information it
needs to construct a correct strict source route to any destination. But both types of source routes
do find application in certain scenarios.
The node we have just described is typically called a bridge, and a collection of LANs connected
by one or more bridges is usually said to form an extended LAN. In their simplest variants, bridges
simply accept LAN frames on their inputs and forward them out on all other outputs.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
Learning Bridges
The first optimization we can make to a bridge is to observe that it need not forward all frames
that it receives. Consider the bridge in Figure 3.9. Whenever a frame from host A that is addressed
to host B arrives on port 1, there is no need for the bridge to forward the frame out over port 2.
The question, then, is how does a bridge come to learn on which port the various hosts reside?
Whenever the bridge receives a frame on port 1 that is addressed to host A, it would not forward
the frame out on port 2; there would be no need because host A would have already directly
received the frame on the LAN connected to port 1. Anytime a frame addressed to host A was
received on port 2, the bridge would forward the frame out on port 1.
No one actually builds bridges in which the table is configured by hand. The idea is for each bridge
to inspect the source address in all the frames it receives. Thus, when host A sends a frame to a
host on either side of the bridge, the bridge receives this frame and records the fact that a frame
from host A was just received on port 1. In this way, the bridge can build a table just like Table
3.4. When a bridge first boots, this table is empty; entries are added over time.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
SPANNING TREE ALGORITHM
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
In practice, each bridge decides the ports over
which it is and is not willing to forward frames.
In a sense, it is by disabling ports from the
topology that the extended LAN is reduced to
an acyclic tree. The algorithm is dynamic,
however, meaning that the bridges are always
prepared to reconfigure themselves into a new
spanning tree should some bridge fail, and so
those unused ports and bridges provide the
redundant capacity needed to recover from
failures.
The Internet Protocol is the key tool used today to build scalable, heterogeneous internetworks.
One way to think of IP is that it runs on all the nodes (both hosts and routers) in a collection of
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
networks and defines the infrastructure that allows these nodes and networks to function as a single
logical internetwork. For example, Figure 3.15 shows how hosts H5 and H8 are logically
connected by the internet in Figure 3.14, including the protocol graph running on each node. Note
that higher-level protocols, such as TCP and UDP, typically run on top of IP on the hosts.
The main concern in defining a service model for an internetwork is that we can provide a host-
to-host service only if this service can somehow be provided over each of the underlying physical
networks. The IP service model can be thought of as having two parts: an addressing scheme,
which provides a way to identify all hosts in the internetwork, and a datagram(connection less)
model of data delivery.
DATAGRAM DELIVERY
The IP datagram is fundamental to the Internet Protocol. a datagram is a type of packet that happens
to be sent in a connectionless manner over a network. Every datagram carries enough information
to let the network forward the packet to its correct destination; there is no need for any advance
setup mechanism to tell the network what to do when the packet arrives. You just send it, and the
network makes its best effort to get it to the desired destination. The “best-effort” part means that
if something goes wrong and the packet gets lost, corrupted, misdelivered, or in any way fails to
reach its intended destination, the network does nothing—it made its best effort, and that is all it
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
has to do. It does not make any attempt to recover from the failure. This is sometimes called an
unreliable service.
Keeping the routers as simple as possible was one of the original design goals of IP. The ability of
IP to “run over anything” is frequently cited as one of its most important characteristics. Best-
effort delivery does not just mean that packets can get lost. Sometimes they can get delivered out
of order, and sometimes the same packet can get delivered more than once. The higher-level
protocols or applications that run above IP need to be aware of all these possible failure modes.
Clearly, a key part of the IP service model is the type of packets that can be carried. The IP
datagram, like most packets, consists of a header followed by a number of bytes of data. The format
of the header is shown in Figure 3.16.
Version – Contains a 4-bit binary value set to
0100 that identifies this as an IP version 4 packet.
Internet Header Length (IHL)- This is a 4-
bit field which tells us the length of the IP header
in 32-bit increments. The minimum length of an
IP header is 20 bytes. The maximum value we can
create with 4 bits is 15 so with 32-bit increments;
that would be a header length of 60 bytes.
Differentiated Services (DS) – Previously
called the Type of Service (ToS) field, the DS field is an 8-bit field used to decide the
priority of each packet.
Differentiated Services Code Point (DSCP)- Usually set to 0, but may indicate particular
Quality of Service needs from the network; the DSCP defines the way routers should queue
packets while they are waiting to be forwarded.
ECN: Explicit Congestion Notification, It carries information about the congestion seen in
the route.
Total Length: Length of entire IP Packet (including IP header and IP Payload).
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
Identification: If IP packet fragmented during the transmission, all the fragments contain
the same identification number. to find original IP packet they belong to.
Flags: As required by the network resources, if IPv4 Packet is too large to handle, these
‘flags’ tell if they fragmented or not. In this 3-bit flag, the MSB is always set to ‘0’.
Fragment Offset: this 13-bit field specifies the place of the fragment in the original
fragmented IP packet.
Time-to-Live (TTL) – This field has an 8-bit binary value used to limit the lifetime of a
packet. The packet sender sets the initial TTL value, and it decreased by one each time the
packet processed by a router. If the TTL field decrements to zero, the router discards the
packet and sends an Internet Control Message Protocol (ICMP) Time Exceeded message
to the source IP address.
Protocol – This 8-bit binary value indicates the data payload type that the packet is
carrying, which enables the network layer to pass the data to the appropriate upper-layer
protocol. Common values include ICMP (1), TCP (6), and UDP (17).
Header Checksum: this 16-bit field used to store a checksum of the header. The receiver
can use the checksum to check if there are any errors in the header.
Source IP Address – Contains a 32-bit binary value that represents the source IP
address of the packet.
Destination IP Address – Contains a 32-bit binary value that represents the destination
IPv4 address of the packet.
Options: This is an optional field, which used if the value of IHL is greater than 5. These
options may contain values for options such as Security, Record-Route, Time Stamp, etc.
One of the problems of providing a uniform host-to-host service model over a heterogeneous
collection of networks is that each network technology tends to have its own idea of how large a
packet can be. For example, an Ethernet can accept packets up to 1500 bytes long, while FDDI
(Fiber Distributed Data Interface) packets may be 4500 bytes long. This leaves two choices for the
IP service model: Make sure that all IP datagrams are small enough to fit inside one packet on any
network technology, or provide a means by which packets can be fragmented and reassembled
when they are too big to go over a given network technology.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
The central idea here is that every network type has a maximum transmission unit (MTU), which
is the largest IP datagram that it can carry in a frame. When a host sends an IP datagram, therefore,
it can choose any size that it wants. A reasonable choice is the MTU of the network to which the
host is directly attached. Then, fragmentation will only be necessary if the path to the destination
includes a network with a smaller MTU.
Fragmentation typically occurs in a router when it receives a datagram that it wants to forward
over a network that has an MTU that is smaller than the received datagram. To enable these
fragments to be reassembled at the receiving host, they all carry the same identifier in the Ident
field. This identifier is chosen by the sending host and is intended to be unique among all the
datagrams that might arrive at the destination from this source over some reasonable time period.
Since all fragments of the original datagram contain this identifier, the reassembling host will be
able to recognize those fragments that go together.
To see what this all means, consider what happens when host H5 sends a datagram to host H8 in
the example internet shown in Figure 3.14. Assuming that the MTU is 1500 bytes for the two
Ethernets and the 802.11 network, and 532 bytes for the point-to-point network, then a 1420-byte
datagram (20-byte IP header plus 1400 bytes of data) sent from H5 makes it across the 802.11
network and the first Ethernet without fragmentation but must be fragmented into three datagrams
at router R2. These three fragments are then forwarded by router R3 across the second Ethernet to
the destination host. This situation is illustrated in Figure 3.17.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
GLOBAL ADDRESSES
In the above discussion of the IP service model, we mentioned that one of the things that it provides
is an addressing scheme. After all, if you want to be able to send data to any host on any network,
there needs to be a way of identifying all the hosts. Thus, we need a global addressing scheme —
one in which no two hosts have the same address. Global uniqueness is the first property that
should be provided in an addressing scheme.
Ethernet addresses are globally unique, but that alone does not suffice for an addressing scheme
in a large internetwork. Ethernet addresses are also flat, which means that they have no structure
and provide very few clues to routing protocols. In fact, Ethernet addresses do have a structure for
the purposes of assignment—the first 24 bits identify the manufacturer—but this provides no
useful information to routing protocols since this structure has nothing to do with network
topology. In contrast, IP addresses are hierarchical, by which we mean that they are made up of
several parts that correspond to some sort of hierarchy in the internetwork. Specifically, IP
addresses consist of two parts, usually referred to as a network part and a host part. The network
part of an IP address identifies the network to which the host is attached; all hosts attached to the
same network have the same network part in their IP address. The host part then identifies each
host uniquely on that particular network.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
24 bits for the host part, meaning that there can be only 126 class A networks (the values 0 and
127 are reserved), but each of them can accommodate up to 224 −2 (about 16 million) hosts (again,
there are two reserved values). Class B addresses allocate 14 bits for the network and 16 bits for
the host, meaning that each class B network has room for 65,534 hosts. Finally, class C addresses
have only 8 bits for the host and 21 for the network part. Therefore, a class C network can have
only 256 unique host identifiers, which means only 254 attached hosts (one host identifier, 255, is
reserved for broadcast, and 0 is not a valid host number). However, the addressing scheme supports
221 class C networks.
CLASSLESS ADDRESSING
All IP addresses have a network and host portion. In classful addressing, the network portion ends
on one of the separating dots in the address (on an octet boundary). Classless addressing uses a
variable number of bits for the network and host portions of the address.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
SUBNET MASKING
The mechanism by which a single network number can be shared among multiple networks
involves configuring all the nodes on each subnet with
a subnet mask. With simple IP addresses, all hosts on
the same network must have the same network number.
The subnet mask enables us to introduce a subnet
number; all hosts on the same physical network will
have the same subnet number, which means that hosts
may be on different physical networks but share a
single network number. This concept is illustrated in
Figure 3.20.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
packet to H2 directly over the subnet, it sends the packet to its default router R1. The forwarding
table of a router also changes slightly when we introduce subnetting.
3.3 ROUTING
In the case of virtual circuits, routing is an issue only for the connection request packet; all
subsequent packets follow the same path as the request. In datagram networks, including IP
networks, routing is an issue for every packet. In either case, a switch or router needs to be able to
look at a destination address and then to determine which of the output ports is the best choice to
get a packet to that address. The switch makes this decision by consulting a forwarding table. The
fundamental problem of routing is how switches and routers acquire the information in their
forwarding tables.
While the terms forwarding table and routing table are sometimes used interchangeably, we will
make a distinction between them here. The forwarding table is used when a packet is being
forwarded and so must contain enough information to accomplish the forwarding function. This
means that a row in the forwarding table contains the
mapping from a network prefix to an outgoing interface
and some MAC information, such as the Ethernet address
of the next hop. The routing table, on the other hand, is
the table that is built up by the routing algorithms as a
precursor to building the forwarding table. It generally
contains mappings from network prefixes to next hops. It
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
may also contain information about how this information was learned, so that the router will be
able to decide when it should discard some information.
The basic problem of routing is to find the lowest-cost path between any two nodes, where the cost
of a path equals the sum of the costs of all the edges that make up the path. For a simple network
like the one in Figure 3.28, you could imagine just calculating all the shortest paths and we assume
that the edge costs in the network are known. We will examine the two main classes of routing
protocols: distance vector routing protocol and link state routing protocol.
The idea behind the distance-vector algorithm is suggested by its name Each node constructs a
one-dimensional array (a vector) containing the “distances” (costs) to all other nodes and
distributes that vector to its immediate neighbors. The starting assumption for distance-vector
routing is that each node knows the cost of the link to each of its directly connected neighbors.
These costs may be provided when the router is configured by a network manager. A link that is
down is assigned an infinite cost.
We can represent each node’s knowledge about the distances to all other nodes as a table like Table
3.10. Note that each node knows only the information in one row of the table. The global view that
is presented here is not available at any single point in the network.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
Distance vector routing:
6. In distance vector routing, a node tells its neighbor about its distance to every other node
in the network.
Advantages
a) Their chief advantage is the simplicity of this algorithm.
Disadvantage
a) The primary drawback of this algorithm is its vulnerability to the ‘Count-to-Infinity’
problem. Many partial solutions have been proposed but none works under all
circumstances.
b) Another drawback of this scheme is that it does not take into account link bandwidth.
c) Yet another problem with this algorithm is that it takes longer time for convergence as
network size grows.
1. One of the important issue in Distance Vector Routing is County of Infinity Problem.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
2. Counting to infinity is just another name for a routing loop.
3. In distance vector routing, routing loops usually occur when an interface goes down.
4. It can also occur when two routers send updates to each other at the same time.
Example:
Imagine a network with a graph as
shown above in figure.
As you see in this graph, there is
only one link between A and the other
parts of the network.
Now imagine that the link between A
and B is cut.
At this time, B corrects its table.
After a specific amount of time, routers exchange their tables, and so B receives C's
routing table.
Since C doesn't know what has happened to the link between A and B, it says that it has a
link to A with the weight of 2 (1 for C to B, and 1 for B to A -- it doesn't know B has no
link to A).
B receives this table and thinks there is a separate link between C and A, so it corrects its
table and changes infinity to 3 (1 for B to C, and 2 for C to A, as C said).
Once again, routers exchange their tables.
When C receives B's routing table, it sees that B has changed the weight of its link to A
from 1 to 3, so C updates its table and changes the weight of the link to A to 4 (1 for C to
B, and 3 for B to A, as B said).
This process loops until all nodes find out that the weight of link to A is infinity.
This situation is shown in the table below 4.2.
In this way, Distance Vector Algorithms have a slow convergence rate.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
One way to solve this problem is for
routers to send information only to the
neighbors that are not exclusive links to the
destination.
For example, in this case, C
shouldn't send any information to B about A,
because B is the only way to A.
Link state routing is the second family of routing protocols. While distance vector routers use a
distributed algorithm to compute their routing tables, link-state routing uses link-state routers to
exchange messages that allow each router to learn the entire network topology. Based on this
learned topology, each router is then able to compute its routing table by using a shortest path
computation.
Features of link state routing protocols –
Link state packet – A small packet that contains routing information.
Link state database – A collection information gathered from link state packet.
Shortest path first algorithm (Dijkstra algorithm) – A calculation performed on the
database results into shortest path
Routing table – A list of known paths and interfaces.
Calculation of shortest path –
To find shortest path, each node need to run the famous Dijkstra algorithm. This famous algorithm
uses the following steps:
Step-1: The node is taken and chosen as a root node of the tree, this creates the tree with a
single node, and now set the total cost of each node to some value based on the information
in Link State Database
Step-2: Now the node selects one node, among all the nodes not in the tree like structure,
which is nearest to the root, and adds this to the tree.The shape of the tree gets changed .
Step-3: After this node is added to the tree, the cost of all the nodes not in the tree needs to
be updated because the paths may have been changed.
Step-4: The node repeats the Step 2. and Step 3. until all the nodes are added in the tree.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
THE OPEN SHORTEST PATH FIRST PROTOCOL (OSPF)
• One of the most widely used link-state routing protocols is OSPF. The first word, Open-
refers to the fact that it is an open, nonproprietary standard, created under the auspices of
the Internet Engineering Task Force (IETF). The SPF -part comes from an alternative
name for link-state routing.
• OSPF adds quite a number of features to the basic link-state algorithm :
• Authentication of routing messages : One feature of distributed routing algorithms is
that they disperse information from one node to many other nodes, using a strong
cryptographic authentication
• Additional hierarchy: OSPF introduces another layer of hierarchy into routing by
allowing a domain to be partitioned into areas. This means that a router within a domain
does not necessarily need to know how to reach every network within that domain -it
may be able to get by knowing only how to get to the right area. Thus, there is a
reduction in the amount of information that must be transmitted to and stored in each
node.
• Load balancing : OSPF allows multiple routes to the same place to be assigned the same
cost and will cause traffic to be distributed evenly over those routes, thus making better
use of available network capacity.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
SHORT NOTES ON :
i) ARP ii) ICMP iii) DHCP
The address resolution protocol (arp) is a protocol used by the Internet Protocol (IP), specifically
IPv4, to map IP network addresses to the hardware addresses used by a data link protocol. It is
used when IPv4 is used over Ethernet.
The term address resolution refers to the process of finding an address of a computer in a network.
The address is "resolved" using a protocol in which a piece of information is sent by a client
process executing on the local computer to a server process executing on a remote computer. The
information received by the server allows the server to uniquely identify the network system for
which the address was required and therefore to provide the required address. The address
resolution procedure is completed when the client receives a response from the server containing
the required address.
An Ethernet network uses two hardware addresses which identify the source and destination of
each frame sent by the Ethernet. The destination address (all 1's) may also identify
a broadcast packet (to be sent to all connected computers). The hardware address is also known as
the Medium Access Control (MAC) address, in reference to the standards which define Ethernet.
Each computer network interface card is allocated a globally unique 6 byte link address when the
factory manufactures the card (stored in a PROM). This is the normal link source address used by
an interface. A computer sends all packets which it creates with its own hardware source link
address, and receives all packets which match the same hardware address in the destination field
or one (or more) pre-selected broadcast/multicast addresses.
The Ethernet address is a link layer address and is dependent on the interface card which is used.
IP operates at the network layer and is not concerned with the link addresses of individual nodes
which are to be used. The address resolution protocol (arp) is therefore used to translate between
the two types of address. The arp client and server processes operate on all computers using IP
over Ethernet. The processes are normally implemented as part of the software driver that drives
the network interface card.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
Figure 3.23 shows the ARP
packet format for IP-to-Ethernet
address mappings. In fact, ARP
can be used for lots of other
kinds of mappings— the major
differences are in the address
sizes. In addition to the IP and
link-layer addresses of both
sender and target, the packet
contains
Following are the fields in the Address Resolution Protocol (ARP) Message Format :
Hardware type (HTYPE)
o This field specifies the network protocol type. Example: Ethernet is 1.
Protocol type (PTYPE)
o This field specifies the internetwork protocol for which the ARP request is
intended. For IPv4, this has the value 0x0800 (Hexade. The permitted PTYPE
values share a numbering space with those for EtherType.
Hardware length (HLEN)
o Length (in octets) of a hardware address. Ethernet addresses size is 6.
Protocol length (PLEN)
o Length (in octets) of addresses used in the upper layer protocol. (The upper layer
protocol specified in PTYPE.) IPv4 address size is 4.
Operation (OPcode)
o Specifies the operation that the sender is performing:
1–ARP request.
2–ARP reply.
3 through 9–RARP and Inverse ARP requests and replies.
Sender hardware address (SHA)
o Media address of the sender. In an ARP request this field is used to indicate the
address of the host sending the request. In an ARP reply this field is used to
indicate the address of the host that the request was looking for. (Not necessarily
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
address of the host replying as in the case of virtual media.) Switches do not pay
attention to this field, particularly in learning MAC addresses. The ARP PDU is
encapsulated in Ethernet frame, and that is what Layer 2 devices examine.
Sender protocol address (SPA)
o Internetwork address of the sender.
Target hardware address (THA)
o Media address of the intended receiver. In an ARP request this field is ignored. In
an ARP reply this field is used to indicate the address of the host that originated
the ARP request.
Target protocol address (TPA)
o Internetwork address of the intended receiver.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
Step 1: When a source device want to communicate with another device, source device checks its
Address Resolution Protocol (ARP) cache to find it already has a resolved MAC Address of the
destination device. If it is there, it will use that MAC Address for communication. To view your
Local Address Resolution Protocol (ARP) cache, Open Command Prompt and type command “arp
-a” (Without double quotes using Windows Operating Systems / Linux Operating Systems).
Step 2: If ARP resolution is not there in local cache, the source machine will generate an Address
Resolution Protocol (ARP) request message, it puts its own data link layer address as the Sender
Hardware Address and its own IPv4 Address as the Sender Protocol Address. It fills the
destination IPv4 Address as the Target Protocol Address. The Target Hardware Address will be
left blank, since the machine is trying to find that.
Step 3: The source broadcast the Address Resolution Protocol (ARP) request message to the local
network.
Step 4: The message is received by each device on the LAN since it is a broadcast. Each device
compare the Target Protocol Address (IPv4 Address of the machine to which the source is trying
to communicate) with its own Protocol Address (IPv4 Address). Those who do not match will drop
the packet without any action.
Step 5: When the targeted device checks the Target Protocol Address, it will find a match and will
generate an Address Resolution Protocol (ARP) reply message. It takes the Sender Hardware
Address and the Sender Protocol Address fields from the Address Resolution Protocol (ARP)
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
request message and uses these values for the Targeted Hardware Address and Targeted Protocol
Address of the reply message.
Step 6: The destination device will update its Address Resolution Protocol (ARP) cache, since it
need to contact the sender machine soon.
Step 7: Destination device send the Address Resolution Protocol (ARP) reply message and it will
NOT be a broadcast, but a unicast.
Step 8: The source machine will process the Address Resolution Protocol (ARP) reply from
destination, it store the Sender Hardware Address as the layer 2 address of the destination.
Step 9: The source machine will update its Address Resolution Protocol (ARP) cache with the
Sender Hardware Address and Sender Protocol Address it received from the Address Resolution
Protocol (ARP) reply message.
3. The router directs the DISCOVER packet to the correct DHCP server.
4. The server receives the DISCOVER packet. Based on availability and usage policies set
on the server, the server determines an appropriate address (if any) to give to the client.
The server then temporarily reserves that address for the client and sends back to the
client an OFFER (or DHCPOFFER) packet, with that address information. The server
also configures the client's DNS servers, WINS servers, NTP servers, and sometimes
other services as well.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
5. The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that
it intends to use the address.
6. The server sends an ACK (or DHCPACK) packet, confirming that the client has a been
given a lease on the address for a server-specified period of time.
The Internet Control Message Protocol is used by routers, devices or hosts to communicate error
information to other routers, devices, or hosts. An ICMP message contains TYPE, CODE and
CHECKSUM fields. These fields identify the ICMP message, provide additional information
about Type and provide a method for determining the integrity of the message.
The PING command, for example, uses ICMP to test an Internet connection. ICMP also provides
the basis for two widely used debugging tools, ping and traceroute. ping uses ICMP echo messages
to determine if a node is reachable and alive. traceroute uses a slightly non-intuitive technique to
determine the set of routers along the path to a destination.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
Before getting to these techniques, we need to have a general picture in our heads of what the
global Internet looks like. It is not just a random interconnection of Ethernets, but instead it takes
on a shape that reflects the fact that it interconnects many different organizations. Figure 4.1 gives
a simple depiction of the state of the Internet.
One of the salient features of this topology is that it consists of enduser sites (e.g., Stanford
University) that connect to service provider networks (e.g., BARRNET was a provider network
that served sites in the San Francisco Bay Area). many providers served a limited geographic
region and were thus known as regional networks. The regional networks were, in turn, connected
by a nationwide backbone. This backbone was funded by the National Science Foundation (NSF)
and was therefore called the NSFNET backbone.
Notice in Figure 4.1 that each provider and end-user is likely to be an administratively independent
entity. Because of this independence, each provider’s network is usually a single autonomous
system (AS).
The fact that the Internet has a discernible structure can be used to our advantage as we tackle the
problem of scalability. In fact, we need to deal with two related scaling issues. The first is the
scalability of routing. We need to find ways to minimize the number of network numbers that get
carried around in routing protocols and stored in the routing tables of routers. The second is address
utilization—that is, making sure that the IP address space does not get consumed too quickly.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
It probably should not be a great surprise to learn that mobile devices present some challenges for
the Internet architecture. Today, of course, mobile computers are everywhere, notably in the forms
of laptops and smartphones, and and increasingly in other forms, such as drones.
Clearly, when you move from one access network to another, you need to get a new IP address—
one that corresponds to the new network. But, the computer or telephone at the other end of your
conversation doesn't immediately know where you have moved or what your new IP address is.
Consequently, in the absence of some other mechanism, packets would continue to be sent to the
address where you used to be, not where you are now.
When the host moves to a new foreign network away from its home network, it typically acquires
a new address on that network using some means such as DHCP. This address is going to change
every time the host roams to a new network, so we can think of this as being more like the locator
for the host, but it is important to note that the host does not lose its permanent home address when
it acquires a new address on the foreign network. This home address is critical to its ability to
sustain communications as it moves, as we'll see below.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN
While the majority of routers remain unchanged, mobility support does require some new
functionality in at least one router, known as the home agent of the mobile node. This router is
located on the home network of the mobile host. In some cases, a second router with enhanced
functionality, the foreign agent, is also required. This router is located on a network to which the
mobile node attaches itself when it is away from its home network. We will consider first the
operation of Mobile IP when a foreign agent is used. An example network with both home and
foreign agents is shown in Figure 2.
Both home and foreign
agents periodically announce
their presence on the
networks to which they are
attached using agent
advertisement messages. A
mobile host may also solicit
an advertisement when it attaches to a new network. The advertisement by the home agent enables
a mobile host to learn the address of its home agent before it leaves its home network. When the
mobile host attaches to a foreign network, it hears an advertisement from a foreign agent and
registers with the agent, providing the address of its home agent. The foreign agent then contacts
the home agent, providing a care-of address. This is usually the IP address of the foreign agent.
By: Dr. Rama Satish KV, RNSIT, Bengaluru. For latest updates visit: https://rebrand.ly/DrKVR-CN