三层交换机配置

[复制链接]
查看884 | 回复0 | 2022-6-18 22:18:25 | 显示全部楼层 |阅读模式
步骤1:交换机trunk配置

交换机sw1配置

Switch>en
Switch#conf t
Switch(config)#ho sw1
sw1(config)#int f0/2
sw1(config-if)#sw mo tr

sw1(config-if)#exit

交换机sw2配置

Switch>en
Switch#conf t
Switch(config)#ho sw2
sw2(config)#int f0/2
sw2(config-if)#sw mo tr

sw2(config-if)#exit

三层交换机配置

Switch>en
Switch#conf t
Switch(config)#ho core
core(config)#int range f0/1 - 2
core(config-if-range)#switchport trunk encapsulation dot1q
core(config-if-range)#sw mo tr
core(config-if-range)#exit

步骤2:交换机建立vlan

交换机sw1配置

sw1(config)#vlan 10
sw1(config-vlan)#exit

交换机sw2配置

sw2(config)#vlan 20
sw2(config-vlan)#exit

步骤3:交换机端口接入vlan

交换机sw1配置

sw1(config)#int f0/1
sw1(config-if)#sw ac vlan 10
sw1(config-if)#exit

交换机sw2配置

sw2(config)#int f0/1
sw2(config-if)#sw ac vlan 20
sw2(config-if)#exit

步骤4:三层交换机配置路由

core(config)#ip routing
core(config)#int vlan 10
core(config-if)#ip add 10.1.1.254 255.255.255.0
core(config-if)#no sh
core(config-if)#exit
core(config)#int vlan 20
core(config-if)#ip add 20.1.1.254 255.255.255.0
core(config-if)#no sh
core(config-if)#exit
————————————————


声明:转载此文出于传递更多学习信息之目的。若有来源标注错误或侵犯了您的合法权益,请与我联系,我将及时更正、删除,谢谢。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 禁止注册

本版积分规则