Skip to content

Instantly share code, notes, and snippets.

@hkwi
Last active December 4, 2018 06:23
Show Gist options
  • Save hkwi/e9fbe95aac311a18b741d81d7dfc5900 to your computer and use it in GitHub Desktop.
Save hkwi/e9fbe95aac311a18b741d81d7dfc5900 to your computer and use it in GitHub Desktop.
cisco vpn/bgp+mpls inter-as option b

cisco vpn/bgp+mpls inter-as option b

  • with next-hop-self
  • with loopback
  • with ldp
  • without bgp labeled-unicast
  • without route-reflector
  • without multi-hop ebgp

表示バグの罠に注意。 https://quickview.cloudapps.cisco.com/quickview/bug/CSCta83434

r4#show ip cef vrf A 192.168.3.0/24
192.168.3.0/24
  recursive via 192.168.2.1 unusable: no label
r4#show ip cef vrf A 192.168.3.0/24 detail
192.168.3.0/24, epoch 0
  recursive via 100.0.0.2 label 18
    recursive via 192.168.2.1 unusable: no label
r4#ping vrf A 192.168.3.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/88/116 ms
hostname r1
version 12.4
ip cef
ip vrf A
rd 65000:1
route-target both 65000:100
interface lo 0
ip address 100.0.0.1 255.255.255.255
interface f 0/0
ip address 192.168.0.1 255.255.255.0
no shutdown
interface e 1/0
ip address 192.168.1.1 255.255.255.0
mpls ip
no shutdown
router bgp 65000
neighbor 192.168.0.2 remote-as 65001
neighbor 100.0.0.3 remote-as 65000
neighbor 100.0.0.3 update-source lo0
address-family vpnv4
neighbor 192.168.0.2 activate
neighbor 100.0.0.3 activate
neighbor 100.0.0.3 next-hop-self
ip route 100.0.0.3 255.255.255.255 192.168.1.2
end
version 12.4
ip cef
hostname r2
ip vrf A
rd 65001:1
route-target both 65000:100
interface lo 0
ip address 100.0.0.2 255.255.255.255
interface f 0/0
ip address 192.168.0.2 255.255.255.0
no shutdown
interface e 1/0
ip address 192.168.2.1 255.255.255.0
mpls ip
no shutdown
router bgp 65001
neighbor 192.168.0.1 remote-as 65000
neighbor 100.0.0.4 remote-as 65001
neighbor 100.0.0.4 update-source lo0
address-family vpnv4
neighbor 192.168.0.1 activate
neighbor 100.0.0.4 activate
neighbor 100.0.0.4 next-hop-self
ip route 100.0.0.4 255.255.255.255 192.168.2.2
end
version 12.4
ip cef
hostname r3
ip vrf A
rd 65000:2
route-target both 65000:100
interface lo 0
ip address 100.0.0.3 255.255.255.255
interface e 1/0
ip address 192.168.1.2 255.255.255.0
mpls ip
no shutdown
interface e 1/1
ip vrf forwarding A
ip address 192.168.3.1 255.255.255.0
no shutdown
router bgp 65000
neighbor 100.0.0.1 remote-as 65000
neighbor 100.0.0.1 update-source lo0
address-family vpnv4
neighbor 100.0.0.1 activate
neighbor 100.0.0.1 next-hop-self
address-family ipv4 vrf A
redistribute connected
ip route 100.0.0.1 255.255.255.255 192.168.1.1
end
version 12.4
ip cef
hostname r4
ip vrf A
rd 65001:2
route-target both 65000:100
interface lo 0
ip address 100.0.0.4 255.255.255.255
interface e 1/0
ip address 192.168.2.2 255.255.255.0
mpls ip
no shutdown
interface e 1/1
ip vrf forwarding A
ip address 192.168.4.1 255.255.255.0
no shutdown
router bgp 65001
neighbor 100.0.0.2 remote-as 65001
neighbor 100.0.0.2 update-source lo0
address-family vpnv4
neighbor 100.0.0.2 activate
neighbor 100.0.0.2 next-hop-self
address-family ipv4 vrf A
redistribute connected
ip route 100.0.0.2 255.255.255.255 192.168.2.1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment