[Knowledge sharing]Configuration example for leaking routes between two VRF's on the same switch

445 0 0 0
Hello all,

I share with you another scenario that I managed to test.
Let's suppose you want that Server A and B to communicate each other in the below scenario.
Initial configuration:

GE1/0/1

ip binding vpn-instance vrf1

ip address 192.168.1.1 255.255.255.0

 

GE 1/0/2

ip binding vpn-instance vrf2

ip address 192.168.2.1 255.255.255.0

9fa6bd5620ae4d9682c555a1418f7b70

 

transparent.gifSolution:

In order to reproduce this scenario I used this topology(with a similar switch) to simulate :
61f55439f07447eb9e765d576afc24c1
The configuration from SW1 :
#

vlan batch 2

#

ip vpn-instance test

ipv4-family

  route-distinguisher 100:1

  import route-policy 1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

#

ip vpn-instance test2

ipv4-family

  route-distinguisher 100:2

  export route-policy 2

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

#

 

interface Vlanif1

ip binding vpn-instance test

ip address 1.1.1.1 255.255.255.0

#

interface Vlanif2

ip binding vpn-instance test2

ip address 2.1.1.1 255.255.255.0

#

interface GigabitEthernet0/0/1

port link-type access

port default vlan 1

#

interface GigabitEthernet0/0/2

port link-type access

port default vlan 2

#

bgp 1

router-id 1.1.1.1

#

ipv4-family unicast

  undo synchronization

#

ipv4-family vpn-instance test

  import-route direct

#

ipv4-family vpn-instance test2

  import-route direct

#

 

PC1 :
257f852127d14880afb209d1aa2b7478
PC2:
23b99301bd8249faaf7d79d6f45fbd33

Result :
2d2ca5d041cd4d19b379ffe6c9bc68bb
So, using the same vpn-target for both VRFs was enough to make the ping working between these 2 hosts. Hope this is useful :)
  • x
  • convention:

Comment

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login