...
Блок кода |
---|
|
ESR(config)# hostname ASBR2
ESR(config)#
ESR(config)# system jumbo-frames
ESR(config)#
ESR(config)# vlan 100,200
ESR(config-vlan)# exit
ESR(config)#
ESR(config)# router bgp 65500
ESR(config-bgp)# router-id 10.10.1.2
ESR(config-bgp)# neighbor 10.10.1.1
ESR(config-bgp-neighbor)# remote-as 65500
ESR(config-bgp-neighbor)# update-source 10.10.1.2
ESR(config-bgp-neighbor)# address-family l2vpn vpls
ESR(config-bgp-neighbor-af)# send-community extended
ESR(config-bgp-neighbor-af)# enable
ESR(config-bgp-neighbor-af)# exit
ESR(config-bgp-neighbor)# enable
ESR(config-bgp-neighbor)# exit
ESR(config-bgp)# enable
ESR(config-bgp)# exit
ESR(config)#
ESR(config)# router ospf 1
ESR(config-ospf)# area 0.0.0.0
ESR(config-ospf-area)# enable
ESR(config-ospf-area)# exit
ESR(config-ospf)# enable
ESR(config-ospf)# exit
ESR(config)#
ESR(config)# bridge 10
ESR(config-bridge)# vlan 100
ESR(config-bridge)# enable
ESR(config-bridge)# exit
ESR(config)# bridge 20
ESR(config-bridge)# vlan 200
ESR(config-bridge)# enable
ESR(config-bridge)# exit
ESR(config)#
ESR(config)# interface gigabitethernet 1/0/1
ESR(config-if-gi)# description "to ASBR1"
ESR(config-if-gi)# mode switchport
ESR(config-if-gi)# spanning-tree disable
ESR(config-if-gi)# switchport forbidden default-vlan
ESR(config-if-gi)# switchport mode trunk
ESR(config-if-gi)# switchport trunk allowed vlan add 100,200
ESR(config-if-gi)# exit
ESR(config)# interface gigabitethernet 1/0/2
ESR(config-if-gi)# description "to PE1"
ESR(config-if-gi)# mtu 1522
ESR(config-if-gi)# ip firewall disable
ESR(config-if-gi)# ip address 10.100.0.2/30
ESR(config-if-gi)# ip ospf instance 1
ESR(config-if-gi)# ip ospf
ESR(config-if-gi)# exit
ESR(config)# interface loopback 1
ESR(config-loopback)# ip address 10.10.1.2/32
ESR(config-loopback)# ip ospf instance 1
ESR(config-loopback)# ip ospf
ESR(config-loopback)# exit
ESR(config)# mpls
ESR(config-mpls)# ldp
ESR(config-ldp)# router-id 10.10.1.2
ESR(config-ldp)# address-family ipv4
ESR(config-ldp-af-ipv4)# interface gigabitethernet 1/0/2
ESR(config-ldp-af-ipv4-if)# exit
ESR(config-ldp-af-ipv4)# exit
ESR(config-ldp)# enable
ESR(config-ldp)# exit
ESR(config-mpls)# l2vpn
ESR(config-l2vpn)# vpls CE1
ESR(config-l2vpn-vpls)# bridge-group 10
ESR(config-l2vpn-vpls)# autodiscovery bgp
ESR(config-bgp)# vpn id 1
ESR(config-bgp)# ve id 1
ESR(config-bgp)# rd 65500:1
ESR(config-bgp)# route-target export 65500:1
ESR(config-bgp)# route-target import 65500:1
ESR(config-bgp)# exit
ESR(config-l2vpn-vpls)# enable
ESR(config-l2vpn-vpls)# exit
ESR(config-l2vpn)# vpls CE2
ESR(config-l2vpn-vpls)# bridge-group 20
ESR(config-l2vpn-vpls)# autodiscovery bgp
ESR(config-bgp)# vpn id 2
ESR(config-bgp)# ve id 1
ESR(config-bgp)# rd 65500:2
ESR(config-bgp)# route-target export 65500:2
ESR(config-bgp)# route-target import 65500:2
ESR(config-bgp)# exit
ESR(config-l2vpn-vpls)# enable
ESR(config-l2vpn-vpls)# exit
ESR(config-l2vpn)# exit
ESR(config-mpls)# forwarding interface gigabitethernet 1/0/2
ESR(config-mpls)# exit
ESR(config)# do com
ESR(config)# do conf
|
Проверим назначение меток, статус сервисов , а также сетевую доступность между CE.
Блок кода |
---|
|
ASBR2# sh bgp l2vpn vpls all
Status codes: * - valid, > - best, i - internal, S - stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Codes Route Distinguisher VID VBO VBS Next hop Metric LocPrf Weight Path
----- --------------------- ----- ----- ----- --------------- ---------- ---------- ------ -------------------
*>i 65500:1 2 1 10 10.11.1.1 -- 100 0 i
*>i 65500:2 2 1 10 10.11.1.1 -- 100 0 i
*> 65500:1 1 1 10 -- -- -- --
*> 65500:2 1 1 10 -- -- -- --
ASBR2# sh mpls forwarding-table
Local Outgoing Prefix Outgoing Next Hop
label label or tunnel ID Interface
-------- -------- ------------------------------------------- ---------------- ---------------------------------------
56 imp-null 10.11.1.1/32 gi1/0/2 10.101.0.1
47 37 PW ID 1 -- 10.11.1.1
37 47 PW ID 2 -- 10.11.1.1
|
Блок кода |
---|
|
ASBR2# sh mpls l2vpn vpls
VPLS: CE1
bridge 10:
MTU: 1500
Status: Up
PWs:
PW ID 1, Neighbor 10.11.1.1:
MTU: 1500
Last change: 00:16:59
Status: Up
VPLS: CE2
bridge 20:
MTU: 1500
Status: Up
PWs:
PW ID 2, Neighbor 10.11.1.1:
MTU: 1500
Last change: 00:16:59
Status: Up
|
Блок кода |
---|
title | Проверка сетевой доступности |
---|
|
CE1# ping 192.168.1.2 detailed
PING 192.168.1.2 (192.168.1.2) 56 bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=0 time=1.08 ms
64 bytes from 192.168.1.2: icmp_seq=2 ttl=0 time=1.06 ms
64 bytes from 192.168.1.2: icmp_seq=3 ttl=0 time=1.01 ms
64 bytes from 192.168.1.2: icmp_seq=4 ttl=0 time=0.971 ms
64 bytes from 192.168.1.2: icmp_seq=5 ttl=0 time=0.972 ms
CE2# ping 192.168.2.2 detailed packets
PING 192.168.2.2 (192.168.2.2) 56 bytes of data.
64 bytes from 192.168.2.2: icmp_seq=1 ttl=0 time=1.17 ms
64 bytes from 192.168.2.2: icmp_seq=2 ttl=0 time=0.972 ms
64 bytes from 192.168.2.2: icmp_seq=3 ttl=0 time=0.960 ms
64 bytes from 192.168.2.2: icmp_seq=4 ttl=0 time=1.04 ms
64 bytes from 192.168.2.2: icmp_seq=5 ttl=0 time=0.976 ms
ASBR2# sh mac address-table bridge 10
VID MAC Address Interface Type
----- ------------------ ------------------------------ -------
-- e4:5a:d4:01:b9:73 vlan 100 Dynamic
-- e4:5a:d4:a1:34:61 dypseudowire 1_10.11.1.1 Dynamic
2 valid mac entries
ASBR2# sh mac address-table bridge 20
VID MAC Address Interface Type
----- ------------------ ------------------------------ -------
-- e4:5a:d4:01:b9:73 vlan 200 Dynamic
-- e4:5a:d4:a1:34:61 dypseudowire 2_10.11.1.1 Dynamic
2 valid mac entries
|