使用MPLS桥接互联-----ethernet-to-vlan

拓扑:

R1配置:

interface FastEthernet0/1
ip address 15.1.1.1 255.255.255.0

R2配置:

mpls label range 200 299
mpls label protocol ldp
multilink bundle-name authenticated
!
pseudowire-class atom-iw-eth-vlan
encapsulation mpls
interworking ethernet//配置特定的伪线
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 23.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
no cdp enable
xconnect 4.4.4.4 10 pw-class atom-iw-eth-vlan
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
passive-interface FastEthernet0/1
network 2.2.2.2 0.0.0.0 area 0
network 23.1.1.0 0.0.0.255 area 0
!
mpls ldp router-id Loopback0
R3配置:

mpls label range 300 399
mpls label protocol ldp
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 23.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 34.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
!
mpls ldp router-id Loopback0
R4配置:

mpls label range 400 499
mpls label protocol ldp
!
pseudowire-class atom-iw-eth-vlan
encapsulation mpls
interworking ethernet
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
no cdp enable
!
interface FastEthernet0/0.100
encapsulation dot1Q 100
no cdp enable
xconnect 2.2.2.2 10 pw-class atom-iw-eth-vlan
!
interface FastEthernet0/1
ip address 34.1.1.4 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 100
router-id 4.4.4.4
log-adjacency-changes
passive-interface FastEthernet0/0
network 4.4.4.4 0.0.0.0 area 0
network 34.1.1.0 0.0.0.255 area 0
!
mpls ldp router-id Loopback0
R5配置:

vlan 100

interface FastEthernet1/0
switchport mode trunk
duplex full
speed 100
!
interface FastEthernet1/1
switchport mode trunk
duplex full
speed 100
R6配置:
 

interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.100
encapsulation dot1Q 100
ip address 15.1.1.5 255.255.255.0

分析:

R1到R2以后打上双层标签,并且封装必要的伪线发给R3

403是R4分配的关于目的地4.4.4.4的标签,301是R3分给关于目的地4.4.4.4的下一跳23.1.1.3的标签。

到达R3以后301弹出,单标签发给R4,

到达R4以后移除标签,并且根据伪线配置封装DOT1Q发给R5(交换机)。

验证:

 

你可能感兴趣的:(MPLS,伪线)