Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
4  
So, you went from one distro you don't understand to another distro you don't understand. Have you considered perhaps using a distro you do understand? –  womble Mar 31 '12 at 12:29
1  
You are hell of a nice guy. –  thpetrus Mar 31 '12 at 12:48
    
Sometimes honesty has its purpose. He's right (especially with your Gentoo choice) –  gparent Mar 31 '12 at 20:39

1 Answer 1

up vote 0 down vote accepted

So, if you want to get the network with a buyvm/frantech VPS and the Sabayon testing image working, here is how you do it:

  1. copy the /etc/resolv.conf from debian/whatever standard OS is installed and working
  2. /etc/conf.d/net:

    config_venet0="127.0.0.2/32 external_ip/32 internal_ip/32 ipv6addr/128" routes_venet0="default via gateway_ip" modules="iproute2"

  3. ln -s /etc/init.d/net.lo /etc/init.d/net.venet0
  4. emerge -n iproute2
  5. rc-update add net.venet0 default
Don't forget to start sshd and everything should be working. The resolf.conf is somehow deleted every boot (this must be the hosters doing).

While Debian network configuration supports the old ifconfig method of alias IPs, you don't need that on newer systems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.