标签:main fse 电路 offset connect 通过 ase process nec
MPLS基本概念注意
此处的接口对应关系:
e0 对应 gi1/0
e1 对应 gi2/0
e2 对应 gi3/0
依次类推
[CE1]display current-configuration interface GigabitEthernet 1/0
#
interface GigabitEthernet1/0
port link-mode route
ip address 100.1.1.1 255.255.255.0
#
return
[CE2]display current-configuration interface GigabitEthernet 2/0
#
interface GigabitEthernet2/0
port link-mode route
ip address 100.1.1.2 255.255.255.0
#
return
[PE]display current-configuration
l2*** enable
xconnect-group ***1
connection ***1
ac interface GigabitEthernet1/0
ac interface GigabitEthernet2/0
PE验证:
[PE]display l2*** forwarding ac
Total number of cross-connections: 1
Total number of ACs: 2
AC Xconnect-group Name Link ID
GE1/0 ***1 0
GE2/0 ***1 1
[PE]
CE1验证:
[CE1]ping 100.1.1.2
Ping 100.1.1.2 (100.1.1.2): 56 data bytes, press CTRL_C to break
56 bytes from 100.1.1.2: icmp_seq=0 ttl=255 time=26.309 ms
56 bytes from 100.1.1.2: icmp_seq=1 ttl=255 time=5.527 ms
56 bytes from 100.1.1.2: icmp_seq=2 ttl=255 time=3.591 ms
56 bytes from 100.1.1.2: icmp_seq=3 ttl=255 time=2.355 ms
56 bytes from 100.1.1.2: icmp_seq=4 ttl=255 time=4.193 ms
--- Ping statistics for 100.1.1.2 ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 2.355/8.395/26.309/9.015 ms
[CE1]vlan 100
[CE1-vlan100]quit
[CE1]interface vlan 100
[CE1-Vlan-interface100]ip add 100.1.1.1 24
[CE1-Vlan-interface100]quit
[CE1]interface GigabitEthernet 1/0
[CE1-GigabitEthernet1/0]port link-mode bridge
[CE1-GigabitEthernet1/0]port link-type trunk
[CE1-GigabitEthernet1/0]port trunk permit vlan all
[CE1-GigabitEthernet1/0]quit
# 配置LSR ID
[PE1]interface LoopBack 0
[PE1-LoopBack0]ip add 2.2.2.1 32
[PE1-LoopBack0]quit
[PE1]mpls lsr-id 2.2.2.1
# 开启L2×××功能
[PE1]l2*** enable
# 全局使能LDP
[PE1]mpls ldp
[PE1-ldp]quit
# 配置连接P路由器的接口,在接口上使能LDP
[PE1]interface GigabitEthernet 2/0
[PE1-GigabitEthernet2/0]ip add 1.1.1.1 24
[PE1-GigabitEthernet2/0]mpls enable
[PE1-GigabitEthernet2/0]mpls ldp enable
[PE1-GigabitEthernet2/0]quit
#在PE1上运行ospf,用于建立LSP
[PE1]ospf 1 router-id 2.2.2.1
[PE1-ospf-1]area 0
[PE1-ospf-1-area-0.0.0.0]network 2.2.2.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0]network 1.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0]quit
[PE1-ospf-1]quit
# 创建交叉连接组***100
[PE1]xconnect-group ***100
# 在该交叉连接组内创建名称为svc的交叉连接
[PE1-xcg-***100]connection svc
# 将连接CE1的接口与此交叉连接关联
[PE1-xcg-***100-svc]ac interface GigabitEthernet 1/0
# 并在交叉连接内创建静态PW,以便将AC和PW关联。
[PE1-xcg-***100-svc]peer 2.2.2.3 pw-id 100 in-label 100 out-label 200
[PE1-xcg-***100-svc-2.2.2.3-100]quit
[PE1-xcg-***100-svc]quit
[PE1-xcg-***100]quit
[P]interface LoopBack 0
[P-LoopBack0]ip add 2.2.2.2 32
[P-LoopBack0]quit
[P]mpls lsr-id 2.2.2.2
[P]mpls ldp
[P-ldp]quit
[P]interface GigabitEthernet 2/0
[P-GigabitEthernet2/0]ip add 1.1.1.2 24
[P-GigabitEthernet2/0]mpls ldp enable
[P-GigabitEthernet2/0]quit
[P]interface GigabitEthernet 1/0
[P-GigabitEthernet1/0]ip add 3.3.3.1 24
[P-GigabitEthernet1/0]mpls enable
[P-GigabitEthernet1/0]mpls ldp enable
[P-GigabitEthernet1/0]quit
[P]ospf 1 router-id 2.2.2.2
[P-ospf-1]area 0
[P-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0]network 1.1.1.0 0.0.0.255
[P-ospf-1-area-0.0.0.0]network 3.3.3.0 0.0.0.255
[P-ospf-1-area-0.0.0.0]quit
[P-ospf-1]quit
[PE2]interface LoopBack 0
[PE2-LoopBack0]ip add 2.2.2.3 32
[PE2-LoopBack0]quit
[PE2]mpls lsr-id 2.2.2.3
[PE2]l2*** enable
[PE2]mpls ldp
[PE2-ldp]quit
[PE2]interface GigabitEthernet 1/0
[PE2-GigabitEthernet1/0]ip add 3.3.3.2 24
[PE2-GigabitEthernet1/0]mpls enable
[PE2-GigabitEthernet1/0]mpls ldp enable
[PE2-GigabitEthernet1/0]quit
[PE2]ospf 1 router-id 2.2.2.3
[PE2-ospf-1]area 0
[PE2-ospf-1-area-0.0.0.0]network 2.2.2.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0]network 3.3.3.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0]quit
[PE2-ospf-1]quit
#创建交叉连接组***100,在该交叉连接组内创建名为svc的交叉连接,将连接CE2的接口与此交叉连接关联,并在交叉连接内创建静态PW,以便将AC和PW关联。
[PE2]xconnect-group ***100
[PE2-xcg-***100]connection svc
[PE2-xcg-***100-svc]ac interface gigabitethernet 2/0
[PE2-xcg-***100-svc]peer 2.2.2.1 pw-id 100 in-label 200 out-label 100
[PE2-xcg-***100-svc-2.2.2.1-100]quit
[PE2-xcg-***100-svc]quit
[PE2-xcg-***100]quit
[CE2]vlan 100
[CE2-vlan100]quit
[CE2]interface vlan 100
[CE2-Vlan-interface100]ip add 100.1.1.2 24
[CE2-Vlan-interface100]quit
[CE2]interface GigabitEthernet 2/0
[CE2-GigabitEthernet2/0]port link-mode bridge
[CE2-GigabitEthernet2/0]port link-type trunk
[CE2-GigabitEthernet2/0]port trunk permit vlan all
[CE2-GigabitEthernet2/0]quit
[P]display ospf peer
OSPF Process 1 with Router ID 2.2.2.2
Neighbor Brief Information
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
2.2.2.3 3.3.3.2 1 39 Full/BDR GE1/0
2.2.2.1 1.1.1.1 1 38 Full/DR GE2/0
PW是静态的。
[PE1]display l2*** pw
Flags: M - main, B - backup, H - hub link, S - spoke link, N - no split horizon
Total number of PWs: 1
1 up, 0 blocked, 0 down, 0 defect, 0 idle, 0 duplicate
Xconnect-group Name: ***100
Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State
2.2.2.3 100 100/200 Static M 1 Up
[CE1]ping 100.1.1.2
Ping 100.1.1.2 (100.1.1.2): 56 data bytes, press CTRL_C to break
56 bytes from 100.1.1.2: icmp_seq=0 ttl=255 time=74.608 ms
56 bytes from 100.1.1.2: icmp_seq=1 ttl=255 time=7.494 ms
56 bytes from 100.1.1.2: icmp_seq=2 ttl=255 time=9.578 ms
56 bytes from 100.1.1.2: icmp_seq=3 ttl=255 time=7.447 ms
56 bytes from 100.1.1.2: icmp_seq=4 ttl=255 time=9.788 ms
--- Ping statistics for 100.1.1.2 ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 7.447/21.783/74.608/26.431 ms
[CE1]dis arp
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN Interface Aging Type
100.1.1.2 7425-8ae3-7c02 100 GE1/0 20 D
动态和静态的区别就在于创建PW的时候,没有指定in-label和out-label
如下:
[PE1]display current-configuration | begin xconnect
xconnect-group ***100
connection ldp
ac interface GigabitEthernet1/0
peer 2.2.2.3 pw-id 100
----------------------------------------------------------------------
[PE2]display current-configuration | begin xconnect
xconnect-group ***a100 #配置name是可以不一样的
connection ***100 #配置name是可以不一样的
ac interface GigabitEthernet2/0
peer 2.2.2.1 pw-id 100
验证:PW是LDP。
[PE1]display l2*** pw
Flags: M - main, B - backup, H - hub link, S - spoke link, N - no split horizon
Total number of PWs: 1
1 up, 0 blocked, 0 down, 0 defect, 0 idle, 0 duplicate
Xconnect-group Name: ***100
Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State
2.2.2.3 100 917631/917629 LDP M 1 Up
[PE2]display l2*** pw
Flags: M - main, B - backup, H - hub link, S - spoke link, N - no split horizon
Total number of PWs: 1
1 up, 0 blocked, 0 down, 0 defect, 0 idle, 0 duplicate
Xconnect-group Name: ***a100
Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State
2.2.2.1 100 917629/917631 LDP M 1 Up
标签:main fse 电路 offset connect 通过 ase process nec
原文地址:https://blog.51cto.com/506554897/2433433