RE: routing to ping automatically via the correct network

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 > I'm still curious what your answer is to my other questions about 
what the
 >  testeth0 & testeth1 interfaces are and how they connect to the 
outside world.

  +-------------------------+     
  |          HOST           |     
  |                         |     
  |      192.168.10.20      |     
  |                         |     
  |                         |     
  |+-----------------------+|     
  ||         netns         ||     
  ||+--------+ +----------+||     
  |||  eth0  | |   eth1   |||     
  |||10.0.0.8| |172.16.1.5|||     
  ||+--------+ +----------+||     
  |+-----------------------+|     
  +-------------------------+     

The host is having some tunnels and interfaces that facilitate the 
network connections in the namespace via a macvtap as eth0/eth1. 

The reason why I have multiple networks is that for 'backend' tasks I 
only need an internal network. Internet facing tasks will mostly have 
public network connection and private network connection.

I am testing with the CO mesos. Mesos destroys the task if the 
connection with any of its networks is lost. So the first thing I need 
to realize, is make sure communication between the host and eth0 / eth1 
are ok.

To realize this I am doing this:

On the host:
ip route add 172.16.1.5/32 dev int1cnivtap                    
ip route add 10.0.0.8/32 dev tun1cnivtap

In the namespace:
ip route add 192.168.10.20 dev eth1 scope global table 81
ip rule add from all to 172.16.1.5 table 81
ip rule add from 172.16.1.5 table 81

ip route add 192.168.10.20 dev eth1 scope global table 82
ip rule add from all to 10.0.0.8 table 82
ip rule add from 10.0.0.8 table 82


> What if you move all the routes out of the custom routing table
> (81) to the main routing table (32766) inside the network namespace.

I think I already tested this. Or I at least do not know how to do 
this properly. These test should not fail.

ping -I eth0 192.168.10.20
ping -I eth1 192.168.10.20





--
Grant. . . .
unix || die





[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux