3

I have the following setup:

  • A network namespace, ns1
  • A pair of virtual interfaces, ns_ext1 and ns_int1. ns_ext exists in the global namespace, and ns_int1 exists in ns1.
  • A GRE device, gre1, which exists in ns1.
  • None of these devices are assigned IP addresses.
  • The routing table in ns1 is as follows
    • 10.0.2.0/24 -> gre1
    • 0.0.0.0/0 -> ns_int1
  • The routing table in the global namespace includes:
    • 10.0.2.0/24 -> ns_ext1

When I try to ping 10.0.2.1 from the global namespace, which is an IP address that exists on the other end of the GRE tunnel, I get odd behavior. The traffic is forwarded to ns_ext1. However, in ns1, ns_int1 isn't forwarding this traffic to gre1, as the routing table says it should. Instead, it's ARP'ing for 10.0.2.1. My suspicion is that, by specifying the device ns_ext as the next hop for the 10.0.2.0/24 subnet in the global routing table, I've made the kernel think that the subnet is directly connected to ns_ext1. Is there any way I can get it to just forward through that interface instead of ARP'ing?

joshlf
  • 119
  • 6
  • 1
    Are you using `iproute2`, right? Can you provide the result of the commands `ip route show table all` and `ip tunnel show`? – fgbreel Aug 22 '15 at 02:23
  • What happens when you try to ping `10.0.2.1` from inside `ns1`? Which device are you seeing ARP packets on? How did you configure the GRE tunnel? – kasperd Aug 23 '15 at 19:29

0 Answers0