侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

Cisco   VLAN与trunk配置(简配)

2022-12-25 星期日 / 0 评论 / 0 点赞 / 75 阅读 / 2039 字

Switch>enSwitch>enableSwitch#configure terminalSwitch(config)#vlan 10Switch(config-vlan)#name lolSwi

.

Switch>en

Switch>enable

Switch#configure terminal

Switch(config)#vlan 10

Switch(config-vlan)#name lol

Switch(config-vlan)#vlan 20

Switch(config-vlan)#name dnf

Switch(config-vlan)#exit

Switch(config)#exit


Switch#configure t

Switch(config)#interface f0/3

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vl 10

Switch(config-if)#exit

Switch(config)#interface f0/4

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vl 20

Switch(config-if)#exit

Switch#show vlan  ---------------查看VLAN已配置信息


Switch(config)#interface f0/24

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk allowed vlan 10,20

Switch(config-if)#end

Switch#show interfaces trunk ------->查看端口的trunk模式

Port        Mode         Encapsulation  Status        Native vlan ------------显示结果

Fa0/24      on           802.1q         trunking      1

Port        Vlans allowed on trunk

Fa0/24      10,20

Port        Vlans allowed and active in management domain

Fa0/24      10,20

Port        Vlans in spanning tree forwarding state and not pruned

Fa0/24      10,20

Switch#



switch1 VLAN 配置完成

switch2 同理


可以在PC机上互相ping,验证试验结果。

.

广告 广告

评论区