两台思科交换机vlan划分_思科模拟器多台交换机的VLAN划分

Switch>

Switch>ena

Switch>enable

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vtp domain 1(1是名字自己取)

Switch(config)#vtp password 1(1是密码自己取)

Switch(config)#vtp mode ?

client Set the device to client mode.(客户端模式)

server Set the device to server mode.(服务器模式)

transparent Set the device to transparent mode.(透明模式)(你想要设置成什么模式自己设置)

Switch(config)#int f0/4(2个交换机之间连接的端口做trunk口)

Switch(config-if)#sw mo trunk

在服务器上做下面配置。

Switch(config)#vlan 2

Switch(config-vlan)#exit

Switch(config)#vlan 3

Switch(config-vlan)#int f0/1(vlan1 pc的接口 看你自己接的口是哪个可以改的)

Switch(config-if)#switchport mode access

因为思科的默认vlan是1所以不用划。

Switch(config)#int f0/2(vlan2 pc接口 看你自己接的口是哪个可以改的)

Switch(config-if)#sw mo access

Switch(config-if)#sw acc vlan 2

Switch(config-if)#exit

Switch(config)#int f0/3(vlan3 pc接口 看你自己接的口是哪个可以改的)

Switch(config-if)#sw mo access

Switch(config-if)#sw acc vlan 3

Switch(config-if)#exit

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面我将为您介绍在思科模拟器中如何进行二层交换机VLAN划分和Trunk链路配置。 首先,我们需要创建VLAN。在思科模拟器中,可以使用以下命令创建VLAN: ``` Switch(config)# vlan vlan-id Switch(config-vlan)# name vlan-name ``` 其中,vlan-id是VLAN的ID号,vlan-name是VLAN的名称。例如,创建VLAN 10并命名为“SALES”,可以使用以下命令: ``` Switch(config)# vlan 10 Switch(config-vlan)# name SALES ``` 创建完VLAN后,需要将端口配置到相应的VLAN中。可以使用以下命令将端口配置到VLAN中: ``` Switch(config)# interface interface-id Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan vlan-id ``` 其中,interface-id是端口的ID号,vlan-id是VLAN的ID号。例如,将端口1/1配置到VLAN 10中,可以使用以下命令: ``` Switch(config)# interface gigabitethernet 1/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 10 ``` 接下来,我们需要配置Trunk链路。可以使用以下命令配置Trunk链路: ``` Switch(config)# interface interface-id Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk allowed vlan vlan-id ``` 其中,interface-id是端口的ID号,vlan-id是允许通过Trunk链路的VLAN的ID号。例如,将端口1/2配置为Trunk链路,并允许通过VLAN 10和20,可以使用以下命令: ``` Switch(config)# interface gigabitethernet 1/2 Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk allowed vlan 10, 20 ``` 以上就是在思科模拟器中进行二层交换机VLAN划分和Trunk链路配置的方法。希望对您有所帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值