Professional Documents
Culture Documents
18ECC303J-Unit 3 Week 9
18ECC303J-Unit 3 Week 9
Communication Networks
Course Credit : 4
Theory : 9 Hours
Session 11 Session 12
• Open Shortest Path
• Routing Information
First-OSPF
Protocol-RIP
Week 9
Session 13
• Border Gateway
Protocol-BGP
Unicast Routing Protocols:
RIP, OSPF, and BGP
Objectives
Upon completion you will be able to:
Request
Sent by a router that has just come up or has some
time-out entries
Can ask specific entries or all entries
iFgure 13-7
Request Messages
Requests and Response
(Cont.)
Response: solicited or unsolicited
A solicited response: sent only in answer to a
request
Contain information about the destination specified in
the corresponding request
An unsolicited response: sent periodically
Every 30s
Contains information about the entire routing table
Also called update packet
Review Question
Following Figure shows the update message sent from router
R1 to router R2 in Figure 14.8.
The message is sent out of interface 130.10.0.2
The message is prepared with the combination of split
horizon and poison reverse strategy in mind.
Router R1 has obtained information about networks 195.2.4.0,
195.2.5.0, and 195.2.6.0 from router R2.
When R1 sends an update message to R2,
Replace the actual value of the hop counts for these three
networks with 16 (infinity) to prevent any confusion for R2.
The figure also shows the table extracted from the message.
Router R2 uses the source address of the IP datagram carrying the
RIP message from R1 (130.10.02) as the next hop address.
Solution
Timers in RIP
RIP uses three timers
Periodic timer
Expiration timer
RIP Timers
Periodic Timer
Periodic timer
Control the advertising of regular update message
RIP-v2 Format
Classless
Addressing
The most important difference between the
two versions
classful v.s. classless addressing
RIPv1 uses classful addressing
The only entry in the message format is the
network address (with a default mask)
Authentication
Multicasting
Version 1 of RIP uses broadcasting to send
RIP message to every neighbor
All the routers and the hosts receive the packets
RIP version 2
Uses the multicast address 224.0.0.9 to multicast
RIP message only to RIP routers in the network
Encapsulation
RIP message are encapsulated in UDP user
datagram
Types of Links
Point-to-Point Link
Connect two routers without any other host or router
in these two routers
Example
Telephone line
T-line
Graphically representation
The routers are represented by nodes
The link is represented by a bidirectional edge
The metric
Usually the same at the two ends
iFgure 13-20
Point-to-Point Link
Transient Link
A network with several routers attached to it
Data can enter through any of the routers and
leave through any router
Example
All LANs and some WANs with two or more
routers
Transient Link (Cont.)
Graphically representation
Figure b in the next slide. However, it is
Not efficient: each router need to advertise the
neighborhood of four other routers
For a total of 20 advertisement
Not realistic: there is no single network (link)
between each pair of routers
There should be only one network that serves as a crossroad
between all five routers
Transient Link (Cont.)
Reality: each router should be connected to every
router through one single network
The network is represented by a node
However, network is not a machine
Cannot function as a router
Solution: one of the routers acts as a single network
This router has a dual purpose: a true router and a
designated router
The link is represented as a bidirectional edge
Figure c in the next slide
iFgure 13-21
Transient Link
Stub Link
A network that is connected to only one router
Data packet enter and leave through this only one router
A special case of transient network
Graphically representation
The router as a node
The designated router as the network
Note, the link is only one-directional
From the router to the network
Because the network is the end point in the graph representation
See the following third slides
F
igure 13-22
Stub Link
Virtual Link
When the link between two routers is broken
The administrator may create a virtual path
between them using a longer path and may go
through several routers
Figure Example of an AS and its graphical representation in OSPF
Types of Packets
OSPF uses five different packets
Hello packet
Database description packet
Link state request packet
Link state update packet
Router link
Network link
Summary link to network
Summary link to AS boundary router
External link
Link state acknowledgment packet
iFgure 13-33
Hello Packet
Hello Packet Format
Network mask: 32-bit
Define the network mask of the network over which the
hello message is sent
Hello interval: 16-bit
Define the number of seconds between hello message
E flag: 1-bit
If it is set, the area is a stub area
T flag: 1-bit
If it is set, the router supports multiple metrics
Hello Packet Format (Cont.)
Priority
The priority of the router. Used for the selection
of the designated router
The router with the highest priority is chosen as
the designated router
The router with the second highest priority is
chosen as the backup designated router
If it is 0, the router never wants to be a designated
or backup designated router
Hello Packet Format (Cont.)
Dead interval: 32-bit
The number of seconds before a router assumes
that a neighbor is dead
Designated router IP address: 32-bit
Backup designated router IP address: 32-bit
Neighbor IP address: a repeated 32-bit field
A current list of all the neighbors from which the
sending router has received the hello message
Database Description Message
When a router is connected to the system for
the first time or after a failure
It needs the complete link state database
immediately
Thus, it sends hello packets to greet its
neighbors
If this is the first time that the neighbors hear
from the router
They send a database description packet
Database Description Message
(Cont.)
The database description message does not contain
complete database information
It only gives an outline, the title of each line in the
database
The newly router examines the outline and find out
which lines it does not have
Send one or more link state request packets to get full
information about that particular link
The content of the database may be divided into several
message
Database Description Message
(Cont.)
When two routers want to exchange database
description packets
One of them acts as master
The other is the slave
iFgure 13-36
Format
Common header
Link state header
F
igure 13-49
Initialization
Sharing
Updating
Path Vector Routing
Why distance vector routing and link state
routing are not good candidates for
interdomain routing?
Solution
Path vector routing
Path Vector Routing
(Cont.)
There is one node in each AS to act on behalf
of the entire SA
Called it speaker node
Example
A small corporation or a small ISP
Multihomed AS
Has more than one connection to another AS
But it is still only a source or sink for data
traffic
There is not transient traffic
Does not allow data coming from one AS and
going to another AS to pass through
Example
A large corporation connected to more than one
regional AS but does not allow transient traffic
Transit AS
A multihomed AS and allow transient traffic
Example
National and international ISPs
CIDR
BGP supports Classless Interdomain Routing
addresses
AS1
and AS2: E-BGP
I-BGP: collect information from other routers in their AS
Types of Packets
BGP uses four different types of messages
Open
Update
Keepalive
Notification
F
igure 13-51
Open Message
Open Message Packet Format
Version: 1-byte
Define the version of BGP. The current version is 4
My autonomous system: 2-byte
Define the autonomous system number
Hold time: 2-byte
Define the maximum number of seconds that can elapsed
before one of the parties receives a keepalive or update
message from the other
If a router does not receive one of the messages during the
hold period, it considers the other party dead
Open Message Packet Format
(Cont.)
BGP number: 4-byte
Define the router that sends the open message
Option parameter length: 1-byte
Define the length of the total option parameters
Since open message may also contain some
option parameters
Option parameters
The only option parameters defined so far is
authentication
Update Message
Used by a router to
Withdraw destination that have advertised
previously
Announce a route to a new destination
Note, a router can withdraw several
destinations in a single update message
However, it can only advertise one new
destination in a single update message
Update Message
Format
Unfeasible routes length: 2-byte
Define the length of the next field
Withdraw routes
List all routes that should be deleted from the previously
advertised list
Path attributes length: 2-byte
Define the length of the next field
Path attributes:
Defines the attributes of the path (route) to the network
whose reachability is being announced in this msssage
F
igure 13-54
Update Message
Update Message Format
Network Layer reachability information (NLRI)
Define the network that is actually advertised by this
message
Has two fields
Length: define the number of bits in the prefix
IP address prefix: the common part of the network address
Example: if a network is 153.18.7.0/24
Length = 24
IP address prefix = 153.18.7
Keepalive Message
Notification Message
Sent by a router
Whenever an error condition is detected
A router wants to close the connection
Format
Error code: 1-byte, define the category of the error
Message header error
Open message error
Update message error
Hold timer expired
Finite state machine error
Cease
Error subcode: 1-byte
Furthermore define the type of error in each category
Error data
Used to give more diagnostic information about the error
iFgure 13-56
Notification Message
Table Error codes
Encapsulation
BGP message are encapsulated in TCP
segments using the well-known port 179
No need for error control and flow control
Thus, when a TCP connection is opened
The exchange of update, keepalive, and
notification message is continued
Until a notification message of type cease is sent