I thought I know quite a bit about networking and linux, but I cannot get the following to work like I want it to:
I want to have a static local ip address for my Ubuntu 5.10 (custom kernel 2.6.16-suspend2).
I have set up debian before on the same network with the same gateway/router.
Here the config I'm aiming for:
router 10.0.0.11
local static ip 10.0.0.4/8
I got dhcp enabled on the router and my box with Ubuntu 5.10 and it works fine. But I use port-forwarding for my web-server I got running and for other little things. The annoying thing is that my ip keeps changing when I reboot or similar. So, every time I boot, I have to reconfigure my router. The funny thing is, that with other Linux versions, such as Debian it works with the same configuration.
Is it maybe an issue that I have vmware installed?
Here an output of
Code:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:05:1C:01:7C:85
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2984 errors:0 dropped:0 overruns:0 frame:0
TX packets:2486 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1682309 (1.6 MiB) TX bytes:461215 (450.4 KiB)
Interrupt:11 Base address:0xb800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:471 errors:0 dropped:0 overruns:0 frame:0
TX packets:471 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:73755 (72.0 KiB) TX bytes:73755 (72.0 KiB)
vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:172.16.231.128 Bcast:172.16.231.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:418 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
inet addr:172.16.120.128 Bcast:172.16.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:436 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
and
Code:
# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.231.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
172.16.120.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
0.0.0.0 10.0.0.11 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 172.16.120.2 0.0.0.0 UG 0 0 0 vmnet8
when it's working.
and
Code:
eth0 Link encap:Ethernet HWaddr 00:05:1C:01:7C:85
inet addr:10.0.0.4 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3008 errors:0 dropped:0 overruns:0 frame:0
TX packets:2498 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1685308 (1.6 MiB) TX bytes:462483 (451.6 KiB)
Interrupt:11 Base address:0xb800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:497 errors:0 dropped:0 overruns:0 frame:0
TX packets:497 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:80019 (78.1 KiB) TX bytes:80019 (78.1 KiB)
vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:172.16.231.128 Bcast:172.16.231.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19 errors:0 dropped:0 overruns:0 frame:0
TX packets:420 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
inet addr:172.16.120.128 Bcast:172.16.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19 errors:0 dropped:0 overruns:0 frame:0
TX packets:459 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.231.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
172.16.120.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
0.0.0.0 10.0.0.11 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 172.16.120.2 0.0.0.0 UG 0 0 0 vmnet8
when it's not working
I think I have to let the vmnet1 and vmnet8 settings alone, otherwise networking wont work in the bridged networking of my virtual machines.
My virtual machines have ip addresses
10.0.0.100
10.0.0.101
...
and they all work fine ('ping -c 1 google.com' gives ip etc). Windows, Linux, all work.
I used http://howtoforge.com/perfect_setup_debian_sarge_p3 as a skeleton for my setup on the Ubuntu machine, but am never successful in pinging google when I set a static ip.
Also, I did put my correct nameservers into /etc/resolv.conf .
What am I missing? I thought Ubuntu is Debian based.
Bookmarks