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

Re: /etc/network/interfaces not strictly correct?



On Tue, Jun 05, 2001 at 03:38:27PM -0400, Peter S Galbraith wrote:
> 
> I rebooted woody after an uptime of 48 days to find my network
> setup incomplete:
> 
> $ ping www.debian.org
> PING www.debian.org (198.186.203.20): 56 data bytes
> ping: sendto: Network is unreachable
> ping: wrote www.debian.org 64 chars, ret=-1
> 
> Here's my /etc/network/interfaces file:
> 
> auto lo
> iface lo inet loopback
> auto eth0
> iface eth0 inet static 
>   address 142.130.48.235
>   netmask 255.255.252.0
> 
> Anything wrong with that?

Here's mine ..

# interfaces to bring up at boot
auto lo eth0

# We always want the loopback interface.

iface lo inet loopback

# fast ethernet
iface eth0 inet static
     address 192.168.112.27
     network 192.168.112.0
     netmask 255.255.255.0
     broadcast 192.168.112.255
     gateway 192.168.112.1

The lack of network and broadcast lines should be ok though.

> I couldn't ping past my gateway.

That's cos you have no gateway line in your config :)

> A look at `route` shows:
> 
> $ route
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> localnet        *               255.255.252.0   U     0      0        0 eth0
> 
> So I manually added a default route:
> 
> $ sudo route add default gw 142.130.48.1
> $ route
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> localnet        *               255.255.252.0   U     0      0        0 eth0
> default         142.130.48.1    0.0.0.0         UG    0      0        0 eth0
> 
> Now the web works, but strangely ping still fails:
> 
> $ ping www.debian.org
> PING www.debian.org (198.186.203.20): 56 data bytes
> [C-c]
> --- www.debian.org ping statistics ---
> 3 packets transmitted, 0 packets received, 100% packet loss

nnorman@canaris:~/sandbox/src/precert $ route   
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref Use Iface
192.168.112.0   *               255.255.255.0   U     0      0     0 eth0
default         netscreen       0.0.0.0         UG    0      0     0 eth0

Weird.

Try "/etc/init.d/networking stop && /etc/init.d/networking start"
after adding a gateway line.

-- 
Nathan Norman - Staff Engineer | A good plan today is better
Micromuse Ltd.                 | than a perfect plan tomorrow.
mailto:nnorman@micromuse.com   |   -- Patton

Attachment: pgpHqD16djkYd.pgp
Description: PGP signature


Reply to: