December 2006
Intermediate to advanced
1188 pages
72h 8m
English
You want to restrict which routes your router advertises to another AS.
There are three ways to filter routes in BGP. The first one uses extended access lists and route maps, as follows:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#access-list105deny ip host172.25.0.0hostRouter1(config)#255.255.0.0access-list105permit ip any anyRouter1(config)#route-mapACL-RT-FILTERpermitRouter1(config-route-map)#10match ip addressRouter1(config-route-map)#105exitRouter1(config)#route-mapACL-RT-FILTERdenyRouter1(config-route-map)#20exitRouter1(config)#router bgpRouter1(config-router)#65500neighbor192.168.1.5remote-asRouter1(config-router)#65510neighbor192.168.1.5route-mapACL-RT-FILTERinRouter1(config-router)#exitRouter1(config)#endRouter1#
The second method uses a distribute-list:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#access-list106deny ip host172.25.0.0hostRouter1(config)#255.255.0.0access-list106permit ip any anyRouter1(config)#router bgpRouter1(config-router)#65500neighbor192.168.1.5remote-asRouter1(config-router)#65510neighbor192.168.1.5distribute-list106inRouter1(config-router)#exitRouter1(config)#endRouter1#
But the most common way to filter routes in BGP is to use prefix lists. The following example has a similar effect the preceding ones:
Router1#configure ...Read now
Unlock full access