cheatsheat for creating vrf
R1
conf t
ip vrf Cust-A
rd 65000:1
route-target both 6500:1
exit
ip vrf Cust-B
rd 6500:2
route-target both 6500:2
# customer facing interfaces
int gig0/0
ip vrf forwarding Cust-A
ip add <IP-add>
int gig0/1
ip vrf Cust-B
exit
ip vrf forwarding Cust-B
ip add <ip-add>
# configure bgp
conf t
router bgp 65000
neighbor 3.3.3.3 remote-as 65000
neighbor 3.3.3.3 update-source lo0
address-family vpnv4
neighbor 3.3.3.3 activate
end
# configure ospf for customer
conf t
router ospf 2 vrf Cust-A
network 10.0.0.0 0.0.0.3 area 0
exit
conf t
router ospf 3 vrf Cust-B
network 20.0.0.0 0.0.0.3 area 0
exit
# redistribution to bgp
conf t
router bgp 65000
address-family ipv4 vrf Cust-A
redistribute ospf 2
address-family ipv4 vrf Cust-B
redistribute ospf 3
# redistribution to ospf
conf t
router ospf 2
redistribute bgp 65000 subnets
router ospf 3
redistribute bgp 65000 subnets
end
R2
conf t
ip vrf Cust-A
rd 65000:1
route-target both 6500:1
exit
ip vrf Cust-B
rd 6500:2
route-target both 6500:2
exit
# customer facing interfaces
int gig0/0
ip vrf forwarding Cust-A
ip add <IP-add>
int gig0/1
ip vrf Cust-B
exit
ip vrf forwarding Cust-B
ip add <ip-add>
# configure bgp
conf t
router bgp 65000
neighbor 2.2.2.2 remote-as 65000
neighbor 2.2.2.2 update-source lo0
address-family vpnv4
neighbor 2.2.2.2 activate
end
# configure ospf for customer
conf t
router ospf 2 vrf Cust-A
network 30.0.0.0 0.0.0.3 area 0
exit
conf t
router ospf 3 vrf Cust-A
network 40.0.0.0 0.0.0.3 area 0
exit
# redistribution to bgp
conf t
router bgp 65000
address-family ipv4 vrf Cust-A
redistribute ospf 2
address-family ipv4 vrf Cust-B
redistribute ospf 3
# redistribution to ospf
conf t
router ospf 2
redistribute bgp 65000 subnets
router ospf 3
redistribute bgp 65000 subnets
end
Customer
router ospf 1
network 4.4.4.4 0.0.0.0 area 0
network 10.0.0.0 0.0.0.3 area 0
network 172.16.1.0 0.0.0.255 area 0
PREVIOUShsrp
NEXTntp and CA