有条件同学可以用YOUTUBE看,更流畅。
视频中的命令:
system-view
vlan 2
quit
vlan 3
quit
interface GigabitEthernet1/0/1
port link-type access
port access vlan 2
quit
interface GigabitEthernet1/0/2
port link-type access
port access vlan 3
quit
interface Vlan-interface2
ip address 192.168.2.1 255.255.255.0
quit
interface Vlan-interface3
ip address 192.168.3.1 255.255.255.0
quit
下面是另一种接法,和视频不同
左侧交换机命令:
system-view
vlan 2
quit
vlan 10
quit
interface Vlan-interface2
ip address 192.168.2.1 255.255.255.0
quit
interface Vlan-interface10
ip address 192.168.10.1 255.255.255.252
quit
interface GigabitEthernet1/0/1
port link-type access
port access vlan 2
quit
interface GigabitEthernet1/0/24
port link-type trunk
port trunk permit vlan 10
quit
ip route-static 192.168.3.0 255.255.255.0 192.168.10.2
右侧交换机命令:
system-view
vlan 3
quit
vlan 10
quit
interface Vlan-interface3
ip address 192.168.3.1 255.255.255.0
quit
interface Vlan-interface10
ip address 192.168.10.2 255.255.255.252
quit
interface GigabitEthernet1/0/1
port link-type access
port access vlan 3
quit
interface GigabitEthernet1/0/24
port link-type trunk
port trunk permit vlan 10
quit
ip route-static 192.168.2.0 255.255.255.0 192.168.10.1