OSPF+MSTP+VRRP+DHCP组网实验

实验需求:

pc1-pc4要求从r4获取dhcp指定ip

sw1-sw4使用mstp+vrrp协议实现负载分担

ar1-ar2-s1-s2使用ospf实现三层通信

ar4设置为dhcp服务器

s1-s2作为dhcp服务器的中继

SW1
<sw1>display current-configuration 
#
sysname sw1
#
undo info-center enable
#
vlan batch 10 to 11 20 30 33 40
#
stp instance 1 root primary
stp instance 2 root secondary
#
dhcp enable
#
stp region-configuration
 region-name huawei
 revision-level 1
 instance 1 vlan 10 20
 instance 2 vlan 30 40
 active region-configuration
#
interface Vlanif10
 ip address 192.168.10.251 255.255.255.0
 vrrp vrid 10 virtual-ip 192.168.10.254
 vrrp vrid 10 priority 120
 dhcp select relay
 dhcp relay server-ip 14.1.1.4
#
interface Vlanif11
 ip address 11.1.1.2 255.255.255.0
#
interface Vlanif20
 ip address 192.168.20.251 255.255.255.0
 vrrp vrid 20 virtual-ip 192.168.20.254
 vrrp vrid 20 priority 120
 dhcp select relay
 dhcp relay server-ip 14.1.1.4
#
interface Vlanif30
 ip address 192.168.30.251 255.255.255.0
 vrrp vrid 30 virtual-ip 192.168.30.254
 dhcp select relay
 dhcp relay server-ip 14.1.1.4
#
interface Vlanif33
 ip address 33.1.1.4 255.255.255.0
#
interface Vlanif40
 ip address 192.168.40.251 255.255.255.0
 vrrp vrid 40 virtual-ip 192.168.40.254
 dhcp select relay
 dhcp relay server-ip 14.1.1.4
#
interface MEth0/0/1
#
interface Eth-Trunk12
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
 mode lacp-static
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 11
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 33
#
interface GigabitEthernet0/0/5
 eth-trunk 12
#
interface GigabitEthernet0/0/6
 eth-trunk 12
#
ospf 1 router-id 11.11.11.11
 import-route direct
 area 0.0.0.0
  network 11.1.1.2 0.0.0.0
  network 33.1.1.4 0.0.0.0
------------------------------------------------------
sw2 
#
sysname sw2
#
undo info-center enable
#
vlan batch 10 20 22 30 40 44
#
stp instance 1 root secondary
stp instance 2 root primary
#
dhcp enable
#
stp region-configuration
 region-name huawei
 revision-level 1
 instance 1 vlan 10 20
 instance 2 vlan 30 40
 active region-configuration
#
interface Vlanif10
 ip address 192.168.10.252 255.255.255.0
 vrrp vrid 10 virtual-ip 192.168.10.254
 dhcp select relay
 dhcp relay server-ip 14.1.1.4
#
interface Vlanif20
 ip address 192.168.20.252 255.255.255.0
 vrrp vrid 20 virtual-ip 192.168.20.254
 dhcp select relay
 dhcp relay server-ip 14.1.1.4
#
interface Vlanif22
 ip address 22.1.1.2 255.255.255.0
#
interface Vlanif30
 ip address 192.168.30.252 255.255.255.0
 vrrp vrid 30 virtual-ip 192.168.30.254
 vrrp vrid 30 priority 120
 dhcp select relay
 dhcp relay server-ip 14.1.1.4
#
interface Vlanif40
 ip address 192.168.40.252 255.255.255.0
 vrrp vrid 40 virtual-ip 192.168.40.254
 vrrp vrid 40 priority 120
 dhcp select relay
 dhcp relay server-ip 14.1.1.4
#
interface Vlanif44
 ip address 44.1.1.2 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk12
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
 mode lacp-static
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 22
#
interface GigabitEthernet0/0/4
 eth-trunk 12
#
interface GigabitEthernet0/0/5
 eth-trunk 12
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
 port link-type access
 port default vlan 44
#
ospf 1 router-id 22.22.22.22
 import-route direct
 area 0.0.0.0
  network 22.1.1.2 0.0.0.0
  network 44.1.1.2 0.0.0.0
------------------------------------------------------
SW3
#
sysname sw3
#
vlan batch 10 20 30 40
#
stp region-configuration
 region-name huawei
 revision-level 1
 instance 1 vlan 10 20
 instance 2 vlan 30 40
 active region-configuration
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 10
 stp edged-port enable
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 20
 stp edged-port enable
#
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/5
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
------------------------------------------------------
SW4
#
sysname sw4
#
vlan batch 10 20 30 40
#
stp region-configuration
 region-name huawei
 revision-level 1
 instance 1 vlan 10 20
 instance 2 vlan 30 40
 active region-configuration
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 30
 stp edged-port enable
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 40
 stp edged-port enable
#
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/5
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
------------------------------------------------------
AR1
#
 sysname ar1
#
interface Ethernet3/0/1
 ip address 44.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/0
 ip address 11.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 14.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 12.1.1.1 255.255.255.0 
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 11.1.1.1 0.0.0.0 
  network 12.1.1.1 0.0.0.0 
  network 14.1.1.1 0.0.0.0 
  network 44.1.1.1 0.0.0.0 
------------------------------------------------------
AR2
#
 sysname ar2
#
interface GigabitEthernet0/0/0
 ip address 33.1.1.3 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 22.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 12.1.1.2 255.255.255.0 
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 12.1.1.2 0.0.0.0 
  network 22.1.1.1 0.0.0.0 
  network 33.1.1.3 0.0.0.0 
------------------------------------------------------

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
引用\[1\]:根据引用\[1\]中的配置信息,Ethernet0/0/1端口被配置为trunk模式,允许通过的VLAN范围是2到4094。Ethernet0/0/2端口被配置为access模式,缺省VLAN是10。引用\[2\]中提到,在SW3和SW4之间部署了两条互联链路(Gi0/3和Gi0/4),并使用LACP动态聚合模式配置了二层链路聚合。其他接口根据网络互联的需求进行了静态链路聚合配置,生成了聚合接口1。引用\[3\]中的配置信息显示,VLAN批量配置了10、20、30、40和102,同时STP实例0被配置为次优根,STP实例1被配置为次优根,STP实例2被配置为主根。 综合以上配置信息,可以得出以下结论: 1. MSTP(Multiple Spanning Tree Protocol)被配置在网络中,通过STP实例的配置,可以实现冗余功能和环路消除。 2. VRRP(Virtual Router Redundancy Protocol)可能也被配置在网络中,但是在提供的引用内容中没有相关的配置信息,因此无法确定具体的VRRP配置。 3. DHCP(Dynamic Host Configuration Protocol)的配置信息没有在提供的引用内容中出现,因此无法确定DHCP的具体配置。 综上所述,根据提供的引用内容,可以确定MSTP和静态链路聚合被配置在网络中,但无法确定VRRPDHCP的具体配置。 #### 引用[.reference_title] - *1* *3* [ENSP:VRRP+MSTP+DHCP配置](https://blog.csdn.net/weixin_45921302/article/details/126897304)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [【ensp】MSTP+VRRP+DHCP+NAT+OSPF+SSH+telnet](https://blog.csdn.net/weixin_57585178/article/details/128459190)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值