PE-CE Communication via OSPF

Problem

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

Solution

You can use OSPF to exchange customer routing information between the CE and PE routers at each site. For this example, we will configure OSPF for the CE to PE IGP at Customer A’s Sites 1 and 2, but not 3, so that we can show some of the idiosyncrasies of MP-BGP route redistribution.

First we will configure the CE routers. We will use two OSPF network statements on the router at Site 1. The first, 192.168.1.0/24, allows this router to communicate with the PE router, while the second, 192.168.5.0/24, includes downstream devices in the OSPF network:

Router-CE-A1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router-CE-A1(config)#router ospf 55
Router-CE-A1(config-router)#network 192.168.1.0 0.0.0.255 area 0
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#

And the CE router at the second site will use only one network statement:

Router-CE-A2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router-CE-A2(config)#router ospf 55
Router-CE-A2(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router-CE-A2(config-router)#end
Router-CE-A2#

For the corresponding configuration on the PE routers, we need to create a new OSPF process that is associated with this VRF, and we need to configure the appropriate redistribution:

Router-PE1#configure terminal ...

Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.