经历过异地恋的人,就更懂配置交换机的诀窍( 五 )

Switch#configure terminal// 进入全局配置模式
Switch(config)#interface fastethernet 0/1//进入fastEthernet0/1的端口配置模式
Switch(config-if)#switchport access vlan10//(将fastEthernet0/1端口添加到VLAN10中

重复以上的命令 , 分别将fastEthernet0/2~ fastEthernet0/6添加到VLAN10中 。

步骤2:

将fastEthernet0/7~ fastEthernet0/12添加到VLAN20中 。

Switch#configure terminal// 进入全局配置模式
Switch(config)#interface fastethernet 0/7//进入fastEthernet0/7的端口配置模式
Switch(config-if)#switchport access vlan20//将fastEthernet0/7端口添加到VLAN20中

重复以上的命令 , 分别将fastEthernet 0/8~ fastEtherne t0/12添加到VLAN10中 。

5、保存设置

在进行了交换机的配置后 , 为了防止断电等原因造成的配置参数丢失 , 可以通过以下命令进行保存 。

推荐阅读