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

Re: Network troubles + ifconfig-a output



On Wed, Dec 25, 2002 at 10:23:31PM +0100, Willem-Jan Meijer wrote:
> Hello,
> 
> A friend of my has a network with 3 computers and I installed a debian
> server. The server contains 2 network cards from Sweex. They are
                                                   ^^^^^
NFC what "Sweex" is.

> recognized correctly and /etc/network/interfaces is configured too
> 
> Auto eth0
> Iface eth0 inet dhcp
> 
> Auto eth1
> 	Address 192.168.0.1
> 	Netmask 255.255.255.0
> 	Network 192.168.0.0
> 	Broadcast 192.168.0.255
> 
> But internet doesn't work

No kidding ... you're missing stanzas in your /etc/network/interfaces.

Here's that file on my router:

  $ cat /etc/network/interfaces
  # The loopback interface
  auto lo
  iface lo inet loopback

  # The first network card - cable modem
  auto eth0
  iface eth0 inet dhcp

  # Internal network
  auto eth1
  iface eth1 inet static
      address     192.168.0.1
      network     192.168.0.0
      netmask     255.255.255.0
      broadcast   192.168.0.255

  # Internal network (part deux)
  auto eth2
  iface eth2 inet static
      address     192.168.1.1
      network     192.168.1.0
      netmask     255.255.255.0
      broadcast   192.168.1.255

Note all the "iface" lines ... you only have an iface line for eth0.
Also, you'll hve to configure masquerading elsewhere, but first things
first, get IP working on the router first :-)

> When I type ping localhost all packets are lost, when I want to ping
> outside they also get lost.
> 
> The output from ifconfig -a is:
>
> Eth0
> Link ncap: ethernet hwaddr 00:02:44:52:08:b6
> Inet addr: 62.164.231.248 bcast: 62.255.255.255 mask: 255.255.254.0 UP
> broadcast running multicast ntu: 1500 metric: 1 Rx packets:6896
> errors:0 dropped:0 overruns:0 frame:0 Tx packets: 82 errors:0
> dropped:0 overruns:0 carrier:0 Collisions:0 txqueuelen: 100
> Rx bytes: 422730 (412.8 kib) tx bytes: 10972 (10.7 kib)
> Interrupt:9 base address: 0x6500

[ snip ]

>  Lo
>  Link ncap: local loopback
>  Loopback ntu: 16436 metric:1
>  Rx packets:0 errors:0 dropped:0 overruns:0 frame:0
>  Tx packets:0 errors:0 dropped:0 overruns:0 carrier:0 Collisions:0  
>  txqueuelen:0 Rx bytes:0 (0.0b) tx bytes:0 (0.0 b)

Yup. no IP address for lo.

Your eth0 claims to be UP.  The broadcast address is wrong; if that
netmask is correct the broadcast should be 62.164.231.255.  I'm not
sure how to fix that as you seem to be getting crappy info from your
ISP.

Run the command "netstat -rn", and look for the route whose
destination is "0.0.0.0"; that is the default route.  Try pinging the
gateway address listed for that route.  "arp" should tell you if your
eth0 can figure out the ARP address for the default gateway.

BTW, you should cut-and-paste the output of commands (or use "!!" in
vi); you have obviously typed them in and introduced errors.  For
example, I've never seen interface names capitalized.  "Loopback ntu:"
ought to be "LOOPBACK MTU:" (actually "UP LOOPBACK RUNNING  MTU:16436
Metric:1", but yours isn't up yet).  OTOH maybe you're running some
rogue version of net-tools or have your LANG set to some language
other than english or "C" (but then I'd expect a lot of the output of
ifconfig to look different.

-- 
Nathan Norman - Incanus Networking mailto:nnorman@incanus.net
  Just because an idea originated at "redhat" does not mean it is evil.
          -- Sean 'Shaleh' Perry



Reply to: