交换机的 VLAN 配置

交换机的 VLAN 配置

S1(config)#vlan 10 //创建 VLAN 10:
S1(config)#interface fastEthernet 0/1 //进入接口 f0 /1
S1(configif)#switchport mode access //设置模式为 access
S1(configif)#switchport access vlan 10 //接口划为 vlan10

S1(config)#interface fastEthernet 0/2 //进入接口 f0 /2
S1(configif)#switchport mo de trunk //设置模式为 trunk
S1(configif)#switchport trunk allowed vlan add 10 //允许 vlan10 数据通过
S1(configif)#switchport trunk allowed vlan add 20 //允许 vlan2 0 数据通过

posted @ 2020-02-04 19:31  编程猴  阅读(555)  评论(0)    收藏  举报