内 网 优 化

拓扑

 

需求

    1)所有部门中都使用了网关冗余技术,为了增强网关稳定性和冗余性

    -配置VRRP

    -SW5是VLAN10和VLAN20的Master ,是VLAN30的Backup

    -SW6是VLAN10和VLAN20的Backup,是VLAN30的Master

    2)交换机之间存在很多冗余链路,必须防止环路的发生,并且能够提高链路的利用率,要求每个部门的主机访问其他主机时,使用的都是最优的转发路径

    -配置MSTP

    -SW5是VLAN10和VLAN20的主根 ,是VLAN30的备根

    -SW6是VLAN10和VLAN20的备根 ,是VLAN30的主根

    3)VLAN30的主机通过SW6与DHCP服务器通信,获取IP地址,所以SW6也是DHCP中继

配置步骤

第一步:SW6基础配置

      -创建vlan10/vlan20/vlan30/vlan50

      -配置vlanif虚接口地址:192.168.xx.252

      -与SW1/SW2/SW3互联的接口配置trunk,允许所有vlan通过

 第二步:配置VRRP

      -在SW5中将g0/0/6 口配置trunk 模式,允许所有vlan通过

      -在vlanif虚接口下配置VRRP

      -让SW5成为vlan10/vlan20的Master,vlan30的Backup

      -让SW6成为vlan30的Master,vlan10/vlan20的Backup

  第三步:配置MSTP

      -在所有的交换机中配置MSTP

      -让SW5成为vlan10/vlan20的主根,vlan30的备根

      -让SW6成为vlan30的主根、vlan10/vlan20的备根

第四步:配置SW6-DHCP中继

      -在系统视图下,开启dhcp 功能

      -在每个vlanif虚接口下开启dhcp中继,并配置DHCP服务器IP:192.168.50.1

配置命令
第一步:SW6基础配置
SW6配置:
[Huawei]sys SW6
[SW6]port-group group-member g0/0/1 to g0/0/3  g0/0/6
[SW6-port-group]port link-type trunk
[SW6-port-group]port trunk allow-pass vlan all
[SW6-port-group]quit 
[SW6]vlan batch 10 20 30 50
[SW6]int vlanif 10
[SW6-Vlanif10]ip address 192.168.10.252 24
[SW6-Vlanif10]int vlanif20
[SW6-Vlanif20]ip address 192.168.20.252 24
[SW6-Vlanif20]int vlanif30
[SW6-Vlanif30]ip address 192.168.30.252 24


第二步:配置VRRP
SW5配置:
[SW5]int g0/0/6
[SW5-GigabitEthernet0/0/6]port link-type trunk
[SW5-GigabitEthernet0/0/6]port trunk allow-pass vlan all
[SW5-GigabitEthernet0/0/6]quit
[SW5]int vlanif 10
[SW5-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[SW5-Vlanif10]vrrp vrid 10 priority 130
[SW5-Vlanif10]int vlanif 20
[SW5-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[SW5-Vlanif20]vrrp vrid 20 priority 130
[SW5-Vlanif20]int vlanif 30
[SW5-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254

SW6配置:
[SW6]int vlanif 10
[SW6-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[SW6-Vlanif10]int vlanif 20
[SW6-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[SW6-Vlanif20]int vlanif 30
[SW6-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254
[SW6-Vlanif30]vrrp vrid 30 priority 130

第三步:配置MSTP
SW1配置:
[SW1]stp region-configuration
[SW1-mst-region] region-name ntd
[SW1-mst-region] instance 10 vlan 10
[SW1-mst-region] instance 20 vlan 20
[SW1-mst-region] instance 30 vlan 30
[SW1-mst-region] active region-configuration
[SW1-mst-region] quit
[SW1]int g0/0/3
[SW1-G0/0/3]port link-type trunk
[SW1-G0/0/3]port trunk allow-pass vlan all


SW2配置:
[SW2]stp region-configuration
[SW2-mst-region] region-name ntd
[SW2-mst-region] instance 10 vlan 10
[SW2-mst-region] instance 20 vlan 20
[SW2-mst-region] instance 30 vlan 30
[SW2-mst-region] active region-configuration
[SW2-mst-region] quit
[SW2]int g0/0/3
[SW2-G0/0/3]port link-type trunk
[SW2-G0/0/3]port trunk allow-pass vlan all

SW3配置:
[SW3]stp region-configuration
[SW3-mst-region] region-name ntd
[SW3-mst-region] instance 10 vlan 10
[SW3-mst-region] instance 20 vlan 20
[SW3-mst-region] instance 30 vlan 30
[SW3-mst-region] active region-configuration
[SW3-mst-region] quit
[SW3]int g0/0/3
[SW3-G0/0/3]port link-type trunk
[SW3-G0/0/3]port trunk allow-pass vlan all

SW5配置:
[SW5]stp region-configuration 
[SW5-mst-region]region-name ntd
[SW5-mst-region]instance 10 vlan 10
[SW5-mst-region]instance 20 vlan 20
[SW5-mst-region]instance 30 vlan 30
[SW5-mst-region]active region-configuration 

[SW5]stp instance 10 priority 4096
[SW5]stp instance 20 priority 4096
[SW5]stp instance 30 priority 8192

SW6配置:
[SW6]stp region-configuration
[SW6-mst-region] region-name ntd
[SW6-mst-region] instance 10 vlan 10
[SW6-mst-region] instance 20 vlan 20
[SW6-mst-region] instance 30 vlan 30
[SW6-mst-region] active region-configuration

[SW6]stp instance 10 priority 8192
[SW6]stp instance 20 priority 8192
[SW6]stp instance 30 priority 4096

第四步:配置SW6-DHCP中继
SW6配置:
[SW6]int vlanif 50
[SW6-Vlanif50]ip address 192.168.50.252 24
[SW6-Vlanif50]quit
[SW6]dhcp enable
[SW6]int vlanif 10
[SW6-Vlanif10]dhcp select relay
[SW6-Vlanif10]dhcp relay server-ip 192.168.50.1
[SW6-Vlanif10]int vlanif 20
[SW6-Vlanif20]dhcp select relay
[SW6-Vlanif20]dhcp relay server-ip 192.168.50.1
[SW6-Vlanif20]int vlanif30
[SW6-Vlanif30]dhcp select relay
[SW6-Vlanif30]dhcp relay server-ip 192.168.50.1

备注:sw1/sw2/sw3的g0/0/3口也做成trunk接口

备注:实现vlan50的最优转发路径:
1)vlan50的流量默认走实例0 -instance 0 
2) 所以我们把SW5设置位instance 0 的主根, 把SW6设置位instance 0 的备根
   就可以实现SW6 到DHCP服务器的数据转发路径是通过g0/0/6转发,实现最优转发路径
3)配置命令:
   SW5:
       stp  instance 0 priority  4096
   
   SW6:
       stp  instance 0  priority  8192
       
  第五步:验证与测试:
  
  vlan10/vlan20的PC 通过SW5-中继和DHCP,获取IP地址
  vlan30的PC 通过SW6-中继和DHCP,获取IP地址
  所有的PC都互联互通
  
  
  验证命令:
  <SW5>display stp instance 10
  <SW5>display stp instance 20
  <SW5>display stp instance 30
  <SW5>display stp instance 0
  <SW5>display vrrp brief
  
  
  <SW6>display stp instance 10
  <SW6>display stp instance 20
  <SW6>display stp instance 30
  <SW6>display stp instance 0
  <SW6>display vrrp brief

  

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CSDN是一个内部市场系统代码。CSDN即“中国软件开发”,是中国软件开发者社区,也是国内最大的IT技术社区。CSDN以提供最新的技术文章、资讯、源码等资源为主要目标,在这个平台上,开发者可以分享自己的经验和知识。 CSDN作为一个内部市场系统代码,主要通过建立一个开放、透明和可交易的平台,促进技术资源的流通和交换。在CSDN平台上,开发者可以上传自己开发的代码,供其他开发者学习和使用。这样可以使开发者之间更好地相互学习和合作,提高整体的技术水平。 CSDN内部市场系统代码的特点之一是可以根据需求进行交易。开发者可以通过购买或出售代码来实现技术资源的交换。这样的交易机制可以激励开发者更加努力地创作和分享质的代码,同时也鼓励其他开发者学习和应用这些质的代码。 另外,CSDN内部市场系统代码还提供一种评价和推荐的机制。开发者可以根据其他用户对其代码的评价和推荐来获得更多的认可和支持,进而提高自己的影响力和知名度。这种评价和推荐的机制可以促进开发者之间的互动和交流,加强技术社区的凝聚力。 总之,CSDN内部市场系统代码通过建立一个开放、透明和可交易的平台,促进技术资源的流通和交换,提高开发者之间的互动和合作,推动技术社区的发展。这使得CSDN成为中国最大的IT技术社区之一,为国内的软件开发者提供了一个宝贵的学习和交流平台。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值