PC端配置ip地址,配置网关
交换机配置:
1、交换机(左):
system-view
sysname sw1
vlan 10
vlan 20
quit
interface range gi 1/0/1 to gi 1/0/2
port link-type access
port access vlan 10
quit
interface range gi 1/0/3 to gi 1/0/4
port link-type access
port access vlan 20
quit
interface gi 1/0/48
port link-type trunk
port trunk permit vlan 10 20
2、交换机(右)
system-view
sysname sw2
vlan 10
vlan 20
quit
interface range gi 1/0/1
port link-type access
port access vlan 10
quit
interface range gi 1/0/2
port link-type access
port access vlan 20
quit
interface gi 1/0/48
port link-type trunk
port trunk permit vlan 10 20
3、交换机(中间):
system-view
sysname hexin
vlan 10
vlan 20
quit
interface range gi 1/0/1 to gi 1/0/2
port link-type trunk
port trunk permit vlan 10 20
quit
interface gi 1/0/48
port link-type trunk
port trunk permit vlan 10 20
路由器配置:
system-view
sysname r1
interface gi 0/0.10
vlan-type dot1q vid 10
ip address 192.168.10.254 24
quit
interface gi 0/0.20
vlan-type dot1q vid 20
ip address 192.168.20.254 24