cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1725
Views
0
Helpful
13
Replies

Communication inter-vrf

Hi,

 

Can you please help for configure inter-vrf configuration for switch catalyste 6500 for a lan network without use bgp.

 

Thank you for your reply.

 

Best regards.

13 Replies 13

Vinit Jain
Cisco Employee
Cisco Employee

Hello,

Please check out my blog on inter-vrf routing. Hope this helps:

https://supportforums.cisco.com/blog/12138546/inter-vrf-routing

Regards

Vinit

Thanks
--Vinit

Hi Jain,

 

Thank you for your reply.But for me i used a vrf in my local netween.and every vrf have the severel VLAN.I want to assure communication inter-VRF without use bgp.

 

Thank you for your reply.

The example that i showed has BGP but its just acting as any other protocol. What is really important is your import and export statements under the vrf. if that is correct, then you dont need to worry about anything else.

Thanks
--Vinit

In your example i have 2 questions please:

  the first : why you use the vrf B??

  The seconde about why you use the following command:

router bgp 100
bgp router-id 2.2.2.2
bgp log-neighbor-changes
no bgp default ipv4-unicast

 

Thank you???

Hi Masoud,

 

Thank you for your reply.But for my i want that VRF-custemer1 communicate with VRF-custemer2 in my network.

 

Thank you.

You can use only one VRF for both customers. In this way,  routes will join and customers see each other.(something like example below).If you want to join routes per case, you need to use BGP. However, by using BGP, you will finally join the routing tables, but per case. It would be more clear for me if you give me an example.

 

ip vrf customers
 rd 65000:1


Interface Fa0/0

Des Customer1 is connected to this interface
ip vrf forwarding customers
ip address 1.1.1.1 255.255.255.0

Interface Fa0/1

Des Customer2 is connected to this interface
ip vrf forwarding customers
ip address 2.2.2.1 255.255.255.0

 

interface G0/1
switchport trunk encapsulation dot1q
 switchport mode trunk

Int vlan 10
ip vrf forwarding customers
192.168.1.1 255.255.255.0


ip route vrf  customers  0.0.0.0 0.0.0.0  192.168.1.2

Hi masoud,

I aready create too diffirente vrf (VRF A and VRF B).Every VRF have Severel VLAN. I want to assure that the VLAN in VRF A can communication with The VLAN in VRF B.

Thank you for see in attchement.

 

Thank you.

See my previous comment. Play with route-target to import routes from one VRF to another.

Masoud

Thank you masoud for your answer. But i will justs use  this commands without BGP. Because,  i always find this command with bgp configuration.

Can you please explain me .

If I understood correctly, you are asking why route-target is used for BGP?

When BGP carries route to a BGP neighbor, It assigns RT export to each route. The BGP neighbor in the destination matches that RT export with local RT import. If it finds a match, then it will put that route in the VRF.

For example in SW1 we have,

IP VRF customer1

route-target export 1:1

route-target import 1:1

in SW2 we have

IP VRF customer1

route-target export 1:1

route-target import 1:1

BGP carries a route from SW1 to SW2 Assigning "route-target export 1:1" to each route

When SW2 receive the route, it compares "route-target export 1:1"  with local route-target import 1:1. If It matches SW1 will put that route in the VRF. You can play with this to join different VRFs.

 

Now you can use this to join two vrfs

SW1
ip vrf customer1
rd 65000:1
route-target export 1:1
route-target import 1:1
route-target import 2:2
!
ip vrf customer2
rd 65000:2
route-target export 2:2
route-target import 2:2
route-target import 1:1

customer1 vrf has import match for both customer1 and customer2 export, so routes from customer1 and customer 2 will be placed in VRF customer1.

 

Hope it helps,

 

 

Thank you very match masoud and jain  for your help.i hope you had the best time .

Here is another way to mix VRFs if you want to keep customers in separate VRFs

 

SW1
 

ip vrf customer1
rd 65000:1
route-target export 1:1
route-target import 1:1
route-target import 2:2
!
ip vrf customer2
rd 65000:2
route-target export 2:2
route-target import 2:2
route-target import 1:1

Hello,

I suppose you have two switches (SW1 and SW2).

You have two customers: customer1 and customer2

Custmer1 connected to SW1  needs to see customer1 connected to SW2 and

Custmer2 connected to SW1  needs to see customer2 connected to SW2

There is a trunk link between two switches. If you do not want to use BGP, you need to make a channel on your trunk interface for each customer. (One vlan for each customer on trunk). So in this example, we have two SVIs( int vlan10 for customer 1,int vlan20 for customer2)

There might be some errors when you are implementing because the configuration is handwriting.

 

SW1
ip vrf customer1
 rd 65000:1
!
ip vrf customer2
 rd 65000:2


Interface Fa0/0

Des Customer1 is connected to this interface
ip vrf forwarding customer1
ip address 1.1.1.1 255.255.255.0

Interface Fa0/1

Des Customer2 is connected to this interface
ip vrf forwarding customer2
ip address 2.2.2.1 255.255.255.0


interface G0/1
Des make channel for each customer by vlan
switchport trunk encapsulation dot1q
 switchport mode trunk

Int vlan 10
ip vrf forwarding customer1
192.168.1.1 255.255.255.0

Int vlan 20
ip vrf forwarding customer2
192.168.2.1 255.255.255.0

option 1 for routing:
ip route vrf  customer1  0.0.0.0 0.0.0.0  192.168.1.2
ip route vrf  customer2 0.0.0.0 0.0.0.0  192.168.2.2

option 2 for routing :    
router ospf 1 vrf customer1
 network 0.0.0.0 255.255.255.255 area 0

router ospf 1 vrf customer2
 network 0.0.0.0 255.255.255.255 area 0
*********************************************************************************************************************************
SW2
ip vrf customer1
 rd 65000:1
!
ip vrf customer2
 rd 65000:2


Interface Fa0/0
ip vrf forwarding customer1
ip address 3.3.3.1 255.255.255.0

Interface Fa0/1
ip vrf forwarding customer2
ip address 4.4.4.1 255.255.255.0


interface G0/1
Des make channel for each customer by vlan
switchport trunk encapsulation dot1q
 switchport mode trunk

Int vlan 10
ip vrf forwarding customer1
192.168.1.2 255.255.255.0

Int vlan 20
ip vrf forwarding customer2
192.168.2.2 255.255.255.0

Option 1 for routing
ip route vrf  customer1  0.0.0.0 0.0.0.0  192.168.1.1
ip route vrf  customer2 0.0.0.0 0.0.0.0  192.168.2.1

Option 2 for routing      
router ospf 1 vrf customer1
 network 0.0.0.0 255.255.255.255 area 0

router ospf 1 vrf customer2
 network 0.0.0.0 255.255.255.255 area 0

 

Hope it helps,

Masoud