l3vpn-MPLS
آموزش راه اندازی l3vpn-MPLS در سودار
توضیح سناریو
در سناریوی زیر provider در core شبکه خود از mpls استفاده می کند و customer ها نیز در شبکه خود از ospf استفاده می کنند . هر customer می خواهد با استفاده از بستر mpls شبکه provider ارتباط بین شبکه (شعب) خود را برقرار کند . provider در روتر های PE خود برای هر customer یک vrf در نظر می گیرد و اینترفیس مربوط به هر customer را در vrf مخصوص به customer قرار می دهد . پس از آن با استفاده از MP-BGP ارتباط vpn بین همه PE ها برقرار می کند . در این vpn بسته های هر customer دارای tag مشخص می باشد که این تگ ها در شبکه core تفسیر نمی شود و فقط به سمت PE ارسال می شود در PE با توجه به tag ، بسته ها به سمت customer مورد نظر forward می شوند . بدین ترتیب چند customer می تواند بصورت جداگانه و بدون ارتباط با دیگر customer ها از شبکه provider استفاده نماید .
در ادامه تنظیمات همه روتر ها را مشاهده می کنید
تنظیمات روتر های هسته مبتنی بر MPLS در سرویس دهنده شبکه (Provider Core):
hostname P1
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
service password-encryption
no banner motd
!
no ntp
!
!
interface erspan0
no ip address
!
interface ge0
mpls ip
no shutdown
ip address 20.0.12.1/24
exit
!
interface ge1
mpls ip
no shutdown
ip address 10.0.12.1/24
exit
!
interface ge2
mpls ip
no shutdown
ip address 30.0.12.1/24
exit
!
interface gre0
no ip address
!
interface gretap0
no ip address
!
interface lo
no ip address
!
interface tunl0
no ip address
!
interface loopback0
no shutdown
ip address 3.3.3.3/32
exit
!
router ospf
ospf router-id 3.3.3.3
redistribute connected
redistribute static
network 3.3.3.3/32 area 0
network 10.0.12.0/24 area 0
network 20.0.12.0/24 area 0
network 30.0.12.0/24 area 0
exit
!
mpls ldp
!
address-family ipv4
discovery transport-address 3.3.3.3
label local advertise explicit-null
!
interface ge0
exit
!
interface ge1
exit
!
interface ge2
exit
!
exit-address-family
!
exit
!
end
hostname P2
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
service password-encryption
no banner motd
!
no ntp
!
!
interface erspan0
no ip address
!
interface ge0
mpls ip
no shutdown
ip address 10.0.12.2/24
exit
!
interface ge1
mpls ip
no shutdown
ip address 10.0.23.2/24
exit
!
interface ge2
mpls ip
ip address 30.0.12.2/24
exit
!
interface gre0
no ip address
!
interface gretap0
no ip address
!
interface lo
no ip address
!
interface tunl0
no ip address
!
interface loopback0
no shutdown
ip address 6.6.6.6/32
exit
!
router ospf
ospf router-id 6.6.6.6
redistribute connected
redistribute static
network 6.6.6.6/32 area 0
network 10.0.12.0/24 area 0
network 10.0.23.0/24 area 0
network 30.0.12.0/24 area 0
exit
!
mpls ldp
!
address-family ipv4
discovery transport-address 6.6.6.6
label local advertise explicit-null
!
interface ge0
exit
!
interface ge1
exit
!
interface ge2
exit
!
exit-address-family
!
exit
!
end
hostname P3
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
service password-encryption
no banner motd
!
no ntp
!
!
interface erspan0
no ip address
!
interface ge0
mpls ip
no shutdown
ip address 40.0.12.3/24
exit
!
interface ge1
mpls ip
no shutdown
ip address 10.0.23.3/24
exit
!
interface ge2
no ip address
!
interface gre0
no ip address
!
interface gretap0
no ip address
!
interface lo
no ip address
!
interface tunl0
no ip address
!
interface loopback0
no shutdown
ip address 7.7.7.7/32
exit
!
router ospf
ospf router-id 7.7.7.7
redistribute connected
redistribute static
network 7.7.7.7/32 area 0
network 10.0.23.0/24 area 0
network 40.0.12.0/24 area 0
exit
!
mpls ldp
!
address-family ipv4
discovery transport-address 7.7.7.7
label local advertise explicit-null
!
interface ge0
exit
!
interface ge1
exit
!
exit-address-family
!
exit
!
end
تنظیمات روتر های لبه در سرویس دهنده شبکه (provider edge یا PE) :
hostname PE1
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
!
!
vrf customer1
!
vrf customer2
!
interface customer1 vrf customer1
no shutdown
!
interface customer2 vrf customer2
no shutdown
!
interface loopback10
no shutdown
ip address 1.1.1.1/32
!
interface ge0 vrf customer1
ip vrf forwarding customer1
no shutdown
ip address 10.0.1.1/24
!
interface ge1 vrf customer2
ip vrf forwarding customer2
no shutdown
ip address 10.0.2.1/24
!
interface ge2
mpls ip
no shutdown
ip address 20.0.12.3/24
!
router bgp 65000
no bgp default ipv4-unicast
neighbor 4.4.4.4 remote-as 65000
neighbor 4.4.4.4 update-source loopback10
!
address-family ipv4 vpn
neighbor 4.4.4.4 activate
exit-address-family
!
router bgp 65000 vrf customer1
!
address-family ipv4 unicast
redistribute connected
redistribute static
label vpn export auto
redistribute ospf
rd vpn export 65000:100
rt vpn both 65000:100
export vpn
import vpn
exit-address-family
!
router bgp 65000 vrf customer2
!
address-family ipv4 unicast
redistribute connected
redistribute static
redistribute ospf
label vpn export auto
rd vpn export 65000:200
rt vpn both 65000:200
export vpn
import vpn
exit-address-family
!
router ospf
ospf router-id 1.1.1.1
redistribute connected
redistribute static
network 1.1.1.1/32 area 0
network 20.0.12.0/24 area 0
exit
!
router ospf vrf customer1
ospf router-id 1.1.1.1
redistribute bgp
network 10.0.1.1/24 area 0
exit
!
router ospf vrf customer2
ospf router-id 1.1.1.1
redistribute bgp
network 10.0.2.1/24 area 0
exit
!
mpls ldp
!
address-family ipv4
discovery transport-address 1.1.1.1
label local advertise explicit-null
!
interface ge2
!
exit-address-family
!
!
line vty
!
hostname PE2
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
!
!
vrf customer1
!
vrf customer2
!
interface customer1 vrf customer1
no shutdown
!
interface customer2 vrf customer2
no shutdown
!
interface loopback10
no shutdown
ip address 4.4.4.4/32
!
interface ge1 vrf customer1
ip vrf forwarding customer1
no shutdown
ip address 10.1.1.1/24
!
interface ge2 vrf customer2
ip vrf forwarding customer2
no shutdown
ip address 10.1.2.1/24
!
interface ge0
mpls ip
no shutdown
ip address 40.0.12.4/24
!
router bgp 65000
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 65000
neighbor 1.1.1.1 update-source loopback10
!
address-family ipv4 vpn
neighbor 1.1.1.1 activate
exit-address-family
!
router bgp 65000 vrf customer1
!
address-family ipv4 unicast
redistribute connected
redistribute static
redistribute ospf
label vpn export auto
rd vpn export 65000:100
rt vpn both 65000:100
export vpn
import vpn
exit-address-family
!
router bgp 65000 vrf customer2
!
address-family ipv4 unicast
redistribute connected
redistribute static
redistribute ospf
label vpn export auto
rd vpn export 65000:200
rt vpn both 65000:200
export vpn
import vpn
exit-address-family
!
router ospf
ospf router-id 4.4.4.4
redistribute connected
redistribute static
network 4.4.4.4/32 area 0
network 40.0.12.0/24 area 0
exit
!
router ospf vrf customer1
ospf router-id 4.4.4.4
redistribute bgp
network 10.1.1.1/24 area 0
exit
!
router ospf vrf customer2
ospf router-id 4.4.4.4
redistribute bgp
network 10.1.2.1/24 area 0
exit
!
mpls ldp
!
address-family ipv4
discovery transport-address 4.4.4.4
label local advertise explicit-null
!
interface ge0
!
exit-address-family
!
!
line vty
!
تنظیمات روتر های لبه Customer :
hostname C1E1
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
!
!
interface loopback0
no shutdown
ip address 8.8.8.8/32
!
interface ge0
no shutdown
ip address 10.0.1.2/24
!
interface ge1
no shutdown
ip address 10.0.8.1/24
!
router ospf
ospf router-id 8.8.8.8
redistribute connected
redistribute static
network 8.8.8.8/32 area 0
network 10.0.1.2/24 area 0
network 10.0.8.1/24 area 0
exit
!
hostname C1E2
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
!
!
interface loopback0
no shutdown
ip address 10.10.10.10/32
!
interface ge0
no shutdown
ip address 10.1.1.2/24
!
interface ge1
no shutdown
ip address 10.0.10.1/24
!
router ospf
ospf router-id 10.10.10.10
redistribute connected
redistribute static
network 10.10.10.10/32 area 0
network 10.1.1.2/24 area 0
network 10.0.10.1/24 area 0
exit
!
hostname C2E1
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
!
!
interface loopback0
no shutdown
ip address 9.9.9.9/32
!
interface ge0
no shutdown
ip address 10.0.2.2/24
!
interface ge1
no shutdown
ip address 10.0.9.1/24
!
router ospf
ospf router-id 9.9.9.9
redistribute connected
redistribute static
network 9.9.9.9/32 area 0
network 10.0.2.2/24 area 0
network 10.0.9.1/24 area 0
exit
!
hostname C2E2
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
interface loopback0
no shutdown
ip address 11.11.11.11/32
!
interface ge0
no shutdown
ip address 10.1.2.2/24
!
interface ge1
no shutdown
ip address 10.0.11.1/24
!
router ospf
ospf router-id 11.11.11.11
redistribute connected
redistribute static
network 11.11.11.11/32 area 0
network 10.1.2.2/24 area 0
network 10.0.11.1/24 area 0
exit
!
تنظیمات روتر های داخلی شبکه Customer:
hostname C11
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
!
!
interface loopback0
no shutdown
ip address 12.12.12.12/32
!
interface ge0
no shutdown
ip address 10.0.8.2/24
!
interface ge1
no shutdown
ip address 192.168.11.1/24
!
router ospf
ospf router-id 12.12.12.12
redistribute connected
redistribute static
network 12.12.12.12/32 area 0
network 10.0.8.2/24 area 0
exit
!
hostname C12
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
interface loopback0
no shutdown
ip address 14.14.14.14/32
!
interface ge0
no shutdown
ip address 10.0.10.2/24
!
interface ge1
no shutdown
ip address 192.168.12.1/24
!
router ospf
ospf router-id 14.14.14.14
redistribute connected
redistribute static
network 14.14.14.14/32 area 0
network 10.0.10.2/24 area 0
exit
!
hostname C21
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
interface loopback0
no shutdown
ip address 13.13.13.13/32
!
interface ge0
no shutdown
ip address 10.0.9.2/24
!
interface ge1
no shutdown
ip address 192.168.21.1/24
!
router ospf
ospf router-id 13.13.13.13
redistribute connected
redistribute static
network 13.13.13.13/32 area 0
network 10.0.9.2/24 area 0
exit
!
hostname C22
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
interface loopback0
no shutdown
ip address 15.15.15.15/32
!
interface ge0
no shutdown
ip address 10.0.11.2/24
!
interface ge1
no shutdown
ip address 192.168.22.1/24
!
router ospf
ospf router-id 15.15.15.15
redistribute connected
redistribute static
network 15.15.15.15/32 area 0
network 10.0.11.2/24 area 0
exit
!
مشاهده جدول MPLS و bgp vpn
با استفاده از دستورات زیر جدول mpls و همسایه های mpls روتر ها را مشاهده میکنیم :
PE1# sh mpls ldp binding
AF Destination Nexthop Local Label Remote Label In Use
ipv4 1.1.1.1/32 3.3.3.3 exp-null 21 no
ipv4 3.3.3.3/32 3.3.3.3 66 exp-null yes
ipv4 4.4.4.4/32 3.3.3.3 67 16 yes
ipv4 6.6.6.6/32 3.3.3.3 68 17 yes
ipv4 7.7.7.7/32 3.3.3.3 69 18 yes
ipv4 10.0.12.0/24 3.3.3.3 70 exp-null yes
ipv4 10.0.23.0/24 3.3.3.3 71 19 yes
ipv4 20.0.12.0/24 3.3.3.3 exp-null exp-null no
ipv4 30.0.12.0/24 3.3.3.3 72 exp-null yes
ipv4 40.0.12.0/24 3.3.3.3 73 20 yes
PE1#
PE1# sh ip bgp ipv4 vpn
BGP table version is 11, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 65000
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65000:100
*> 8.8.8.8/32 10.0.1.2@6< 10 32768 ?
UN=10.0.1.2 EC{65000:100} label=16 type=bgp, subtype=5
*> 10.0.1.0/24 0.0.0.0@6< 0 32768 ?
UN=0.0.0.0 EC{65000:100} label=16 type=bgp, subtype=5
*> 10.0.8.0/24 10.0.1.2@6< 20 32768 ?
UN=10.0.1.2 EC{65000:100} label=16 type=bgp, subtype=5
*>i10.0.10.0/24 4.4.4.4 20 100 0 ?
UN=4.4.4.4 EC{65000:100} label=16 type=bgp, subtype=0
*>i10.1.1.0/24 4.4.4.4 0 100 0 ?
UN=4.4.4.4 EC{65000:100} label=16 type=bgp, subtype=0
*>i10.10.10.10/32 4.4.4.4 10 100 0 ?
UN=4.4.4.4 EC{65000:100} label=16 type=bgp, subtype=0
*> 12.12.12.12/32 10.0.1.2@6< 20 32768 ?
UN=10.0.1.2 EC{65000:100} label=16 type=bgp, subtype=5
*>i14.14.14.14/32 4.4.4.4 20 100 0 ?
UN=4.4.4.4 EC{65000:100} label=16 type=bgp, subtype=0
*> 192.168.11.0/24 10.0.1.2@6< 20 32768 ?
UN=10.0.1.2 EC{65000:100} label=16 type=bgp, subtype=5
*>i192.168.12.0/24 4.4.4.4 20 100 0 ?
UN=4.4.4.4 EC{65000:100} label=16 type=bgp, subtype=0
Route Distinguisher: 65000:200
*> 9.9.9.9/32 10.0.2.2@7< 10 32768 ?
UN=10.0.2.2 EC{65000:200} label=17 type=bgp, subtype=5
*> 10.0.2.0/24 0.0.0.0@7< 0 32768 ?
UN=0.0.0.0 EC{65000:200} label=17 type=bgp, subtype=5
*> 10.0.9.0/24 10.0.2.2@7< 20 32768 ?
UN=10.0.2.2 EC{65000:200} label=17 type=bgp, subtype=5
*>i10.0.11.0/24 4.4.4.4 20 100 0 ?
UN=4.4.4.4 EC{65000:200} label=17 type=bgp, subtype=0
*>i10.1.2.0/24 4.4.4.4 0 100 0 ?
UN=4.4.4.4 EC{65000:200} label=17 type=bgp, subtype=0
*>i11.11.11.11/32 4.4.4.4 10 100 0 ?
UN=4.4.4.4 EC{65000:200} label=17 type=bgp, subtype=0
*> 13.13.13.13/32 10.0.2.2@7< 20 32768 ?
UN=10.0.2.2 EC{65000:200} label=17 type=bgp, subtype=5
*>i15.15.15.15/32 4.4.4.4 20 100 0 ?
UN=4.4.4.4 EC{65000:200} label=17 type=bgp, subtype=0
*> 192.168.21.0/24 10.0.2.2@7< 20 32768 ?
UN=10.0.2.2 EC{65000:200} label=17 type=bgp, subtype=5
*>i192.168.22.0/24 4.4.4.4 20 100 0 ?
UN=4.4.4.4 EC{65000:200} label=17 type=bgp, subtype=0
Displayed 20 routes and 20 total paths
PE2# sh mpls ldp binding
AF Destination Nexthop Local Label Remote Label In Use
ipv4 1.1.1.1/32 7.7.7.7 73 22 yes
ipv4 3.3.3.3/32 7.7.7.7 68 17 yes
ipv4 4.4.4.4/32 7.7.7.7 exp-null 16 no
ipv4 6.6.6.6/32 7.7.7.7 69 18 yes
ipv4 7.7.7.7/32 7.7.7.7 66 exp-null yes
ipv4 10.0.12.0/24 7.7.7.7 70 19 yes
ipv4 10.0.23.0/24 7.7.7.7 67 exp-null yes
ipv4 20.0.12.0/24 7.7.7.7 71 20 yes
ipv4 30.0.12.0/24 7.7.7.7 72 21 yes
ipv4 40.0.12.0/24 7.7.7.7 exp-null exp-null no
PE2# sh ip bgp ipv4 vpn
BGP table version is 11, local router ID is 4.4.4.4, vrf id 0
Default local pref 100, local AS 65000
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65000:100
*>i8.8.8.8/32 1.1.1.1 10 100 0 ?
UN=1.1.1.1 EC{65000:100} label=16 type=bgp, subtype=0
*>i10.0.1.0/24 1.1.1.1 0 100 0 ?
UN=1.1.1.1 EC{65000:100} label=16 type=bgp, subtype=0
*>i10.0.8.0/24 1.1.1.1 20 100 0 ?
UN=1.1.1.1 EC{65000:100} label=16 type=bgp, subtype=0
*> 10.0.10.0/24 10.1.1.2@5< 20 32768 ?
UN=10.1.1.2 EC{65000:100} label=16 type=bgp, subtype=5
*> 10.1.1.0/24 0.0.0.0@5< 0 32768 ?
UN=0.0.0.0 EC{65000:100} label=16 type=bgp, subtype=5
*> 10.10.10.10/32 10.1.1.2@5< 10 32768 ?
UN=10.1.1.2 EC{65000:100} label=16 type=bgp, subtype=5
*>i12.12.12.12/32 1.1.1.1 20 100 0 ?
UN=1.1.1.1 EC{65000:100} label=16 type=bgp, subtype=0
*> 14.14.14.14/32 10.1.1.2@5< 20 32768 ?
UN=10.1.1.2 EC{65000:100} label=16 type=bgp, subtype=5
*>i192.168.11.0/24 1.1.1.1 20 100 0 ?
UN=1.1.1.1 EC{65000:100} label=16 type=bgp, subtype=0
*> 192.168.12.0/24 10.1.1.2@5< 20 32768 ?
UN=10.1.1.2 EC{65000:100} label=16 type=bgp, subtype=5
Route Distinguisher: 65000:200
*>i9.9.9.9/32 1.1.1.1 10 100 0 ?
UN=1.1.1.1 EC{65000:200} label=17 type=bgp, subtype=0
*>i10.0.2.0/24 1.1.1.1 0 100 0 ?
UN=1.1.1.1 EC{65000:200} label=17 type=bgp, subtype=0
*>i10.0.9.0/24 1.1.1.1 20 100 0 ?
UN=1.1.1.1 EC{65000:200} label=17 type=bgp, subtype=0
*> 10.0.11.0/24 10.1.2.2@6< 20 32768 ?
UN=10.1.2.2 EC{65000:200} label=17 type=bgp, subtype=5
*> 10.1.2.0/24 0.0.0.0@6< 0 32768 ?
UN=0.0.0.0 EC{65000:200} label=17 type=bgp, subtype=5
*> 11.11.11.11/32 10.1.2.2@6< 10 32768 ?
UN=10.1.2.2 EC{65000:200} label=17 type=bgp, subtype=5
*>i13.13.13.13/32 1.1.1.1 20 100 0 ?
UN=1.1.1.1 EC{65000:200} label=17 type=bgp, subtype=0
*> 15.15.15.15/32 10.1.2.2@6< 20 32768 ?
UN=10.1.2.2 EC{65000:200} label=17 type=bgp, subtype=5
*>i192.168.21.0/24 1.1.1.1 20 100 0 ?
UN=1.1.1.1 EC{65000:200} label=17 type=bgp, subtype=0
*> 192.168.22.0/24 10.1.2.2@6< 20 32768 ?
UN=10.1.2.2 EC{65000:200} label=17 type=bgp, subtype=5
Displayed 20 routes and 20 total paths
PE2#
P1# sh mpls ldp binding
AF Destination Nexthop Local Label Remote Label In Use
ipv4 1.1.1.1/32 1.1.1.1 21 exp-null yes
ipv4 1.1.1.1/32 6.6.6.6 21 22 no
ipv4 3.3.3.3/32 1.1.1.1 exp-null 66 no
ipv4 3.3.3.3/32 6.6.6.6 exp-null 16 no
ipv4 4.4.4.4/32 1.1.1.1 16 67 no
ipv4 4.4.4.4/32 6.6.6.6 16 17 yes
ipv4 6.6.6.6/32 1.1.1.1 17 68 no
ipv4 6.6.6.6/32 6.6.6.6 17 exp-null yes
ipv4 7.7.7.7/32 1.1.1.1 18 69 no
ipv4 7.7.7.7/32 6.6.6.6 18 18 yes
ipv4 10.0.12.0/24 1.1.1.1 exp-null 70 no
ipv4 10.0.12.0/24 6.6.6.6 exp-null exp-null no
ipv4 10.0.23.0/24 1.1.1.1 19 71 no
ipv4 10.0.23.0/24 6.6.6.6 19 exp-null yes
ipv4 20.0.12.0/24 1.1.1.1 exp-null exp-null no
ipv4 20.0.12.0/24 6.6.6.6 exp-null 19 no
ipv4 30.0.12.0/24 1.1.1.1 exp-null 72 no
ipv4 30.0.12.0/24 6.6.6.6 exp-null 20 no
ipv4 40.0.12.0/24 1.1.1.1 20 73 no
ipv4 40.0.12.0/24 6.6.6.6 20 21 yes
P2# sh mpls ldp binding
AF Destination Nexthop Local Label Remote Label In Use
ipv4 1.1.1.1/32 3.3.3.3 22 21 yes
ipv4 1.1.1.1/32 7.7.7.7 22 22 no
ipv4 3.3.3.3/32 3.3.3.3 16 exp-null yes
ipv4 3.3.3.3/32 7.7.7.7 16 17 no
ipv4 4.4.4.4/32 3.3.3.3 17 16 no
ipv4 4.4.4.4/32 7.7.7.7 17 16 yes
ipv4 6.6.6.6/32 3.3.3.3 exp-null 17 no
ipv4 6.6.6.6/32 7.7.7.7 exp-null 18 no
ipv4 7.7.7.7/32 3.3.3.3 18 18 no
ipv4 7.7.7.7/32 7.7.7.7 18 exp-null yes
ipv4 10.0.12.0/24 3.3.3.3 exp-null exp-null no
ipv4 10.0.12.0/24 7.7.7.7 exp-null 19 no
ipv4 10.0.23.0/24 3.3.3.3 exp-null 19 no
ipv4 10.0.23.0/24 7.7.7.7 exp-null exp-null no
ipv4 20.0.12.0/24 3.3.3.3 19 exp-null yes
ipv4 20.0.12.0/24 7.7.7.7 19 20 no
ipv4 30.0.12.0/24 3.3.3.3 20 exp-null yes
ipv4 30.0.12.0/24 7.7.7.7 20 21 no
ipv4 40.0.12.0/24 3.3.3.3 21 20 no
ipv4 40.0.12.0/24 7.7.7.7 21 exp-null yes
P2#
P3# sh mpls ldp binding
AF Destination Nexthop Local Label Remote Label In Use
ipv4 1.1.1.1/32 4.4.4.4 22 73 no
ipv4 1.1.1.1/32 6.6.6.6 22 22 yes
ipv4 3.3.3.3/32 4.4.4.4 17 68 no
ipv4 3.3.3.3/32 6.6.6.6 17 16 yes
ipv4 4.4.4.4/32 4.4.4.4 16 exp-null yes
ipv4 4.4.4.4/32 6.6.6.6 16 17 no
ipv4 6.6.6.6/32 4.4.4.4 18 69 no
ipv4 6.6.6.6/32 6.6.6.6 18 exp-null yes
ipv4 7.7.7.7/32 4.4.4.4 exp-null 66 no
ipv4 7.7.7.7/32 6.6.6.6 exp-null 18 no
ipv4 10.0.12.0/24 4.4.4.4 19 70 no
ipv4 10.0.12.0/24 6.6.6.6 19 exp-null yes
ipv4 10.0.23.0/24 4.4.4.4 exp-null 67 no
ipv4 10.0.23.0/24 6.6.6.6 exp-null exp-null no
ipv4 20.0.12.0/24 4.4.4.4 20 71 no
ipv4 20.0.12.0/24 6.6.6.6 20 19 yes
ipv4 30.0.12.0/24 4.4.4.4 21 72 no
ipv4 30.0.12.0/24 6.6.6.6 21 20 yes
ipv4 40.0.12.0/24 4.4.4.4 exp-null exp-null no
ipv4 40.0.12.0/24 6.6.6.6 exp-null 21 no
P3#
مشاهده جدول مسیریابی
C1E1# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default:
C>* 8.8.8.8/32 is directly connected, loopback0, 00:43:07
C>* 10.0.1.0/24 is directly connected, ge0, 00:43:10
C>* 10.0.8.0/24 is directly connected, ge1, 00:43:10
O>* 10.0.10.0/24 [110/20] via 10.0.1.1, ge0, weight 1, 00:42:08
O>* 10.1.1.0/24 [110/20] via 10.0.1.1, ge0, weight 1, 00:42:08
O>* 10.10.10.10/32 [110/20] via 10.0.1.1, ge0, weight 1, 00:42:08
O>* 12.12.12.12/32 [110/10] via 10.0.8.2, ge1, weight 1, 00:42:18
O>* 14.14.14.14/32 [110/20] via 10.0.1.1, ge0, weight 1, 00:42:08
O>* 192.168.11.0/24 [110/20] via 10.0.8.2, ge1, weight 1, 00:42:17
O>* 192.168.12.0/24 [110/20] via 10.0.1.1, ge0, weight 1, 00:42:08
C1E1#
C1E2# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default:
O>* 8.8.8.8/32 [110/20] via 10.1.1.1, ge0, weight 1, 00:49:06
O>* 10.0.1.0/24 [110/20] via 10.1.1.1, ge0, weight 1, 00:49:06
O>* 10.0.8.0/24 [110/20] via 10.1.1.1, ge0, weight 1, 00:49:06
C>* 10.0.10.0/24 is directly connected, ge1, 00:50:07
C>* 10.1.1.0/24 is directly connected, ge0, 00:50:07
C>* 10.10.10.10/32 is directly connected, loopback0, 00:50:05
O>* 12.12.12.12/32 [110/20] via 10.1.1.1, ge0, weight 1, 00:49:06
O>* 14.14.14.14/32 [110/10] via 10.0.10.2, ge1, weight 1, 00:49:16
O>* 192.168.11.0/24 [110/20] via 10.1.1.1, ge0, weight 1, 00:49:06
O>* 192.168.12.0/24 [110/20] via 10.0.10.2, ge1, weight 1, 00:49:15
C1E2#
C2E1# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default:
C>* 9.9.9.9/32 is directly connected, loopback0, 00:50:31
C>* 10.0.2.0/24 is directly connected, ge0, 00:50:33
C>* 10.0.9.0/24 is directly connected, ge1, 00:50:33
O>* 10.0.11.0/24 [110/20] via 10.0.2.1, ge0, weight 1, 00:49:32
O>* 10.1.2.0/24 [110/20] via 10.0.2.1, ge0, weight 1, 00:49:32
O>* 11.11.11.11/32 [110/20] via 10.0.2.1, ge0, weight 1, 00:49:32
O>* 13.13.13.13/32 [110/10] via 10.0.9.2, ge1, weight 1, 00:49:37
O>* 15.15.15.15/32 [110/20] via 10.0.2.1, ge0, weight 1, 00:49:32
O>* 192.168.21.0/24 [110/20] via 10.0.9.2, ge1, weight 1, 00:49:36
O>* 192.168.22.0/24 [110/20] via 10.0.2.1, ge0, weight 1, 00:49:32
C2E1#
C2E2# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default:
O>* 9.9.9.9/32 [110/20] via 10.1.2.1, ge0, weight 1, 00:49:55
O>* 10.0.2.0/24 [110/20] via 10.1.2.1, ge0, weight 1, 00:49:55
O>* 10.0.9.0/24 [110/20] via 10.1.2.1, ge0, weight 1, 00:49:55
C>* 10.0.11.0/24 is directly connected, ge1, 00:50:56
C>* 10.1.2.0/24 is directly connected, ge0, 00:50:56
C>* 11.11.11.11/32 is directly connected, loopback0, 00:50:54
O>* 13.13.13.13/32 [110/20] via 10.1.2.1, ge0, weight 1, 00:49:55
O>* 15.15.15.15/32 [110/10] via 10.0.11.2, ge1, weight 1, 00:50:00
O>* 192.168.21.0/24 [110/20] via 10.1.2.1, ge0, weight 1, 00:49:55
O>* 192.168.22.0/24 [110/20] via 10.0.11.2, ge1, weight 1, 00:49:59
C2E2#
PE1# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF customer1:
O>* 8.8.8.8/32 [110/10] via 10.0.1.2, ge0, weight 1, 00:41:38
C>* 10.0.1.0/24 is directly connected, ge0, 00:42:34
O>* 10.0.8.0/24 [110/20] via 10.0.1.2, ge0, weight 1, 00:41:38
B> 10.0.10.0/24 [20/20] via 4.4.4.4 (vrf default) (recursive), label 16, weight 1, 00:41:
32
* via 20.0.12.1, ge2 (vrf default), label 16/16, weight 1, 00:41:
32
B> 10.1.1.0/24 [20/0] via 4.4.4.4 (vrf default) (recursive), label 16, weight 1, 00:41:32
* via 20.0.12.1, ge2 (vrf default), label 16/16, weight 1, 00:41:32
B> 10.10.10.10/32 [20/10] via 4.4.4.4 (vrf default) (recursive), label 16, weight 1, 00:4
1:32
* via 20.0.12.1, ge2 (vrf default), label 16/16, weight 1, 00:4
1:32
O>* 12.12.12.12/32 [110/20] via 10.0.1.2, ge0, weight 1, 00:41:38
B> 14.14.14.14/32 [20/20] via 4.4.4.4 (vrf default) (recursive), label 16, weight 1, 00:41:32
* via 20.0.12.1, ge2 (vrf default), label 16/16, weight 1, 00:41:32
O>* 192.168.11.0/24 [110/20] via 10.0.1.2, ge0, weight 1, 00:41:37
B> 192.168.12.0/24 [20/20] via 4.4.4.4 (vrf default) (recursive), label 16, weight 1, 00:41:32
* via 20.0.12.1, ge2 (vrf default), label 16/16, weight 1, 00:41:32
VRF customer2:
O>* 9.9.9.9/32 [110/10] via 10.0.2.2, ge1, weight 1, 00:41:37
C>* 10.0.2.0/24 is directly connected, ge1, 00:42:33
O>* 10.0.9.0/24 [110/20] via 10.0.2.2, ge1, weight 1, 00:41:37
B> 10.0.11.0/24 [20/20] via 4.4.4.4 (vrf default) (recursive), label 17, weight 1, 00:41:32
* via 20.0.12.1, ge2 (vrf default), label 16/17, weight 1, 00:41:32
B> 10.1.2.0/24 [20/0] via 4.4.4.4 (vrf default) (recursive), label 17, weight 1, 00:41:32
* via 20.0.12.1, ge2 (vrf default), label 16/17, weight 1, 00:41:32
B> 11.11.11.11/32 [20/10] via 4.4.4.4 (vrf default) (recursive), label 17, weight 1, 00:41:32
* via 20.0.12.1, ge2 (vrf default), label 16/17, weight 1, 00:41:32
O>* 13.13.13.13/32 [110/20] via 10.0.2.2, ge1, weight 1, 00:41:37
B> 15.15.15.15/32 [20/20] via 4.4.4.4 (vrf default) (recursive), label 17, weight 1, 00:41:32
* via 20.0.12.1, ge2 (vrf default), label 16/17, weight 1, 00:41:32
O>* 192.168.21.0/24 [110/20] via 10.0.2.2, ge1, weight 1, 00:41:36
B> 192.168.22.0/24 [20/20] via 4.4.4.4 (vrf default) (recursive), label 17, weight 1, 00:41:32
* via 20.0.12.1, ge2 (vrf default), label 16/17, weight 1, 00:41:32
VRF default:
C>* 1.1.1.1/32 is directly connected, loopback10, 00:42:31
O>* 3.3.3.3/32 [110/10] via 20.0.12.1, ge2, label IPv4 Explicit Null, weight 1, 00:41:37
O>* 4.4.4.4/32 [110/40] via 20.0.12.1, ge2, label 16, weight 1, 00:41:37
O>* 6.6.6.6/32 [110/20] via 20.0.12.1, ge2, label 17, weight 1, 00:41:37
O>* 7.7.7.7/32 [110/30] via 20.0.12.1, ge2, label 18, weight 1, 00:41:37
O>* 10.0.12.0/24 [110/20] via 20.0.12.1, ge2, label IPv4 Explicit Null, weight 1, 00:41:37
O>* 10.0.23.0/24 [110/30] via 20.0.12.1, ge2, label 19, weight 1, 00:41:37
C>* 20.0.12.0/24 is directly connected, ge2, 00:42:33
O>* 30.0.12.0/24 [110/20] via 20.0.12.1, ge2, label IPv4 Explicit Null, weight 1, 00:41:37
O>* 40.0.12.0/24 [110/40] via 20.0.12.1, ge2, label 20, weight 1, 00:41:37
PE1#
PE2# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF customer1:
B> 8.8.8.8/32 [20/10] via 1.1.1.1 (vrf default) (recursive), label 16, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/16, weight 1, 00:48:28
B> 10.0.1.0/24 [20/0] via 1.1.1.1 (vrf default) (recursive), label 16, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/16, weight 1, 00:48:28
B> 10.0.8.0/24 [20/20] via 1.1.1.1 (vrf default) (recursive), label 16, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/16, weight 1, 00:48:28
O>* 10.0.10.0/24 [110/20] via 10.1.1.2, ge1, weight 1, 00:48:33
C>* 10.1.1.0/24 is directly connected, ge1, 00:49:28
O>* 10.10.10.10/32 [110/10] via 10.1.1.2, ge1, weight 1, 00:48:33
B> 12.12.12.12/32 [20/20] via 1.1.1.1 (vrf default) (recursive), label 16, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/16, weight 1, 00:48:28
O>* 14.14.14.14/32 [110/20] via 10.1.1.2, ge1, weight 1, 00:48:33
B> 192.168.11.0/24 [20/20] via 1.1.1.1 (vrf default) (recursive), label 16, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/16, weight 1, 00:48:28
O>* 192.168.12.0/24 [110/20] via 10.1.1.2, ge1, weight 1, 00:48:32
VRF customer2:
B> 9.9.9.9/32 [20/10] via 1.1.1.1 (vrf default) (recursive), label 17, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/17, weight 1, 00:48:28
B> 10.0.2.0/24 [20/0] via 1.1.1.1 (vrf default) (recursive), label 17, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/17, weight 1, 00:48:28
B> 10.0.9.0/24 [20/20] via 1.1.1.1 (vrf default) (recursive), label 17, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/17, weight 1, 00:48:28
O>* 10.0.11.0/24 [110/20] via 10.1.2.2, ge2, weight 1, 00:48:33
C>* 10.1.2.0/24 is directly connected, ge2, 00:49:28
O>* 11.11.11.11/32 [110/10] via 10.1.2.2, ge2, weight 1, 00:48:33
B> 13.13.13.13/32 [20/20] via 1.1.1.1 (vrf default) (recursive), label 17, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/17, weight 1, 00:48:28
O>* 15.15.15.15/32 [110/20] via 10.1.2.2, ge2, weight 1, 00:48:33
B> 192.168.21.0/24 [20/20] via 1.1.1.1 (vrf default) (recursive), label 17, weight 1, 00:48:28
* via 40.0.12.3, ge0 (vrf default), label 22/17, weight 1, 00:48:28
O>* 192.168.22.0/24 [110/20] via 10.1.2.2, ge2, weight 1, 00:48:32
VRF default:
O>* 1.1.1.1/32 [110/40] via 40.0.12.3, ge0, label 22, weight 1, 00:48:33
O>* 3.3.3.3/32 [110/30] via 40.0.12.3, ge0, label 17, weight 1, 00:48:34
C>* 4.4.4.4/32 is directly connected, loopback10, 00:49:27
O>* 6.6.6.6/32 [110/20] via 40.0.12.3, ge0, label 18, weight 1, 00:48:34
O>* 7.7.7.7/32 [110/10] via 40.0.12.3, ge0, label IPv4 Explicit Null, weight 1, 00:48:34
O>* 10.0.12.0/24 [110/30] via 40.0.12.3, ge0, label 19, weight 1, 00:48:34
O>* 10.0.23.0/24 [110/20] via 40.0.12.3, ge0, label IPv4 Explicit Null, weight 1, 00:48:34
O>* 20.0.12.0/24 [110/40] via 40.0.12.3, ge0, label 20, weight 1, 00:48:34
O>* 30.0.12.0/24 [110/40] via 40.0.12.3, ge0, label 21, weight 1, 00:48:34
C>* 40.0.12.0/24 is directly connected, ge0, 00:49:28
PE2#
P1# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default:
O>* 1.1.1.1/32 [110/10] via 20.0.12.3, ge0, label IPv4 Explicit Null, weight 1, 00:46:23
C>* 3.3.3.3/32 is directly connected, loopback0, 00:47:17
O>* 4.4.4.4/32 [110/30] via 10.0.12.2, ge1, label 17, weight 1, 00:46:24
O>* 6.6.6.6/32 [110/10] via 10.0.12.2, ge1, label IPv4 Explicit Null, weight 1, 00:46:24
O>* 7.7.7.7/32 [110/20] via 10.0.12.2, ge1, label 18, weight 1, 00:46:24
C>* 10.0.12.0/24 is directly connected, ge1, 00:47:19
O>* 10.0.23.0/24 [110/20] via 10.0.12.2, ge1, label IPv4 Explicit Null, weight 1, 00:46:24
C>* 20.0.12.0/24 is directly connected, ge0, 00:47:19
C>* 30.0.12.0/24 is directly connected, ge2, 00:47:18
O>* 40.0.12.0/24 [110/30] via 10.0.12.2, ge1, label 21, weight 1, 00:46:24
P1#
P2# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default:
O>* 1.1.1.1/32 [110/20] via 10.0.12.1, ge0, label 21, weight 1, 00:47:15
O>* 3.3.3.3/32 [110/10] via 10.0.12.1, ge0, label IPv4 Explicit Null, weight 1, 00:47:16
O>* 4.4.4.4/32 [110/20] via 10.0.23.3, ge1, label 16, weight 1, 00:47:16
C>* 6.6.6.6/32 is directly connected, loopback0, 00:48:09
O>* 7.7.7.7/32 [110/10] via 10.0.23.3, ge1, label IPv4 Explicit Null, weight 1, 00:47:16
C>* 10.0.12.0/24 is directly connected, ge0, 00:48:12
C>* 10.0.23.0/24 is directly connected, ge1, 00:48:12
O>* 20.0.12.0/24 [110/20] via 10.0.12.1, ge0, label IPv4 Explicit Null, weight 1, 00:47:16
O>* 30.0.12.0/24 [110/20] via 10.0.12.1, ge0, label IPv4 Explicit Null, weight 1, 00:47:16
O>* 40.0.12.0/24 [110/20] via 10.0.23.3, ge1, label IPv4 Explicit Null, weight 1, 00:47:16
P2#
P3# sh ip fib vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, W - WG,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default:
O>* 1.1.1.1/32 [110/30] via 10.0.23.2, ge1, label 22, weight 1, 00:47:33
O>* 3.3.3.3/32 [110/20] via 10.0.23.2, ge1, label 16, weight 1, 00:47:34
O>* 4.4.4.4/32 [110/10] via 40.0.12.4, ge0, label IPv4 Explicit Null, weight 1, 00:47:34
O>* 6.6.6.6/32 [110/10] via 10.0.23.2, ge1, label IPv4 Explicit Null, weight 1, 00:47:34
C>* 7.7.7.7/32 is directly connected, loopback0, 00:48:27
O>* 10.0.12.0/24 [110/20] via 10.0.23.2, ge1, label IPv4 Explicit Null, weight 1, 00:47:34
C>* 10.0.23.0/24 is directly connected, ge1, 00:48:29
O>* 20.0.12.0/24 [110/30] via 10.0.23.2, ge1, label 19, weight 1, 00:47:34
O>* 30.0.12.0/24 [110/30] via 10.0.23.2, ge1, label 20, weight 1, 00:47:34
C>* 40.0.12.0/24 is directly connected, ge0, 00:48:30
P3#
نکته
در جدول Route در روتر های PE مشاهده می شود که برای customer1 , customer2 جدول های route جداگانه وجود دارد و مسیریابی این دو از یکدیگر جدا است . این مسئله در جدول route روترهای (C1E1,C1E2,C2E1,C2E2) CE نیز قابل مشاهده است که در جدول هر کدام مسیرهای مربوط به شبکه خود را دارند .