eNSP双二层交换机单臂路由实现不同vlan间通信(路由器间设置静态路由)

在这里插入图片描述

AR1:

<Huawei>un t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn AR1
[AR1]user-interface con 0
[AR1-ui-console0]idle-timeout 0 0
[AR1-ui-console0]qu
[AR1]vlan bat 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]undo shut 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[AR1-GigabitEthernet0/0/1]int g0/0/1.1
[AR1-GigabitEthernet0/0/1.1]vlan-type dot1q 10 default 
[AR1-GigabitEthernet0/0/1.1]ip address 192.168.10.1 24
[AR1-GigabitEthernet0/0/1.1]un shut
Info: Interface GigabitEthernet0/0/1.1 is not shutdown.
[AR1-GigabitEthernet0/0/1.1]int g0/0/1.2
[AR1-GigabitEthernet0/0/1.2]vlan-type dot1q 20 default
[AR1-GigabitEthernet0/0/1.2]ip address 192.168.20.1 24
[AR1-GigabitEthernet0/0/1.2]un shut
Info: Interface GigabitEthernet0/0/1.2 is not shutdown.
[AR1-GigabitEthernet0/0/1.2]int g0/0/3
[AR1-GigabitEthernet0/0/3]ip address 10.1.1.1 24
Info: Interface GigabitEthernet0/0/3 is not shutdown.
[AR1-GigabitEthernet0/0/3]qu
[AR1]ip route-static 192.168.30.1 24 10.1.1.2
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.30.0/24 was generated.
[AR1]ip route-static 192.168.40.1 24 10.1.1.2
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.40.0/24 was generated.
[AR1]display ip routing-table 

AR2:

<Huawei>un t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn AR2
[AR2]user-interface con 0
[AR2-ui-console0]idle-timeout 0 0
[AR2-ui-console0]qu
[AR2]vlan bat 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[AR2]int g0/0/1
[AR2-GigabitEthernet0/0/1]undo shut 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[AR2-GigabitEthernet0/0/1]int g0/0/1.1
[AR2-GigabitEthernet0/0/1.1]vlan-type dot1q 30 default 
[AR2-GigabitEthernet0/0/1.1]ip address 192.168.30.1 24
[AR2-GigabitEthernet0/0/1.1]un shut
Info: Interface GigabitEthernet0/0/1.1 is not shutdown.
[AR2-GigabitEthernet0/0/1.1]int g0/0/1.2
[AR2-GigabitEthernet0/0/1.2]vlan-type dot1q 40 default
[AR2-GigabitEthernet0/0/1.2]ip address 192.168.40.1 24
[AR2-GigabitEthernet0/0/1.2]un shut
Info: Interface GigabitEthernet0/0/1.2 is not shutdown.
[AR2-GigabitEthernet0/0/1.2]int g0/0/3
[AR2-GigabitEthernet0/0/3]ip address 10.1.1.2 24
Info: Interface GigabitEthernet0/0/3 is not shutdown.
[AR2-GigabitEthernet0/0/3]qu
[AR2]ip route-static 192.168.10.1 24 10.1.1.1
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.10.0/24 was generated.
[AR2]ip route-static 192.168.20.1 24 10.1.1.1
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.20.0/24 was generated.

SW1:

<Huawei>un t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-i	
[Huawei]user-interface con 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]qu
[Huawei]sys n	
[Huawei]sys SW1
[SW1]vlan bat 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]port hybrid pvid vlan 10
[SW1-Ethernet0/0/1]port hybrid untagged vlan 10 20 30 40 
[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]port hybrid pvid vlan 20
[SW1-Ethernet0/0/2]port hybrid untagged vlan 10 20 30 40 
[SW1-Ethernet0/0/2]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk 	
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all

SW2

<Huawei>un t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-i	
[Huawei]user-interface con 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]qu
[Huawei]sys n	
[Huawei]sys SW2
[SW2]vlan bat 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]port hybrid pvid vlan 10
[SW2-Ethernet0/0/1]port hybrid untagged vlan 10 20 30 40
[SW2-Ethernet0/0/1]int e0/0/2
[SW2-Ethernet0/0/2]port hybrid pvid vlan 20
[SW2-Ethernet0/0/2]port hybrid untagged vlan 10 20 30 40
[SW2-Ethernet0/0/2]int g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk 	
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all

猜你喜欢

转载自blog.csdn.net/July_jojo/article/details/107458396