H3C VLAN-access+路由
W1=vlan batch 10 20 30
interface Vlanif10
ip address 192.168.1.254 255.255.255.0
interface Vlanif20
ip address 192.168.2.254 255.255.255.0
interface Vlanif30
ip address 192.168.3.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 30
#路由rip 100
undo summary
version 2
network 192.168.3.0
network 192.168.1.0
network 192.168.2.0
W4配置
vlan batch 20 40
interface Vlanif20
ip address 192.168.3.2 255.255.255.0
#
interface Vlanif40
ip address 192.168.4.1 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 40
#
rip 100
undo summary
version 2
network 192.168.3.0
network 192.168.4.0
W3配置
vlan batch 40 50 60
interface Vlanif40
ip address 192.168.4.2 255.255.255.0
#
interface Vlanif50
ip address 192.168.5.254 255.255.255.0
#
interface Vlanif60
ip address 192.168.6.254 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 40
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 50
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 60
rip 100
undo summary
version 2
network 192.168.4.0
network 192.168.5.0
network 192.168.6.0
以上实验用的是模拟器可能与真室设备存在差别。实验中用的是ACCESS口,大家也可以用trunk做做。本试验最终的目的是要理解VLAN之间的路由。如有不足之处希望大家指出,一起学习一起进步。
相关文章