配置单臂路由
两个主机实现互联互通
路由器配置
int g0/0.1
ip add 192.168.1.1 255.255.255.0
vlan-type dot1q vid 10 #子接口封装dot1q并分配给VLAN 10
quit
int g0/0.2
ip add 192.168.2.1 255.255.255.0
vlan-type dot1q vid 20 #子接口封装dot1q并分配给VLAN 20
quit
交换机配置
vlan 10
port GigabitEthernet 1/0/2
quit
vlan 20
port GigabitEthernet 1/0/3
quit
interface GigabitEthernet 1/0/1
port link-type trunk
port trunk permit vlan all
验证
能互相ping通