0% found this document useful (0 votes)
44 views86 pages

ADC&N Chapter 3 Handout

RIP is a distance-vector routing protocol that uses Bellman-Ford algorithm to calculate routes. It shares full routing tables between neighboring routers every 30 seconds. RIP routers maintain routing tables with destinations and hop counts, updating entries by increasing hop counts of routes learned from neighbors.

Uploaded by

Samuel Nigatu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views86 pages

ADC&N Chapter 3 Handout

RIP is a distance-vector routing protocol that uses Bellman-Ford algorithm to calculate routes. It shares full routing tables between neighboring routers every 30 seconds. RIP routers maintain routing tables with destinations and hop counts, updating entries by increasing hop counts of routes learned from neighbors.

Uploaded by

Samuel Nigatu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

Advanced Data Communication

& Networking
( CN-6112 )

Presented by
Dr. M. Prasad, Ph. D, MISTE,
Professor,
Master of Science in Computer Science and Networking Program,
School of Computing and Informatics,
College of Engineering and Technology,
Dilla University, Dilla.
CHAPTER – 3

Routing Protocols

2.2
Chapter_3 Syllabus
Routing Algorithms: Types of routing algorithm,

Multicast Addressing

Unicast Routing Protocols: RIP, BGP and OSPF

Protocols

Multicast Routing Protocols: IGMP, MOSPF,

DVMRP and MBONE Protocols.

2.3
Routing Algorithms

2.4
Introduction
 An internet is a combination of networks connected by
routers

 How to pass a packet from source to destination ?


 Which of the available pathways is the optimum pathway ?

 Depends on the metric:


 Metric: a cost assigned for passing through a network
 A router should choose the route with the smallest metric

2.5
Introduction . . .
 Routing Algorithm is

 Part of the network layer software.

 Responsible for deciding which output line an incoming packet

should be transmitted on.

 Properties of Routing Algorithm:


 Correctness
 Simplicity
 Robustness
 Stability
 Fairness
 Optimality 2.6
Types of Routing Algorithms

 Two Categories

 Based on Routing Table Updating

 Based on Forwarding Principle

2.7
Based on Routing Table Updating
 Routing algorithms can be grouped into two major classes:
• Non Adaptive
• Adaptive.

Non Adaptive
 The route is computed in advance, off-line.
 Downloaded to the routers when the network is booted.
 This procedure is sometimes called Static Routing.
 A static table is one with manual entries.

2.8
Based on Routing Table Updating . . .
Adaptive
• Change their routing decisions to reflect changes in the
topology and traffic as well.

• Sometimes called Dynamic Routing.

• A dynamic table is updated automatically.

• An internet needs dynamic routing tables.

• Dynamic routing table is achieved by the routing protocols.

• Dynamic Routing protocols can be either an interior


protocol or an exterior protocol.

2.9
Based on Routing Table Updating . . .
 Interior Routing
 Routing inside an autonomous system.
 An interior protocol handles intradomain routing.

 Each AS can chose its own interior routing protocol


 Examples: RIP and OSPF
 Exterior Routing
 Routing between autonomous systems

 An exterior protocol handles inter- domain routing.

 Examples: BGP
2.10
Based on Routing Table Updating . . .

 An internet can be so large that one routing protocol cannot


handle the task of updating routing table of all routers.
 Thus, an internet is divided into Autonomous Systems (AS)

 AS is a group of networks and routers under the authority


of a single administration.

2.11
Based on Routing Table Updating . . .

Fig. Autonomous System


2.12
Based on Routing Table Updating . . .
Example. 1

Fig. Autonomous Systems


2.13
Based on Routing Table Updating . . .

Example. 1

 R1, R2, R3 and R4 use an interior and an exterior routing


protocol
 Solid thin lines
 Interior routing protocol
 Broken thick lines
 Exterior routing protocol

2.14
Based on Routing Table Updating . . .

Fig. Popular Routing Protocols

2.15
Based on Routing Table Updating . . .
 RIP (Routing Information Protocol)
 Treat each network as equals

 The cost of passing through each network is the same: one hop
count
 Open Shortest Path First (OSPF)
 Allow administrator to assign a cost for passing through a network
based on the type of serviced required
 For example, maximum throughput or minimum delay
 Border Gateway Protocol (BGP)
 The criterion is the policy, which can be set by the administrator
2.16
Based on Forwarding Principle

 As per forwarding principle / Delivery Models relate to the

Internet,

 Unicasting

 Multicasting

 Broadcasting.

2.17
Based on Forwarding Principle . . .
 Unicasting
 One source, one destination

 Widely used (web, p2p, streaming, many other protocols)

Fig. Example Unicasting Systems


2.18
Based on Forwarding Principle . . .
 Multicasting
 One source, several (pre specified) destinations.

 Used within some ISP infrastructures for content delivery,

overlay networks

Fig. Example Multicasting Systems


2.19
Based on Forwarding Principle . . .
 Broadcasting
 One source, all destinations .

 Used to disseminate control information, perform service

discovery

Fig. Example Multicasting Systems


2.20
Multicast Addressing
 A multicast address is a destination address for a group of
hosts.

 A packet that uses a multicast address as a destination can


reach all members of the group.

 Multicast addresses in both data link and network layers.

 Multicast addresses in the network layer - IPv4 protocol.

 In classful addressing - Single block in class D.

In classless addressing - The same block has been used.

2.21
Unicast Routing
Algorithms

2.22
RIP:
Routing Information Protocol

2.23
RIP
 RIP: Routing Information Protocol

 Based on distance vector routing


 Bellman-Ford algorithm - calculating the routing tables
 Each router periodically shares its knowledge with its neighbors

 Sharing knowledge about the entire AS

 At the start, a router’s knowledge may be sparse

 Sharing only with neighbors

 Sends its knowledge only to neighbors

 Sharing at regular intervals

2.24
RIP - Message Format
 Command: 8-bit
 The type of message:
request (1) or response (2)
 Version: 8-bit
 Define the RIP version
 Family: 16-bit
 Define the family of the protocol used
 TCP/IP: value is 2
 Address: 14 bytes
 Defines the address of the destination network
 14 bytes for this field to be applicable to any protocol
 However, IP currently uses only 4 bytes, the rest are all 0s
 Distance: 32-bit
 The hop count from the advertising router to the destination network 2.25
RIP - Message Types
 RIP uses two type of messages

 Request and Response

 Request

 Sent by a router that has just come up or has some time-out


entries.

 Can ask specific entries or all entries.

2.26
RIP - Message Types . . .

 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

2.27
RIP - Message Types . . .
Example 1

 What is the periodic response sent by router R1?

 Assume R1 knows about the whole autonomous system.

2.28
RIP - Message Types . . .
Solution
 R1 can advertise three networks 144.2.7.0, 144.2.9.0, and
144.2.12.0.

 The periodic response (update packet) is shown in below

2.29
RIP - Routing table Updating
 Initializing the Routing Table
 When a router is added to a network

 It initializes a routing table for itself using its


configuration file
 The table contains only the directly attached networks and
the hop count (= 1)
 Updating the Routing Table
 Each routing table is updated upon receipt of RIP
Response message

2.30
RIP - Routing table Updating . . .
 Add one hop to the hop count for each advertised destination
 Using the RIP updating message algorithm shown below
 Repeat the following steps for each advertised destination

If (destination not in the routing table)


Add the advertised information to the table
Else
If (next-hop field is the same)
Replace retry in the table with the advertised one
Else
If (advertised hop count smaller than one in the table)
Replace entry in the routing table
Return
2.31
RIP - Routing table Updating . . .

Fig. Example of Updating a Routing Table


2.32
RIP - Timers
 RIP uses three timers

 Periodic timer
 Expiration timer
 Garbage collection timer

 Periodic timer
 Control the advertising of regular update message
 Although protocol specifies 30 s, the working model uses a random
number between 25 and 35 s.
 Prevent routers update simultaneously

2.33
RIP – Timers . . .
 Expiration Timer

• Govern the validity of a route

• Set to 180s for a route when a router receives update


information for a route

• If a new update for the route is received, the timer is reset

• In normal operation, this occurs every 30 s

• If timer goes off, the route is considered expired

• The hop count of the route is set to 16, which means


destination is unreachable
2.34
RIP – Timers . . .
 Garbage Collection Timer
 When a route becomes invalid, the router does not immediately
purge that route from its table.

 It continues advertise the route with a metric value of 16.

 A garbage collection timer is set to 120 s for that route.

 When the count reaches zero, the route is purged from the table
and allow neighbors to become aware of the invalidity of a
route prior to purging.

2.35
RIP – Timers . . .
Example 2
 A routing table has 20 entries.
 It does not receive information about five routes for 200
seconds.
 How many timers are running at this time?

Solution
 The timers are listed below:

 Periodic timer: 1

 Expiration timer: 20 - 5 = 15

 Garbage collection timer: 5


2.36
RIP - Encapsulation
 RIP message are encapsulated in UDP user datagram

 The well-known port assigned to RIP in UDP is port 520

RIP - Problems
 Slow Convergence

 Instability

2.37
BGP:
Border Gateway Protocol

2.38
BGP
 First appeared in 1989
 An inter-autonomous system routing protocol
 Based on the path vector routing method

 Each entry in the routing table contains

 The destination network


 The next router
 The path to reach the destination, usually defined as ordered list
of ASs

2.39
BGP

Network Next Router Path


NO1 R01 AS14, AS23, AS67
NO2 R05 AS22, AS67, AS05, AS89
NO3 RO6 AS67, AS89, AS09, AS34
NO4 R12 AS62, AS02, AS09

Example of a Path Vector Routing Table

2.40
BGP . . .
 Autonomous boundary routers advertise the reachability of
networks in their own AS to neighbor autonomous boundary
routers
 Each router receives a path vector message
 Verify the advertised path is in agreement with its policy

 If yes, update its routing table and modify the message before
sending it to the next router.

 Add its AS number to the path and replacing the next router entry
with its own identification

2.41
BGP . . .
Example 3
 R1 send a path vector message

 Advertise the reachability of N1

 R2 receives the message

 Update it routing table

 Send the message to R3 with adding its AS to the path and


inserting itself as the next router

2.42
BGP . . .
 Path vector routing can solve

 The instability of distance vector routing


 The creation of loops

 When a router receive a message, it check to see if its AS is


in the path list or not
 If yes, looping is involved and the message is ignored

2.43
BGP . . .
 Policy Routing can be easily implemented through path vector
routing
 Once a router receives a message, it can check the path.
 If one of the AS listed in the path is against its policy,
 It can ignore that path and that destination
 Does not update its routing table with this path
 Does not send this message to its neighbors
 Thus, path vector routing are not based on the smallest hop count
or the minimum metric. Based on the policy imposed on the router
by the administrator

2.44
BGP - Path Attributes
 In previous example, the path was presented as a list of AS.
 Actually, the path was presented as a list of attributes.

 The list of attributes help the receiving router make a better


decision when applying its policy.

 Path Attributes are divided into two categories:

 Well-known

 Optional

2.45
BGP - Path Attributes . . .
 Well-known:
 One that every BGP router should recognize.
 Divided into two categories:
 Mandatory
 Must appear in the description of a route
 Well Known Attributes
 ORIGIN: the source of the routing information (RIP or
OSPF)
 AS_PATH: the list of AS through which the destination can
be reached.
 NEXT_HOP: the next router to which data packet should be
2.46
sent
BGP - Path Attributes . . .
 Well-known discretionary
 Must be recognized by each router
 But is not required to be included in every update
message.
 Optional: One that need not be recognized by every router

 Transitive

 Must be passed to the next router by the router that has not
implemented this attribute

 Nontransitive

 One that should be discarded if the receiving router has not


implemented it 2.47
BGP - Packet Format
 All BGP packets share the same common header
 Header format
 Marker: 16-bit
 Reserved for authentication
 Length: 2-bytes

 Define the length of the total message, including the


header
 Type: 1-byte
 Define the type of the packet

2.48
BGP - Packet Format . . .

Fig. BGP Packet Header


2.49
BGP - Types of Messages
 BGP uses four different types of messages

2.50
BGP - Types of Messages . . .
1. Open Message

 Used to create a neighborhood relationship

 A router running BGP opens a TCP connection with a


neighbor and sends an open message

 If the neighbor accepts

 It responses with a keepalive message

 The relationship then has been established between the


two router

2.51
BGP - Types of Messages . . .

Fig. Open Message


2.52
BGP - Types of Messages . . .
 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
2.53
BGP - Types of Messages . . .

 BGP Identifier: 4-byte


 Define the router that sends the open message
 Option length: 1-byte
 Define the length of the total option parameters
 Since open message may also contain some option parameters
 Option
 The only option parameters defined so far is Authentication

2.54
BGP - Types of Messages . . .
2. 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

2.55
BGP - Types of Messages . . .

Fig. Update Message


2.56
BGP - Types of Messages . . .
 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
2.57
BGP - Types of Messages . . .

 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:

 Thus, BGP4 supports classless addressing and CIDR

2.58
BGP - Types of Messages . . .
3. Keepalive Message

 The BGP routers exchange keepalive message regularly

 Tell each other that they are alive


 Format

 Consist of only the common header

Fig. Keepalive Message


2.59
BGP - Types of Messages . . .
4. Notification Message
 Sent by a router

 Whenever an error condition is detected


 A router wants to close the connection

Fig. Notification Message


2.60
BGP - Types of Messages . . .
 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
2.61
BGP - Sessions
o The exchange of routing information between two routers

using BGP takes place in a session.

o A session is a connection that is established between two BGP

routers only for the sake of exchanging routing information.

o To create a reliable environment, BGP uses the services of TCP.

o BGP sessions are sometimes referred to as semipermanent

connections.

2.62
BGP – Sessions . . .
 BGP can have two types of sessions.
• External BGP (E-BGP)
 Used to exchange information between two speaker
nodes belonging to two different autonomous systems.
• Internal BGP (I-BGP)
 Used to exchange routing information between two
routers inside an autonomous system.

Fig. Internal and External BGP sessions 2.63


BGP - 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

2.64
Multicast Routing
Algorithms

2.65
Multicast Routing Algorithms

 Some of these multicast protocols are extensions of unicast


routing protocols; some are totally new.

Fig. Taxonomy of common multicast protocols


2.66
Distance Vector Multicast Routing
Protocol (DVMRP)

2.67
DVMRP
 Multicast distance vector routing.

 Source-based routing protocol, based on RIP.

 Source based works on the principle of Source based tree.

 Source based tree likely have different tree for different senders.

 Defined in RFC 1075.

 DVMRP constructs delivery trees based on the information on

the previous-hop back to the source.

2.68
DVMRP
 DVMRP developed as a progression of algorithms

 Reverse Path Flooding (RPF)

 Reverse Path Broadcast (RPB)

 Reverse Path Multicast (RPM)

o Standardization of the latest version of DVMRP is being


conducted by the Internet Engineering Task Force (IETF)
Inter-Domain Multicast Routing (IDMR) working group.

2.69
DVMRP . . .
 DVMRP consists of two major components:

 A conventional distance-vector routing protocol (like RIP)

 A protocol for determining how to forward multicast

packets, based on the routing table

 DVMRP router forwards a packet if

 The packet arrived from the link used to reach the source

of the packet (reverse path forwarding check – RPF)

 If downstream links have not pruned the tree

2.70
DVMRP . . .
 The first packet of multicast messages sent from a particular

source to a particular multicast group is flooded across the

internetwork.

 Then, prune messages are used to truncate the branches which

do not lead to a group member.

 Furthermore, a new type of messages is used to quickly "graft"

back a previously pruned branch of a delivery tree in case a new

host on that branch joins the multicast group. 2.71


DVMRP . . .
 Similar to prune messages which are forwarded hop by hop, graft
messages are sent back one hop at a time until they reach a node
which is on the multicast delivery tree.

 Similar to RPM, DVMRP still implements the flooding of packets


periodically.

 DVMRP support tunnel interfaces explicitly configured with the


IP address of the local router's tunnel interface and the IP address
of the remote router interface.

2.72
DVMRP . . .

Example Topology 2.73


DVMRP . . .

Flood with Truncated Broadcast 2.74


DVMRP . . .

Prune 2.75
DVMRP . . .

Graft 2.76
DVMRP . . .

Steady State 2.77


DVMRP . . .
 The scope of an IP multicast can be limited by using the TTL field
in the IP header.

 The conventional TTL values used to limit the scope of multicast


packets.
TTL Threshold Scope

0 Restricted to the same host

1 Restricted to the same subnetwork

15 Restricted to the same site

63 Restricted to the same region

127 Worldwide

191 Worldwide; limited bandwidth

255 Unrestricted in scope

2.78
Multicast BackbONE
(MBONE)

2.79
MBONE
 In 1992, an interconnected set of subnetworks with routers

capable of forwarding multicast packets were selected for

experimenting with multicasting.

 MBone for deployment of multicast applications.

 The MBone which started with 40 subnetworks in four different

countries, now includes more than 3400 subnets in over 25

countries.

2.80
MBONE
 Only a small fraction of Internet routers are multicast
routers.

 A multicast router may not find another multicast router in


the neighborhood to forward the multicast packet.

 The above problem solution is Tunneling.

 The multicast routers are seen as a group of routers on top of


unicast routers.

 The multicast routers may not be connected directly, but they


are connected logically.

2.81
MBONE . . .

Fig. Logical Tunneling

2.82
MBONE . . .
 A logical tunnel is established by encapsulating the multicast
packet inside a unicast packet.

 The multicast packet becomes the payload (data) of the


unicast packet.

 The intermediate (non-multicast) routers forward the packet


as unicast routers and deliver the packet from one island to
another.

2.83
MBONE . . .
 Multicast capable networks are connected to each other by

virtual links called "tunnels".

 For forwarding multicast packets through these tunnels, they

are encapsulated as IP-over-IP.

 The multicast routing protocol used in the Mbone is DVMRP,

MOSPF and PIM.

2.84
MBONE . . .
 MBONE Application Areas
 Carrying audio and video multicasts of IETF meetings
 NASA Space Shuttle Missions
 US House and Senate sessions
 Many technical talks and seminars.

 MBONE Success story


 Multicast video to 20 sites in 1992
 Easy to deploy, no explicit router support
 Ran DVMRP and had 100s of routers

 MBONE Drawbacks
 Manual tunnel creation/maintenance
 Inefficient
 No routing policy (single tree)
 Why would an ISP deploy a new Mbonenode? 2.85
Dr. M. Prasad, Ph.D, MISTE,
Professor,
Master of Science in Computer Science and Networking
Program,
School of Computing and Informatics,
E-mail : [email protected]
2.86
Phone No : 0934845087

You might also like