[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Static IP config



Kelley Hilborn wrote:
Okay, with the /etc/network/interfaces file looking like this:

auto lo eth0
iface lo inet loopback
iface eth0 inet static
 	address 192.168.0.101
	netmask 255.255.255.0
	gateway 192.168.0.1


This looks OK. Your card should be setup automatically upon bootup. Right after a bootup, do an "ifconfig" and make sure it shows the above stuff. You should be able to ping your "gateway" machine by IP number if it is working at this point.

And my resolv.conf looking like this:(/etc/resolv.conf didn't exist I
had to create it)

nameserver 192.168.0.1
nameserver 192.168.0.1
nameserver 68.116.216.6


Do you have your "gateway" machine setup as a DNS server for your LAN? If not, the first two entries are meaningless for this machine. Since name lookups will cycle through these in order, you are introducing an artificial delay in name lookups here If 192.168.0.1 isn't a nameserver. If this confuses you, then you probably don't have it setup as a DNS machine...

Where did you get the IP numbers for your third "nameserver"? If that is what your ISP told you, then it is ok. I would plug in one of the "real" DNS server IPs for your ISP. I did a lookup for the nameservers for pdq.net and got the following:

206.66.10.46
207.158.92.26
207.158.92.18
209.196.76.10
209.196.96.18

Nothing works at first, and I occasionally get the error message with
ifup:
/etc/network/interfaces:14: duplicate option
couldn't read interfaces file: "/etc/network/interfaces"


Recheck you /etc/network/interfaces file. The above says there is a "duplicate option" in line 14 that confuses the shell and networking is NOT be started. If you are having problems with format of the /etc/network/interfaces file or introducing typos, try installing the etherconf package and answer the questions there. It will create the correct files for you... including the /etc/resolv.conf file.

I can't ping anything at all, until I type:


This probably means the card is not getting initialized for the network.


ifconfig eth0 192.168.0.101 netmask 255.255.255.0


By doing this, you are by-passing the /etc/network/interfaces files and manually initializing the card. This tells you that the driver module is correct and the card CAN be configured for your network. This re-inforces the error message that you are getting above.

Then I can ping anything on my personal network, but nothing outside of
it.  By IP or name...


Do you have the "gateway" machine set up to provide some sort of NAT like IPMASQUERADING? If you don't, then you will not be able to "see" anything beyond your private network that you are using. Those IP numbers are not "routable" on the Internet. I suspect this is one of your main problems IF you cannot ping anything beyond the gateway machine. BTW, does the "gateway" machine connect to the Internet OK??

HTH,

-Don Spoon-



Reply to: