Dynamic routing
RIP IGRP EIGRP OSPF BGP Protocols
Comparison
RIP version2 with authentication (supports VLSM, uses Multicast for updates 224.0.0.9) |
key chain ripkeys key 1 key-string ccie ! interface Ethernet0 ip address 172.16.50.10 255.255.255.0 ip rip receive version 1 ip rip authentication key-chain ripkeys ! router rip version 2 network 172.16.0.0 timers basic 30 10 10 20 no auto-summary ! |
To disable split horizon |
! interface Ethernet0 no ip split-horizon ! |
RIP updates from broadcast to unicast |
! router rip passive-interface Ethernet 0 (passive-interface with RIP will not send but it will accept updates) neighbor 192.168.1.2 ! |
Increase the cost by x, for a specific advertised network (could be used to break equal cost load balance) |
! Access-list 1 permit 192.168.2.0 0.0.0.255 ! Router rip Network 193.1.1.0 Offset-list 1 out x Ethernet 0 ! |
Redistribute static routes |
Ip route 192.168.5.0 255.255.255.0 172.68.1.1 Ip route 192.168.3.0 255.255.255.0 172.68.1.1 ! router rip network 172.68.0.0 redistribute static metric 2 route-map
N3 ! access-list 3 permit 192.168.3.0 0.0.0.255 ! route-map N3 permit match ip address 3 |
Redistribute routes learned by other routing protocols |
! interface Ethernet0 ip address 172.68.70.10 255.255.255.0 ! interface Ethernet1 ip address 172.68.50.11 255.255.255.0 ! router rip network 172.68.0.0 passive-interface Ethernet 1 redistribute igrp 100 default-metric 2 ! router igrp 100 network 172.68.0.0 passive-interface Ethernet 0 |
Manual auto-summary: Router(config-router)# no auto-summary Router(config-if)# ip summary-address rip 192.168.1.0 255.255.255.192 |
Filter incoming updates RIP will only accept routing updates for 192.168.0.0
networks R1(config)#access-list
1 permit
192.168.0.0 R1(config-router)#distribute-list
1 in fastEthernet 0/0 |
ipv6 unicast-routing ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2001:410:1:10::/64 eui-64 ipv6 rip riptest enable ! interface FastEthernet0/1 no ip address duplex auto speed auto ipv6 address 2001:410:1:20::/64 eui-64 ipv6 rip riptest enable ! !option. if you need to add any RIPng global commands ipv6 router rip riptest maximum-paths 6 ………. |
Basic config The metric depends on Bw, delay,… |
interface serial0 ip address 172.16.50.10 255.255.255.0 bandwidth 64 ! ip route 0.0.0.0 0.0.0.0 192.168.1.1 ! router igrp 100 network 172.16.0.0 timers basic 45 135 145 280 (optional) redistribute static metric 128 2000 255 1 2500 Unlike (RIP), IGRP will not automatically redistribute a route
to the 0.0.0.0 network. So we need to add redistribute command. |
Redistributing IGRP |
router igrp 100 network 172.16.0.0 network 192.168.254.0 network 172.30.0.0 Redistribute igrp 200 ! router igrp 200 network 172.16.0.0 network 172.30.0.0 Redistribute igrp 100 |
Redistributing RIP |
router rip network 172.16.0.0 ! router igrp 200 network 172.16.0.0 network 172.30.0.0 Redistribute rip Default-metric 1000 100 255 1 1500 |
Redistributing eigrp (we don't need to use redistribute command, because
they have same AS) |
router eigrp 200 network 172.16.0.0 ! router igrp 200 network 172.16.0.0 network 172.30.0.0 ! |
Load balance over unequal cost paths (By default IGRP keeps the lowest cost route) |
interface serial0 ip address 172.16.50.5 255.255.255.252 bandwidth 64 ! interface serial1 ip address 172.16.50.9 255.255.255.252 bandwidth 128 ! router igrp 100 network 172.16.0.0 Variance 3 |
Basic config |
key chain eigrpkeys key 1 key-string ccie interface ethernet0 ip address 170.170.50.10 255.255.255.0 ! interface serial0 ip address 180.180.50.10 255.255.255.0 ip authentication mode eigrp 10 md5 ip authentication key-chain eigrp 10 eigrpkeys ! router eigrp 10 network 170.170.0.0 network 180.180.0.0 no auto-summary ! (by default, it summaries) (passive-interface with EIGR will not nor receive updates) |
Redistribute-list
any inbound EIGRP route is checked against access list 1. Any match for 140.175.x.x and 140.176.x.x is placed in the routing table. |
router eigrp 100 distribute-list 1 in ! access-list 1 permit 140.175.0.0 0.0.255.255 access-list 1 permit 140.176.0.0 0.0.255.255 |
To prevent any routing loops, only networks 150.175.1.0 and 150.175.2.0 are redistributed into OSPF from EIGRP. |
router eigrp 100 redistribute ospf 200 distribute-list 1 out ospf 200 ! access-list 1 permit 150.175.1.0 0.0.0.255 access-list 1 permit 150.175.2.0 0.0.0.255 ! router ospf 200 redistribute eigrp 100 |
Manual auto-summary: Router(config-router)# no auto-summary Router(config-if)# ip summary-address eigrp 192.168.10.64 255.255.255.224 |
Basic config |
||||||
interface ethernet0 ip address 170.170.50.10 255.255.255.0 ! interface serial0 ip address 170.170.60.10 255.255.255.0 ip ospf authentication-key ospfkey1 ip ospf authentication message-digest ! router ospf 10 network 170.170.50.10 0.0.0.0 area 0 network 170.170.60.10 0.0.0.0 area 1 ! |
||||||
Over NBMA |
||||||
NBMA rtr |
Point2point rtr |
|||||
interface FastEthernet0/0 ip address 192.168.1.1 255.255.255.0 ! interface Serial2/0 ip address 172.16.1.1 255.255.255.0 encapsulation frame-relay ip ospf network broadcast frame-relay map ip 172.16.1.2 101 broadcast ! router ospf 7 log-adjacency-changes network 172.16.1.0 0.0.0.255 area 1 network 192.168.1.0 0.0.0.255 area 0 ! |
interface FastEthernet0/0 ip address 192.168.2.1 255.255.255.0 ! interface Serial2/0 no ip address encapsulation frame-relay ! interface Serial2/0.101 point-to-point ip address 172.16.1.2 255.255.255.0 ip ospf network broadcast frame-relay interface-dlci 202 ! router ospf 7 log-adjacency-changes network 172.16.1.0 0.0.0.255 area 1 network 192.168.2.0 0.0.0.255 area 1 ! |
|||||
Stub area |
||||||
External routes do not get flooded into stub areas. Routers in a stub area reach networks that are external to the autonomous system via the default route that is generated by ABR. Suppose area 2 will be a stub area. In ABR and in router in area 2 add: area 2 stub. |
||||||
Totally stub
area |
||||||
Not only are the external routes not listed any more, but neither are inter-area routes. Only the connected routes, or intra-area routes, and the default route generated by the ABR are listed in the routing table. Suppose area 2 will be a not so stubby area. In ABR and in router in area 2 add: area 2 stub no-summary. |
||||||
Not so stubby area |
||||||
Area 2 is a Totally stub area
but it may advertise external routes! For example
one router in area2 have a link with a RIP domain. This router will advertise
these external routes as Type7 LSA and ABR will convert them to Type 5. Suppose area 2 will be a not so stubby area. In ABR add : area 2 nssa
no-summary and in router in area 2 add: area 2 nssa.. |
||||||
Change OSPF router ID by changing interface priority: (by default equal 1 and 0 means will not participate) Router(config-if)# ip
ospf priority 2 |
||||||
Change OSPF router ID by explicit definition: Router(config-router)# router-id
193.2.2.2 |
||||||
Change load balancing: (equal cost only. By default 4) Router(config-router)# maximum-path 6 |
||||||
Manual auto-summary: (done in ABR, will send to area 0 only a summary
route) Router(config-router)# area 1 range
192.168.10.64 255.255.255.224 In ASBR: Router(config-router)#summary-address
192.168.10.64 255.255.255.224 |
||||||
Change interface type (by default ospf
advertise the exact ip address of loopback
interface (/32). To avoid this change the interface type) Router(config)#
interface loopback 1 Router(config-if)#ip ospf network point-to-point |
||||||
Manually define the cost (may be used for Stub's advertised external routes) Router(config-router)# area 11
default-cost 10 |
||||||
Redistribute rip to ospf (subnets:
will not autosummary – metric-type 1 : the
cost will increase cross the network. Type2 will not. Tag: optionally used to
filter redistributing ospf to rip to avoid loops) R1(config-router)#redistribute
rip subnets metric-type 1 metric 1500 tag 5 |
||||||
Redistribute with filtering using route-map R1(config)#Access-list 1 permit 192.168.2.0 0.0.0.255 R1(config)#route-map
rip-2-ospf R1(config-route-map)#match
ip address 1 R1(config-router)#redistribute
rip route-map rip-2-ospf subnets metric-type 1 metric 1500 tag 5 |
||||||
Virtual link area 0 -- router A -- area 1 --
router B – area 2
|
||||||
eBGP with authentication (needs direct connection) Private AS: 64512à65635 |
iBGP no need for direct connection |
Interface serial 0/0 Bandwidth 128 ip address 192.168.1.2 255.255.255.252 ! Router bgp 10500 Neighbor 192.168.1.1 remote-as 21500 Neighbor 192.168.1.1 password bgpsecret Neighbor 192.168.1.1 next-hop-self Network 10.50.1.0 mask 255.255.255.0 (to be advertised) ! |
R1# int loopback 1 ip add
1.1.1.1
255.255.255.255 router bgp
10500 neighbor 2.2.2.2 remote-as 10500 neighbor 2.2.2.2 update-source loopback 1 R2# int loopback 2 ip add 2.2.2.2 255.255.255.255 router bgp
10500 neighbor 1.1.1.1 remote-as 10500 neighbor 1.1.1.1 update-source loopback 2 Router# show ip bgp (summary) Show ip bgp neighbor Clear ip bgp * soft |
Remarks |
Load balance |
Metric |
Flush |
Hold-down |
Invalid |
Updates |
Admin.distance |
|
|
|
n/a |
n/a |
n/a |
n/a |
n/a |
1: if directed to an IP address 0: if directed to a connected interface |
Static |
-UDP520 -255.255.255.255 -classfull |
6 equal metric routes (default 4) |
Hop count Max=15 |
240 |
180 |
180 |
30 |
120 |
Rip 1 |
-UDP520 224.0.0.9- Classless- -By default it will auto-summarize |
6 equal metric routes |
Hop count Max=15 |
240 |
180 |
180 |
30 |
120 |
Rip 2 |
-IP protocol 9 255.255.255.255- Classfull- |
equal and unequal cost routes |
(10^7/Bw)+∑(delay/10) Bw: the smallest bw |
630 |
280 |
270 |
90 |
100 |
IGRP |
IP protocol 88- -Hello : 224.0.0.10 -Uses DUAL algo. And RTP -Calculate feasible successor
route -By default it will auto-summarize. |
equal and unequal cost routes (default 4, max 6) |
IGRP metric* 256 Note: max hop count: default
100/max:255 |
n/a |
n/a |
n/a |
Sends partial route updates only when
changes occur. Hello updates: 10s / 30s NBMA |
90 internal 170 external 5 summary |
EIGRP |
-Hello :
224.0.0.5. -Uses
SPF algo -By default it will NOT auto-summarize |
|
∑100
/ BW Bw: Mbps The 100 can be changed:
auto-cost reference-bandwidth
1000 |
|
|
4 x hello |
large updates :
every 30 minutes hello :10s (Bcst, P2P) 30s (NBMA) |
110 |
OSPF |
Supports IP,IPX, AT,…like EIGRP |
Equal-cost load balancing up to six paths |
Metric |
|
|
|
every 15 minutes |
115 |
IS-IS |
Use TCP179 Slowww |
By default, selects one path, but supports
load balancing with BGP Multipath to the same autonomous system (AS) |
Called PATH ATTRIBUTES: 1-weight(cisco, local) 2- LocPrf(def=100, transmitted to
same AS) 3-MED (metrique) 4- Origin: = i if from BGP using network cmd or = ? if redistributed 5-ASpath: list of AS 6- next-hop, metric(MED),
, , 7-community |
|
|
|
|
eBGP: 20 iBGP:200 |
BGP |