Making a manual IP configuration 'stick' [message #39174] |
Mon, 22 March 2010 22:28 |
PhYrE
Messages: 3 Registered: November 2009
|
Junior Member |
|
|
I have the following config:
Host:
eth0: EXT.EXT.EXT.5/24
eth0:1 10.5.5.5/8
Container:
venet0 127.0.0.1
venet0:0 EXT.EXT.EXT.6/24
venet0:1 10.6.6.6/8
This worked great for all purposes except that pinging something on the 10.x network failed unless the host being pinged was also on the EXT network, as the source IP was going out as EXT.EXT.EXT.6 and hence the remote system wasn't able to return the packet.
This was solved by running the following WITHIN the container
ip route add to 10.0.0.0/8 src 10.6.6.6 dev venet0
How can I:
a) configure this so that it does it when it configures the IP automatically or chooses the 'best' interface.
b) configure it to execute this line after it brings up the interface.
c) make this setting stick, beyond putting it into rc.local so that it is easily configured, replicated, and not overwritten by operating system changes.
Any help is greatly appreciated!
-M
|
|
|