O'Reilly logo

Cisco IOS Cookbook, 2nd Edition by Ian Brown, Kevin Dooley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PE-CE Communication via BGP

Problem

You want to use BGP to exchange routing information between CE and PE routers.

Solution

Once again, this problem is similar to the RIP, OSPF, and EIGRP examples in Recipes 26.5, 26.6, and 26.7. First we have to enable the routing protocol on the CE routers, which we do by configuring a new AS number on the CE routers. These devices are part of a different AS than the MPLS cloud, so they must have different AS numbers:

Router-CE-A1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router-CE-A1(config)#router bgp 65535
Router-CE-A1(config-router)#neighbor 192.168.1.1 remote-as 100
Router-CE-A1(config-router)#redistribute ospf 155
Router-CE-A1(config-router)#no synchronization
Router-CE-A1(config-router)#no auto-summary
Router-CE-A1(config-router)#exit
Router-CE-A1(config)#router ospf 155
Router-CE-A1(config-router)#redistribute bgp 65535 subnets
Router-CE-A1(config-router)#network 192.168.5.0 0.0.0.255 area 0
Router-CE-A1(config-router)#end
Router-CE-A1#

At this site, we are using the same OSPF configuration as in Recipe 26.6 to facilitate routing within the site, so we must redistribute the OSPF routes into BGP, and vice versa.

We configure the other CE router similarly, but with a different AS number:

Router-CE-A2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router-CE-A2(config)#router bgp 65534
Router-CE-A2(config-router)#neighbor 192.168.3.1 remote-as 100 Router-CE-A2(config-router)# ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required