PDA

View Full Version : [ubuntu] Can't connect to internet after switching to static IP address



MountainX
March 10th, 2009, 01:41 AM
I connect through a router (that is also a DHCP server). The default setting in Ubuntu (DHCP) was working, but I need a static IP address on this machine. After making the changes suggested here (http://www.ubuntugeek.com/how-to-set-a-static-ip-address-in-ubuntu-810-intrepid-ibex.html), I can still connect to other machines on my LAN, but now I cannot connect to the Internet.


myuser@myserver:$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth1
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
myuser@myserver:$
$ sudo lshw -C network
*-network:0
description: Ethernet interface
product: 82546GB Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 4
bus info: pci@0000:0c:04.0
logical name: eth0
version: 03
serial: 11:11:11:11:33
size: 1GB/s
capacity: 1GB/s
width: 64 bits
clock: 66MHz
capabilities: pm pcix msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.20-k3-NAPI duplex=full firmware=N/A ip=192.168.1.5 latency=32 link=yes mingnt=255 module=e1000 multicast=yes port=twisted pair speed=1GB/s
*-network:1
description: Ethernet interface
product: 82546GB Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 4.1
bus info: pci@0000:0c:04.1
logical name: eth1
version: 03
serial: 11:11:11:11:22
size: 1GB/s
capacity: 1GB/s
width: 64 bits
clock: 66MHz
capabilities: pm pcix msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.20-k3-NAPI duplex=full firmware=N/A ip=192.168.1.6 latency=32 link=yes mingnt=255 module=e1000 multicast=yes port=twisted pair speed=1GB/s
*-network DISABLED
description: Ethernet interface
physical id: 2
logical name: pan0
serial: 11:11:11:11:11
capabilities: ethernet physical
configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes
$ cat /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.1

auto eth1
iface eth1 inet static
address 192.168.1.6
netmask 255.255.255.0
gateway 192.168.1.1


$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1

Anyone see the problem?

Iowan
March 11th, 2009, 02:05 AM
I guess if it works, it works... but generally, two interfaces in the same subnet causes routing problems. Out of curiosity, what is the advantage?
Another thread form several months ago suggested that static addresses in a DHCP environment sometimes had problems with DNS.
Another option to static addresses is a static lease from the router - based on MAC address(es). If the router can handle it, a static lease seems to have the advantages of both DHCP and static addresses.

MountainX
March 12th, 2009, 12:53 AM
Say my client machine wants to fetch two large video files from the file server. The file server has plenty of CPU (dual Xeon), disk subsystem (15k rpm scsi drives) and memory (8 GB) to serve the request fast. I assume the bottleneck will be the network. The file server has two GigE NICs.

Could I somehow set up my LAN so that requests for files on the file server can utilize the two network interfaces for faster throughput?

Basically, I have this hardware and I'm trying to understand how I can make use of it (mostly just for learning, but also to speed up my work).

I want to have an effective 2 Gigabit connection between the file server and one workstation, if that is possible.

punx45
March 12th, 2009, 02:44 AM
i think you need to bond your interfaces.

MountainX
March 12th, 2009, 02:54 AM
i think you need to bond your interfaces.

thanks - never heard of that before your reply. I just looked it up on google and found a how-to here (http://linuxwave.blogspot.com/2007/11/combining-multiple-network-interface.html): http://linuxwave.blogspot.com/2007/11/combining-multiple-network-interface.html

That sounds like what I want to do. :)

MountainX
March 12th, 2009, 03:00 AM
I found a better how-to here (http://www.howtoforge.com/network_bonding_ubuntu_6.10): http://www.howtoforge.com/network_bonding_ubuntu_6.10

Does anyone know how the instructions need to be modified to use them with amd64 arch?

punx45
March 12th, 2009, 06:14 PM
I found a better how-to here (http://www.howtoforge.com/network_bonding_ubuntu_6.10): http://www.howtoforge.com/network_bonding_ubuntu_6.10

Does anyone know how the instructions need to be modified to use them with amd64 arch?

my guess is instead of /etc/modprob.d/arch/i386 it will be whatever file you have in /etc/modprob.d/arch/ i have a 32 bit intel system and the only file in there was i386 so im guessing whatever yours should be should be the only file in there.

everything else looked pretty standard

also, my path was /etc/modprobe.d/arch/i386

MountainX
March 12th, 2009, 07:54 PM
Thanks for that tip.

Here's what I have.

/etc/modprobe.d/arch$ ls
x86_64
If you think everything else looks pretty standard, then I think I'll give it a try. :)