m_sandwich n00b
Joined: 12 Aug 2008 Posts: 11 Location: Seattle, WA
|
Posted: Fri Jan 16, 2009 1:19 am Post subject: adding another ip address or interface when using iproute2 |
|
|
I have two internal ip addresses, both of which run off the same interface (eth0), and an external mail server that uses an ip on eth1.
I'm using davical (though I'm having extreme frustration with intermittent errors and problems.. but that's for another post). We serve our email off the internal address of 192.168.1.3. Currently, I have davical using a subdirectory of the mail vhost. Because I've read that davical is best off with its own vhost, I'd like to add the interface eth2 to the mix, with an ip address of 192.168.1.5 (you can see my failed attempt in the commented out portion at the bottom of my conf.d/net file listed below). How would I change the net file to accommodate this? My failed attempt did something bad, but I can't remember what it was... I think it blocked one of the other ip addresses or something.
I just can't seem to grasp routing, and I've been banging my head against the wall with this. It may be super simple for some of you... in which case, my thanks!
If yo need any other info, just let me know.
thanks again.
/etc/conf.d/net:
(I've used a fictional range of 123.456.789.224/29 in place of my actual ip block)
Code: |
modules=( "iproute2" )
dns_domain_lo="mycompany.com"
dns_servers_lo="192.168.1.1 xxx.xxx.xxx.27 xxx.xxx.xxx.28"
config_eth0=(
"192.168.1.4/24"
"192.168.1.3/24"
)
routes_eth0=(
"default via 192.168.1.1"
"192.168.1.0/24 src 192.168.1.4 table eth0"
"default via 192.168.1.1 dev eth0 table eth0"
"192.168.1.0/24 dev eth0 table eth1"
"127.0.0.0/8 dev lo table eth0"
)
rules_eth0=( "from 192.168.1.4 table eth0" )
config_eth1=( "123.456.789.228/29" )
routes_eth1=(
"123.456.789.224/29 src 123.456.789.228 table eth1"
"default via 123.456.789.225 dev eth1 table eth1"
"123.456.789.224/29 dev eth1 table eth0"
"127.0.0.0/8 dev lo table eth1" )
rules_eth1=( "from 123.456.789.228 table eth1" )
#config_eth2=( "192.168.1.5/24" )
#routes_eth2=(
# "192.168.1.0/24 src 192.168.1.5 table eth2"
# "default via 192.168.1.1 dev eth2 table eth2"
# "192.168.1.0/24 dev eth2 table eth2"
# "127.0.0.0/8 dev lo table eth2"
#)
#rules_eth2=( "from 192.168.1.5 table eth2" )
# I snipped the subroutine definitions below
|
|
|