Hi Archana, Instead of creating loopback, assign the ip address to gre tunnel interface and try it out.
If this doesn't work, please send the show ip fib output for more details. Thank you, Kusuma On Thu, 30 Sep, 2021, 4:52 PM Archana Sampath, <arch...@ezelink.com> wrote: > Hi Team, > > > > I am trying to test GRE tunnel on VPP. > > > > SETUP is > > > > Host 1 --------------------Sever1 ------------------server2 > -------------------host2 > > [20.0.0.x/24] [43.0.0.x/24] > [10.0.0.x/24] > > > > > > GRE TUNNEL is configured between Server1 and Server2 . > > > > Router 1: > > ======= > > #create namespaces > > ip netns add vpp1 > > > > # create and configure 1st veth pair > > ip link add name veth_vpp1 type veth peer name vpp1 > > ip link set dev vpp1 up > > ip link set dev veth_vpp1 up netns vpp1 > > > > ip netns exec vpp1 \ > > bash -c " > > ip link set dev lo up > > ip addr add 20.20.20.100/24 dev veth_vpp1 > > ip route add 0.0.0.0/0 via 20.20.20.1 > > " > > > > VPP_SIDE CONFIGS > > =============== > > vppctl -s /run/vpp/cli-vpp1.sock create host-interface name vpp1 > > vppctl -s /run/vpp/cli-vpp1.sock set int state host-vpp1 up > > vppctl -s /run/vpp/cli-vpp1.sock set int ip address host-vpp1 > 20.20.20.1/24 > > vppctl -s /run/vpp/cli-vpp1.sock ping 20.20.20.100 > > vppctl -s /run/vpp/cli-vpp1.sock show ip neighbors > > vppctl -s /run/vpp/cli-vpp1.sock set int state TenGigabitEthernet1/0/1 up > > vppctl -s /run/vpp/cli-vpp1.sock set int ip address > TenGigabitEthernet1/0/1 43.0.0.1/24 > > vppctl -s /run/vpp/cli-vpp1.sock show interface address > > vppctl -s /run/vpp/cli-vpp1.sock loopback create mac 1a:ab:3c:4d:5e:7f > > vppctl -s /run/vpp/cli-vpp1.sock set interface ip address loop0 > 10.100.0.7/31 > > vppctl -s /run/vpp/cli-vpp1.sock set int mtu 1360 loop0 > > vppctl -s /run/vpp/cli-vpp1.sock create gre tunnel src 10.100.0.7 dst > 10.100.0.6 > > vppctl -s /run/vpp/cli-vpp1.sock set int state gre0 up > > vppctl -s /run/vpp/cli-vpp1.sock ip route add 10.10.10.0/24 via 10.100.0.6 > > vppctl -s /run/vpp/cli-vpp1.sock ip route add 10.100.0.0/24 via 43.0.0.2 > > > > > > On server 2: > > ========== > > > > > > ip netns del vpp1 > > #create namespaces > > ip netns add vpp1 > > > > # create and configure 1st veth pair > > ip link add name veth_vpp1 type veth peer name vpp1 > > ip link set dev vpp1 up > > ip link set dev veth_vpp1 up netns vpp1 > > > > ip netns exec vpp1 \ > > bash -c " > > ip link set dev lo up > > ip addr add 10.10.10.100/24 dev veth_vpp1 > > ip route add 0.0.0.0/0 via 10.10.10.1 > > " > > > > VPP_SIDE CONFIGS > > =============== > > vppctl -s /run/vpp/cli-vpp1.sock create host-interface name vpp1 > > vppctl -s /run/vpp/cli-vpp1.sock set int state host-vpp1 up > > vppctl -s /run/vpp/cli-vpp1.sock set int ip address host-vpp1 > 10.10.10.1/24 > > vppctl -s /run/vpp/cli-vpp1.sock ping 10.10.10.100 > > vppctl -s /run/vpp/cli-vpp1.sock show ip neighbors > > vppctl -s /run/vpp/cli-vpp1.sock set int state TenGigabitEthernet1/0/1 up > > vppctl -s /run/vpp/cli-vpp1.sock set int ip address > TenGigabitEthernet1/0/1 43.0.0.2/24 > > vppctl -s /run/vpp/cli-vpp1.sock show interface address > > vppctl -s /run/vpp/cli-vpp1.sock loopback create mac 1a:2b:3c:4d:5e:7f > > vppctl -s /run/vpp/cli-vpp1.sock set interface ip address loop0 > 10.100.0.6/31 > > vppctl -s /run/vpp/cli-vpp1.sock set int mtu 1360 loop0 > > vppctl -s /run/vpp/cli-vpp1.sock create gre tunnel src 10.100.0.6 dst > 10.100.0.7 > > vppctl -s /run/vpp/cli-vpp1.sock set int state gre0 up > > vppctl -s /run/vpp/cli-vpp1.sock ip route add 20.20.20.0/24 via 10.100.0.7 > > vppctl -s /run/vpp/cli-vpp1.sock ip route add 10.100.0.0/24 via 43.0.0.1 > > > > > > Kindly let me know if I am doing it correctly. > > From FIB entries in server1 and server2, next hop is not Tunnel . > > > > Regards, > > Archana > > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20238): https://lists.fd.io/g/vpp-dev/message/20238 Mute This Topic: https://lists.fd.io/mt/85971079/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-