:
router#config terminal
(config)#interface fastethernet0/0.2 !进入子接口2
(config-subif)#encapsulation dot1q 2 !子接口对应VLAN2,并封装dot1q协议
(config-subif)#ip address 10.1.20.1 255.255.255.0 !配置了10.1.20.0/24网段的网关
确认:
router#show interface fastethernet0/0
不同VLAN下的主机可以相互ping通,则配置成功。
保存配置
(5)连接交换机
同种类型的网络设备相连要使用交叉线。交换机使用交叉线相连后,将会自动将两端设置成干道。
2、VTP(VL页码:[1] [2] [3] [4] [5] [6] 第5页、共6页 |