Trouble with 2.1.4 & bridged networking gateway problem
Posted: 10. Apr 2009, 20:29
Hi guys,
I've been able to get a bridged networking setup on my local network testbed, and it's fine, however when I try to get this running on my remote dedicated server (hosted), I have configuration problems that are a little beyond me, and they (the hosting company) do not provide "official support" for VM environments, though I'm sure it's possible.
I'm hosting with VirtualBox 2.1.4 OSE on Ubuntu 9.04, and trying to configure a debian (lenny) guest. Using NAT configuration, everything's good, but obviously that doesn't work for what I want (web server in VM guest, etc).
Basically, it doesn't seem to have network access because when connecting to the apt repository it fails.
My provider has given me the following network configuration (from /etc/network/interfaces). The oddball thing to me is that I have a primary IP, and my "secondary" IPs are not sequential with the first/primary one, so the gateway doesn't work for them. At least that's my current understanding.
Hosting company's provided network configuration (/etc/network/interfaces):
The resulting ifconfig:
I have apache configured on this host machine, and I confirmed that all these IP addresses do load the default apache page from an external location. So they "work".
Now I found a "helpful" forum post by I believe one of their mods (hosting company), that explains how to get things working in VMWare with bridged networking on their systems, so I took a shot at some of the things they suggest.
I'll quote their post here:
You'll notice that they already configured my eth0:0 as per their forum post's suggestions (along with the rest of the secondary IPs as well). As I pointed out, the gateway they gave me is for my primary IP, and won't work with the secondary IPs. So I think they want me to configure the first of the secondary IPs as some kind of gateway. So I proceeded to do the forwarding as per their suggestions:
I don't know how to verify that these settings are "working". Just in case, I rebooted the computer to ensure they took hold.
Now let's go through my VM configuration. There's a bunch of screenshots to walk you through what I've done. I hope that by documenting this, somebody might be able to help.
First I configure VirtualBox to use eth0 and bridged networking. I'm selecting "eth0" in VirtualBox configuration when in bridging mode, not the odd "virbr0" that appears in VirtulBox's list (I tried with it in one of my several unsuccessful attempts though, and no dice).

Then it fails DHCP as expected, and I enter a manual IP address (I use the second 'additional' IP address as per the forum post):

Then I enter the netmask provided by my hosting company (255.255.255.248):

Then I enter the gateway as indicated by the forum post, using the IP bound to eth0:0 (174.142.56.249):

Then it asks for DNS. As for the DNS server selection in my debian guest, I wasn't sure what to put in. It came up with a default of the gateway IP address. I checked by /etc/resolv.conf file and found the following values (I assume configured by my hosting company at setup time):
In this case, with my host being the "gateway" I believe, I'm not sure if that default applies. I decided to keep it as the first entry, and used the first of the name servers my host uses above. Maybe there's a mistake here.

My first bad sign: the next step is to get the time server time, and this took much longer than "usual" which to me is a sign that networking is not working right.
After this, I partitioned the disks, and waited while it "installed the base system". Then typed in my username and passwords as requested.
The next step is the real problem. I selected a mirror for apt, then waited a long time stuck at 37% ("scanning the mirror").

Then, horrors, I get the red screen of death telling me that apt cannot connect:

I tried another mirror, but the same thing happens. I'm sure something's wrong with the networking.
I have no idea what else to do. Can anybody help? I've done my best to document my situation.
Thanks,
Mal.
I've been able to get a bridged networking setup on my local network testbed, and it's fine, however when I try to get this running on my remote dedicated server (hosted), I have configuration problems that are a little beyond me, and they (the hosting company) do not provide "official support" for VM environments, though I'm sure it's possible.
I'm hosting with VirtualBox 2.1.4 OSE on Ubuntu 9.04, and trying to configure a debian (lenny) guest. Using NAT configuration, everything's good, but obviously that doesn't work for what I want (web server in VM guest, etc).
Basically, it doesn't seem to have network access because when connecting to the apt repository it fails.
My provider has given me the following network configuration (from /etc/network/interfaces). The oddball thing to me is that I have a primary IP, and my "secondary" IPs are not sequential with the first/primary one, so the gateway doesn't work for them. At least that's my current understanding.
Hosting company's provided network configuration (/etc/network/interfaces):
Code: Select all
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 174.142.53.123
netmask 255.255.255.224
gateway 174.142.53.97
auto eth0:0
iface eth0:0 inet static
address 174.142.56.249
netmask 255.255.255.248
auto eth0:1
iface eth0:1 inet static
address 174.142.56.250
netmask 255.255.255.248
auto eth0:2
iface eth0:2 inet static
address 174.142.56.251
netmask 255.255.255.248
auto eth0:3
iface eth0:3 inet static
address 174.142.56.252
netmask 255.255.255.248
auto eth0:4
iface eth0:4 inet static
address 174.142.56.253
netmask 255.255.255.248
auto eth0:5
iface eth0:5 inet static
address 174.142.56.254
netmask 255.255.255.248
Code: Select all
eth0 Link encap:Ethernet HWaddr 00:1b:21:32:8f:b3
inet addr:174.142.53.123 Bcast:174.142.53.127 Mask:255.255.255.224
inet6 addr: fe80::21b:21ff:fe32:8fb3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:111 errors:0 dropped:0 overruns:0 frame:0
TX packets:115 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:10612 (10.6 KB) TX bytes:12816 (12.8 KB)
eth0:0 Link encap:Ethernet HWaddr 00:1b:21:32:8f:b3
inet addr:174.142.56.249 Bcast:174.142.56.255 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:1 Link encap:Ethernet HWaddr 00:1b:21:32:8f:b3
inet addr:174.142.56.250 Bcast:174.142.56.255 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:2 Link encap:Ethernet HWaddr 00:1b:21:32:8f:b3
inet addr:174.142.56.251 Bcast:174.142.56.255 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:3 Link encap:Ethernet HWaddr 00:1b:21:32:8f:b3
inet addr:174.142.56.252 Bcast:174.142.56.255 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:4 Link encap:Ethernet HWaddr 00:1b:21:32:8f:b3
inet addr:174.142.56.253 Bcast:174.142.56.255 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:5 Link encap:Ethernet HWaddr 00:1b:21:32:8f:b3
inet addr:174.142.56.254 Bcast:174.142.56.255 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:208 (208.0 B) TX bytes:208 (208.0 B)
Now I found a "helpful" forum post by I believe one of their mods (hosting company), that explains how to get things working in VMWare with bridged networking on their systems, so I took a shot at some of the things they suggest.
I'll quote their post here:
Code: Select all
The problem
Additional IPs at iWeb are not provided with an additional gateway so customers using VMWare or other virtualization tools might be wondering how they can use the additional IPs to create new Guest OS or Virtual Machines. It can be done by configuring VMWare to bridge connection to eth0.
1. Configure your first additional IP XX.XX.XX.1 as a secondary IP on eth0:0
2. Enable IP forwarding to route VM traffic (IP forwarding can be enabled by adding net.ipv4.ip_forward = 1 to /etc/sysctl.conf)
3. In VMWare make sure that your VM uses the bridge connection to eth0.
4. Configure your VM with one of your remaining 5 additional IPs.
5. The netmask is 255.255.255.248 (If you have been provded with 6 IPs)
6. The gateway is XX.XX.XX.1
Example with actual IPs:
Primary Host IP:
72.55.144.123
Secondary IPs:
72.55.155.169
72.55.155.170
72.55.155.171
72.55.155.172
72.55.155.173
72.55.155.174
1. Configure the ip 72.55.155.169 as a secondary IP on eth0:0
2. Enable IP forwarding to route VM traffic
3. Make sure that your VM uses the bridge connection to eth0
4. Configure your VM with one of the available IPs (.170, .171, .172, .173 or .174)
4. Use 255.255.255.248 as the Netmask.
5. Use 72.55.155.169 as the gateway.
Code: Select all
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
Now let's go through my VM configuration. There's a bunch of screenshots to walk you through what I've done. I hope that by documenting this, somebody might be able to help.
First I configure VirtualBox to use eth0 and bridged networking. I'm selecting "eth0" in VirtualBox configuration when in bridging mode, not the odd "virbr0" that appears in VirtulBox's list (I tried with it in one of my several unsuccessful attempts though, and no dice).

Then it fails DHCP as expected, and I enter a manual IP address (I use the second 'additional' IP address as per the forum post):

Then I enter the netmask provided by my hosting company (255.255.255.248):

Then I enter the gateway as indicated by the forum post, using the IP bound to eth0:0 (174.142.56.249):

Then it asks for DNS. As for the DNS server selection in my debian guest, I wasn't sure what to put in. It came up with a default of the gateway IP address. I checked by /etc/resolv.conf file and found the following values (I assume configured by my hosting company at setup time):
Code: Select all
search privatedns.com
nameserver 209.172.41.200
nameserver 209.172.41.202

My first bad sign: the next step is to get the time server time, and this took much longer than "usual" which to me is a sign that networking is not working right.
After this, I partitioned the disks, and waited while it "installed the base system". Then typed in my username and passwords as requested.
The next step is the real problem. I selected a mirror for apt, then waited a long time stuck at 37% ("scanning the mirror").

Then, horrors, I get the red screen of death telling me that apt cannot connect:

I tried another mirror, but the same thing happens. I'm sure something's wrong with the networking.
I have no idea what else to do. Can anybody help? I've done my best to document my situation.
Thanks,
Mal.