Difference between revisions of "Route optimization"
m (New page: = reditribution cavets = == Routing loops == === redistribute RIP into OSPF example === Consider the network below and follow the red update path. #Router A updates router B with RIP. Rou...) |
m (→Routing loops) |
||
Line 4: | Line 4: | ||
Consider the network below and follow the red update path. | Consider the network below and follow the red update path. | ||
#Router A updates router B with RIP. Router B now learne the network 80.0.0.0/16. | #Router A updates router B with RIP. Router B now learne the network 80.0.0.0/16. | ||
− | + | ##Please note that the administrative distance for RIP is 120. | |
#Router B now redistributes 80.0.0.0/16 into OSPF. | #Router B now redistributes 80.0.0.0/16 into OSPF. | ||
− | + | ##Note that OSPF has an administrative distance of 110. | |
#Router B updates router C as an '''external''' OSPF route administrative distance 110 | #Router B updates router C as an '''external''' OSPF route administrative distance 110 | ||
#Router C updates router D as an '''external''' OSPF route administrative distance 110 | #Router C updates router D as an '''external''' OSPF route administrative distance 110 | ||
Line 21: | Line 21: | ||
Consider the network below and follow the red update path. | Consider the network below and follow the red update path. | ||
#Router A updates router B with RIP. Router B now learne the network 80.0.0.0/16. | #Router A updates router B with RIP. Router B now learne the network 80.0.0.0/16. | ||
− | + | ##Please note that the administrative distance for RIP is 120. | |
#Router B now redistributes 80.0.0.0/16 into EIGRP. | #Router B now redistributes 80.0.0.0/16 into EIGRP. | ||
− | + | ##EIGRP has an '''internal''' route administrative distance of 90. and | |
− | + | ##EIGRP has an '''external''' route administrative distance of 170. | |
#Router B updates router C as an '''external''' EIGRP route administrative distance 170 | #Router B updates router C as an '''external''' EIGRP route administrative distance 170 | ||
#Router C updates router D as an '''external''' EIGRP route administrative distance 170 | #Router C updates router D as an '''external''' EIGRP route administrative distance 170 | ||
Line 33: | Line 33: | ||
#Router E sends traffic to 80.0.0.0/16 to router A because RIP(120) administrative distance is better than EIGRP external(170). | #Router E sends traffic to 80.0.0.0/16 to router A because RIP(120) administrative distance is better than EIGRP external(170). | ||
[[image:RIP_redistribute_into_EIGRP.png|500px|none|thumb|RIP redistribution into EIGRP example]] | [[image:RIP_redistribute_into_EIGRP.png|500px|none|thumb|RIP redistribution into EIGRP example]] | ||
+ | |||
= Distribute lists = | = Distribute lists = | ||
You can filter updates with distribute lists. The exampe below shows filtering of incoming updates. You can also filter outgoing updates. | You can filter updates with distribute lists. The exampe below shows filtering of incoming updates. You can also filter outgoing updates. |
Revision as of 09:16, 25 March 2009
Contents
reditribution cavets
Routing loops
redistribute RIP into OSPF example
Consider the network below and follow the red update path.
- Router A updates router B with RIP. Router B now learne the network 80.0.0.0/16.
- Please note that the administrative distance for RIP is 120.
- Router B now redistributes 80.0.0.0/16 into OSPF.
- Note that OSPF has an administrative distance of 110.
- Router B updates router C as an external OSPF route administrative distance 110
- Router C updates router D as an external OSPF route administrative distance 110
- Router D updates router E as an external OSPF route administrative distance 110
- Router E now has two router to 80.0.0.0/16
- Via RIP directly to Router A (Preferred route)
- Via OSPF to router D - Path D->C->B->A.
- Router E sends traffic to 80.0.0.0/16 to router D because OSPF(110) administrative distance is better than RIP's(120).
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.
- Router A updates router B with RIP. Router B now learne the network 80.0.0.0/16.
- Please note that the administrative distance for RIP is 120.
- Router B now redistributes 80.0.0.0/16 into EIGRP.
- EIGRP has an internal route administrative distance of 90. and
- EIGRP has an external route administrative distance of 170.
- Router B updates router C as an external EIGRP route administrative distance 170
- Router C updates router D as an external EIGRP route administrative distance 170
- Router D updates router E as an external EIGRP route administrative distance 170
- Router E now has two router to 80.0.0.0/16
- Via RIP directly to Router A (Preferred route)
- Via EIGRP to router D - Path D->C->B->A.
- Router E sends traffic to 80.0.0.0/16 to router A because RIP(120) administrative distance is better than EIGRP external(170).
Distribute lists
You can filter updates with distribute lists. The exampe below shows filtering of incoming updates. You can also filter outgoing updates.
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
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.0724 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/0 ! route-map ISP2 permit 20 match ip address 48 set interface s0/1 ! interface e0 ip policy route-map ISP1 ! interface e1 ip policy route-map ISP2