How to configure vpn-instance interface VLAN/ intervlan routing on an HPE Comware Switch!
I had a customer who uses VPN Instances on HPE Comware 5500-HI switches, and they needed the Comware switch to act as the default gateway, and enable intervlan routing between two vpn instances. A VPN Instance splits the routing table, the same was Cisco's implementation of VRF's - so this behavior is not enabled by default and you have to use MBGP (Multi protocol BGP).
Note that you cannot use static routing to achieve this.
Its compiled of three main things:
I use a fairly straightforward setup, as follows:
Interface VLAN’s
interface Vlan-interface30description Customer1ip binding vpn-instance Customer1ip address 172.16.30.3 255.255.255.0interface Vlan-interface40description Customer2ip binding vpn-instance Customer2ip address 172.16.40.3 255.255.255.0VPN Instance Config
ip vpn-instance Customer1
route-distinguisher 64516:1description Customer1vpn-target 64516:1 64517:1 import-extcommunityvpn-target 64516:1 export-extcommunityip vpn-instance Customer2route-distinguisher 64517:1description Customer2vpn-target 64517:1 64516:1 import-extcommunityvpn-target 64517:1 export-extcommunityBGP Config
bgp 65001ip vpn-instance Customer1 # address-family ipv4 unicast import-route direct#ip vpn-instance Customer2 # address-family ipv4 unicast import-route direct#Your routing tables will then look like:
disp ip routing-table vpn-instance Customer1Destinations : 15 Routes : 15Destination/Mask Proto Pre Cost NextHop Interface...172.16.30.0/24 Direct 0 0 172.16.30.3 Vlan30172.16.30.0/32 Direct 0 0 172.16.30.3 Vlan30172.16.30.3/32 Direct 0 0 127.0.0.1 InLoop0172.16.30.255/32 Direct 0 0 172.16.30.3 Vlan30172.16.40.0/24 BGP 130 0 172.16.40.3 Vlan40172.16.40.3/32 BGP 130 0 127.0.0.1 InLoop0224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0disp ip routing-table vpn-instance Customer2Destinations : 15 Routes : 15Destination/Mask Proto Pre Cost NextHop Interface...172.16.30.0/24 BGP 130 0 172.16.30.3 Vlan30172.16.30.3/32 BGP 130 0 127.0.0.1 InLoop0172.16.40.0/24 Direct 0 0 172.16.40.3 Vlan40172.16.40.0/32 Direct 0 0 172.16.40.3 Vlan40172.16.40.3/32 Direct 0 0 127.0.0.1 InLoop0172.16.40.255/32 Direct 0 0 172.16.40.3 Vlan40224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0And you can now ping between your devices as though it was a normal intervlan router :)