Create l2tpv2 connection over vrf between 2 machines

Issues related to configuring your network
Post Reply
hezilka
Posts: 1
Joined: 2022/12/07 15:48:28

Create l2tpv2 connection over vrf between 2 machines

Post by hezilka » 2022/12/07 20:03:26

Hi all,

Need an assistance with l2tpv2 in vrf env,

I have 4 machines, 1EndPC + 1 GW machine in each ENV.
EndPC need to transfer data to the it's GW1 and from GW1 the data need to flow with l2tpv2 tunnel to the other GW- GW2 and from there to the other EndPC.
the l2tpv2 is required because the env is using also vlans and vrfs that all connected with bridge.
Attached a photo that show all the communication: Screenshot from 2022-12-07 21-52-41.png
ENV
ENV
Screenshot from 2022-12-07 21-52-41.png (39.87 KiB) Viewed 1286 times
attached to this e-mail the list of command that I've made and didn't worked\=

Left Side(lEndPC2):

ip link add TenantAB type vrf table 21
ip link set TenantAB up
ip link add link eth1 name eth1.21 type vlan id 21
ip link set eth1.21 up
ip addr add ${Local_LAN_IP} dev eth1.21
ip link set eth1.21 master TenantAB
ip r a ${Remote_LAN_Subnet} t 21

Left Side(l2tp server):

ip link add TenantAB type vrf table 21
ip link set TenantAB up
ip l2tp add tunnel remote ${RemoteIP} local {LocalIP} tunnel_id 1040 peer_tunnel_id 4010 encap ip
ip l2tp add session name l2tp2140 tunnel_id 1040 session_id 2140 peer_session_id 2110
ip link set l2tp2140 up
ip link add link eth1 name eth1.21 type vlan id 21
ip link set eth1.21 up
ip addr add ${Local_LAN_IP} dev eth1.21
ip link add br21 type bridge
ip addr add ${Local_LAN_IP} dev br21
ip link set l2tp2140 master br21
ip link set eth1.21 master br21
ip link set br21 master TenantAB
ip link set br21 up
ip r a ${Remote_LAN_Subnet} dev l2tp2140 t 21

Right Side(l2tp server):

ip link add TenantAB type vrf table 21
ip link set TenantAB up
ip l2tp add tunnel remote ${RemoteIP} local {LocalIP} tunnel_id 4010 peer_tunnel_id 1040 encap ip
ip l2tp add session name l2tp2110 tunnel_id 4010 session_id 2110 peer_session_id 2140
ip link set l2tp2110 up
ip link add link eth1 name eth1.21 type vlan id 21
ip link set eth1.21 up
ip addr add ${Local_LAN_IP} dev eth1.21
ip link add br21 type bridge
ip addr add ${Local_LAN_IP} dev br21
ip link set l2tp2110 master br21
ip link set eth1.21 master br21
ip link set br21 master TenantAB
ip link set br21 up
ip r a ${Remote_LAN_Subnet} dev l2tp2110 t 21

Right Side(lEndPC2):

ip link add TenantAB type vrf table 21
ip link set TenantAB up
ip link add link eth1 name eth1.21 type vlan id 21
ip link set eth1.21 up
ip addr add ${Local_LAN_IP} dev eth1.21
ip link set eth1.21 master TenantAB
ip r a ${Remote_LAN_Subnet} t 21

when I'm doing ping from the EndPC1 to EndPC2:
ping ${Other_End_PC} -I eth1.21
I get ARP request in all 4 machine but there is no ping...

Please assist... I don't know what is missing.......... :o :o :roll:

Thanks for all the helpers

Post Reply