简单配置(涉及vrrp)

在这里插入图片描述

端口设置ip

端口设置ip
ISP:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip address 200.1.1.2 24

端口设置ip
AR1:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn	
[Huawei]sysname AR1
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip address 200.1.1.1 24
[AR1-GigabitEthernet0/0/0]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip address 10.1.1.1
[AR1-GigabitEthernet0/0/1]int g0/0/2
[AR1-GigabitEthernet0/0/2]ip address 10.2.2.1 24

VLAN设置ip

LSW1:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys	
[Huawei]sysname LSW1
[LSW1]vlan batch 10 20 1000
[LSW1-Vlanif1000]ip address 10.1.1.2 24

LSW2:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys	
[Huawei]sysname LSW2
[LSW2]vlan batch 10 20 1000
[LSW2-Vlanif2000]ip address 10.2.2.2 24


display IP interface brief  查看接口ip地址情况

聚合链路

LSW1

[LSW1]interface Eth-Trunk 1 	
[LSW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3

[LSW1]interface Eth-Trunk1
[LSW1-Eth-Trunk1]port link-type trunk
[LSW1-Eth-Trunk1]port trunk allow-pass vlan 2 to 4094

LSW2
[LSW2]interface Eth-Trunk 1 	
[LSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3

[LSW2]interface Eth-Trunk1
[LSW2-Eth-Trunk1]port link-type trunk
[LSW2-Eth-Trunk1]port trunk allow-pass vlan 2 to 4094

ospf宣告

LSW1:
ospf 1 router-id 1.1.1.1
 area 0.0.0.0
  network 10.1.1.2 0.0.0.0
  network 172.16.10.254 0.0.0.0
  network 172.16.20.254 0.0.0.0  
 AR1:
[AR1] (宣告)
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 10.1.1.1 0.0.0.0

设置MSTP

所有设备(交换机)都设置相同的mstp实例 交换机
stp region-configuration
 region-name huawei //域名
 (revision-level 1) //修订版本号
 instance 1 vlan 10
 instance 2 vlan 20
 active region-configuration

MSTP 实现
vlan 10 的流量走左边LSW1 LSW1必须为VRRP的主
vlan 20 的流量走右边LSW2 LSW2必须为VRRP的主

LSW1:
stp instance 1 root primary 	
stp instance 2 root secondary

LSW2:
stp instance 2 root primary 	
stp instance 1 root secondary

<LSW3>display stp brief 在LSW3上查看结果

设置VRRP

MSTP 实现
vlan 10 的流量走左边LSW1 LSW1必须为VRRP VLAN 10的主 互为备份
vlan 20 的流量走右边LSW2 LSW2必须为VRRP VLAN 20的主 互为备份

物理网关地址
interface Vlanif10
 ip address 172.16.10.252 255.255.255.0
interface Vlanif20
 ip address 172.16.20.252 255.255.255.0

物理网关地址
interface Vlanif10
 ip address 172.16.10.253 255.255.255.0
interface Vlanif20
 ip address 172.16.20.253 255.255.255.0
 


 LSW1:
interface Vlanif10
 ip address 172.16.10.252 255.255.255.0
 vrrp vrid 1 virtual-ip 172.16.10.254      虚拟网关地址
 vrrp vrid 1 priority 120                  vrrp优先级(越大越优先默认100 
                                           如果虚拟网关地址和改地址相同 为255)
 vrrp vrid 1 preempt-mode timer delay 1    设置抢占延时为1s 抢占默认开启

interface Vlanif20
 ip address 172.16.20.252 255.255.255.0
 vrrp vrid 2 virtual-ip 172.16.20.254
 vrrp vrid 2 priority 110
 vrrp vrid 2 preempt-mode timer delay 1


LSW2:

interface Vlanif10
 ip address 172.16.10.253 255.255.255.0
 vrrp vrid 1 virtual-ip 172.16.10.254
 vrrp vrid 1 priority 110
 vrrp vrid 1 preempt-mode timer delay 1

interface Vlanif20
 ip address 172.16.20.253 255.255.255.0
 vrrp vrid 2 virtual-ip 172.16.20.254
 vrrp vrid 2 priority 120
 vrrp vrid 2 preempt-mode timer delay 1
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值