Re: reconfigure broken network? (kinda urgent)
On Mon, 2003-06-23 at 13:42, Matt Price wrote:
> Hi everyone,
>
> In an effort to change form a dynamic to a staticIP configuration, I
> seem to have partially broken my network setup. Here's what I did:
>
> -- added an extra line to /etc/hosts:
> 192.16.8.2.199 matts-mac localhost
This is an invalid ip address. It should be 4 octets, eg 192.168.2.199.
I've a feeling localhost should always be 127.0.0.1 (it has been on
every system I ever looked after), maybe someone can verify.
If you are using the static config as below your /etc/hosts file should
look like this:
127.0.0.1 localhost
192.168.2.199 matts-mac
>
> -- changed the devinition of eth0 in /etc/networking/interfaces from
>
> auto eth0
> iface eth0 inet dhcp
>
> to
>
> # replace dhcpwith static
> # auto eth0
> # iface eth0 inet static
> # address 192.168.2.199
> # netmask 255.255.255.0
> # broadcast 192.168.2.255
> # gateway 192.168.2.1
>
This looks ok to me.
> as you can see, I've since commented it out.
>
> At this point my interface was broken, and although I tried returning
> the files to their pristie state and rebooting, I didn't have much
rebooting generally doesn't change much on a Linux/Unix box as it uses
the files you have edited.
> luck. Then (no doubt compounding the problem) I ran dpkg-reconfigure
> on any package that looked like it might help revert me to my original
> setup, like ifupdown, inetd, net-tools, network-base. In so doing I
> worry I might have screwed things up further... and after I returned
> the files I'd edited by hand to their original state, things were
> still broken.
>
> the situation now is the following:
>
> - on boot, any network relateddaemon takes forever to start up before
> some connection times out. But the system boots nonetheless. - ping
It will boot, just without network support.
<snip>
/sbin/ifconfig will tell you what interfaces are up (should be in your
path if you are root, but not as a normal user -- unless you put /sbin
in you path :-)
Make the changes suggested above and then the following:
ifdown --all
ifup --all
This will take the interfaces down and then bring them back up again,
then type ifconfig to check that the interfaces are up.
I am assuming that the kernel supports the nic or you have the correct
modules loaded (lsmod). Have you changed the kernel?
rgh
>
> meanwhile, lots of outgoing connections still seem to work. For
> instance, I can browse the web and make ssh connections. However, I
> can't seem to reach my computer even from outside (can't ssh to it,
> for instance).
>
> so, 2 questions:
>
> -- WHAT'S WRONG WITH MY SYSTEM?
>
> and
>
> -- HOW DO I FIX IT?
>
> the latter is more pressing than the former... I was hoping it would
> be possible to reduplicate the "configure your system" step from the
> debian install process, but I couldn't figure out whether that's
> possible.
>
> Anyway, thanks again, as usual, for the help!
>
> matt
--
"It is possible to make things of great complexity out of things
that are very simple. There is no conservation of simplicity"
-- Stephen Wolfram
Richard Heycock <rgh@roughage.com.au>
tel : 0410 646 369
key fingerprint : 909D CBFA C669 AC2F A937 AFA4 661B 9D21 EAAB 4291
Reply to: