Below is a sample configuration of enabling interprovider option B VPN between Juniper and Cisco-IOS. The configuration assumes two service providers are interconnected across ASBR routers (ASBR1 and ASBR2), MPLS and LDP are enabled across each of the domains for MPLS label exchange, and one VRF has been created across these two domains.
root@R2# show system { host-name R2; } interfaces { fe-0/0 { unit 0 { family inet { address 150.100.100.1/30; } family mpls; } } lo0 { unit 0 { family inet { address 172.100.100.2/32; } } unit 100 { family inet { address 100.100.100.1/32; } } } } routing-options { autonomous-system 65001; } protocols { mpls { interface fe-0/0.0; } bgp { group IBGP { type internal; local-address 172.100.100.2; family inet-vpn { unicast; } neighbor 172.100.100.1; } } ospf { area 0.0.0.0 { interface fe-0/0.0; interface lo0.0 { passive; } } } ldp { interface fe-0/0.0; interface lo0.0; } } routing-instances { Site-A { instance-type vrf; interface lo0.100; route-distinguisher 65001:1; vrf-target target:100:1; } }
root@R1# show system { host-name R1; } interfaces { fe-0/1 { unit 0 family inet { address 150.100.100.5/30; } family mpls; } } fe-0/0 { unit 0 { family inet { address 150.100.100.2/30; } family mpls; } } lo0 { unit 0 { family inet { address 172.100.100.1/32; } } } } routing-options { autonomous-system 65001; } protocols { mpls { interface fe-0/0.0; interface fe-0/1.0; } bgp { group IBGP { type internal; local-address 172.100.100.1; family inet-vpn { unicast; } neighbor 172.100.100.2 { export next-hop-self; } } group EBGP { type external; family inet-vpn { unicast; } peer-as 65000; neighbor 150.100.100.6; } } ospf { area 0.0.0.0 { interface fe-0/0.0; interface lo0.0 { passive; } } } ldp { interface fe-0/0.0; interface lo0.0; } } policy-options { policy-statement next-hop-self { term A { from { protocol bgp; neighbor 150.100.100.6; } then { next-hop self; } } } }
R3#sh run Building configuration... Current configuration : 1420 bytes ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! no logging console ! no aaa new-model ip subnet-zero ! ! ip cef no ip domain lookup ! ! interface Loopback0 ip address 172.100.100.3 255.255.255.255 ! interface FastEthernet0/0 no ip address shutdown duplex half ! interface FastEthernet1/0 ip address 150.100.100.6 255.255.255.252 duplex auto speed auto ! interface FastEthernet1/1 ip address 150.100.100.9 255.255.255.252 duplex auto speed auto mpls label protocol ldp tag-switching ip ! router ospf 100 log-adjacency-changes network 150.100.100.9 0.0.0.0 area 0 network 172.100.100.3 0.0.0.0 area 0 ! router bgp 65000 no synchronization no bgp default route-target filter bgp log-neighbor-changes neighbor 150.100.100.5 remote-as 65001 neighbor 172.100.100.4 remote-as 65000 neighbor 172.100.100.4 update-source Loopback0 no auto-summary ! address-family vpnv4 neighbor 150.100.100.5 activate neighbor 150.100.100.5 send-community extended neighbor 172.100.100.4 activate neighbor 172.100.100.4 next-hop-self neighbor 172.100.100.4 send-community extended exit-address-family ! ip classless no ip http server ! ! line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line aux 0 stopbits 1 line vty 0 4 ! ! end R3#
R4#sh run Building configuration... Current configuration : 1501 bytes ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R4 ! boot-start-marker boot-end-marker ! no logging console ! no aaa new-model ip subnet-zero ! ! ip cef no ip domain lookup ! ip vrf SITE-A rd 65000:1 route-target export 100:1 route-target import 100:1 ! interface Loopback0 ip address 172.100.100.4 255.255.255.255 ! interface Loopback100 ip vrf forwarding SITE-A ip address 100.100.100.2 255.255.255.255 ! interface FastEthernet0/0 no ip address shutdown duplex half ! interface FastEthernet1/0 ip address 150.100.100.10 255.255.255.252 duplex auto speed auto mpls label protocol ldp tag-switching ip ! interface FastEthernet1/1 no ip address shutdown duplex auto speed auto ! router ospf 100 log-adjacency-changes network 150.100.100.10 0.0.0.0 area 0 network 172.100.100.4 0.0.0.0 area 0 ! router bgp 65000 no synchronization bgp log-neighbor-changes neighbor 172.100.100.3 remote-as 65000 neighbor 172.100.100.3 update-source Loopback0 no auto-summary ! address-family vpnv4 neighbor 172.100.100.3 activate neighbor 172.100.100.3 send-community extended exit-address-family ! address-family ipv4 vrf SITE-A redistribute connected no auto-summary no synchronization exit-address-family ! ip classless no ip http server ! line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line aux 0 stopbits 1 line vty 0 4 ! ! end R4#
R4#sh ip bgp vpnv4 all BGP table version is 41, local router ID is 172.100.100.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 65000:1 (default for vrf SITE-A) *>i100.100.100.1/32 172.100.100.3 0 100 0 65001 i *> 100.100.100.2/32 0.0.0.0 0 32768 ? Route Distinguisher: 65001:1 *>i100.100.100.1/32 172.100.100.3 0 100 0 65001 i R4#sh ip route vrf SITE-A Routing Table: SITE-A Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 100.0.0.0/32 is subnetted, 2 subnets B 100.100.100.1 [200/0] via 172.100.100.3, 00:24:41 C 100.100.100.2 is directly connected, Loopback100 R4#ping vrf SITE-A 100.100.100.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 100.100.100.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 36/69/100 ms
root@R2# run show route table Site-A Site-A.inet.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 100.100.100.1/32 *[Direct/0] 00:26:34 > via lo0.100 100.100.100.2/32 *[BGP/170] 00:25:57, localpref 100, from 172.100.100.1 AS path: 65000 ? > to 150.100.100.2 via fxp0.0, Push 100128 root@R2# run ping routing-instance Site-A 100.100.100.2 rapid PING 100.100.100.2 (100.100.100.2): 56 data bytes !!!!! --- 100.100.100.2 ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max/stddev = 29.921/58.085/101.494/24.054 ms