专栏首页网络技术联盟站IPV6之VRRP典型组网配置案例

IPV6之VRRP典型组网配置案例

组网及说明

组网说明:

本案例采用H3C HCL模拟器来模拟IPV6 VRRP典型组网配置。为了确保网络的冗余,将SW2和SW3开启VRRP作为网关冗余。SW2为主设备,SW3为备用设备。SW2、SW3与R1的互联采用ospfv3路由协议互通。当断开SW2的GI1/0/2上联口是,物理机能走SW3方向去往R1。

配置步骤

  • 按照网络拓扑图正确配置IP地址和VLAN划分
  • SW2和SW3配置VRRP
  • SW2配置track,方便VRRP的检测与切换
  • SW2、SW3、R1运行OSPFv3路由协议

配置关键点

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname SW1

[SW1]vlan 10

[SW1-vlan10]quit

[SW1]int gi 1/0/3

[SW1-GigabitEthernet1/0/3]port link-type access

[SW1-GigabitEthernet1/0/3]port access vlan 10

[SW1-GigabitEthernet1/0/3]quit

[SW1]int range gi 1/0/1 to gi 1/0/2

[SW1-if-range]port link-type trunk

[SW1-if-range]undo port trunk permit vlan 1

[SW1-if-range]port trunk permit vlan 10

[SW1-if-range]quit

[SW1]ip unreachables enable

[SW1]ip ttl-expires enable

[SW1]ipv6 unreachables enable
SW2:

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname SW2

[SW2]vlan 10

[SW2-vlan10]quit

[SW2]int range gi 1/0/1 gi 1/0/3

[SW2-if-range]port link-type trunk

[SW2-if-range]undo port trunk permit vlan 1

[SW2-if-range]port trunk permit vlan 10

[SW2-if-range]quit

[SW2]int vlan 10

[SW2-Vlan-interface10]ipv6 address fe80::2 link-local

[SW2-Vlan-interface10]vrrp ipv6 vrid 1 virtual-ip fe80::1 link-local

[SW2-Vlan-interface10]vrrp ipv6 vrid 1 priority 120

[SW2-Vlan-interface10]vrrp ipv6 vrid 1 track 1 priority reduced 30

[SW2-Vlan-interface10]ipv6 address 3::1 64

[SW2-Vlan-interface10]ospfv3 1 area 0

[SW2-Vlan-interface10]quit

[SW2]track 1 interface GigabitEthernet 1/0/2

[SW2-track-1]quit

[SW2]int LoopBack 0

[SW2-LoopBack0]ip address 1.1.1.1 32

[SW2-LoopBack0]quit

[SW2]ospfv3 1

[SW2-ospfv3-1]import-route direct

[SW2-ospfv3-1]router-id 1.1.1.1

[SW2-ospfv3-1]silent-interface Vlan-interface 10

[SW2-ospfv3-1]quit

[SW2]int gi 1/0/2

[SW2-GigabitEthernet1/0/2]port link-mode route

[SW2-GigabitEthernet1/0/2]des <connect to R1>

[SW2-GigabitEthernet1/0/2]ipv6 address 1::1 64

[SW2-GigabitEthernet1/0/2]ospfv3 1 area 0

[SW2-GigabitEthernet1/0/2]quit

[SW2]ip unreachables enable

[SW2]ip ttl-expires enable

[SW2]ipv6 unreachables enable
SW3:

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname SW3

[SW3]int loopback 0

[SW3-LoopBack0]ip address 2.2.2.2 32

[SW3-LoopBack0]quit

[SW3]vlan 10

[SW3-vlan10]quit

[SW3]int range gi 1/0/1 gi 1/0/3

[SW3-if-range]port link-type trunk

[SW3-if-range]undo port trunk permit vlan 1

[SW3-if-range]port trunk permit vlan 10

[SW3-if-range]quit

[SW3]int vlan 10

[SW3-Vlan-interface10]ipv6 address fe80::3 link-local

[SW3-Vlan-interface10]vrrp ipv6 vrid 1 virtual-ip fe80::1 link-local

[SW3-Vlan-interface10]ipv6 address 3::2 64

[SW3-Vlan-interface10]ospfv3 1 area 0

[SW3-GigabitEthernet1/0/2]ospfv3 cost 200

[SW3-Vlan-interface10]quit

[SW3]ospfv3 1

[SW3-ospfv3-1]silent-interface Vlan-interface 10

[SW3-ospfv3-1]import-route direct

[SW3-ospfv3-1]router-id 2.2.2.2

[SW3-ospfv3-1]quit

[SW3]int gi 1/0/2

[SW3-GigabitEthernet1/0/2]port link-mode route

[SW3-GigabitEthernet1/0/2]des <connect to R1>

[SW3-GigabitEthernet1/0/2]ipv6 address 2::1 64

[SW3-GigabitEthernet1/0/2]ospfv3 1 area 0

[SW3-GigabitEthernet1/0/2]quit

[SW3]ip unreachables enable

[SW3]ip ttl-expires enable

[SW3]ipv6 unreachables enable
R1:

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname R1

[R1]int loopback 0

[R1-LoopBack0]ip address 3.3.3.3 32

[R1-LoopBack0]quit

[R1]int loopback 1

[R1-LoopBack1]ipv6 address 4::1 64

[R1-LoopBack1]ospfv3 1 area 0

[R1-LoopBack1]quit

[R1]ospfv3 1

[R1-ospfv3-1]router-id 3.3.3.3

[R1-ospfv3-1]import-route direct

[R1-ospfv3-1]quit

[R1]int gi 0/0

[R1-GigabitEthernet0/0]des <connect to SW2>

[R1-GigabitEthernet0/0]ipv6 address 1::2 64

[R1-GigabitEthernet0/0]ospfv3 1 area 0

[R1-GigabitEthernet0/0]quit

[R1]int gi 0/1

[R1-GigabitEthernet0/1]des <connect to SW3>

[R1-GigabitEthernet0/1]ipv6 address 2::2 64

[R1-GigabitEthernet0/1]ospfv3 1 area 0

[R1-GigabitEthernet0/1]quit

[R1]ip unreachables enable

[R1]ip ttl-expires enable

[R1]ipv6 unreachables enable

查看SW2的VRRP显示信息为master:

查看SW3的VRRP显示信息为backup:

查看SW2的OSPF邻居信息:

查看SW3的OSPF邻居信息:

查看R1的OSPF邻居信息:

查看SW2的路由表:

[SW2]dis ipv6 routing-table

 

Destinations : 10       Routes : 10

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 1::/64                                      Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : GE1/0/2                                     Cost      : 0

 

Destination: 1::1/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 2::/64                                      Protocol  : O_INTRA

NextHop    : FE80::867D:FF:FE9A:405                      Preference: 10

Interface  : GE1/0/2                                     Cost      : 2

 

Destination: 3::/64                                      Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : Vlan10                                      Cost      : 0

 

Destination: 3::1/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 4::/64                                      Protocol  : O_ASE2

NextHop    : FE80::867D:FF:FE9A:405                      Preference: 150

Interface  : GE1/0/2                                     Cost      : 1

 

Destination: 4::1/128                                    Protocol  : O_INTRA

NextHop    : FE80::867D:FF:FE9A:405                      Preference: 10

Interface  : GE1/0/2                                     Cost      : 1

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: FF00::/8                                    Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : NULL0                                       Cost      : 0

[SW2]

查看SW3的路由表:

[SW3]dis ipv6 routing-table

 

Destinations : 10       Routes : 10

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 1::/64                                      Protocol  : O_INTRA

NextHop    : FE80::867D:FF:FE9A:406                      Preference: 10

Interface  : GE1/0/2                                     Cost      : 201

 

Destination: 2::/64                                      Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : GE1/0/2                                     Cost      : 0

 

Destination: 2::1/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 3::/64                                      Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : Vlan10                                      Cost      : 0

 

Destination: 3::2/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 4::/64                                      Protocol  : O_ASE2

NextHop    : FE80::867D:FF:FE9A:406                      Preference: 150

Interface  : GE1/0/2                                     Cost      : 1

 

Destination: 4::1/128                                    Protocol  : O_INTRA

NextHop    : FE80::867D:FF:FE9A:406                      Preference: 10

Interface  : GE1/0/2                                     Cost      : 200

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: FF00::/8                                    Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : NULL0                                       Cost      : 0

[SW3]

查看R1的路由表:

[R1]dis ipv6 routing-table

 

Destinations : 10       Routes : 11

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 1::/64                                      Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : GE0/0                                       Cost      : 0

 

Destination: 1::2/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 2::/64                                      Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : GE0/1                                       Cost      : 0

 

Destination: 2::2/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 3::/64                                      Protocol  : O_INTRA

NextHop    : FE80::867C:9AFF:FE0A:207                    Preference: 10

Interface  : GE0/0                                       Cost      : 2

 

Destination: 3::/64                                      Protocol  : O_INTRA

NextHop    : FE80::867C:9FFF:FEF2:307                    Preference: 10

Interface  : GE0/1                                       Cost      : 2

 

Destination: 4::/64                                      Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : Loop1                                       Cost      : 0

 

Destination: 4::1/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: FF00::/8                                    Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : NULL0                                       Cost      : 0

[R1]

物理机设置IPV6地址:

物理机能PING通4::1

路由追踪,走SW2方向去往4::1

关闭SW2的GI 1/0/2端口:

[SW2]int gi 1/0/2

[SW2-GigabitEthernet1/0/2]shutdown

查看SW2和SW3的VRRP状态:

SW2的VRRP状态为backup

SW3的VRRP状态为main

此时物理机依然可以PING通4::1

使用trecert -d 4::1,物理机去往4::1已经走SW3方向:

由以上测试结果得知,VRRP可以正常切换,同时在切换后,VLAN10的流量可以正常走SW3方向去往R1。

至此,IPV6之VRRP典型组网配置案例已完成!

本文分享自微信公众号 - 网络技术联盟站(it666lmz),作者:夏轩

原文出处及转载信息见文内详细说明,如有侵权,请联系 yunjia_community@tencent.com 删除。

原始发表时间:2020-05-07

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • H3C 配置管理实验

    3、R1 上开启 FTP 服务,创建用户 wangdaye,密码 123步骤1 :开启 FTP服务

    网络技术联盟站
  • DHCP 中继实验

    1、配置 配置 IP 地址部分略 地址部分略 2、置 配置 R1 为 为 DHCP 服务器,能够跨网段为 192.168.2.0/24 配 网段自动分配 IP...

    网络技术联盟站
  • 从零开始学习华为路由交换 | 配置console线路密码aaa认证模式

    网络技术联盟站
  • Github开源免费编程书籍

    时见疏星
  • java 并发包之 LongAdder 源码分析

    LongAdder是java8中新增的原子类,在多线程环境中,它比AtomicLong性能要高出不少,特别是写多的场景。

    微风-- 轻许--
  • 插件化编程实现的一份糖炒栗子~~

    迷茫的原因是因为想得太多,做得太少。因为只是 想 真的很容易,转瞬之间就会产生无数个念头,或许是该做点什么了吧。

    易墨
  • CCAI 2017 | 德国人工智能研究中心(DFKI)科技总监 Hans Uszkoreit 将带来精彩演讲

    用户1737318
  • 说说我们SQL英语群的故事

    这句话我非常喜欢。我不说它多么包含有哲学思想,只是单纯认可这种做学问的态度。凡事都要细致地观察,反复琢磨,才有可能认识到某块领域对自己的机会。

    Lenis
  • 【Python 第35课】 continue

    break是彻底地跳出循环,而continue只是略过本次循环的余下内容,直接进入下一次循环。 在我们前面写的那个统计分数的程序里,如果发现有成绩不足60分,...

    Crossin先生
  • day95-分页组件

    少年包青菜

扫码关注云+社区

领取腾讯云代金券