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 terminalEnter configuration commands, one per line. End with CNTL/Z. Router-CE-A1(config)#router bgpRouter-CE-A1(config-router)#65535neighbor192.168.1.1remote-asRouter-CE-A1(config-router)#100redistribute ospfRouter-CE-A1(config-router)#155no synchronizationRouter-CE-A1(config-router)#no auto-summaryRouter-CE-A1(config-router)#exitRouter-CE-A1(config)#router ospfRouter-CE-A1(config-router)#155redistribute bgp65535subnetsRouter-CE-A1(config-router)#network192.168.5.0 0.0.0.255areaRouter-CE-A1(config-router)#0endRouter-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 terminalEnter configuration commands, one per line. End with CNTL/Z. Router-CE-A2(config)#router bgpRouter-CE-A2(config-router)#65534neighbor192.168.3.1remote-asRouter-CE-A2(config-router)# ...100
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access