Hi Archana, I might have jumped to conclusions, sorry. The src,dst address of the GRE tunnel in config are the same addresses that will be in the encapsulation, i.e. the address that will be on the wire. These address need to be routable through the network between the tunnel endpoints. You can use either the addresses on the loopback or the Ethernets – the choice is yours. If you want to use the loopback addresses; Set int ip addr loop0 10.100.0.7/32 << always a /32 on a loopback, there are never any peers Set the tunnel from your loop back to the peer’s loopback Create gre tunnel src 10.100.0.7 dst 10.100.0.6 Add a route to the peer’s loop back Ip route 10.100.0.6/32 via 43.0.0.2 TenGigabitEthernet1/0/1 Bring the tunnel up Set int state gro0 up IP enable the tunnel so that it can accept IP packets; 2 ways either:
1. Make it unnumbered to the loopback Set int ip unnumbered gre0 ip loop0 1. Or give it an IP address; this subnet does not need to be routable. Set int ip addr gre0 192.168.1.0/31 Then you can point routes through the tunnel Ip route 10.10.10.0/24 via gre0 /neeale From: Archana Sampath <arch...@ezelink.com> Date: Thursday, 30 September 2021 at 15:29 To: Neale Ranns <ne...@graphiant.com>, kusumanjal...@gmail.com <kusumanjal...@gmail.com> Cc: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] VPP - GRE tunnel Hi Neale , If that is the case , Server1 (TenGigabitEthernet1/0/1 ) and server2(TenGigabitEthernet1/0/2) are connected back to back . If I assign the same ip to GRE , will packet go via GRE instead of directly connected route? Note: In my topology ,server1 and server2 are connected via private network and not via WAN. Regards, Archana From: Neale Ranns <ne...@graphiant.com> Date: Thursday, 30 September 2021 at 5:23 PM To: kusumanjal...@gmail.com <kusumanjal...@gmail.com>, Archana Sampath <arch...@ezelink.com> Cc: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] VPP - GRE tunnel Also the tunnel src,dst addresses should be 43.0.0.x /neale From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> on behalf of Kusuma DS via lists.fd.io <kusumanjali47=gmail....@lists.fd.io> Date: Thursday, 30 September 2021 at 14:25 To: Archana Sampath <arch...@ezelink.com> Cc: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] VPP - GRE tunnel 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<mailto: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<http://20.20.20.100/24> dev veth_vpp1 ip route add 0.0.0.0/0<http://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<http://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<http://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<http://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<http://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<http://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<http://10.10.10.100/24> dev veth_vpp1 ip route add 0.0.0.0/0<http://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<http://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<http://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<http://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<http://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<http://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 (#20263): https://lists.fd.io/g/vpp-dev/message/20263 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] -=-=-=-=-=-=-=-=-=-=-=-