• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

MSR使用VRRP虚地址建立GRE隧道配置

2015-11-05 发表
  • 0关注
  • 0收藏 2203浏览
粉丝:27人 关注:0人

1.   RTARTB采用VRRP做备份;

2.   RTARTB使用VRRP虚地址与RTCGRE Tunnel

3.   RTA链路出现问题时,切换到备用RTB上,保持GRE VPN不断,PC可以快速访问到备用服务器;


RTA的配置

#配置接口地址,并起VRRP

interface GigabitEthernet0/0

 port link-mode route

 ip address 1.1.1.2 255.255.255.0

 vrrp vrid 1 virtual-ip 1.1.1.4

 vrrp vrid 1 priority 110

 vrrp vrid 1 preempt-mode timer delay 5

#配置连接内网服务器接口地址

interface GigabitEthernet0/1

 port link-mode route

 ip address 192.168.1.1 255.255.255.0

#配置GRE,此处注意,RTARTB上的配置参数需要一致,source地址需要配置为VRRP的虚地址。

interface Tunnel0

 ip address 10.1.1.1 255.255.255.0

 source 1.1.1.4

 destination 1.1.1.10

 keepalive 10 3

#配置完,切记要添加一条静态路由,指向tunnel口。

 ip route-static 192.168.2.0 255.255.255.0 Tunnel0

 

RTB的配置

 

#配置接口地址,并起VRRP

interface GigabitEthernet0/0

 port link-mode route

 ip address 1.1.1.3 255.255.255.0

 vrrp vrid 1 virtual-ip 1.1.1.4

 vrrp vrid 1 preempt-mode timer delay 5

#配置连接内网服务器接口地址

interface GigabitEthernet0/1

 port link-mode route

 ip address 192.168.1.1 255.255.255.0

#配置GRE,此处注意,RTARTB上的配置参数需要一致,source地址需要配置为VRRP的虚地址。

interface Tunnel0

 ip address 10.1.1.1 255.255.255.0

 source 1.1.1.4

 destination 1.1.1.10

 keepalive 10 3

#

 ip route-static 192.168.2.0 255.255.255.0 Tunnel0

#

RTC的配置

#配置出口地址

interface GigabitEthernet0/0

 port link-mode route

 ip address 1.1.1.10 255.255.255.0

#配置内网地址,这里使用一个loopback地址进行模拟

interface LoopBack5

 ip address 192.168.2.2 255.255.255.255

#配置GRE tunnel

interface Tunnel0

 ip address 10.1.1.2 255.255.255.0

 source 1.1.1.10

 destination 1.1.1.4

 keepalive 10 3

#添加一条静态路由,指向tunnel

 ip route-static 192.168.1.0 255.255.255.0 Tunnel0

配置完成之后,在RTA上观察VRRP

[RTA]dis vrrp ver

 IPv4 Standby Information:

     Run Mode       : Standard

     Run Method     : Virtual MAC

 Total number of virtual routers : 1

   Interface GigabitEthernet0/0

     VRID           : 1               Adver Timer : 1

     Admin Status   : Up              State       : Master

     Config Pri     : 110             Running Pri : 110

     Preempt Mode   : Yes             Delay Time  : 5

     Auth Type      : None

     Virtual IP     : 1.1.1.4

     Virtual MAC    : 0000-5e00-0101

     Master IP      : 1.1.1.2

 

 

RTB上观察VRRP

[RTB]dis vrrp ver

 IPv4 Standby Information:

     Run Mode       : Standard

     Run Method     : Virtual MAC

 Total number of virtual routers : 1

   Interface GigabitEthernet0/0

     VRID           : 1               Adver Timer : 1

     Admin Status   : Up              State       : Backup

     Config Pri     : 100             Running Pri : 100

     Preempt Mode   : Yes             Delay Time  : 5

     Become Master  : 3100ms left

     Auth Type      : None

     Virtual IP     : 1.1.1.4

     Master IP      : 1.1.1.2

可以看到,RTAmater设备。

 

RTA的观察tunnel0

[RTA]dis interface Tunnel 0

Tunnel0 current state: UP

Line protocol current state: UP

Description: Tunnel0 Interface

The Maximum Transmit Unit is 1476

Internet Address is 20.1.1.1/24 Primary

Encapsulation is TUNNEL, service-loopback-group ID not set.

Tunnel source 1.1.1.4, destination 1.1.1.10

Tunnel bandwidth 64 (kbps)

Tunnel keepalive enabled, Period(10 s), Retries(3)

Tunnel protocol/transport GRE/IP

    GRE key disabled

    Checksumming of GRE packets disabled

Output queue : (Urgent queuing : Size/Length/Discards)  0/100/0

Output queue : (Protocol queuing : Size/Length/Discards)  0/500/0

Output queue : (FIFO queuing : Size/Length/Discards)  0/75/0

 Last clearing of counters:  Never

    Last 300 seconds input:  2 bytes/sec, 0 packets/sec

    Last 300 seconds output:  2 bytes/sec, 0 packets/sec

    404 packets input,  4956 bytes

    0 input error

    233 packets output,  5700 bytes

0 output error

 

RTB上观察tunnel0

[RTB]dis interface Tunnel 0

Tunnel0 current state: DOWN

Line protocol current state: DOWN

Description: Tunnel0 Interface

The Maximum Transmit Unit is 64000

Internet Address is 10.1.1.1/24 Primary

Encapsulation is TUNNEL, service-loopback-group ID not set.

Tunnel source 1.1.1.4, destination 1.1.1.10

Tunnel bandwidth 64 (kbps)

Tunnel keepalive enabled, Period(10 s), Retries(3)

Tunnel protocol/transport GRE/IP

    GRE key disabled

    Checksumming of GRE packets disabled

Output queue : (Urgent queuing : Size/Length/Discards)  0/100/0

Output queue : (Protocol queuing : Size/Length/Discards)  0/500/0

Output queue : (FIFO queuing : Size/Length/Discards)  0/75/0

 Last clearing of counters:  Never

    Last 300 seconds input:  0 bytes/sec, 0 packets/sec

    Last 300 seconds output:  0 bytes/sec, 0 packets/sec

    0 packets input,  0 bytes

    0 input error

    0 packets output,  0 bytes

    0 output error

RTC上观察tunnel0

[RTC]dis int Tunnel 0

Tunnel0 current state: UP

Line protocol current state: UP

Description: Tunnel0 Interface

The Maximum Transmit Unit is 1476

Internet Address is 10.1.1.2/24 Primary

Encapsulation is TUNNEL, service-loopback-group ID not set.

Tunnel source 1.1.1.10, destination 1.1.1.4

Tunnel bandwidth 64 (kbps)

Tunnel keepalive enabled, Period(10 s), Retries(3)

Tunnel protocol/transport GRE/IP

    GRE key disabled

    Checksumming of GRE packets disabled

Output queue : (Urgent queuing : Size/Length/Discards)  0/100/0

Output queue : (Protocol queuing : Size/Length/Discards)  0/500/0

Output queue : (FIFO queuing : Size/Length/Discards)  0/75/0

 Last clearing of counters:  Never

    Last 300 seconds input:  0 bytes/sec, 0 packets/sec

    Last 300 seconds output:  2 bytes/sec, 0 packets/sec

    221 packets input,  324 bytes

    0 input error

    239 packets output,  5844 bytes

0 output error

 

 

 

断开RTA的连线之后,可以看到VRRP已经切换到了RTB设备上。

[RTB]dis vrrp ver

 IPv4 Standby Information:

     Run Mode       : Standard

     Run Method     : Virtual MAC

 Total number of virtual routers : 1

   Interface GigabitEthernet0/0

     VRID           : 1               Adver Timer : 1

     Admin Status   : Up              State       : Master

     Config Pri     : 100             Running Pri : 100

     Preempt Mode   : Yes             Delay Time  : 5

     Auth Type      : None

     Virtual IP     : 1.1.1.4

     Virtual MAC    : 0000-5e00-0101

     Master IP      : 1.1.1.3

在长ping的时候,我们可以看到,当RTA的出口链路端口之后,会很快的切换到RTB设备上。


1、 RTA与RTB配置的GRE参数需要保持一致。

2、 配置完之后,记得添加一个路由,指向tunnel口。


该案例对您是否有帮助:

您的评价:1

若您有关于案例的建议,请反馈:

作者在2019-06-08对此案例进行了修订
0 个评论

该案例暂时没有网友评论

编辑评论

举报

×

侵犯我的权益 >
对根叔知了社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔知了社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作