Linux does not route packets between containers.
by sara sh from LinuxQuestions.org on (#5P7GG)
Hello,
I have started two separate containers in Ubuntu. I did not use the default docker bridge but I used peer virtual interfaces with IP addresses in different subnets. The configuration is as below:
Container1: veth3 with IP address 192.168.42.2 that is peered with veth4 in Linux host with IP address 192.168.42.1
Container2: veth5 with IP address 192.168.43.2 that is peered with veth6 in Linux host with IP address 192.168.43.1
The problem is that I cannot ping container 2 from container 1 even when IP forwarding is enabled in the Linux host. I am wondering if anybody knows where is the problem and even if it possible to do it or not?
I have started two separate containers in Ubuntu. I did not use the default docker bridge but I used peer virtual interfaces with IP addresses in different subnets. The configuration is as below:
Container1: veth3 with IP address 192.168.42.2 that is peered with veth4 in Linux host with IP address 192.168.42.1
Container2: veth5 with IP address 192.168.43.2 that is peered with veth6 in Linux host with IP address 192.168.43.1
The problem is that I cannot ping container 2 from container 1 even when IP forwarding is enabled in the Linux host. I am wondering if anybody knows where is the problem and even if it possible to do it or not?