Cisco Layer 3 switch enables IP routing
Cisco Layer 3 switch enables IP routing
一、网络拓扑
二、三层交换机配置内容
#vlan 11 // 创建 VLAN 11 #exit #vlan 12 // 创建 VLAN 12 #exit #vlan 13 // 创建 VLAN 13 #exit #ip routing // 启用IP路由 #interface Vlan 11 // 创建 VLAN 11 的虚拟接口 #ip address 192.168.11.1 255.255.255.0 // 配置虚拟接口 VLAN 11 的IP地址 #exit #interface Vlan 12 // 创建 VLAN 12 的虚拟接口 #ip address 192.168.12.1 255.255.255.0 // 配置虚拟接口 VLAN 12 的IP地址 #exit #interface Vlan 13 // 创建 VLAN 13 的虚拟接口 #ip address 192.168.13.1 255.255.255.0 // 配置虚拟接口 VLAN 13 的IP地址 #exit
查看路由表状态
Switch>show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C 192.168.11.0/24 is directly connected, Vlan11 C 192.168.12.0/24 is directly connected, Vlan12 C 192.168.13.0/24 is directly connected, Vlan13 Switch>
三、二层交换机 Switch0 的配置内容
#interface FastEthernet 0/1 #switchport mode trunk // 设置接口工作模式为trunk #exit #interface FastEthernet 1/1 #switchport access vlan 11 // 设置接口绑定的 VLAN ID 为 11 #exit #interface FastEthernet 2/1 #switchport access vlan 12 // 设置接口绑定的 VLAN ID 为 12 #exit #interface FastEthernet 3/1 #switchport access vlan 13 // 设置接口绑定的 VLAN ID 为 13 #exit
查看 VLAN 信息
Switch#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa4/1, Fa5/1 11 VLAN0011 active Fa1/1 12 VLAN0012 active Fa2/1 13 VLAN0013 active Fa3/1 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch#
四、二层交换机 Switch1 的配置内容
#interface FastEthernet 0/1 #switchport mode trunk // 设置接口工作模式为trunk #exit #interface FastEthernet 1/1 #switchport access vlan 11 // 设置接口绑定的 VLAN ID 为 11 #exit #interface FastEthernet 2/1 #switchport access vlan 12 // 设置接口绑定的 VLAN ID 为 12 #exit #interface FastEthernet 3/1 #switchport access vlan 13 // 设置接口绑定的 VLAN ID 为 13 #exit
查看 VLAN 信息
Switch#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa4/1, Fa5/1 11 VLAN0011 active Fa1/1 12 VLAN0012 active Fa2/1 13 VLAN0013 active Fa3/1 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch#
五、二层交换机 Switch2 的配置内容
#interface FastEthernet 0/1 #switchport mode trunk // 设置接口工作模式为trunk #exit #interface FastEthernet 1/1 #switchport access vlan 11 // 设置接口绑定的 VLAN ID 为 11 #exit #interface FastEthernet 2/1 #switchport access vlan 12 // 设置接口绑定的 VLAN ID 为 12 #exit #interface FastEthernet 3/1 #switchport access vlan 13 // 设置接口绑定的 VLAN ID 为 13 #exit
查看 VLAN 信息
Switch#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa4/1, Fa5/1
11 VLAN0011 active Fa1/1
12 VLAN0012 active Fa2/1
13 VLAN0013 active Fa3/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Switch#
六、终端设备IP地址配置
============= End
分类:
ccna
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
2019-11-12 chocolatey install curl and netcat
2017-11-12 飞舞的蝴蝶(GraphicsView框架)
2017-11-12 Qt Creator中的3D绘图及动画教程(参照NeHe)
2017-11-12 Qt5 UI信号、槽自动连接的控件重名
2017-11-12 QT 基本图形绘制