Beruflich Dokumente
Kultur Dokumente
7
Types of Routing Protocols
B
Distance Vector
D A
Hybrid Routing
B
Link State
D A
C
Distance Vector Routing Protocols:
Distance vector routing protocols are protocols in which:
1) Updates are Periodic sent every 30/90sec
2) Entire routing table is sent as an update,
3) Updates are broadcasted (255.255.255.255)
4) Updates are sent to directly connected neighbors only
5) D.V. Routers don’t have end-to-end visibility of entire network, directly
connected neighbors are the worlds. (Routing by Rumors)
6) Because updates are periodic hence convergence is slow. (To converge
means to change, convergence means adapting to change)
7) Because convergence is slow hence there is possibility of a patch
getting created in your network that carries wrong information called
as Black-hole.
Link State- Routing Protocols:
1) Updates are triggered they are not periodic
2) Updates are incremental, entire routing table is not sent as an update,
3) Updates are multicasted they are not broadcasted.
4) Updates are sent to the group and not just connected neighbors.
5) L.S. Routers send details like SPF Cost, SPF Tree/Table as part of their update
which helps routers build end-to-end visibility of entire network all its paths and
their costs in form of topology table (LSDB).
6) Convergence is fast:
• Updates are triggered
• Routers have E2E visibility
of entire network, their paths and its costs in form of topology table.
Link State Operations
• When two link state routers come-up they will start exchanging multicast hellos
to establish neighborship,
• Only directly connected routers will become neighbors and their entries will be
added to neighbor table.
• Directly connected neighbors will start exchanging LSDB till all routers have
learnt about all networks, all paths to reach all networks, on completion routers
will reach full state.
• Post full state:
– Exchange of topology table stops, now updates will be sent only when
something goes down or comes up, and updates are now incremental and
triggered.
– SPF algorithm works on LSDB, it pulls best path and puts it in route table
– Hellos that were earlier exchanged to form neighbors are now exchanged as
keep alive
– OSPF uses Dijikstra Algorithm for best path selection and EIGRP uses DUAL
Diffusion Algorithm
Classfull Routing Protocol
10.10.10.0 /24
R 10.10.10.0
R 10.10.10.0 / 8
R2 10.10.10.0 /24 R 10.0.0.0 / 8 via R2
R 10.20.20.0
10.20.20.1
R1 R 10.20.20.0 / 8
R 10.0.0.0 / 8 via R3
10.20.20.0 /24
R3
10.20.20.0/24
E0 S2 S3
172.16.1.0/24 S2 S3 E0 192.168.1.0/24
AA BA A
10.1.1.1/24 10.1.1.2/24 10.2.2.2/24 10.2.2.3/24
router rip
Version 2
network 10.0.0.0
Verifying the Routing Protocol—RIP
E0 S2 S3
172.16.1.0 S2 S3 E0 192.168.1.0
AA BA A
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
RouterA#sh ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Key-chain
Ethernet0 1 12
Serial2 1 12
Routing for Networks:
10.0.0.0
172.16.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.1.2 120 00:00:10
Distance: (default is 120)
Displaying the IP Routing Table
E0 S2 S3
172.16.1.0 S2 S3 E0 192.168.1.0
AA BA A
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
RouterA# sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E – EGP
Frame Payload
C
Frame
IP Protocol R
Header Packet Payload
Header Number C
>
BKC
VASHI
OSPF Area Concept BLR
BKC
Area 1 X Area 0
R1
vashi
ABR
Area Border Router
Summarization is allowed here
• OSPF is a highly scalable routing protocol, created to work on 1000s
of routers and handle 1000s of routes.
• If Your network has 50000 routers and every router has 5 networks
and every network has 4 routes, which means all routers will have a
million route in its LSDB-OSPF can work on such large scale
networks.
• OSPF routers have E2E visibility of entire network all its paths and
their costs in form of LSDB.
• If all routers have update of all network and its paths then they will
also receive updates when it goes down or comes up. In such huge
network there will always be some or the other link failing that will
lead to frequent LSA/LSU (link state advertisement / link state
update)
• Frequent LSA and LSUs will lead to following issues:
– High B/W utilisation
– High Memory Util.
– High Processor Util
– Performance degradation
• Solution: OSPF Area
• As per OSPF architecture rules, you should divide large scale OSPF
Networks into small areas and control LSA/LSU generated in area to remain
within area with help of summarization.
• Put all networks managed by local administrators in one area, OSPF area is
administrator Defined area, with in area no summarization, all area internal
and border routers will receive all area Internal LSA / LSU directly un-
summarized.
• All area internal routers will have E2E visibility of all area Internal routes, its
paths and their costs un-summarized.
• Administrators should summarize routes on Area Border Routers, so that
LSA/LSU generated within area does not propagate to other areas and
LSA/LSU gets controlled.
• OSPF suggests to create Backbone area(Area 0) for inter area communication.
• The other view point is why don’t we summarize routes to control LSA/LSUs,
• So view is: Yes we can use summarization, on any router to control LSA/LSU,
but with summarization on internal routers E2E visibility is lost,
administrators will not learn about link failures of their own network as
summarization will filter it.
• So to provide administrators E2E visibility of his network it was decided to
allow summarization at border routers. As updates of my link failures going to
other areas may be unnecessary.
• PUNCH: OSPF area rule is to control frequent LSA/LSU, wherever LSA/LSUs
are required put them in one area and filter at ABR using summarization to
control LSA/LSUs going to other areas
Router R1ID - RID
100.0.0.1 / 24 200.0.0.1 / 24
Shut
Area 0
Backbone Area
Area 1
Area 3
X
Area 2
Figure 14.19 Areas in an autonomous system
29
OSPF on Multi-access Network
DR BDR 224.0.0.6
This is the address on
D E
which DR/BDR listens
Hello
afadjfjorqpoeru
39547439070713
Router ID
*
Hello/dead intervals
Area-ID
B
DR Others
A C
DR Others
Hello DR IP address**
Router priority
224.0.0.5
This is the address on
which DR OTHERS & BDR listens
BDR IP address
**
Authentication password
Stub area flag
OSPF Priority * Entry must match on neighboring routers
Default Priority is 1
Possible priority 0 ----- 255
( Forcefull DR-Other )
Ip ospf priority 0
( Forcefull DR )
Ip ospf priority 255
•OSPF’s behavior on Multi-access network is slightly different, OSPF elects DR,
BDR and all other routers will act as DR-other.
•If there is a topology change seen on DR-other router, it will send update to DR
and BDR using multicast address 224.0.0.6 (This is the address on which
DR/BDR listens).
•In turn DR will send this update to DR-other using multicast address 224.0.0.5,
This is the address on which DR-other listens
•If DR fails to send this update in stipulated time BDR will become DR and send it,
Once BDR becomes DR it remains DR and will not change even if original DR
comes up.
•Now the original DR will act as DR-other because when BDR was made DR,
some other DR-other was made BDR.
•Post Neighbor formation same hellos are used to elect DR/BDR.
•Routers will send details like : Router-ID, Router Priority, DR IP and BDR IP as
part of hellos which will help in DR/BDR election
•Initially all routers will claim themselves to be DR and BDR, but eventually by
exchanging these details appropriate router will be elected as DR and BDR.
•DR is the router with highest ospf priority if all routers have same priority then
election goes on RID. Administrator can make any router become DR by changing
its priority or RID
Neighborship Rule
Two directly connected routers will become neighbors only if
Router ID
Hello/dead intervals
Neighbors *
Hello
Area-ID
*
Router priority
DR IP address
BDR IP address
Authentication password
Stub area flag
* *
Hello and Dead timers for multi-access interface Ethernet and frame-relay
Hello = 10Sec
Dead = 40Sec
Area0
20.0.0.2/24 20.0.0.3/24
20.0.0.1/24
10.0.0.1/24
10.0.0.2/24 10.0.0.3/24
Area0
Interface F0/0
20.0.0.2/24 Ip ospf priority 200 20.0.0.3/24
Router ospf 1
Network 20.0.0.0 0.0.0.255 area 0 20.0.0.1/24
Network 10.0.0.0 0.0.0.255 area 0
Router-id 150.0.0.1
Router ospf 1
10.0.0.1/24 Network 10.0.0.0 0.0.0.255 area 0
Router-id 200.0.0.1
Interface F0/0
10.0.0.2/24 10.0.0.3/24
Ip ospf priority 200
Figure 14.25 Types of OSPF packets
35
Exchange Process (1)
172.16.5.1/24 172.16.5.2/24
A E0 E1 B
Down State
I am router ID 172.16.5.1 and I see no one.
Init State
Router B
Neighbors List
172.16.5.1/24, int E1
I am router ID 172.16.5.2, and I see 172.16.5.1.
Router A
Neighbors List
172.16.5.2/24, int E0
Two-Way State
Discovering Routes(2)
DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
Exstart State
39547439070713
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713
Loading State
39
Figure 14.21 Point-to-point link
40
Figure 14.22 Transient link
41
Figure 14.23 Stub link
42
Figure 14.26 OSPF common header
43
OSPF Hello Packet
OSPF Database
OSPF Link status request
OSPF Link Status Update
Figure 14.27 Link state update packet
49
Figure 14.28 LSA general header
• Link state age: Indicates the number of seconds elapsed since thie message was first
generated
• E flag: 1 bit field set to1 indicated that the area is the stub area (stub area is area
connected to the backbone area via a single path)
• T flag: 1 bit field set to1 indicated that the router can handle multiple types of services
• Link state type: any one of the 5 types
• Link state ID: depends on type of link e,g.: For type 1 (router link) it is the IP address
of the router
• Advertising Router: This is the IP address of the router advertising the message
• Link State sequence number: This is a sequence number assigned to each link stte
update message
• Link state checksum: The value of this field is calculated using Flecther’s checksum,
which is based on the whole packet except for the age field
50
14.6 PATH VECTOR ROUTING
Path vector routing is similar to distance vector routing. There is at least
one node, called the speaker node, in each AS that creates a routing table
and advertises it to speaker nodes in the neighboring ASs..
Initialization
Sharing
Updating
51
Figure 14.48 Initial routing tables in path vector routing
52
Figure 14.49 Stabilized tables for four autonomous systems
53
14.7 BGP
Border Gateway Protocol (BGP) is an interdomain routing protocol using
path vector routing. It first appeared in 1989 and has gone through four
versions.
54
Characteristics
of BGP
Figure 14.50 Internal and external BGP sessions
56
Internal & External BGP
IBGP Neighbors
B
AS D
65500 C
EBGP Neighbors
A
AS
• When BGP neighbors belong to different autonomous 65000
systems it is called external BGP (EBGP) AD-Value = 20
• Neighbors should be directly connected
• When BGP neighbors belong to the same AS it is called
internal BGP (IBGP) AD-Value = 200
• Neighbors do not have to be directly connected
Figure 14.51 Types of BGP messages
58
Figure 14.52 BGP packet header
Marker: Authentication
59
Figure 14.53 Open message
60
Figure 14.54 Update message
62
Figure 14.56 Notification message
64
Unicast, Multicast and Broadcast
Addresses
• Unicast Addresses
One-to-one communication
A,B or C classes
• Multicast Addresses
One-to-many communication
D class
• Broadcast Addresses
One-to-all communication
Allows broadcasting only at local level
Limited broadcast address (all 1s)
Direct broadcast address(netid:specific, hostid:all 1s)
Multicast Addresses: Category addresses
Multicast Addresses :Addresses for conferencing