Sie sind auf Seite 1von 68

Routing

Static vs. Dynamic Routing Protocol

STATIC ROUTING PROTOCOL DYNAMIC ROUTING PROTOCOL


Use Static Route when network is Use Dynamic Routing Protocol when
simple network is Complex

Static Route paths are selected by Dynamic routing protocols are


administrator responsible for path selection

Requires minimum resources Requires sufficient Resources


(Memory, CPU, Bandwidth, etc.
C 20.0.0.1 /24 directly connected S0/0 C 20.0.0.2 /24 directly connected S0/0
C 10.0.0.10 /24 directly connected E0/0 C 30.0.0.10 /24 directly connected E0/0

S0/0 -20.0.0.1 /24


S0/0 -20.0.0.2 /24 R2
R1 R2
10.0.0.10 /24 30.0.0.10 /24

10.0.0.1 /24 30.0.0.1 /24


dfg. 10.0.0.10 dfg. 30.0.0.10

Initially routers routing table will only reflect directly connected


routes, but for end to end IP communication all routers should have
route to reach all networks.
Static Routing
C 20.0.0.1 /24 directly connected S0/0 C 20.0.0.2 /24 directly connected S0/0
C 10.0.0.10 /24 directly connected E0/0 C 30.0.0.10 /24 directly connected E0/0
S 30.0.0.0 /24 [1/0] via 20.0.0.2 S 10.0.0.0 /24 [1/0] via 20.0.0.1

S0/0 -20.0.0.1 /24


S0/0 -20.0.0.2 /24 R2
R1 R2
10.0.0.10 /24 30.0.0.10 /24

10.0.0.1 /24 30.0.0.1 /24


dfg. 10.0.0.10 dfg. 30.0.0.10

IP route 30.0.0.0 255.255.255.0 20.0.0.2 IP route 10.0.0.0 255.255.255.0 20.0.0.1


N/W N.H. N/W N.H.
• What is Routing Protocol?
– To learn about all the networks
– To learn about all the paths to reach the networks
and select the best path
Autonomous Systems:
Interior or Exterior Routing Protocols

IGPs: RIP, IGRP EGPs: BGP

Autonomous System 100 Autonomous System 200


Figure 14.2 Popular routing protocols

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

Classfull routing protocols are protocols in which:


1) Mask is not sent as part of update
2) They will automatically summarize at classfull boundary
3) May lead to sub-optimal path forwarding
Dynamic Routing Protocol
RIP
C 70.0.0.0 /24 directly connected S0/2 C 20.0.0.2 /24 directly connected S0/0
C 50.0.0.0 /24 directly connected S0/1 C 30.0.0.10 /24 directly connected E0/0
C 20.0.0.1 /24 directly connected S0/0 R 10.0.0.0 /24 [120/1] via 20.0.0.1
C 10.0.0.10 /24 directly connected E0/0 R 50.0.0.0 /24 [120/1] via 20.0.0.1
100.0.0.0/24 R 30.0.0.0 /24 [120/1] via 20.0.0.2 R 100.0.0.0 /24 [120/2] via 20.0.0.1
R 100.0.0.0 /24 [120/1] via 50.0.0.2
.2
.2 50.0.0.0 /24 S0/0 -20.0.0.1 /24
.1 S0/0 -20.0.0.2 /24 R2
R1 R2
70.0.0.0 /24 .1 Router Rip Router Rip 30.0.0.10 /24
Starts RIP Routing
.2 10.0.0.10/24 net 20.0.0.0 net 20.0.0.0 Process
net 10.0.0.0 net 30.0.0.0 Send Updates
net 50.0.0.0 on interfaces
where these
UPDATES: Networks are
• Details of Networks on which configured
10.0.0.1 /24 routing protocol is operating 30.0.0.1 /24
dfg. 10.0.0.10 • Routes that Routing protocol has dfg. 30.0.0.10
received from neighbors
RIP Configuration Example
172.16.1.1/24 192.168.1.1/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 router rip


Version 2 Version 2
network 172.16.0.0 network 192.168.1.0
network 10.0.0.0 network 10.0.0.0

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

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 1 subnets


C 172.16.1.0 is directly connected, Ethernet0
10.0.0.0/24 is subnetted, 2 subnets
R 10.2.2.0 [120/1] via 10.1.1.2, 00:00:07, Serial2
C 10.1.1.0 is directly connected, Serial2
R 192.168.1.0/24 [120/2] via 10.1.1.2, 00:00:07, Serial2
RIP v1 RIP v2

Class full Class less

Does not Sends mask as part of Sends mask as part of update


update

No authentication Supports authentication

Auto summary (no manual Auto and Manual Summarization


summarization) allowed

Updates are broadcasted Updates are multicast (224.0.0.9)


What Is OSPF?

– Link State Routing Protocol.


– Classless routing Protocol
– AD-Value = 110
– Metric = cost
– Criteria = bandwidth
– Relation is inverse, higher the bandwidth lower the
cost, lower the cost better the path.
– Supports equal-cost multipath
OSPF in IP Packets
89—OSPF
6—TCP
17—UDP

Frame Payload
C
Frame
IP Protocol R
Header Packet Payload
Header Number C

OSPF is a link-state routing protocol


– Relies on IP packets for delivery of routing
information
– Uses protocol number 89
Cost Calculation

20.0.0.0/24 10mbps 100mbps

10mbps =Cost = 10 Cost = 10 Cost = 1


N/W Cost N/W Cost N/W Cost
20.0.0.0/24 10 20.0.0.0/24 20 20.0.0.0/24 21

OSPF cost = 100000000


______________
bandwidth
Cost for 10mbps = 100000000
______________ = 10
10000000
OSPF Area Concept BLR

>
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

In OSPF Routers are identified by their Router ID


Router ID is highest IP of Loopback Interface, in absence of loopback interface it is
highest IP of active interface when OSPF starts.
Loopback interface is software interface, they are not physically present and are
created for testing purposed
In above example RID of R1 router is 20.0.0.1(highest Loopback IP)
In absence of loopback , RID would be 100.0.0.1. as interface with IP 200.0.0.1 is not
active (Shutdown)
Once RID is selected it remains RID and will not change even if interface with higher IP
comes up
OSPF Multi-Area
Inter area communication will happen through backbone area

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

Hello I will start exchange because I have router ID 172.16.5.1.

afadjfjorqpoeru
39547439070713

No, I will start exchange because I have a


higher router ID. Hello

Exchange State afadjfjorqpoeru


39547439070713

Here is a summary of my link-state database.


DBD
afadjfjorqpoeru
39547439070713

DBD Here is a summary of my link-state database.


Discovering Routes (3)
DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


LSAck

afadjfjorqpoeru
39547439070713
Loading State

LSR I need the complete entry for network 172.16.6.0/24.


afadjfjorqpoeru
39547439070713

Here is the entry for network 172.16.6.0/24. LSU


afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


Full State
Figure 14.20 Types of links

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

The topics discussed in this section include:

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.

The topics discussed in this section include:


Types of Autonomous Systems
External and Internal BGP
Types of Packets
Packet Format
Encapsulation

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

Path Attributes: Attributes of the path to the network whose


reachability is being announced in this message
Network Layer Reachability : Network that is actually advertise by
61
this message
Figure 14.55 Keepalive message

62
Figure 14.56 Notification message

Error code: category of error


Error subcode: Type of error 63
Table 14.3 Error codes

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

Das könnte Ihnen auch gefallen