...
Блок кода |
---|
|
ASBR2(config)# hostname ASBR2
ASBR2(config)#
ASBR2(config)# system jumbo-frames
ASBR2(config)#
ASBR2(config)# route-map VPNv4
ASBR2(config-route-map)# rule 1
ASBR2(config-route-map-rule)# exit
ASBR2(config-route-map)# exit
ASBR2(config)# router bgp 65500
ASBR2(config-bgp)# router-id 10.11.1.2
ASBR2(config-bgp)# neighbor 10.101.0.2
ASBR2(config-bgp-neighbor)# remote-as 65501
ASBR2(config-bgp-neighbor)# address-family vpnv4 unicast
ASBR2(config-bgp-neighbor-af)# route-map VPNv4 out
ASBR2(config-bgp-neighbor-af)# send-community extended
ASBR2(config-bgp-neighbor-af)# enable
ASBR2(config-bgp-neighbor-af)# exit
ASBR2(config-bgp-neighbor)# enable
ASBR2(config-bgp-neighbor)# exit
ASBR2(config-bgp)# neighbor 10.11.1.1
ASBR2(config-bgp-neighbor)# remote-as 65500
ASBR2(config-bgp-neighbor)# update-source 10.11.1.2
ASBR2(config-bgp-neighbor)# address-family vpnv4 unicast
ASBR2(config-bgp-neighbor-af)# next-hop-self
ASBR2(config-bgp-neighbor-af)# send-community extended
ASBR2(config-bgp-neighbor-af)# enable
ASBR2(config-bgp-neighbor-af)# exit
ASBR2(config-bgp-neighbor)# enable
ASBR2(config-bgp-neighbor)# exit
ASBR2(config-bgp)# enable
ASBR2(config-bgp)# exit
ASBR2(config)#
ASBR2(config)# router ospf 1
ASBR2(config-ospf)# router-id 10.11.1.2
ASBR2(config-ospf)# area 0.0.0.0
ASBR2(config-ospf-area)# enable
ASBR2(config-ospf-area)# exit
ASBR2(config-ospf)# enable
ASBR2(config-ospf)# exit
ASBR2(config)#
ASBR2(config)# interface gigabitethernet 1/0/1
ASBR2(config-if-gi)# description "to ASBR1"
ASBR2(config-if-gi)# ip firewall disable
ASBR2(config-if-gi)# ip address 10.101.0.1/30
ASBR2(config-if-gi)# exit
ASBR2(config)# interface gigabitethernet 1/0/2
ASBR2(config-if-gi)# description "to PE2"
ASBR2(config-if-gi)# mtu 1522
ASBR2(config-if-gi)# ip firewall disable
ASBR2(config-if-gi)# ip address 10.102.0.2/30
ASBR2(config-if-gi)# ip ospf instance 1
ASBR2(config-if-gi)# ip ospf
ASBR2(config-if-gi)# exit
ASBR2(config)# interface loopback 1
ASBR2(config-loopback)# ip address 10.11.1.2/32
ASBR2(config-loopback)# ip ospf instance 1
ASBR2(config-loopback)# ip ospf
ASBR2(config-loopback)# exit
ASBR2(config)# mpls
ASBR2(config-mpls)# ldp
ASBR2(config-ldp)# router-id 10.11.1.2
ASBR2(config-ldp)# address-family ipv4
ASBR2(config-ldp-af-ipv4)# interface gigabitethernet 1/0/2
ASBR2(config-ldp-af-ipv4-if)# exit
ASBR2(config-ldp-af-ipv4)# exit
ASBR2(config-ldp)# enable
ASBR2(config-ldp)# exit
ASBR2(config-mpls)# forwarding interface gigabitethernet 1/0/1
ASBR2(config-mpls)# forwarding interface gigabitethernet 1/0/2
ASBR2(config-mpls)# exit
ASBR2(config)# do com
ASBR2(config)# do conf
|
Проверим распространение маршрутной информации и сетевую доступность узлов:
Блок кода |
---|
PE1# sh bgp vpnv4 unicast all
Status codes: * - valid, > - best, i - internal, S - stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Codes Route Distinguisher IP Prefix Next hop Metric Label LocPrf Weight Path
----- --------------------- ------------------ --------------- ---------- ------- ---------- ------ ----------------
*>i 65501:2 10.104.0.1/32 10.10.1.2 -- 23 100 0 65500 65513 i
*>i 65501:1 10.103.0.1/32 10.10.1.2 -- 19 100 0 65500 65512 i
*> 65501:2 10.101.0.1/32 -- -- 29 100 -- 65511 i
*> 65501:1 10.100.0.1/32 -- -- 28 100 -- 65510 i
ASBR1# sh bgp vpnv4 unicast all
Status codes: * - valid, > - best, i - internal, S - stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Codes Route Distinguisher IP Prefix Next hop Metric Label LocPrf Weight Path
----- --------------------- ------------------ --------------- ---------- ------- ---------- ------ ----------------
*> 65501:2 10.104.0.1/32 10.101.0.1 -- 24 100 0 65500 65513 i
*> 65501:1 10.103.0.1/32 10.101.0.1 -- 20 100 0 65500 65512 i
*>i 65501:2 10.101.0.1/32 10.10.1.1 -- 29 100 0 65511 i
*>i 65501:1 10.100.0.1/32 10.10.1.1 -- 28 100 0 65510 i
ASBR2# sh bgp vpnv4 unicast all
Status codes: * - valid, > - best, i - internal, S - stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Codes Route Distinguisher IP Prefix Next hop Metric Label LocPrf Weight Path
----- --------------------- ------------------ --------------- ---------- ------- ---------- ------ ----------------
*>i 65501:2 10.104.0.1/32 10.11.1.1 -- 19 100 0 65513 i
*>i 65501:1 10.103.0.1/32 10.11.1.1 -- 18 100 0 65512 i
*> 65501:2 10.101.0.1/32 10.101.0.2 -- 30 100 0 65501 65511 i
*> 65501:1 10.100.0.1/32 10.101.0.2 -- 31 100 0 65501 65510 i
PE2# sh bgp vpnv4 unicast all
Status codes: * - valid, > - best, i - internal, S - stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Codes Route Distinguisher IP Prefix Next hop Metric Label LocPrf Weight Path
----- --------------------- ------------------ --------------- ---------- ------- ---------- ------ ----------------
*> 65501:2 10.104.0.1/32 -- -- 19 100 -- 65513 i
*> 65501:1 10.103.0.1/32 -- -- 18 100 -- 65512 i
*>i 65501:2 10.101.0.1/32 10.11.1.2 -- 29 100 0 65501 65511 i
*>i 65501:1 10.100.0.1/32 10.11.1.2 -- 30 100 0 65501 65510 i
CE4# ping 10.104.0.1 source ip 10.101.0.1 detailed
PING 10.104.0.1 (10.104.0.1) from 10.101.0.1 : 56 bytes of data.
64 bytes from 10.104.0.1: icmp_seq=1 ttl=0 time=2.25 ms
64 bytes from 10.104.0.1: icmp_seq=2 ttl=0 time=2.08 ms
64 bytes from 10.104.0.1: icmp_seq=3 ttl=0 time=2.15 ms
64 bytes from 10.104.0.1: icmp_seq=4 ttl=0 time=2.12 ms
64 bytes from 10.104.0.1: icmp_seq=5 ttl=0 time=2.09 ms
CE1# ping 10.103.0.1 source ip 10.100.0.1 detailed
PING 10.103.0.1 (10.103.0.1) from 10.100.0.1 : 56 bytes of data.
64 bytes from 10.103.0.1: icmp_seq=1 ttl=0 time=2.22 ms
64 bytes from 10.103.0.1: icmp_seq=2 ttl=0 time=2.11 ms
64 bytes from 10.103.0.1: icmp_seq=3 ttl=0 time=2.09 ms
64 bytes from 10.103.0.1: icmp_seq=4 ttl=0 time=2.09 ms
64 bytes from 10.103.0.1: icmp_seq=5 ttl=0 time=2.11 ms
|