Translating debian network configuration to gentoo
- by thpetrus
I just got rid off Debian on my VPS (OpenVZ) and installed Gentoo on it, however it is a plain Gentoo image without further configuration, i.e. no working network.
I'm not familiar with Debian and coulnd't figure out how to get the network set up, these are the debian network files
/etc/network/interfaces:
auto venet0
iface venet0 inet manual
up ifconfig venet0 up
up ifconfig venet0 127.0.0.2
up route add default dev venet0
down route del default dev venet0
down ifconfig venet0 down
iface venet0 inet6 manual
up ifconfig venet0 add ipv6addr/128
down ifconfig venet0 del ipv6addr/128
up route -A inet6 add default dev venet0
down route -A inet6 del default dev venet0
auto venet0:0
iface venet0:0 inet static
address external_ip
netmask 255.255.255.255
auto venet0:1
iface venet0:1 inet static
address internal_ip
netmask 255.255.255.255
Please note that external_ip, internal_ip and ipv6addr are placeholders. I copied the /etc/resolv.conf, know the gateway_ip and also have another ouput of ifconfig, if necessary.
This is what I came up with, /etc/conf.d/net:
config_venet0="127.0.0.2 netmask 255.255.255.255 brd 0.0.0.0"
config_venet0:0="external_ip netmask 255.255.255.255 brd 0.0.0.0"
route_venet0:0="default via gateway_ip"
config_venet0:1="internal_ip netmask 255.255.255.255 brd 0.0.0.0"
Broadcast IP is taken from ifconfig debian output - however it doesn't work.
A symbolic link net.venet0:0 -> net.lo in /etc/init.d/ was created and I added net.venet0:0 to the boot runlevel.