Route optimization

From Teknologisk videncenter
Jump to: navigation, search

redistribution cavets

Routing loops

redistribute RIP into OSPF example

Consider the network below and follow the red update path.

  1. Router A updates router B with RIP. Router B now learne the network 80.0.0.0/16.
    1. Please note that the administrative distance for RIP is 120.
  2. Router B now redistributes 80.0.0.0/16 into OSPF.
    1. Note that OSPF has an administrative distance of 110.
  3. Router B updates router C as an external OSPF route administrative distance 110
  4. Router C updates router D as an external OSPF route administrative distance 110
  5. Router D updates router E as an external OSPF route administrative distance 110
  6. Router E now has two router to 80.0.0.0/16
    1. Via RIP directly to Router A (Preferred route)
    2. Via OSPF to router D - Path D->C->B->A.
  7. Router E sends traffic to 80.0.0.0/16 to router D because OSPF(110) administrative distance is better than RIP's(120).
RIP redistribution into OSPF example

Avoiding Routing loop

redistribute RIP into EIGRP example

With EIGRP we avoid the routing loop seen from OSPF above. EIGRP has two different administrative distances. One for internal routes 90 and one for externally learned routes 170.
Consider the network below and follow the red update path.

  1. Router A updates router B with RIP. Router B now learne the network 80.0.0.0/16.
    1. Please note that the administrative distance for RIP is 120.
  2. Router B now redistributes 80.0.0.0/16 into EIGRP.
    1. EIGRP has an internal route administrative distance of 90. and
    2. EIGRP has an external route administrative distance of 170.
  3. Router B updates router C as an external EIGRP route administrative distance 170
  4. Router C updates router D as an external EIGRP route administrative distance 170
  5. Router D updates router E as an external EIGRP route administrative distance 170
  6. Router E now has two router to 80.0.0.0/16
    1. Via RIP directly to Router A (Preferred route)
    2. Via EIGRP to router D - Path D->C->B->A.
  7. Router E sends traffic to 80.0.0.0/16 to router A because RIP(120) administrative distance is better than EIGRP external(170).
RIP redistribution into EIGRP example

Distribute lists

You can filter updates with distribute lists. The exampe below shows filtering of incoming updates. You can also filter outgoing updates.

distribute list example
hostname B
!
router rip
 version 2
 distribute-list 23 in
!
access-list 23 deny 90.0.0.0 0.0.255.255
access-list 23 permit any

Router B Configuration of distribute list

hostname E
!
router rip
 version 2
 distribute-list 3 in
!
access-list 3 deny 80.0.0.0 0.0.255.255
access-list 3 permit any

Router E Configuration of distribute list

prefix lists

Routes in routetable

Address groups
Nr. Network
1 10.0.0.0/8
2 10.128.0.0/9
3 10.1.1.0/24
4 10.1.2.0/24
5 10.128.10.4/30
6 10.128.10.8/30
Address groups
Prefix list Matches in previos table
10.0.0.0/8 1
10.128.0.0/9 2
10.0.0.0/8 ge 9 2,3,4,5,6
10.0.0.0/8 ge 24 le 24 3,4
10.0.0.0/8 le 24 1,2,3,4
0.0.0.0/0 None
0.0.0.0/0 le 32 All

PBR: Policy Based Routing

PBR or Policy Based Routing gives more control and more options than distribute lists - see above. PBR introduces the set command which set the interface or next-hop address to which the packet should be sent. To select which packets should go where you can use the match command and match the based on for example source or destination addresses.

In the picture below the traffic from 192.168.1.0/24 on E0 interface must route to ISP1 and traffic from 172.16.1.0/24 on E1 must route to ISP1.

hostname RTA
!
access-list 37 permit 192.168.1.0 0.0.0.255
access-list 48 permit 172.16.1.0 0.0.0.255
!
route-map ISP1 permit 10
 match ip address 37
 set interface s0
!
route-map ISP2 permit 20
 match ip address 48
 set interface s1
!
interface e0
 ip policy route-map ISP1
!
interface e1
 ip policy route-map ISP2
Policy Based Routing example

Seed metric

Default Seed Metric
Default Seed Metric example (RIP=infinity default)
Administrative distance