Talk:Multiple IPs
From LinodeWiki
I figured I would contribute something... I need to learn wiki syntax, so if anyone wants to spiffy it up, go ahead... --Fallstorm84 01:02, 14 Jan 2005 (EST)
A Request For Comments on configuring your Linode with multiple IPs assigned on different subnets is made. An anonymous comment implied that the recommendations were "not necessary" and "Linux could figure it out."
In my experience, now four or five years old, differs. My Linode has two IPs on on 70, and another on 65. A subnet mask of 24 bits shows that Linode has 254 host on that network. The IPs are not on the same network, gateways can not be the same. As I understand it. Discuss. My near 2 year uptime of my linode also shows my configuration stable and reliable. --Javafueled 09:41, 12 Feb 2010 (EST)
- Phil Paradis (author of the Linode Library article about this) says that you do not need two gateways, and that this is why the example in the library article uses IPs from different /24s (12.34.56.78 and 34.56.78.90). (Reference: IRC) --Mnordhoff 06:14, 7 March 2010 (UTC)
Hello, while reading the article, I couldn't but needing to mention you a way to create static route and gateway for multiple IPs & interfaces at startup for redhat & cie system : using the file /etc/sysconfig/network-script/route-ethx
Define a default gateway on the first line. This is only required if the default gateway is not set via DHCP:
default X.X.X.X dev ethX
Define a static route. Each line is parsed as an individual route:
X.X.X.X/X via X.X.X.X dev ethX
the doc is here centos 5.1 doc I've deployed this solution and it works as expected.
thomas ( bouktin -_AT_- gmail -_DOT_- com )
I added a note about a new IP requiring a reboot to be routed properly. I figured it was worded clearly enough, that everyone would know a reboot is required no matter what distro you're using. -WormFood
