SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 1
CHAPTER 20 UNICAST ROUTING PROTOCOLS IN THE INTERNET
A protocol needs to define its domain of operation, the messages exchanged,
communication between routers, and interaction with protocols in other domains.
There are three common protocols used in the Internet:
Routing Information Protocol (RIP)- based on the distance-vector algorithm,
Open Shortest Path First (OSPF)- based on the link-state algorithm, and Border
Gateway Protocol (BGP) - based on the path-vector algorithm.
20.3.1 Internet Structure
The Internet today is a multi-backbone structure run by different private
corporations. A typical structure is shown in Fig. 20.14.
There are several backbones run by private communication companies that provide
global connectivity. Any of these three entities (backbone, provider network, or
customer network) can be called an Internet Service Provider or ISP.
1) Hierarchical Routing
The Internet today is made of a huge number of networks and routers that connect
them. So, routing in the Internet cannot be done using a single protocol for two
reasons: scalability problem and administrative issues.
Hierarchical routing means, considering each ISP as an autonomous system (AS).
Each AS can run a routing protocol that meets its needs. The routing protocol run
inside each AS is referred to as intra-AS routing protocol, intra-domain routing
protocol, or interior gateway protocol (IGP); the global routing protocol is referred to
as inter-AS routing protocol, inter-domain routing protocol, or exterior gateway
protocol (EGP).
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 2
We can have several intradomain routing protocols, but we should have only one
interdomain protocol that handles routing between these entities.
2) Autonomous Systems
Each ISP is an autonomous system (AS): An AS is one which can manage all the
networks and routers under its control. Each AS is given a 16-bit unique, unsigned
autonomous number (ASN) by the ICANN. The ASes are categorized according to the
way they are connected to other ASs. We have stub ASs, multihomed AS, and
transient AS.
Stub AS. A stub AS has only one connection to another AS. The data traffic can
be either initiated (source) or terminated (sink) in a stub AS; the data cannot
pass through it. Ex: customer network
Multihomed AS. A multihomed AS can have more than one connection to other
ASs, but it does not allow data traffic to pass through it.
Transient AS. A transient AS is connected to more than one other AS and also
allows the traffic to pass through. The provider networks and the backbone are
good examples of transient ASs.
Hierarchical Routing
in the Internet
Intra-domain /intra-AS/
Interior Gateway
protocols (IGP)
Routing Information
Protocol -RIP (Based
on Distance Vector
Alg)
Open Shortest Path
First-OSPF protocol-
(Based on Link-state
alg)
Inter-domain/inter-AS/
exterior gateway
protocols (EGP)
Border Gateway
Protocol -BGP
(based on path vector
alg)
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 3
20.3.2 Routing Information Protocol (RIP)
The Routing Information Protocol (RIP) is one of the most widely used
intradomain routing protocols based on DV routing algorithm.
1) Hop Count
i. Since a router in an AS needs to know how to forward a packet to different
networks (subnets) in an AS, RIP routers advertise the cost of reaching
different networks. i.e., the cost is defined between a router and the network
in which the destination host is located.
ii. To make the implementation simpler (independent from performance factors
such as delay, bandwidth etc), the cost is defined as the number of hops i.e., the
number of networks (subnets) a packet needs to travel through from the
source router to the final destination host.
iii. The network in which the source host is connected is not counted as a hop,
since the source host does not use a forwarding table.
Fig. 20.15 shows the concept of hop count advertised by three routers. In RIP, the
maximum cost of a path can be 15 (i.e. 16 is considered as infinity [no connection –
not reachable]). So, RIP can be used only in when the diameter of the AS is not more
than 15 hops.
Fig.20.15 Hop counts in RIP
2) Forwarding Tables
The routers in an AS need to keep forwarding tables to forward packets to
their destination networks. A forwarding table in RIP is a 3-column table: first
column is the address of the destination network, the second column is the
address of the next router to which the packet should be forwarded, and the
third column is the cost (the number of hops) to reach the destination network.
Fig. 20.16 shows the three forwarding tables for the routers in Fig. 20.15.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 4
The second column actually gives the information about the whole least-cost tree.
For ex, R1 defines that the next router for the path to N4 is R2; R2 defines that the
next router to N4 is R3; R3 defines that there is no next router for this path. Thus, the
complete path of the tree is R1 → R2 → R3 → N4.
3) RIP Implementation
 RIP is implemented as a process that uses the service of UDP on the well-known
port number 520. RIP is a daemon process (a process running in the background)
named routed. RIP is a routing protocol to help IP route its datagrams through
the AS; but, RIP messages are encapsulated inside UDP user datagrams, which in
turn are encapsulated inside IP datagrams. i.e., RIP runs at the application layer,
but creates forwarding tables for IP at the network layer.
 RIP has gone through two versions: RIP-1 and RIP-2.
4) RIP Messages
 Two RIP processes, a client and a server, need to exchange messages. RIP-2
message format is shown in Fig. 20.17. Part of the message called entry, can be
repeated as needed in a message.
 RIP has two types of messages: request and response.
 A request message is sent by a router that is just booted or by a router that has
some time-out entries. A request message can ask about specific entries or all
entries. A response (or update) message can be either solicited or unsolicited.
A solicited response message is sent only as an answer to a request message.
It contains information about the destination specified in the corresponding
request message. An unsolicited response message is sent periodically
(every 30 seconds) or when there is a change in the forwarding table.
5) RIP Algorithm
 RIP implements a modified version of DV algorithm.
 Instead of sending only distance vectors, a router needs to send the whole
contents of its forwarding table in a response message.
 The receiver adds one hop to each cost and changes the next router field to the
address of the sending router. We call each route in the modified forwarding
table the received route and each route in the old forwarding table the old route.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 5
The router selects the old routes as the new ones except in the following three
cases:
i. If the received route does not exist in the old forwarding table, it should be
added to the route.
ii. If the cost of the received route is lower than the cost of the old one, the
received route should be selected as the new one.
iii. If the cost of the received route is higher than the cost of the old one, but the
value of the next router is the same in both routes, the received route should
be selected as the new one. For ex, suppose a neighbor has previously
advertised a route to a destination with cost 3, but now there is no path
between this neighbor and that destination. The neighbor advertises this
destination with cost value infinity (16 in RIP) & this must be considered.
 The new forwarding table needs to be sorted according to the destination
route (using the longest prefix first).
6) Timers in RIP
 RIP uses three timers to support its operation.
1. The periodic timer controls the advertising of regular update messages. Each
router has one periodic timer that is randomly set to a number between 25 and
35 seconds. The timer counts down; when it reaches zero, the update message
is sent, and the timer is randomly set once again.
2. The expiration timer governs the validity of a route. When a router receives
update information for a route, the expiration timer is set to 180 seconds for
that particular route. Every time a new update for the route is received, the
timer is reset. If no update is received within 180 seconds, the route is
considered expired and the hop count of the route is set to 16. (i.e., destination
unreachable). Every route has its own expiration timer.
3. The garbage collection timer is used to purge a route from the forwarding
table. When the information about a route becomes invalid, the router
continues to advertise the route with a metric value of 16. A garbage collection
timer is set to 120 seconds for that route. When the count reaches zero, the
route is purged from the table. This timer allows neighbors to become aware of
the invalidity of a route prior to purging.
7) Performance of RIP
 Update Messages –The update messages in RIP have a very simple format and
are sent only to neighbours; they are local. They do not normally create traffic.
 Convergence of Forwarding Tables – RIP uses the DV algorithm, but since
RIP allows only 15 hops in a domain, there is no problem in convergence.
Other issues may arise: like count-to-infinity and loops created in the domain.
 Robustness – DV routing is based on the concept that each router sends what
it knows about the domain to its neighbours. So, the calculation of the
forwarding table depends on information from their own neighbours. If there
is a failure or corruption in one router, the problem will be propagated to all
routers and the forwarding in each router will be affected.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 6
20.3.3 Open Shortest Path First (OSPF)
Open Shortest Path First (OSPF) is an intradomain routing protocol like RIP, but it
is based on the link-state routing algorithm. OSPF is an open protocol, which means
that the specification is a public document.
1) Metric
Each link (network) can be assigned a weight/cost based on the throughput, round-
trip time, reliability, hop count and so on. Fig 20.19 shows the idea of the cost from a
router to the destination host network.
2) Forwarding Tables
Each OSPF router can create a forwarding table after finding the shortest-path tree
between itself and the destination using Dijkstra’s algorithm. Fig. 20.20 shows the
forwarding tables for the simple AS in Fig. 20.19.
3) Areas
 OSPF was designed to handle routing in a small or large AS. However, the
formation of shortest-path trees in OSPF requires that all routers flood the
whole AS with their LSPs to create the global LSDB. This may create a huge
volume of traffic in a large AS. To prevent this, the AS needs to be divided into
small sections called areas. Each area acts as a small independent domain for
flooding LSPs. So, OSPF uses 2-level of hierarchy in routing: AS and area.
 Each router in an area needs to know the information about the link states in its
area as well as in other areas. So, one of the areas in the AS is designated as the
backbone area, responsible for gluing the areas together.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 7
 The routers in the backbone area pass the information collected by each area to
all other areas. Each area has an area identification. The area ID of the backbone
is zero. Fig. 20.21 shows an autonomous system and its areas.
Fig.20.21 Areas in an AS
4) Link-State Advertisement
 OSPF requires that a router advertise the state of each link to all neighbors for
the formation of the LSDB. In the Internet, we have different entities like nodes/
routers, different types of links that connect each node to its neighbors, and
different types of costs associated with each link. So, we need different types of
advertisements, each capable of advertising different situations.
 In OSPF, we have five types of link-state advertisements: router link, network
link, summary link to network, summary link to AS border router, and
external link. Fig. 20.22 shows different types of LSPs.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 8
a. Router link: A router link advertises the existence of a router as a node. It can
also define one or more types of links that connect the advertising router to
other entities.
i. A transient link announces a link to a transient network, a network that is
connected to the rest of the networks by one or more routers. The LSP
defines the address of the transient network and the cost of the link.
ii. A stub link advertises a link to a stub network, a network that is not a
through network.
iii. A point-to-point link should define the address of the router at the end of
the point-to-point line and the cost to get there.
b. Network link: A network link advertises the network as a node. Since a
network cannot do announcements itself (it is a passive entity), one of the
routers is assigned as the designated router and does the advertising. This type
of LSP announces the IP address of all routers (including the designated router
as a router), but no cost is advertised because each router announces the cost to
the network when it sends a router link advertisement.
c. Summary link to network: This is done by an area border router; it advertises
the summary of links collected by the backbone to an area or the summary of
links collected by the area to the backbone.
d. Summary link to AS: This is done by an AS router that advertises the summary
links from other ASs to the backbone area of the current AS. Required for
exterior gateway protocol operation.
e. External link: This is done by an AS router to announce the existence of a single
network outside the AS to the backbone area.
5) OSPF Implementation
 OSPF is a routing protocol to help IP to route its datagrams inside an AS & is
implemented as a program in the network layer. OSPF messages are
encapsulated inside IP datagrams with value of the protocol field to 89. Most
implementations use OSPF version 2.
6) OSPF Messages
 OSPF uses five different types of messages. In Fig. 20.23, we show the format of
the OSPF common header (which is used in all messages) and the link-state
general header (which is used in some messages).
The hello message (type 1) is used by a router to introduce itself to the neighbors
and announce all neighbors that it already knows.
The database description message (type 2) is normally sent in response to the
hello message to allow a newly joined router to acquire the full LSDB.
The linkstate request message (type 3) is sent by a router that needs information
about a specific LS.
The link-state update message (type 4) is the main OSPF message used for
building the LSDB. This message has five different versions for 5 different LSPs.
The link-state ACK message (type 5) is used to create reliability in OSPF; each
router that receives a link-state update message needs to acknowledge it.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 9
7) Authentication
As Fig. 20.23 shows, the OSPF common header has the provision for authentication
of the message sender. This prevents a malicious entity from sending OSPF messages
to a router.
8) OSPF Algorithm
OSPF implements the link-state routing algorithm with some modifications:
 After each router has created the shortest-path tree, the algorithm needs to use
it to create the corresponding routing algorithm
 The algorithm needs to be augmented to handle sending and receiving all five
types of messages.
9) Performance
Finally, let us briefly discuss the performance of OSPF:
❑ Update Message: The link-state messages in OSPF have a complex format. They
also are flooded to the whole area. If the area is large, these messages may create
heavy traffic and use a lot of bandwidth.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 10
❑ Convergence of Forwarding Table:. When the flooding of LSPs is completed, each
router can create its own shortest-path tree and forwarding table; convergence is
fairly quick. However, each router needs to run Dijkstra’s algorithm, which may take
some time.
❑ Robustness: The OSPF protocol is more robust than RIP because, after receiving
the completed LSDB, each router is independent and does not depend on other
routers in the area. Corruption or failure in one router does not affect other routers
as seriously as in RIP.
20.3.4 Border Gateway Protocol Version 4 (BGP4)
The Border Gateway Protocol version 4 (BGP4) is the only interdomain routing
protocol used in the Internet today. BGP4 is based on the path-vector algorithm and
also provides information about the reachability of networks in the Internet.
BGP should be used under following circumstances:
 Multiple connections exist to external ASes via different providers.
 Multiple connections exist to external ASes through the same providers, but
connect via a separate CO or routing policy.
 The existing routing equipment cannot handle the additional demands.
1) Introduction
BGPv4 is a complex protocol and used along with intra-domain routing protocols RIP
or OSPF.
Fig. 20.24 shows an example of an internet with four ASes. AS2, AS3, and AS4 are
stub autonomous systems; AS1 is a transient AS. In this ex, data exchange between
AS2, AS3, and AS4 should pass through AS1.
Fig.20.24 A sample internet with four Autonomous Systems
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 11
 Each AS uses one of the two common intra-domain protocols, RIP or OSPF.
 Each router in each AS knows how to reach a network that is in its own AS, but it
does not know how to reach a network in another AS.
 To enable each router to route a packet to any network in the internet, we have
two types of BGP software. i) external BGP (eBGP), on each border router
(communicate between different AS) ii) internal BGP (iBGP), on all routers
(running inside AS). i.e., the border routers will be running 3 routing protocols
(intradomain, eBGP, and iBGP), but other routers are running only two
protocols (intradomain and iBGP).
2) Operation of External BGP (eBGP)
 BGP is a kind of point-to-point protocol. When the software is installed on two
routers, they create a TCP connection using the well-known port 179. The two
routers that run the BGP processes are called BGP peers or BGP speakers. eBGP
routers should be in two different ASes, but need to be directly connected.
 The eBGP allows two physically connected border routers in two different ASs
to form pairs of eBGP speakers and exchange messages. Such pairs in Fig. 20.24
are: R1-R5, R2-R6, and R4-R9. The connection between these pairs is established
over three physical WANs (N5, N6, and N7). eBGP neighbors must have different
AS numbers
 A logical TCP connection need to be created for information exchange. Each
logical connection in BGP is referred to as a session. The 3 BGP sessions are
shown in Fig 20.25.
Fig.20.25 eBGP Operation
 Fig.20.25 also shows the simplified update messages sent by routers. The circled
number defines the sending router. For ex, message 1 is sent by router R1 and
tells router R5 that N1, N2, N3, and N4 can be reached through router R1. Router
R5 can now add this information at the end of its forwarding table.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 12
Problems:
i. Some border routers do not know how to route a packet destined for
nonneighbor ASs. For ex, R5 does not know how to route packets for networks
in AS3 and AS4.
ii. None of the nonborder routers (Ex: R3, R7, R8) know how to route a packet
destined for any networks in other ASs.
Solution: Allow all pairs of routers (border or nonborder) to run the second
variation of the BGP protocol called iBGP.
3) Operation of Internal BGP (iBGP)
When BGP is running inside an AS, it is referred to as Internal BGP (iBGP).
iBGP neighbors are in the same AS. i.e., iBGP neighbors must have the same AS
number.
iBGP neighbors do not need to be directly connected.
It uses the service of TCP on the well-known port 179, but it creates a session
between any possible pair of routers inside an AS.
If an AS has only one router, there cannot be an iBGP session.
If there are n routers in an AS, there should be [n × (n − 1) / 2] iBGP sessions in
that AS (a fully connected mesh) to prevent loops in the system. i.e., each router
needs to advertise its own reachability to the peer in the session.
Fig.20.26 Combination of eBGP and iBGP in an internet
At this stage, only four messages are exchanged. The first message (1) is sent by
R1 announcing that networks N8 and N9 are reachable through the path AS1-
AS2, but the next router is R1. This message is sent to R2, R3, and R4 through
different sessions.
Similarly, Routers R2, R4, and R6 send different messages to different
destinations. R3, R7, and R8 create sessions with their peers, but they have no
message to send.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 13
The process continues. For ex, router R1 gets update from R2, updates its table
and sends new updates to R5. Finally at some point of time, each router
combines the information received from eBGP and iBGP and creates a path table
after applying the criteria for finding the best path.
To demonstrate, we show the path tables in Fig. 20.27 for the routers in Fig
20.24. For ex, router R1 now knows that any packet destined for networks N8 or
N9 should go through AS1 and AS2 and the next router to deliver the packet to is
router R5.
The path tables collected and organized by BGP are not directly used for routing
packets; they are injected into intradomain forwarding tables (RIP or OSPF).
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 14
4) Path Attributes
Inter-domain routing needs more information (compared to intra-domain) about
how to reach the final destination. In BGP these are called path attributes.
BGP allows a destination to be associated with up to seven path attributes.
Path attributes are divided into two broad categories: well-known and optional.
A well-known attribute must be recognized by all routers; an optional attribute
need not be. A well-known attribute can be mandatory or discretionary.
An optional attribute can be either transitive, which means it can pass to the
next AS, or intransitive, which means it cannot.
The format for an attribute is shown in Fig.20.29.
The first byte in each attribute defines the four attribute flags O, T, P ,E.
The next byte defines the type of attributes assigned by ICANN (7 types)
The attribute value length defines the length of the attribute value field (not
the length of the whole attributes section).
Description of each Attribute:
 ORIGIN (type 1): Well-known mandatory attribute – defines the source of the
routing information. This has 3 values: Value 1- information has come from an
intradomain protocol (RIP or OSPF), Value 2 - information comes from BGP,
Value 3 - it comes from an unknown source.
 AS-PATH (type 2): Well-known mandatory attribute - defines the list of ASes
through which the destination can be reached. Helps prevent a loop. The AS-
PATH can also be used in route selection.
 NEXT-HOP (type 3): Well-known mandatory attribute - defines the next router to
which the data packet should be forwarded.
 MULT-EXIT-DISC (type 4): Multiple-exit-discriminator is an optional intransitive
attribute - distinguish among multiple exit paths to a destination. It is not
propagated from one AS to another.
 LOCAL-PREF (type 5): Well-known discretionary attribute. It is normally set by
the administrator. The routes the administrator prefers are given a higher local
preference value. Provides a preference to determine the best path for outbound
traffic.
 ATOMIC-AGGREGATE (type 6): Well-known discretionary attribute - defines a
single destination network. This attribute has no value field.
 AGGREGATOR (type 7): This is an optional transitive attribute – identifies the
BGP router that performed an address aggregation.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 15
5) BGP Route Selection
When multiple routes are received to a destination, BGP needs to select one among
them. A route in BGP has some attributes attached to it and it may come from an
eBGP session or an iBGP session.
The router extracts the routes which meet the criteria in each step. If only one route
is extracted, it is selected and the process stops; otherwise, the process continues
with the next step. Note that the first choice is related to the LOCAL-PREF attribute.
Fig. 20.30 shows the flow diagram
6) BGP Messages
 BGP uses four types of messages for communication between the BGP speakers
across the ASs and inside an AS: open, update, keepalive, and notification
 All BGP packets share the same common header. Refer Fig.20.31
❑ Open Message: To create a neighborhood relationship, a router running BGP
opens a TCP connection with a neighbor and sends an open message.
❑ Update Message: The update message is the heart of the BGP protocol. It is used
by a router to withdraw destinations to announce a route to a new destination, or
both. BGP can withdraw several destinations, but it can only advertise one new
destination (or multiple destinations with the same path attributes) in a single
update message.
❑ Keepalive Message: The BGP peers that are running, exchange keepalive
messages regularly to tell each other that they are alive.
❑ Notification: A notification message is sent by a router whenever an error
condition is detected or a router wants to close the session.
Computer Communication Networks-17EC64 Module 4
Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 16
Fig.20.31 BGP Messages

Contenu connexe

Tendances

WAN Technology : ATM - Forouzan
WAN Technology : ATM - ForouzanWAN Technology : ATM - Forouzan
WAN Technology : ATM - ForouzanPradnya Saval
 
Transport control protocols for Wireless sensor networks
Transport control protocols for Wireless sensor networksTransport control protocols for Wireless sensor networks
Transport control protocols for Wireless sensor networksRushin Shah
 
An overview of TCP (Transmission Control Protocol)
An overview of TCP (Transmission Control Protocol)An overview of TCP (Transmission Control Protocol)
An overview of TCP (Transmission Control Protocol)Ammad Marwat
 
TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionShubham Khedekar
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and modelsMayank Jain
 
Chapter 2 - Network Models
Chapter 2 - Network ModelsChapter 2 - Network Models
Chapter 2 - Network ModelsWayne Jones Jnr
 
Mobile transport layer - traditional TCP
Mobile transport layer - traditional TCPMobile transport layer - traditional TCP
Mobile transport layer - traditional TCPVishal Tandel
 
Computer Networks Lecture Notes
Computer Networks Lecture NotesComputer Networks Lecture Notes
Computer Networks Lecture NotesFellowBuddy.com
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 
Computer Communication Networks-Wireless LAN
Computer Communication Networks-Wireless LANComputer Communication Networks-Wireless LAN
Computer Communication Networks-Wireless LANKrishna Nanda
 

Tendances (20)

On demand provisioning
On demand provisioningOn demand provisioning
On demand provisioning
 
WAN Technology : ATM - Forouzan
WAN Technology : ATM - ForouzanWAN Technology : ATM - Forouzan
WAN Technology : ATM - Forouzan
 
Transport control protocols for Wireless sensor networks
Transport control protocols for Wireless sensor networksTransport control protocols for Wireless sensor networks
Transport control protocols for Wireless sensor networks
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Delivery and Forwarding of IP Packets
Delivery and Forwarding of IP PacketsDelivery and Forwarding of IP Packets
Delivery and Forwarding of IP Packets
 
An overview of TCP (Transmission Control Protocol)
An overview of TCP (Transmission Control Protocol)An overview of TCP (Transmission Control Protocol)
An overview of TCP (Transmission Control Protocol)
 
TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer Description
 
Global state routing
Global state routingGlobal state routing
Global state routing
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and models
 
Chapter 2 - Network Models
Chapter 2 - Network ModelsChapter 2 - Network Models
Chapter 2 - Network Models
 
Mobile transport layer - traditional TCP
Mobile transport layer - traditional TCPMobile transport layer - traditional TCP
Mobile transport layer - traditional TCP
 
Computer Networks Lecture Notes
Computer Networks Lecture NotesComputer Networks Lecture Notes
Computer Networks Lecture Notes
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
Routing in vanet
Routing in vanetRouting in vanet
Routing in vanet
 
Cs8591 Computer Networks
Cs8591 Computer NetworksCs8591 Computer Networks
Cs8591 Computer Networks
 
Routing Protocols in WSN
Routing Protocols in WSNRouting Protocols in WSN
Routing Protocols in WSN
 
HDLC
HDLCHDLC
HDLC
 
Computer Communication Networks-Wireless LAN
Computer Communication Networks-Wireless LANComputer Communication Networks-Wireless LAN
Computer Communication Networks-Wireless LAN
 
Computer network physical layer
Computer network  physical layerComputer network  physical layer
Computer network physical layer
 

Similaire à COMPUTER COMMUNICATION NETWORKS-R-Routing protocols 2

16 coms 525 tcpip - routing protocols -all
16    coms 525 tcpip - routing protocols -all16    coms 525 tcpip - routing protocols -all
16 coms 525 tcpip - routing protocols -allPalanivel Kuppusamy
 
IPv6 Routing.pdf
IPv6 Routing.pdfIPv6 Routing.pdf
IPv6 Routing.pdfniran10
 
3 ip routing eigrp
3 ip routing eigrp3 ip routing eigrp
3 ip routing eigrpSagarR24
 
Chapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptxChapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptxGirT2
 
OSPF (Open Shortest Path First) Case Study: Anil Nembang
OSPF (Open Shortest Path First) Case Study: Anil NembangOSPF (Open Shortest Path First) Case Study: Anil Nembang
OSPF (Open Shortest Path First) Case Study: Anil NembangAnil Nembang
 
All in one q & ans
All in one q & ansAll in one q & ans
All in one q & ansRavi Kodoli
 
Routing Protocols.pptx
Routing Protocols.pptxRouting Protocols.pptx
Routing Protocols.pptxsazia7
 
Routing Information Protocol (RIP)
Routing Information Protocol (RIP)Routing Information Protocol (RIP)
Routing Information Protocol (RIP)Amna Nawazish
 
UNIT-IV.pptx
UNIT-IV.pptxUNIT-IV.pptx
UNIT-IV.pptxpbrinda
 
A Comparative Performance Analysis of Route Redistribution among Three Differ...
A Comparative Performance Analysis of Route Redistribution among Three Differ...A Comparative Performance Analysis of Route Redistribution among Three Differ...
A Comparative Performance Analysis of Route Redistribution among Three Differ...IJCNCJournal
 
ConfigureTwo networks principle
ConfigureTwo networks principleConfigureTwo networks principle
ConfigureTwo networks principleDrAlneami
 
Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routingphanleson
 
Performance Analysis of Routing Protocols RIP, OSPF and EIGRP
Performance Analysis of Routing Protocols RIP, OSPF and EIGRPPerformance Analysis of Routing Protocols RIP, OSPF and EIGRP
Performance Analysis of Routing Protocols RIP, OSPF and EIGRPIRJET Journal
 

Similaire à COMPUTER COMMUNICATION NETWORKS-R-Routing protocols 2 (20)

16 coms 525 tcpip - routing protocols -all
16    coms 525 tcpip - routing protocols -all16    coms 525 tcpip - routing protocols -all
16 coms 525 tcpip - routing protocols -all
 
Qs.pptx
Qs.pptxQs.pptx
Qs.pptx
 
IPv6 Routing.pdf
IPv6 Routing.pdfIPv6 Routing.pdf
IPv6 Routing.pdf
 
3 ip routing eigrp
3 ip routing eigrp3 ip routing eigrp
3 ip routing eigrp
 
DSR,LSR,IGMP,RIP,OSPF.ppt
DSR,LSR,IGMP,RIP,OSPF.pptDSR,LSR,IGMP,RIP,OSPF.ppt
DSR,LSR,IGMP,RIP,OSPF.ppt
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
Chapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptxChapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptx
 
C0343015019
C0343015019C0343015019
C0343015019
 
Arun project-Final
Arun project-FinalArun project-Final
Arun project-Final
 
OSPF (Open Shortest Path First) Case Study: Anil Nembang
OSPF (Open Shortest Path First) Case Study: Anil NembangOSPF (Open Shortest Path First) Case Study: Anil Nembang
OSPF (Open Shortest Path First) Case Study: Anil Nembang
 
All in one q & ans
All in one q & ansAll in one q & ans
All in one q & ans
 
Routing Protocols.pptx
Routing Protocols.pptxRouting Protocols.pptx
Routing Protocols.pptx
 
Routing Information Protocol (RIP)
Routing Information Protocol (RIP)Routing Information Protocol (RIP)
Routing Information Protocol (RIP)
 
UNIT-IV.pptx
UNIT-IV.pptxUNIT-IV.pptx
UNIT-IV.pptx
 
A Comparative Performance Analysis of Route Redistribution among Three Differ...
A Comparative Performance Analysis of Route Redistribution among Three Differ...A Comparative Performance Analysis of Route Redistribution among Three Differ...
A Comparative Performance Analysis of Route Redistribution among Three Differ...
 
Routing.ppt
Routing.pptRouting.ppt
Routing.ppt
 
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
 
ConfigureTwo networks principle
ConfigureTwo networks principleConfigureTwo networks principle
ConfigureTwo networks principle
 
Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routing
 
Performance Analysis of Routing Protocols RIP, OSPF and EIGRP
Performance Analysis of Routing Protocols RIP, OSPF and EIGRPPerformance Analysis of Routing Protocols RIP, OSPF and EIGRP
Performance Analysis of Routing Protocols RIP, OSPF and EIGRP
 

Plus de Krishna Nanda

Python regular expressions
Python regular expressionsPython regular expressions
Python regular expressionsKrishna Nanda
 
Computer Communication Networks- Introduction to Transport layer
Computer Communication Networks- Introduction to Transport layerComputer Communication Networks- Introduction to Transport layer
Computer Communication Networks- Introduction to Transport layerKrishna Nanda
 
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLSComputer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLSKrishna Nanda
 
COMPUTER COMMUNICATION NETWORKS -IPv4
COMPUTER COMMUNICATION NETWORKS -IPv4COMPUTER COMMUNICATION NETWORKS -IPv4
COMPUTER COMMUNICATION NETWORKS -IPv4Krishna Nanda
 
Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Krishna Nanda
 
Computer Communication Networks-Network Layer
Computer Communication Networks-Network LayerComputer Communication Networks-Network Layer
Computer Communication Networks-Network LayerKrishna Nanda
 
Lk module4 structures
Lk module4 structuresLk module4 structures
Lk module4 structuresKrishna Nanda
 

Plus de Krishna Nanda (15)

Python regular expressions
Python regular expressionsPython regular expressions
Python regular expressions
 
Python dictionaries
Python dictionariesPython dictionaries
Python dictionaries
 
Python lists
Python listsPython lists
Python lists
 
Python-Tuples
Python-TuplesPython-Tuples
Python-Tuples
 
Python- strings
Python- stringsPython- strings
Python- strings
 
Python-files
Python-filesPython-files
Python-files
 
Computer Communication Networks- Introduction to Transport layer
Computer Communication Networks- Introduction to Transport layerComputer Communication Networks- Introduction to Transport layer
Computer Communication Networks- Introduction to Transport layer
 
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLSComputer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
 
COMPUTER COMMUNICATION NETWORKS -IPv4
COMPUTER COMMUNICATION NETWORKS -IPv4COMPUTER COMMUNICATION NETWORKS -IPv4
COMPUTER COMMUNICATION NETWORKS -IPv4
 
Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1
 
Computer Communication Networks-Network Layer
Computer Communication Networks-Network LayerComputer Communication Networks-Network Layer
Computer Communication Networks-Network Layer
 
Lk module3
Lk module3Lk module3
Lk module3
 
Lk module4 structures
Lk module4 structuresLk module4 structures
Lk module4 structures
 
Lk module4 file
Lk module4 fileLk module4 file
Lk module4 file
 
Lk module5 pointers
Lk module5 pointersLk module5 pointers
Lk module5 pointers
 

Dernier

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 

Dernier (20)

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 

COMPUTER COMMUNICATION NETWORKS-R-Routing protocols 2

  • 1. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 1 CHAPTER 20 UNICAST ROUTING PROTOCOLS IN THE INTERNET A protocol needs to define its domain of operation, the messages exchanged, communication between routers, and interaction with protocols in other domains. There are three common protocols used in the Internet: Routing Information Protocol (RIP)- based on the distance-vector algorithm, Open Shortest Path First (OSPF)- based on the link-state algorithm, and Border Gateway Protocol (BGP) - based on the path-vector algorithm. 20.3.1 Internet Structure The Internet today is a multi-backbone structure run by different private corporations. A typical structure is shown in Fig. 20.14. There are several backbones run by private communication companies that provide global connectivity. Any of these three entities (backbone, provider network, or customer network) can be called an Internet Service Provider or ISP. 1) Hierarchical Routing The Internet today is made of a huge number of networks and routers that connect them. So, routing in the Internet cannot be done using a single protocol for two reasons: scalability problem and administrative issues. Hierarchical routing means, considering each ISP as an autonomous system (AS). Each AS can run a routing protocol that meets its needs. The routing protocol run inside each AS is referred to as intra-AS routing protocol, intra-domain routing protocol, or interior gateway protocol (IGP); the global routing protocol is referred to as inter-AS routing protocol, inter-domain routing protocol, or exterior gateway protocol (EGP).
  • 2. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 2 We can have several intradomain routing protocols, but we should have only one interdomain protocol that handles routing between these entities. 2) Autonomous Systems Each ISP is an autonomous system (AS): An AS is one which can manage all the networks and routers under its control. Each AS is given a 16-bit unique, unsigned autonomous number (ASN) by the ICANN. The ASes are categorized according to the way they are connected to other ASs. We have stub ASs, multihomed AS, and transient AS. Stub AS. A stub AS has only one connection to another AS. The data traffic can be either initiated (source) or terminated (sink) in a stub AS; the data cannot pass through it. Ex: customer network Multihomed AS. A multihomed AS can have more than one connection to other ASs, but it does not allow data traffic to pass through it. Transient AS. A transient AS is connected to more than one other AS and also allows the traffic to pass through. The provider networks and the backbone are good examples of transient ASs. Hierarchical Routing in the Internet Intra-domain /intra-AS/ Interior Gateway protocols (IGP) Routing Information Protocol -RIP (Based on Distance Vector Alg) Open Shortest Path First-OSPF protocol- (Based on Link-state alg) Inter-domain/inter-AS/ exterior gateway protocols (EGP) Border Gateway Protocol -BGP (based on path vector alg)
  • 3. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 3 20.3.2 Routing Information Protocol (RIP) The Routing Information Protocol (RIP) is one of the most widely used intradomain routing protocols based on DV routing algorithm. 1) Hop Count i. Since a router in an AS needs to know how to forward a packet to different networks (subnets) in an AS, RIP routers advertise the cost of reaching different networks. i.e., the cost is defined between a router and the network in which the destination host is located. ii. To make the implementation simpler (independent from performance factors such as delay, bandwidth etc), the cost is defined as the number of hops i.e., the number of networks (subnets) a packet needs to travel through from the source router to the final destination host. iii. The network in which the source host is connected is not counted as a hop, since the source host does not use a forwarding table. Fig. 20.15 shows the concept of hop count advertised by three routers. In RIP, the maximum cost of a path can be 15 (i.e. 16 is considered as infinity [no connection – not reachable]). So, RIP can be used only in when the diameter of the AS is not more than 15 hops. Fig.20.15 Hop counts in RIP 2) Forwarding Tables The routers in an AS need to keep forwarding tables to forward packets to their destination networks. A forwarding table in RIP is a 3-column table: first column is the address of the destination network, the second column is the address of the next router to which the packet should be forwarded, and the third column is the cost (the number of hops) to reach the destination network. Fig. 20.16 shows the three forwarding tables for the routers in Fig. 20.15.
  • 4. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 4 The second column actually gives the information about the whole least-cost tree. For ex, R1 defines that the next router for the path to N4 is R2; R2 defines that the next router to N4 is R3; R3 defines that there is no next router for this path. Thus, the complete path of the tree is R1 → R2 → R3 → N4. 3) RIP Implementation  RIP is implemented as a process that uses the service of UDP on the well-known port number 520. RIP is a daemon process (a process running in the background) named routed. RIP is a routing protocol to help IP route its datagrams through the AS; but, RIP messages are encapsulated inside UDP user datagrams, which in turn are encapsulated inside IP datagrams. i.e., RIP runs at the application layer, but creates forwarding tables for IP at the network layer.  RIP has gone through two versions: RIP-1 and RIP-2. 4) RIP Messages  Two RIP processes, a client and a server, need to exchange messages. RIP-2 message format is shown in Fig. 20.17. Part of the message called entry, can be repeated as needed in a message.  RIP has two types of messages: request and response.  A request message is sent by a router that is just booted or by a router that has some time-out entries. A request message can ask about specific entries or all entries. A response (or update) message can be either solicited or unsolicited. A solicited response message is sent only as an answer to a request message. It contains information about the destination specified in the corresponding request message. An unsolicited response message is sent periodically (every 30 seconds) or when there is a change in the forwarding table. 5) RIP Algorithm  RIP implements a modified version of DV algorithm.  Instead of sending only distance vectors, a router needs to send the whole contents of its forwarding table in a response message.  The receiver adds one hop to each cost and changes the next router field to the address of the sending router. We call each route in the modified forwarding table the received route and each route in the old forwarding table the old route.
  • 5. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 5 The router selects the old routes as the new ones except in the following three cases: i. If the received route does not exist in the old forwarding table, it should be added to the route. ii. If the cost of the received route is lower than the cost of the old one, the received route should be selected as the new one. iii. If the cost of the received route is higher than the cost of the old one, but the value of the next router is the same in both routes, the received route should be selected as the new one. For ex, suppose a neighbor has previously advertised a route to a destination with cost 3, but now there is no path between this neighbor and that destination. The neighbor advertises this destination with cost value infinity (16 in RIP) & this must be considered.  The new forwarding table needs to be sorted according to the destination route (using the longest prefix first). 6) Timers in RIP  RIP uses three timers to support its operation. 1. The periodic timer controls the advertising of regular update messages. Each router has one periodic timer that is randomly set to a number between 25 and 35 seconds. The timer counts down; when it reaches zero, the update message is sent, and the timer is randomly set once again. 2. The expiration timer governs the validity of a route. When a router receives update information for a route, the expiration timer is set to 180 seconds for that particular route. Every time a new update for the route is received, the timer is reset. If no update is received within 180 seconds, the route is considered expired and the hop count of the route is set to 16. (i.e., destination unreachable). Every route has its own expiration timer. 3. The garbage collection timer is used to purge a route from the forwarding table. When the information about a route becomes invalid, the router continues to advertise the route with a metric value of 16. A garbage collection timer is set to 120 seconds for that route. When the count reaches zero, the route is purged from the table. This timer allows neighbors to become aware of the invalidity of a route prior to purging. 7) Performance of RIP  Update Messages –The update messages in RIP have a very simple format and are sent only to neighbours; they are local. They do not normally create traffic.  Convergence of Forwarding Tables – RIP uses the DV algorithm, but since RIP allows only 15 hops in a domain, there is no problem in convergence. Other issues may arise: like count-to-infinity and loops created in the domain.  Robustness – DV routing is based on the concept that each router sends what it knows about the domain to its neighbours. So, the calculation of the forwarding table depends on information from their own neighbours. If there is a failure or corruption in one router, the problem will be propagated to all routers and the forwarding in each router will be affected.
  • 6. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 6 20.3.3 Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an intradomain routing protocol like RIP, but it is based on the link-state routing algorithm. OSPF is an open protocol, which means that the specification is a public document. 1) Metric Each link (network) can be assigned a weight/cost based on the throughput, round- trip time, reliability, hop count and so on. Fig 20.19 shows the idea of the cost from a router to the destination host network. 2) Forwarding Tables Each OSPF router can create a forwarding table after finding the shortest-path tree between itself and the destination using Dijkstra’s algorithm. Fig. 20.20 shows the forwarding tables for the simple AS in Fig. 20.19. 3) Areas  OSPF was designed to handle routing in a small or large AS. However, the formation of shortest-path trees in OSPF requires that all routers flood the whole AS with their LSPs to create the global LSDB. This may create a huge volume of traffic in a large AS. To prevent this, the AS needs to be divided into small sections called areas. Each area acts as a small independent domain for flooding LSPs. So, OSPF uses 2-level of hierarchy in routing: AS and area.  Each router in an area needs to know the information about the link states in its area as well as in other areas. So, one of the areas in the AS is designated as the backbone area, responsible for gluing the areas together.
  • 7. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 7  The routers in the backbone area pass the information collected by each area to all other areas. Each area has an area identification. The area ID of the backbone is zero. Fig. 20.21 shows an autonomous system and its areas. Fig.20.21 Areas in an AS 4) Link-State Advertisement  OSPF requires that a router advertise the state of each link to all neighbors for the formation of the LSDB. In the Internet, we have different entities like nodes/ routers, different types of links that connect each node to its neighbors, and different types of costs associated with each link. So, we need different types of advertisements, each capable of advertising different situations.  In OSPF, we have five types of link-state advertisements: router link, network link, summary link to network, summary link to AS border router, and external link. Fig. 20.22 shows different types of LSPs.
  • 8. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 8 a. Router link: A router link advertises the existence of a router as a node. It can also define one or more types of links that connect the advertising router to other entities. i. A transient link announces a link to a transient network, a network that is connected to the rest of the networks by one or more routers. The LSP defines the address of the transient network and the cost of the link. ii. A stub link advertises a link to a stub network, a network that is not a through network. iii. A point-to-point link should define the address of the router at the end of the point-to-point line and the cost to get there. b. Network link: A network link advertises the network as a node. Since a network cannot do announcements itself (it is a passive entity), one of the routers is assigned as the designated router and does the advertising. This type of LSP announces the IP address of all routers (including the designated router as a router), but no cost is advertised because each router announces the cost to the network when it sends a router link advertisement. c. Summary link to network: This is done by an area border router; it advertises the summary of links collected by the backbone to an area or the summary of links collected by the area to the backbone. d. Summary link to AS: This is done by an AS router that advertises the summary links from other ASs to the backbone area of the current AS. Required for exterior gateway protocol operation. e. External link: This is done by an AS router to announce the existence of a single network outside the AS to the backbone area. 5) OSPF Implementation  OSPF is a routing protocol to help IP to route its datagrams inside an AS & is implemented as a program in the network layer. OSPF messages are encapsulated inside IP datagrams with value of the protocol field to 89. Most implementations use OSPF version 2. 6) OSPF Messages  OSPF uses five different types of messages. In Fig. 20.23, we show the format of the OSPF common header (which is used in all messages) and the link-state general header (which is used in some messages). The hello message (type 1) is used by a router to introduce itself to the neighbors and announce all neighbors that it already knows. The database description message (type 2) is normally sent in response to the hello message to allow a newly joined router to acquire the full LSDB. The linkstate request message (type 3) is sent by a router that needs information about a specific LS. The link-state update message (type 4) is the main OSPF message used for building the LSDB. This message has five different versions for 5 different LSPs. The link-state ACK message (type 5) is used to create reliability in OSPF; each router that receives a link-state update message needs to acknowledge it.
  • 9. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 9 7) Authentication As Fig. 20.23 shows, the OSPF common header has the provision for authentication of the message sender. This prevents a malicious entity from sending OSPF messages to a router. 8) OSPF Algorithm OSPF implements the link-state routing algorithm with some modifications:  After each router has created the shortest-path tree, the algorithm needs to use it to create the corresponding routing algorithm  The algorithm needs to be augmented to handle sending and receiving all five types of messages. 9) Performance Finally, let us briefly discuss the performance of OSPF: ❑ Update Message: The link-state messages in OSPF have a complex format. They also are flooded to the whole area. If the area is large, these messages may create heavy traffic and use a lot of bandwidth.
  • 10. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 10 ❑ Convergence of Forwarding Table:. When the flooding of LSPs is completed, each router can create its own shortest-path tree and forwarding table; convergence is fairly quick. However, each router needs to run Dijkstra’s algorithm, which may take some time. ❑ Robustness: The OSPF protocol is more robust than RIP because, after receiving the completed LSDB, each router is independent and does not depend on other routers in the area. Corruption or failure in one router does not affect other routers as seriously as in RIP. 20.3.4 Border Gateway Protocol Version 4 (BGP4) The Border Gateway Protocol version 4 (BGP4) is the only interdomain routing protocol used in the Internet today. BGP4 is based on the path-vector algorithm and also provides information about the reachability of networks in the Internet. BGP should be used under following circumstances:  Multiple connections exist to external ASes via different providers.  Multiple connections exist to external ASes through the same providers, but connect via a separate CO or routing policy.  The existing routing equipment cannot handle the additional demands. 1) Introduction BGPv4 is a complex protocol and used along with intra-domain routing protocols RIP or OSPF. Fig. 20.24 shows an example of an internet with four ASes. AS2, AS3, and AS4 are stub autonomous systems; AS1 is a transient AS. In this ex, data exchange between AS2, AS3, and AS4 should pass through AS1. Fig.20.24 A sample internet with four Autonomous Systems
  • 11. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 11  Each AS uses one of the two common intra-domain protocols, RIP or OSPF.  Each router in each AS knows how to reach a network that is in its own AS, but it does not know how to reach a network in another AS.  To enable each router to route a packet to any network in the internet, we have two types of BGP software. i) external BGP (eBGP), on each border router (communicate between different AS) ii) internal BGP (iBGP), on all routers (running inside AS). i.e., the border routers will be running 3 routing protocols (intradomain, eBGP, and iBGP), but other routers are running only two protocols (intradomain and iBGP). 2) Operation of External BGP (eBGP)  BGP is a kind of point-to-point protocol. When the software is installed on two routers, they create a TCP connection using the well-known port 179. The two routers that run the BGP processes are called BGP peers or BGP speakers. eBGP routers should be in two different ASes, but need to be directly connected.  The eBGP allows two physically connected border routers in two different ASs to form pairs of eBGP speakers and exchange messages. Such pairs in Fig. 20.24 are: R1-R5, R2-R6, and R4-R9. The connection between these pairs is established over three physical WANs (N5, N6, and N7). eBGP neighbors must have different AS numbers  A logical TCP connection need to be created for information exchange. Each logical connection in BGP is referred to as a session. The 3 BGP sessions are shown in Fig 20.25. Fig.20.25 eBGP Operation  Fig.20.25 also shows the simplified update messages sent by routers. The circled number defines the sending router. For ex, message 1 is sent by router R1 and tells router R5 that N1, N2, N3, and N4 can be reached through router R1. Router R5 can now add this information at the end of its forwarding table.
  • 12. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 12 Problems: i. Some border routers do not know how to route a packet destined for nonneighbor ASs. For ex, R5 does not know how to route packets for networks in AS3 and AS4. ii. None of the nonborder routers (Ex: R3, R7, R8) know how to route a packet destined for any networks in other ASs. Solution: Allow all pairs of routers (border or nonborder) to run the second variation of the BGP protocol called iBGP. 3) Operation of Internal BGP (iBGP) When BGP is running inside an AS, it is referred to as Internal BGP (iBGP). iBGP neighbors are in the same AS. i.e., iBGP neighbors must have the same AS number. iBGP neighbors do not need to be directly connected. It uses the service of TCP on the well-known port 179, but it creates a session between any possible pair of routers inside an AS. If an AS has only one router, there cannot be an iBGP session. If there are n routers in an AS, there should be [n × (n − 1) / 2] iBGP sessions in that AS (a fully connected mesh) to prevent loops in the system. i.e., each router needs to advertise its own reachability to the peer in the session. Fig.20.26 Combination of eBGP and iBGP in an internet At this stage, only four messages are exchanged. The first message (1) is sent by R1 announcing that networks N8 and N9 are reachable through the path AS1- AS2, but the next router is R1. This message is sent to R2, R3, and R4 through different sessions. Similarly, Routers R2, R4, and R6 send different messages to different destinations. R3, R7, and R8 create sessions with their peers, but they have no message to send.
  • 13. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 13 The process continues. For ex, router R1 gets update from R2, updates its table and sends new updates to R5. Finally at some point of time, each router combines the information received from eBGP and iBGP and creates a path table after applying the criteria for finding the best path. To demonstrate, we show the path tables in Fig. 20.27 for the routers in Fig 20.24. For ex, router R1 now knows that any packet destined for networks N8 or N9 should go through AS1 and AS2 and the next router to deliver the packet to is router R5. The path tables collected and organized by BGP are not directly used for routing packets; they are injected into intradomain forwarding tables (RIP or OSPF).
  • 14. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 14 4) Path Attributes Inter-domain routing needs more information (compared to intra-domain) about how to reach the final destination. In BGP these are called path attributes. BGP allows a destination to be associated with up to seven path attributes. Path attributes are divided into two broad categories: well-known and optional. A well-known attribute must be recognized by all routers; an optional attribute need not be. A well-known attribute can be mandatory or discretionary. An optional attribute can be either transitive, which means it can pass to the next AS, or intransitive, which means it cannot. The format for an attribute is shown in Fig.20.29. The first byte in each attribute defines the four attribute flags O, T, P ,E. The next byte defines the type of attributes assigned by ICANN (7 types) The attribute value length defines the length of the attribute value field (not the length of the whole attributes section). Description of each Attribute:  ORIGIN (type 1): Well-known mandatory attribute – defines the source of the routing information. This has 3 values: Value 1- information has come from an intradomain protocol (RIP or OSPF), Value 2 - information comes from BGP, Value 3 - it comes from an unknown source.  AS-PATH (type 2): Well-known mandatory attribute - defines the list of ASes through which the destination can be reached. Helps prevent a loop. The AS- PATH can also be used in route selection.  NEXT-HOP (type 3): Well-known mandatory attribute - defines the next router to which the data packet should be forwarded.  MULT-EXIT-DISC (type 4): Multiple-exit-discriminator is an optional intransitive attribute - distinguish among multiple exit paths to a destination. It is not propagated from one AS to another.  LOCAL-PREF (type 5): Well-known discretionary attribute. It is normally set by the administrator. The routes the administrator prefers are given a higher local preference value. Provides a preference to determine the best path for outbound traffic.  ATOMIC-AGGREGATE (type 6): Well-known discretionary attribute - defines a single destination network. This attribute has no value field.  AGGREGATOR (type 7): This is an optional transitive attribute – identifies the BGP router that performed an address aggregation.
  • 15. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 15 5) BGP Route Selection When multiple routes are received to a destination, BGP needs to select one among them. A route in BGP has some attributes attached to it and it may come from an eBGP session or an iBGP session. The router extracts the routes which meet the criteria in each step. If only one route is extracted, it is selected and the process stops; otherwise, the process continues with the next step. Note that the first choice is related to the LOCAL-PREF attribute. Fig. 20.30 shows the flow diagram 6) BGP Messages  BGP uses four types of messages for communication between the BGP speakers across the ASs and inside an AS: open, update, keepalive, and notification  All BGP packets share the same common header. Refer Fig.20.31 ❑ Open Message: To create a neighborhood relationship, a router running BGP opens a TCP connection with a neighbor and sends an open message. ❑ Update Message: The update message is the heart of the BGP protocol. It is used by a router to withdraw destinations to announce a route to a new destination, or both. BGP can withdraw several destinations, but it can only advertise one new destination (or multiple destinations with the same path attributes) in a single update message. ❑ Keepalive Message: The BGP peers that are running, exchange keepalive messages regularly to tell each other that they are alive. ❑ Notification: A notification message is sent by a router whenever an error condition is detected or a router wants to close the session.
  • 16. Computer Communication Networks-17EC64 Module 4 Edited by: Prof. Krishnananda L, Dept of ECE, Govt SKSJTI, Bengaluru Page 16 Fig.20.31 BGP Messages