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

MSR系列路由器公网作MPLS L3VPN Over GRE Over IPsec备份和NAT多实例上Internet功能的配置

2007-06-13 发表
  • 0关注
  • 1收藏 723浏览
粉丝: 关注:

MSR系列路由器

公网作MPLS L3VPN Over GRE Over IPsec备份和NAT多实例上Internet功能的配置

 

关键字:MSR; MPLS; L3VPN; BGP; OSPF; GRE; IPSec; NAT多实例

 

一、组网需求

三台MSR分别是一个总部和2个分支路由器,全部是MPLS L3VPN中的PE设备,3台路由器间使用MPLS网络作为VPN的主用网络,要求主用MPLS网络断开情况下Internet上组建MPLS L3VPN Over GRE Over IPSec作为VPN的备份,另外要求总部和分支的VPN都可以自由访问Internet,不需要总部和分支之间相互转发。

设备清单:MSR系列路由器3

二、组网图:

三、配置步骤:

适用设备和版本:MSR系列、Version 5.20, Release 1206后所有版本。

总部配置

#

 //配置本地的IKE名字

 ike local-name 1.1.1.1

#

 //配置OSPFBGPRouter ID

 router id 1.1.1.1

#

//配置VPN实例vpna

ip vpn-instance vpna

 route-distinguisher 1:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

//配置mpls lsr-id

mpls lsr-id 1.1.1.1

#

//使能MPLS

mpls

#

//使能MPLS LDP

mpls ldp

#

//配置分支1IKE Peer,野蛮模式和NAT穿越

ike peer 2.2.2.2

 exchange-mode aggressive

 pre-shared-key h3c

 remote-name 2.2.2.2

 nat traversal

#

//配置分支2IKE Peer,野蛮模式和NAT穿越

ike peer 3.3.3.3

 exchange-mode aggressive

 pre-shared-key h3c

 remote-name 3.3.3.3

 nat traversal

#

//配置IPSec提议

ipsec proposal def

#

//IPSec策略branch配置,序号1到分支1,序号2到分支2

ipsec policy branch 1 isakmp

 security acl 3333

 ike-peer 2.2.2.2

 proposal def

#

ipsec policy branch 2 isakmp

 security acl 3334

 ike-peer 3.3.3.3

 proposal def

#

//ACL 3000用于NAT多实例

acl number 3000

 rule 0 permit ip vpn-instance vpna

//ACL 3333用于匹配总部到分支1GRE

acl number 3333

 rule 0 permit gre source 100.1.1.1 0 destination 100.2.2.2 0

//ACL 3334用于匹配总部到分支2GRE

acl number 3334

 rule 0 permit gre source 100.1.1.1 0 destination 100.3.3.3 0

#

//用于建立BGP邻居的环回接口

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

//用于建立GRE的环回接口

interface LoopBack100

 ip address 100.1.1.1 255.255.255.255

#

//连接Internet的接口

interface GigabitEthernet0/1

 port link-mode route

 //NAT多实例配置

 nat outbound 3000

 ip address 200.1.1.1 255.255.255.0

 //绑定IPSec策略

 ipsec policy branch

#

//连接MPLS网络的接口

interface GigabitEthernet0/0

 port link-mode route

 ip address 1.2.3.1 255.255.255.0

 mpls

 mpls ldp

#

//连接vpna的接口

interface GigabitEthernet1/0

 port link-mode route

 ip binding vpn-instance vpna

 ip address 11.2.2.2 255.255.255.0

#

//到分支1GRE隧道

interface Tunnel0

 description to2.2.2.2

 ip address 1.2.0.1 255.255.255.252

 source LoopBack100

 destination 100.2.2.2

 //使能GRE接口的MPLSLDP

 mpls

 mpls ldp

#

//到分支2GRE隧道

interface Tunnel1

 description to3.3.3.3

 ip address 1.3.0.1 255.255.255.252

 source LoopBack100

 destination 100.3.3.3

 //使能GRE接口的MPLSLDP

 mpls

 mpls ldp

#

//BGP部分配置

bgp 100

 undo synchronization

 group 100 internal

 peer 100 connect-interface LoopBack0

 peer 2.2.2.2 group 100

 undo peer 2.2.2.2 connect-interface

 peer 3.3.3.3 group 100

 undo peer 3.3.3.3 connect-interface

 #

 ipv4-family vpnv4

  peer 100 enable

  peer 2.2.2.2 enable

  peer 2.2.2.2 group 100

  peer 3.3.3.3 enable

  peer 3.3.3.3 group 100

 #

 ipv4-family vpn-instance vpna

  import-route direct

#

//OSPF部分配置,只将MPLS相关的接口(Loopback0G0/0Tunnel)加入到OSPF

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 1.2.3.0 0.0.0.255

  network 1.2.0.0 0.0.0.3

  network 1.3.0.0 0.0.0.3

#

 //保证IPSec的路由,即访问Internet的路由

 ip route-static 0.0.0.0 0.0.0.0 200.1.1.254

 //配置保证vpna可以访问Internet的静态路由,必须要指定Internet出接口

 ip route-static vpn-instance vpna 0.0.0.0 0.0.0.0 GigabitEthernet0/1 200.1.1.254

#

分支1配置

#

 //本地IKE名字

 ike local-name 2.2.2.2

#

 //OSPFBGProuter id

 router id 2.2.2.2

#

//VPN实例vpna

ip vpn-instance vpna

 route-distinguisher 2:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

mpls lsr-id 2.2.2.2

#

mpls

#

mpls ldp

#

//连接到总部的IKE Peer

ike peer 1.1.1.1

 exchange-mode aggressive

 pre-shared-key h3c

 remote-name 1.1.1.1

 remote-address 200.1.1.1

 nat traversal

#

ipsec proposal def

#

//连接到总部的IPSec策略配置

ipsec policy center 1 isakmp

 security acl 3333

 ike-peer 1.1.1.1

 proposal def

#

//ACL 3000用于NAT多实例

acl number 3000

 rule 0 permit ip vpn-instance vpna

//ACL 3333用于匹配到总部的GRE

acl number 3333

 rule 0 permit gre source 100.2.2.2 0 destination 100.1.1.1 0

#

//用于建立BGP连接和Router ID的环回接口

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

//用于建立GRE连接的环回接口

interface LoopBack100

 ip address 100.2.2.2 255.255.255.255

#

//连接Internet的接口

interface GigabitEthernet0/1

 port link-mode route

 //NAT多实例配置

 nat outbound 3000

 ip address 200.1.1.2 255.255.255.0

 //IPSec策略配置

 ipsec policy center

#

//连接MPLS网络接口

interface GigabitEthernet0/0

 port link-mode route

 ip address 1.2.3.2 255.255.255.0

 mpls

 mpls ldp

#

//连接VPNA的接口

interface GigabitEthernet1/0

 port link-mode route

 ip binding vpn-instance vpna

 ip address 12.2.2.2 255.255.255.0

#

//到总部的GRE隧道接口

interface Tunnel0

 ip address 1.2.0.2 255.255.255.252

 source LoopBack100

 destination 100.1.1.1

 //使能MPLSLDP

 mpls

 mpls ldp

#

//BGP部分配置

bgp 100

 undo synchronization

 group 100 internal

 peer 100 connect-interface LoopBack0

 peer 1.1.1.1 group 100

 peer 3.3.3.3 group 100

 #

 ipv4-family vpnv4

  peer 100 enable

  peer 1.1.1.1 enable

  peer 1.1.1.1 group 100

  peer 3.3.3.3 enable

  peer 3.3.3.3 group 100

 #

 ipv4-family vpn-instance vpna

  import-route direct

#

//OSPF部分配置,注意只将MPLS相关接口加入区域0

ospf 1

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 1.2.3.0 0.0.0.255

  network 1.2.0.0 0.0.0.3

#

 //访问Internet的默认路由

 ip route-static 0.0.0.0 0.0.0.0 200.1.1.254

 //配置保证vpna可以访问Internet的静态路由,必须要指定Internet出接口

 ip route-static vpn-instance vpna 0.0.0.0 0.0.0.0 GigabitEthernet0/1 200.1.1.254

#

分支2配置

#

 //本地IKE名字

 ike local-name 3.3.3.3

#

 //OSPFBGProuter id

 router id 3.3.3.3

#

//VPN实例vpna

ip vpn-instance vpna

 route-distinguisher 3:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

mpls lsr-id 3.3.3.3

#

mpls

#

mpls ldp

#

//连接到总部的IKE Peer

ike peer 1.1.1.1

 exchange-mode aggressive

 pre-shared-key h3c

 remote-name 1.1.1.1

 remote-address 200.1.1.1

 nat traversal

#

ipsec proposal def

#

//连接到总部的IPSec策略配置

ipsec policy center 1 isakmp

 security acl 3333

 ike-peer 1.1.1.1

 proposal def

#

//ACL 3000用于NAT多实例

acl number 3000

 rule 0 permit ip vpn-instance vpna

//ACL 3333用于匹配到总部的GRE

acl number 3333

 rule 0 permit gre source 100.3.3.3 0 destination 100.1.1.1 0

#

//用于建立BGP连接和Router ID的环回接口

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

//用于建立GRE连接的环回接口

interface LoopBack100

 ip address 100.3.3.3 255.255.255.255

#

//连接Internet的接口

interface GigabitEthernet0/1

 port link-mode route

 //NAT多实例配置

 nat outbound 3000

 ip address 200.1.1.3 255.255.255.0

 //IPSec策略配置

 ipsec policy center

#

//连接MPLS网络接口

interface GigabitEthernet0/0

 port link-mode route

 ip address 1.2.3.3 255.255.255.0

 mpls

 mpls ldp

#

//连接VPNA的接口

interface GigabitEthernet1/0

 port link-mode route

 ip binding vpn-instance vpna

 ip address 13.2.2.2 255.255.255.0

#

//到总部的GRE隧道接口

interface Tunnel0

 ip address 1.3.0.2 255.255.255.252

 source LoopBack100

 destination 100.1.1.1

 //使能MPLSLDP

 mpls

 mpls ldp

#

//BGP部分配置

bgp 100

 undo synchronization

 group 100 internal

 peer 100 connect-interface LoopBack0

 peer 1.1.1.1 group 100

 peer 2.2.2.2 group 100

 #

 ipv4-family vpnv4

  peer 100 enable

  peer 1.1.1.1 enable

  peer 1.1.1.1 group 100

  peer 2.2.2.2 enable

  peer 2.2.2.2 group 100

 #

 ipv4-family vpn-instance vpna

  import-route direct

#

//OSPF部分配置,注意只将MPLS相关接口加入区域0

ospf 1

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 1.2.3.0 0.0.0.255

  network 1.3.0.0 0.0.0.3

#

 //访问Internet的默认路由

 ip route-static 0.0.0.0 0.0.0.0 200.1.1.254

 //配置保证vpna可以访问Internet的静态路由,必须要指定Internet出接口

 ip route-static vpn-instance vpna 0.0.0.0 0.0.0.0 GigabitEthernet0/1 200.1.1.254

#

四、配置关键点

1) 先配置好MPLS L3VPN部分,可以参照相应内容KMS

2) 再配置好公网的GRE Over IPSec

3) 在配置好的GRE上面运行MPLSLDP

4) GRE隧道也加入到MPLS网络的OSPF进程;

5) 最后配置NAT多实例,注意ACL 3000VPN静态路由的配置,静态路由务必指定连接Internet出接口

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

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

该案例暂时没有网友评论

编辑评论

举报

×

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

侵犯我的权益

×

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

泄露了我的隐私

×

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

侵犯了我企业的权益

×

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

抄袭了我的内容

×

原文链接或出处

诽谤我

×

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

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

×

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

不规范转载

×

举报说明

提出建议

    +

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

确定

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

注册后可访问此模块

跳转hclhub

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