518 字
3 分钟
Page Views
VLAN间的路由及三层交换机的部署

Q & A#

如何满足不同VLAN的互访需求?#

  • 解决方案1:单臂路由

路由 VS. 交换的园区网结构#

  • 在过去,交换是基于硬件的转发,而路由是基于软件的转发,因此园区网络更多的采用交换网络的设计
  • 而如今,路由已经几乎与交换一样快,也能够基于硬件做转发,与此同时路由的设计很好的解决了交换网络的二层环路问题,以及LAN的隔离问题

Switch Virtual interface(SVI)#

SVI autostate exclude command#

  • SVI口的Line-state在以下条件满足的情况下才会是UP
    • SVI对应的VLAN必须在vlan database中存在并且是激活的
    • Vlan interface存在并且不能说administratively down的
    • 必须至少有一个二层接口(SVI对于VLAN的access接口或者trunk口)是UP的,而且必须是spanning-tree的forwarding状态
  • SVI autostate exclude特性可以让特定接口跳出上述up-and-down的计算过程,也就是说该接口的up down与SVI口的up down无关了

Switch(config)# int f0/24

Switch(config-if)# switchport auto-state exclude

交换机管理VLAN#

二层交换机的管理VLAN#

  • 交换机的管理VLAN用于交换机本身的设备管理
  • 二层交换机只能有一个VLAN接口可以拥有IP地址,具体的VLAN可以根据实际需求选定
  • 有了这个VLAN接口,PC就能够telnet到交换机上执行管理操作
  • 用户VLAN与交换管理VLAN重叠会有什么问题?

三层交换环境的管理VLAN#

三层交换机的端口模式#

  • 二层接口:access模式,trunk模式
  • 三层接口:路由接口(no switchport或称为routed port)、SVI接口

基础配置#

Switch(config)# ip routing
# 开启三层交换机路由功能
Switch(config)# vlan 10
Switch(config-vlan)# name name
# 创建VLAN
Switch(config)# int vlan 10
Switch(config-Vlanif10)# ip add x.x.x.x mask
Switch(config-Vlanif10)# no sh
# 配置VLAN对于SVI接口
Switch(config)# int f0/1
Switch(config-if)# no switchport
Switch(config-if)# ip add x.x.x.x mask
Switch(config-if)# no sh
# 配置no switchport(routed port)三层接口
Switch(config)# ip route 0.0.0.0 0.0.0.0 x.x.x.x
# 配置静态路由
VLAN间的路由及三层交换机的部署
https://astro.sumi233.top/posts/ccnp/ccnp交换-vlan间的路由及三层交换机的部署/
作者
Supermini233
发布于
2024-11-21
许可协议
CC BY-NC-SA 4.0