当前位置: 首页> 房产> 市场 > 重庆网页制作工作室_人力资源和社会保障部查询app_东莞seo外包公司哪家好_网络营销运营

重庆网页制作工作室_人力资源和社会保障部查询app_东莞seo外包公司哪家好_网络营销运营

时间:2025/7/14 18:20:04来源:https://blog.csdn.net/2301_81256766/article/details/147234978 浏览次数:0次
重庆网页制作工作室_人力资源和社会保障部查询app_东莞seo外包公司哪家好_网络营销运营

三层交换机

SVI功能(交换机虚拟接口)

  • 实现VLAN路由

  • 需求 :各实训室使用独立局域网,即每个实训有自己的IP网段, 每个实训室只有内部互相访问。

  • 需求:为了加强各实训室学生的交流,学校要求我们将各实训室电脑网络连接起来。

  • 1. 先去汇聚层划分VLAN,
  • 2. 把实训一划分到VLAN10,
  • 3. 把实训二划分到VLAN20
  • 4. 让汇聚层连接核心层的端口模式修改为trunk

    三层-1

三层交换机(s3560)

  • 1. 在核心层划分和汇聚层相同个数的VLAN
    • vlan 10

    • exit

  • 2. 先将该接口的Trunk封装为802.1Q的帧格式
    • switchport trunk encapsulation dotlq

  • 3. 将三层交换机的端口设为trunk模式
    • switchport mode trunk

  • 4. 进入SVI模式 (vlan 10 只是进入)
    • interface vlan 10

  • 5. 设IP网关
    • ip address 192.168.10.254 255.255.255.0

  • 6. 开启
    • no shutdown

  • 7. 开启路由功能,才能跨网络(全局模式)
    • ip routing

具体步骤

先在二层交换机(汇聚层)

image-20250410154827077

  Switch>enable //进入特权
Switch#configure terminal //进入全局
Switch(config)#vlan 10 // 划分VLAN
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#interface f0/5 // 进入f0/5端口
Switch(config-if)#switchport access vlan 10 //设置端口模式为access ,把这个端口添加到VLAN10
Switch(config-if)#exit
Switch(config)#interface f0/10   // 进入f0/10端口
Switch(config-if)#switchport access vlan 20   //设置端口模式为access ,把这个端口添加到VLAN10
Switch(config-if)#exit
// 汇聚层和核心层连接的端口一定要设为trunk模式,要和三层一致
Switch(config)#interface f0/24  // 进入f0/24端口
Switch(config-if)#switchport mode trunk  //修改端口模式为trunk

三层交换机(核心层)

  • 选no

% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: no
Switch>enable //进入特权
Switch#configure terminal //进入全局
Switch(config)#interface f0/24 //进入f0/24端口
Switch(config-if)#switchport trunk encapsulation dot1q//先将该接口的Trunk封装为802.1Q的帧格式
Switch(config-if)#switchport mode trunk //再配置端口模式为Trunk
Switch(config-if)#exit
Switch(config)#vlan 10 //创建VLAN
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#interface vlan 10 进入SVI
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
​
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
​配置该SVI接口的IP地址,作为所在VLAN主机的网关
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 20
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
​
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
​
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip routing //开启路由功能,才能跨网络

关键字:重庆网页制作工作室_人力资源和社会保障部查询app_东莞seo外包公司哪家好_网络营销运营

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: