华为实验手册1(10)
发布时间:2021-06-08
发布时间:2021-06-08
在Switch B上创建三个三层虚接口,并配置IP地址 VLAN5的IP地址是10.1.5.1,掩码是255.255.255.0 VLAN6的IP地址是10.1.6.1,掩码是255.255.255.0 VLAN4的IP地址是10.1.4.2,掩码是255.255.255.0 在交换机上配置非直连网段静态路由 在Switch A上配置两静态路由:
ip route-static 10.1.5.0 255.255.255.0 10.1.4.2 ip route-static 10.1.6.0 255.255.255.0 10.1.4.2 在Switch B上配置两静态路由:
ip route-static 10.1.2.0 255.255.255.0 10.1.4.1 ip route-static 10.1.3.0 255.255.255.0 10.1.4.1
1.5 配置参考
1.5.1 配置VLAN及所属端口
1. 配置RTA
[Switch A]vlan 2
[Switch A-vlan2]port Ethernet 0/1 [Switch A]vlan 3
[Switch A-vlan3]port Ethernet 0/12 [Switch A]vlan 4
[Switch A-vlan4]port Ethernet 0/17
2. 配置RTB
[Switch B]vlan 5
[Switch B-vlan5]port Ethernet 0/1 [Switch B]vlan 6
[Switch B-vlan6]port Ethernet 0/12 [Switch B]vlan 4
[Switch B-vlan4]port Ethernet 0/17
1.5.2 创建三层接口
1. 配置RTA
[Switch A]interface Vlan-interface 2
[Switch A-Vlan-interface2]ip address 10.1.2.1 255.255.255.0 [Switch A]interface vlan-interface 3 [Switch A-Vlan-interface3]ip address 10.1.3.1 255.255.255.0
[Switch A]interface vlan-interface 4 [Switch A-Vlan-interface4]ip address 10.1.4.1 255.255.255.0
2. 配置RTB
[Switch B]interface Vlan-interface 5
[Switch B-Vlan-interface5]ip address 10.1.5.1 255.255.255.0