• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 全部
  • 全部
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
高级搜索

Intranet users access different businesses via different exit VPN configuration examples

2020-08-21 Published
  • 0关注
  • 0收藏,305浏览
孟普 五段
粉丝:1人 关注:0人

Network Topology

1. On Router1, there are two exit VPNS to connect different regions.

2. After the PC traffic arrives at Router1, match the PBR of the interface and redirect the message to the next hop in different VPNS according to the source and destination addresses;

3, PC access Router2 (address 2.2.2.2) and Router3, through different VPN interface, and normal communication.



Configuration Steps

In this case, a router is used to simulate the Intranet device PC, Router0 is used to simulate the three-layer switching devices of the Intranet, Router1 is used to simulate the outlet devices of the branch, and Router2 and Router3 are used to simulate the remote devices at different exits.

Router1 USES G0/0 to connect a three-layer Router0 device on the internal network, and the interface address is 1.1.1.2;

Router1 USES G0/1 to connect to Router2 with an interface address of 2.1.1.1 and a vPN-instance 1 binding.

Router1 used G0/2 to connect to Router3, with the interface address of 3.1.1.1 and vPN-instance 2 bound.

The interfaces Router2 and Router3 connect to Router1 are not tied to a VPN.


1. Configuration of the PC


# Configure interface Address:

[PC]interface GigabitEthernet5/0


[PC-GigabitEthernet5/0] port link-mode route


[PC-GigabitEthernet5/0] combo enable copper


[PC-GigabitEthernet5/0] ip address 10.1.1.1 255.255.255.0


# Configure an exit route:                                      


[PC] ip route-static 0.0.0.0 0 10.1.1.2


2. Configuration of the Router0


# Configure the g5/0 address of the interface for connecting to a PC


[ROUTER0]interface GigabitEthernet5/0


[ROUTER0-GigabitEthernet5/0] port link-mode route


[ROUTER0-GigabitEthernet5/0] combo enable copper


[ROUTER0-GigabitEthernet5/0] ip address 10.1.1.2 255.255.255.0


# Configure the g0/0 address of the interface for connecting to Router1


[ROUTER0]interface GigabitEthernet0/0


[ROUTER0-GigabitEthernet0/0] port link-mode route


[ROUTER0-GigabitEthernet0/0] combo enable copper


[ROUTER0-GigabitEthernet0/0] ip address 1.1.1.1 255.255.255.0


# Configure an exit route:                                      


[ROUTER0] ip route-static 0.0.0.0 0 1.1.1.2


3Configuration of the Router1


 [ROUTER1]ip vpn-instance 1


[ROUTER1-vpn-instance-1] route-distinguisher 1:1


[ROUTER1-vpn-instance-1] vpn-target 1:1 import-extcommunity


[ROUTER1-vpn-instance-1] vpn-target 1:1 export-extcommunity


[ROUTER1-vpn-instance-1]#


[ROUTER1-vpn-instance-1]ip vpn-instance 2


[ROUTER1-vpn-instance-2] route-distinguisher 2:1


[ROUTER1-vpn-instance-2] vpn-target 2:1 import-extcommunity


[ROUTER1-vpn-instance-2] vpn-target 2:1 export-extcommunity


# Configure the interface G0/1 address for interconnecting Router2.


 [ROUTER1] interface GigabitEthernet0/1


[ROUTER1-GigabitEthernet0/1] port link-mode route


[ROUTER1-GigabitEthernet0/1] combo enable copper


[ROUTER1-GigabitEthernet0/1] ip binding vpn-instance 1


[ROUTER1-GigabitEthernet0/1] ip address 2.1.1.1 255.255.255.0


# Configure the interface G0/2 address for interconnecting Router3


[ROUTER1]interface GigabitEthernet0/2


[ROUTER1-GigabitEthernet0/2] port link-mode route


[ROUTER1-GigabitEthernet0/2] combo enable copper


[ROUTER1-GigabitEthernet0/2] ip binding vpn-instance 2


[ROUTER1-GigabitEthernet0/2] ip address 3.1.1.1 255.255.255.0


# Configure the ACL to match the address of the Intranet PC to the remote end, respectively.


[ROUTER1]acl advanced 3000


[ROUTER1-acl-ipv4-adv-3000] rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 2.2.2.2 0


[ROUTER1]acl advanced 3001


[ROUTER1-acl-ipv4-adv-3001] rule 5 permit ip source 10.1.1.0 0.0.0.255 destination 3.3.3.3 0


# Configure PBR to forward to the next hop in different VPNS when matched  different ACLs.


[ROUTER1]policy-based-route 1 permit node 1


[ROUTER1-pbr-1-1] if-match acl 3000


[ROUTER1-pbr-1-1] apply next-hop vpn-instance 1 2.1.1.2


[ROUTER1-pbr-1-1]#


[ROUTER1-pbr-1-1]policy-based-route 1 permit node 2


[ROUTER1-pbr-1-2] if-match acl 3001


[ROUTER1-pbr-1-2] apply next-hop vpn-instance 2 3.1.1.2


# Configure routing


[ROUTER1] ip route-static 10.1.1.0 24 1.1.1.1


[ROUTER1] ip route-static vpn-instance 1 10.1.1.0 24 1.1.1.1 public


[ROUTER1] ip route-static vpn-instance 2 10.1.1.0 24 1.1.1.1 public


4 Router2


# Create a Loopback 0 interface to simulate the service server


[ROUTER2]interface LoopBack0


[ROUTER2-LoopBack0] ip address 2.2.2.2 255.255.255.255


# Configure the G0/1 interface to connect to Router1


[ROUTER2]interface GigabitEthernet0/1


[ROUTER2-GigabitEthernet0/1] port link-mode route


[ROUTER2-GigabitEthernet0/1] combo enable copper


[ROUTER2-GigabitEthernet0/1] ip address 2.1.1.2 255.255.255.0


#Add an exit route


[ROUTER2] ip route-static 0.0.0.0 0 2.1.1.1


5 Router3


#Create a Loopback 0 interface to simulate the service server


[ROUTER3]interface LoopBack0


[ROUTER3-LoopBack0] ip address 2.2.2.2 255.255.255.255


# Configure the G0/1 interface to connect to Router1


[ROUTER3]interface GigabitEthernet0/1


[ROUTER3-GigabitEthernet0/1] port link-mode route


[ROUTER3-GigabitEthernet0/1] combo enable copper


[ROUTER3-GigabitEthernet0/1] ip address 2.1.1.2 255.255.255.0


#Add an exit route


 [ROUTER3] ip route-static 0.0.0.0 0 2.1.1.1


 


6. Verify the configuration


 [PC]ping 2.2.2.2


Ping 2.2.2.2 (2.2.2.2): 56 data bytes, press CTRL_C to break


56 bytes from 2.2.2.2: icmp_seq=0 ttl=253 time=3.000 ms


56 bytes from 2.2.2.2: icmp_seq=1 ttl=253 time=1.000 ms


56 bytes from 2.2.2.2: icmp_seq=2 ttl=253 time=1.000 ms


56 bytes from 2.2.2.2: icmp_seq=3 ttl=253 time=1.000 ms


56 bytes from 2.2.2.2: icmp_seq=4 ttl=253 time=1.000 ms


 [PC]ping 3.3.3.3


Ping 3.3.3.3 (3.3.3.3): 56 data bytes, press CTRL_C to break


56 bytes from 3.3.3.3: icmp_seq=0 ttl=253 time=2.000 ms


56 bytes from 3.3.3.3: icmp_seq=1 ttl=253 time=2.000 ms


56 bytes from 3.3.3.3: icmp_seq=2 ttl=253 time=2.000 ms


56 bytes from 3.3.3.3: icmp_seq=3 ttl=253 time=2.000 ms


56 bytes from 3.3.3.3: icmp_seq=4 ttl=253 time=1.000 ms






Key Configuration

1. This kind of networking is generally used by operators, and needs to be clearly defined;


2. When configuring Router1, the key point is to add VPN in the PBR redirection;


3. Router1 needs to add the backtrip VPN route to the internal network, and the keyword public must be added. Specify that the next hop of static route is in the public network instance, otherwise it will lead to the backtrip route exception to the internal network.


 

0 comments

No comments

Add Comments:

举报

×

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

侵犯我的权益

×

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

泄露了我的隐私

×

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

侵犯了我企业的权益

×

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

抄袭了我的内容

×

原文链接或出处

诽谤我

×

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

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

×

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

不规范转载

×

举报说明

提出建议

    +
<

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

确定

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