LAN Routing
cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter route between VPN-Instance/BGP on the same switch?

ProsperBZH
Occasional Visitor

How to filter route between VPN-Instance/BGP on the same switch?

Hello,

I work on a HP 5820 in Comware 5.
I created 2 Vpn-Instances. Each of them are associated with 2 Vlans (or in fact their Vlan-Interfaces).
In order to route between the Vpn-Instances, I simply configured BGP by creating 1 AS and bound the Vlan-interfaces to a Vpn-Instance.
To be clear:
#
ip vpn-instance VRF10
 route-distinguisher 10:1
 vpn-target 20:1 import-extcommunity
 vpn-target 10:1 export-extcommunity
#
ip vpn-instance VRF20
 route-distinguisher 20:1
 vpn-target 10:1 import-extcommunity
 vpn-target 20:1 export-extcommunity
#
interface Vlan-interface1
 ip binding vpn-instance VRF10
 ip address 1.1.1.1 255.0.0.0
#
interface Vlan-interface2
 ip binding vpn-instance VRF10
 ip address 2.2.2.2 255.0.0.0
#
interface Vlan-interface3
 ip binding vpn-instance VRF20
 ip address 3.3.3.3 255.0.0.0
#
interface Vlan-interface4
 ip binding vpn-instance VRF20
 ip address 4.4.4.4 255.0.0.0
#
bgp 100
 #
 ipv4-family vpn-instance VRF10
  #           
   import-route direct
 #
 ipv4-family vpn-instance VRF20
  #
   import-route direct
 #

It works fine, each Vpn-Instance learned the networks of the other one in its routing table.

But now, I don't want all the Vlan to be known. For example, Vlan 4 does not need to be "exported" to VRF10 routing table.
How can I do that? I read in documentation that "route-policy" is the solution, but I failed to succeed.
Does anyone ever do the same ?

Thanks.