I have a server that I have setup to use dhcp for the main connection information and have an alias set up that my router forwards ports to.
Everytime (I think this is what is happening) dhcp renews the lease. I lose the alias ip.
This is on a Gentoo Linux box
#/etc/conf.d/net
config_eth0( "dhcp" "192.168.3.42/24" )
When I run
/etc/init.d/net.eth0 restart
I get both the dhcp assigned ip and the alias.
eth0 Link encap:Ethernet HWaddr 00:17:9a:b6:67:cc
inet addr:192.168.3.100 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::217:9aff:feb6:67cc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2974019 errors:0 dropped:0 overruns:0 frame:0
TX packets:2294036 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3110313558 (2.8 GiB) TX bytes:266296521 (253.9 MiB)
Interrupt:19 Base address:0x4000
eth0:1 Link encap:Ethernet HWaddr 00:17:9a:b6:67:cc
inet addr:192.168.3.42 Bcast:192.168.3.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:19 Base address:0x4000
after a day, I will only have eth0.
What do I have to do so that the alias stays when the dhcp gets renewed?