(二层交换机直接跳过三层交换价接入路由器时才使用该配置。推荐使用三层交换机建立VLANIF配置更简洁明了。如果VLAN较少可直接配置;路由器接口,一个物理接口一个VLAN)
S1配置
vlan batch 2 to 3interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 2 to 3interface GigabitEthernet0/0/2port link-type accessport default vlan 2interface GigabitEthernet0/0/3port link-type accessport default vlan 3
R1配置
interface GigabitEthernet0/0/0.2dot1q termination vid 2ip address 192.168.2.254 255.255.255.0 arp broadcast enableinterface GigabitEthernet0/0/0.3dot1q termination vid 3ip address 192.168.3.254 255.255.255.0 arp broadcast enable
PC2配置
PC3配置
整体架构图