D'oh!
chris-n/jUll39koHNgV/OU4+dkA at public.gmane.org
chris-n/jUll39koHNgV/OU4+dkA at public.gmane.org
Tue Dec 11 16:13:08 UTC 2007
Lennart Sorensen writes:
> On Tue, Dec 11, 2007 at 10:11:24AM -0500, Chris Aitken wrote:
>> Chris Aitken wrote:
>>
>> <snip>
>>
>> This is getting worse. I found a site that advises how to set a static
>> ip. Unfortunately I couldn't find instructions how to set up static (for
>> local network) AND dhcp-assigned (for Internet). I should have printed
>> out my /etc/network/interfaces file but didn't - so now I don't have the
>> default to reset it to to at least get my Internet back. So, here's the
>> butchered /etc/network/interfaces file (maybe you can see what I am
>> trying to do):
>>
>> #primary network interface
>> auto eth0:1
>> iface eth0:1 inet static
>> address 192.168.0.2
>> netmask 255.255.255.0
>> network 192.168.0.0
>> broadcast 192.168.0.255
>> gateway 192.168.0.1
>>
>> #iface eth0 inet dhcp
>> address 192.168.0.225
>> netmask 255.255.255.0
>> gateway 192.168.0.1
>>
>> I guess my next step will be to look at the /etc/network/interfaces file
>> on the computer I'm on right now. It's a fedora 7 box so I nope that
>> nothing will be different.
>
> That setup looks wrong. You have essentially set it to have dhcp on
> eth0 and also have an alias that is a static IP. That doesn't work
> well. You /etc/network/interfaces should be:
>
> #primary network interface
> auto eth0
> iface eth0 inet static
> address 192.168.0.2
> netmask 255.255.255.0
> gateway 192.168.0.1
>
> And hopefully you also have something like:
> auto lo
> iface lo inet loopback
>
> That should do it all.
I'm okay now (Internet and pinging local addresses). I guess I figured it
out while you were sending this. Here is my /etc/network/interfaces file now
(same as yours only I had to add a connection for Internet):
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0 eth1
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
#iface eth0 inet dhcp
iface eth1 inet dhcp
address 192.168.0.225
netmask 255.255.255.0
gateway 192.168.0.1
I'm assuming that the cable modem will reset the Internet interface IP info
(in /etc/network/interfaces) whenever I reboot the modem or PC or whatever..
Chris
>
> --
> Len Sorensen
> --
> The Toronto Linux Users Group. Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list