祖瑞科技 全国计算机 网络IT运维社区!

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 6761|回复: 0

HCNA-38 VRRP基本配置

[复制链接]

199

主题

212

帖子

1200

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1200
发表于 2021-2-5 17:29:58 | 显示全部楼层 |阅读模式
HCNA-38 VRRP基本配置

基本配置及搭建OSPF网络
<Huawei>system-view
[Huawei]sysnamer2
[r2]interfaceGigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ipaddress 192.168.100.2 24
[r2-GigabitEthernet0/0/0]interfaceGigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ipaddress 172.16.12.2 24
[r2-GigabitEthernet0/0/1]quit
[r2]ospf1
[r2-ospf-1]area0
[r2-ospf-1-area-0.0.0.0]authentication-modemd5 1 cipher admin1234
[r2-ospf-1-area-0.0.0.0]network192.168.100.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]network172.16.12.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]return
<Huawei>system-view
[Huawei]sysnamer1
[r1]interfaceGigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ipaddress 172.16.12.1 24
[r1-GigabitEthernet0/0/0]interfaceGigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ipaddress 172.16.13.1 24
[r1-GigabitEthernet0/0/1]quit
[r1]ospf1
[r1-ospf-1]area0
[r1-ospf-1-area-0.0.0.0]authentication-modemd5 1 cipher admin1234
[r1-ospf-1-area-0.0.0.0]network172.16.12.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network172.16.13.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]return
<Huawei>system-view
[Huawei]sysnamer3
[r3]interfaceGigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ipaddress 192.168.100.3 24
[r3-GigabitEthernet0/0/0]interfaceGigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ipaddress 172.16.13.3 24
[r3-GigabitEthernet0/0/1]quit
[r3]ospf1
[r3-ospf-1]area0
[r3-ospf-1-area-0.0.0.0]authentication-modemd5 1 cipher admin1234
[r3-ospf-1-area-0.0.0.0]network192.168.100.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 172.16.13.00.0.0.255
[r3-ospf-1-area-0.0.0.0]return
<r3>displayospf peer
     OSPFProcess 1 with Router ID 192.168.100.3
         Neighbors
Area 0.0.0.0 interface192.168.100.3(GigabitEthernet0/0/0)'s neighbors
Router ID: 192.168.100.2    Address: 192.168.100.2   
   State: Full Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.100.2  BDR: 192.168.100.3  MTU: 0   
   Dead timer due in 40  sec
   Retrans timer interval: 5
   Neighbor is up for 00:00:20     
   Authentication Sequence: [ 1609]
         Neighbors
Area 0.0.0.0 interface172.16.13.3(GigabitEthernet0/0/1)'s neighbors
Router ID: 172.16.12.1      Address: 172.16.13.1     
   State: Full Mode:Nbr is  Slave  Priority: 1
   DR: 172.16.13.1  BDR: None  MTU: 0   
   Dead timer due in 37  sec
   Retrans timer interval: 5
   Neighbor is up for 00:00:04     
   Authentication Sequence: [ 1601]
配置VRRP协议
[r2]interfaceGigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]vrrpvrid 1 virtual-ip 192.168.100.1  //配置VRRP 备份组1 虚拟IP
[r3]interfaceGigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]vrrpvrid 1 virtual-ip 192.168.100.1
[r2]displayvrrp
  GigabitEthernet0/0/0 | Virtual Router 1
    State : Master  //状态为主路由
    Virtual IP : 192.168.100.1
    Master IP : 192.168.100.2
    PriorityRun : 100
    PriorityConfig : 100
    MasterPriority : 100
    Preempt : YES   Delay Time : 0 s
    TimerRun : 1 s
    TimerConfig : 1 s
    Auth type : NONE
    Virtual MAC : 0000-5e00-0101
    Check TTL : YES
    Config type : normal-vrrp
    Backup-forward : disabled
    Create time : 2020-07-22 23:40:37 UTC-08:00
Lastchange time : 2020-07-22 23:40:40 UTC-08:00
[r3]displayvrrp
  GigabitEthernet0/0/0 | Virtual Router 1
    State : Backup  //状态为备份路由
    Virtual IP : 192.168.100.1
    Master IP : 192.168.100.2
    PriorityRun : 100
    PriorityConfig : 100
    MasterPriority : 100
    Preempt : YES   Delay Time : 0 s
    TimerRun : 1 s
    TimerConfig : 1 s
    Auth type : NONE
    Virtual MAC : 0000-5e00-0101
    Check TTL : YES
    Config type : normal-vrrp
    Backup-forward : disabled
    Create time : 2020-07-22 23:42:10 UTC-08:00
Last change time : 2020-07-22 23:42:10 UTC-08:00
配置VRRP优先级
[r3]interfaceGigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]vrrpvrid 1 priority 120  //配置VRRP 优先级
[r3]displayvrrp
  GigabitEthernet0/0/0 | Virtual Router 1
    State : Master  
    Virtual IP : 192.168.100.1
    Master IP : 192.168.100.3
    PriorityRun : 120
    PriorityConfig : 120
    MasterPriority : 120
    Preempt : YES   Delay Time : 0 s
    TimerRun : 1 s
    TimerConfig : 1 s
    Auth type : NONE
    Virtual MAC : 0000-5e00-0101
    Check TTL : YES
    Config type : normal-vrrp
    Backup-forward : disabled
    Create time : 2020-07-22 23:42:10 UTC-08:00
    Last change time : 2020-07-22 23:54:38UTC-08:00
<r2>displayvrrp brief  //查看VRRP摘要信息
Total:1     Master:0     Backup:1     Non-active:0      
VRID  State       Interface                Type     Virtual IP     
----------------------------------------------------------------
1     Backup       GE0/0/0                  Normal   192.168.100.1  
<r2>displayvrrp interface GigabitEthernet 0/0/0  //查看VRRP接口信息
  GigabitEthernet0/0/0 | Virtual Router 1
    State : Backup
    Virtual IP : 192.168.100.1
    Master IP : 192.168.100.3
   PriorityRun : 100
    PriorityConfig : 100
    MasterPriority : 120
    Preempt : YES   Delay Time : 0 s
    TimerRun : 1 s
    TimerConfig : 1 s
    Auth type : NONE
    Virtual MAC : 0000-5e00-0101
    Check TTL : YES
    Config type : normal-vrrp
    Backup-forward : disabled
    Create time : 2020-07-22 23:40:37 UTC-08:00
Last change time : 2020-07-22 23:54:39 UTC-08:00
PC>ping172.16.12.1
Ping172.16.12.1: 32 data bytes, Press Ctrl_C to break
From172.16.12.1: bytes=32 seq=1 ttl=254 time=47 ms
From172.16.12.1: bytes=32 seq=2 ttl=254 time=31 ms
From172.16.12.1: bytes=32 seq=3 ttl=254 time=31 ms
From172.16.12.1: bytes=32 seq=4 ttl=254 time=47 ms
From172.16.12.1: bytes=32 seq=5 ttl=254 time=31 ms
---172.16.12.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 31/37/47 ms

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
祖瑞(上海)网络科技有限公司
我们在全国范围提供企业IT运维、网络工程、弱电安装、监控安防、计算机产品收售、办公设备耗材等服务!
期待与您的合作!
邮箱:sanne@zurkj.com
电话:021-51850021 18918292296
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

公司网站

QQ|Archiver|手机版|小黑屋|祖瑞科技 全国计算机 网络IT运维社区! ( 沪ICP备16021636号-2 )

GMT+8, 2024-5-4 03:34 , Processed in 0.397987 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表