1.网络拓扑图
2.网络需求
MPLS协议实现PC1和PC2互通。
3.配置
3.1、R1的配置
display current-configuration
sysname R1
mpls lsr-id 1.1.1.1
mpls
mpls ldp
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
firewall zone Local
priority 16
interface Ethernet0/0/0
interface Ethernet0/0/1
interface Serial0/0/0
link-protocol ppp
interface Serial0/0/1
link-protocol ppp
interface Serial0/0/2
link-protocol ppp
interface Serial0/0/3
link-protocol ppp
interface GigabitEthernet0/0/0
ip address 192.168.12.1 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
interface GigabitEthernet0/0/2
interface GigabitEthernet0/0/3
wlan
interface NULL0
interface LoopBack0
ip address 1.1.1.1 255.255.255.0
bgp 100
peer 4.4.4.4 as-number 100
peer 4.4.4.4 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
network 192.168.1.0
peer 4.4.4.4 enable
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 192.168.12.0 0.0.0.255
network 1.1.1.0 0.0.0.255
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
return
3.2、R2的配置
display current-configuration
sysname R2
mpls lsr-id 2.2.2.2
mpls
mpls ldp
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
firewall zone Local
priority 16
interface Ethernet0/0/0
interface Ethernet0/0/1
interface Serial0/0/0
link-protocol ppp
interface Serial0/0/1
link-protocol ppp
interface Serial0/0/2
link-protocol ppp
interface Serial0/0/3
link-protocol ppp
interface GigabitEthernet0/0/0
ip address 192.168.12.2 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip address 192.168.23.2 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/2
interface GigabitEthernet0/0/3
wlan
interface NULL0
interface LoopBack0
ip address 2.2.2.2 255.255.255.0
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 192.168.12.0 0.0.0.255
network 192.168.23.0 0.0.0.255
network 2.2.2.0 0.0.0.255
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
return
3.3、R3的配置
display current-configuration
sysname R3
mpls lsr-id 3.3.3.3
mpls
mpls ldp
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
firewall zone Local
priority 16
interface Ethernet0/0/0
interface Ethernet0/0/1
interface Serial0/0/0
link-protocol ppp
interface Serial0/0/1
link-protocol ppp
interface Serial0/0/2
link-protocol ppp
interface Serial0/0/3
link-protocol ppp
interface GigabitEthernet0/0/0
ip address 192.168.23.3 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip address 192.168.34.3 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/2
interface GigabitEthernet0/0/3
wlan
interface NULL0
interface LoopBack0
ip address 3.3.3.3 255.255.255.0
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 192.168.23.0 0.0.0.255
network 192.168.34.0 0.0.0.255
network 3.3.3.0 0.0.0.255
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
return
3.4、R4的配置
display current-configuration
sysname R4
mpls lsr-id 4.4.4.4
mpls
mpls ldp
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
firewall zone Local
priority 16
interface Ethernet0/0/0
interface Ethernet0/0/1
interface Serial0/0/0
link-protocol ppp
interface Serial0/0/1
link-protocol ppp
interface Serial0/0/2
link-protocol ppp
interface Serial0/0/3
link-protocol ppp
interface GigabitEthernet0/0/0
ip address 192.168.34.4 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip address 192.168.2.1 255.255.255.0
interface GigabitEthernet0/0/2
interface GigabitEthernet0/0/3
wlan
interface NULL0
interface Logic-Channel0
interface LoopBack0
ip address 4.4.4.4 255.255.255.0
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
network 192.168.2.0
peer 1.1.1.1 enable
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 192.168.34.0 0.0.0.255
network 4.4.4.0 0.0.0.255
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
return