LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Cannot Network AT ALL On Mandrake 9.1 (https://www.linuxquestions.org/questions/linux-networking-3/cannot-network-at-all-on-mandrake-9-1-a-114371/)

johnleemk 11-10-2003 06:05 AM

Cannot Network AT ALL On Mandrake 9.1
 
I am a first-time user of Linux, running Mandrake 9.1 on my PC(dual-booting with Windows). I have outlined my troubles in this thread. Nothing works at all, and I am seriously considering installing a different distro; however, I do not want to waste the money I spent buying the CDs, and I really hope somebody can help me resolve this. Thank you.

johnleemk 11-10-2003 06:20 AM

This is my ethernet card(eth0). This is my router.

Patrick Bulteel 11-10-2003 11:28 AM

I read the previous thread and I saw what hardware you've got.

I'll see if I can help you...

I was curious what ip address you have in Windows. Also what the output of the route command in windows (I thought it was route -rn in 2k - it looks like it's route print in XP)

And from the sound of it, you can browse the network in windows without any issue. I'll go back to the previous thread and grab as much info as I can from there and we'll see if we can figure this one out.

johnleemk 11-11-2003 12:21 AM

My IP address in Windows is 192.168.1.150(assigned by DHCP).

route -print outputs:
Code:

C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x10003 ...00 08 a1 1b 67 b5 ...... CNet PRO200 PCI Fast Ethernet Adapter - Pack
et Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway      Interface  Metric
          0.0.0.0          0.0.0.0      192.168.1.1  192.168.1.212      20
        127.0.0.0        255.0.0.0        127.0.0.1      127.0.0.1      1
      192.168.1.0    255.255.255.0    192.168.1.212  192.168.1.212      20
    192.168.1.212  255.255.255.255        127.0.0.1      127.0.0.1      20
    192.168.1.255  255.255.255.255    192.168.1.212  192.168.1.212      20
        224.0.0.0        240.0.0.0    192.168.1.212  192.168.1.212      20
  255.255.255.255  255.255.255.255    192.168.1.212  192.168.1.212      1
Default Gateway:      192.168.1.1
===========================================================================
Persistent Routes:
  None

Interestingly, Linux identifies my ethernet card as this. Windows identified the card correctly, but prepended the word Davicom before the rest of the name in AIDA32(a program to identify and benchmark one's hardware, like Sandra SiSoft). Obviously the Davicom card is supported, and CNet claims my real card supports Linux as well, but CNet only offers Windows drivers for download. I found a driver for download here, but oddly enough, the source requires registration before downloading.

johnleemk 11-11-2003 01:46 AM

Ah, I downloaded it, and apparently, my card and the Davicom 9102 cards use the same driver on Linux. False lead. :(

johnleemk 11-11-2003 11:56 PM

Can anyone else help me? I'm soooo desperate! :(

johnleemk 11-12-2003 09:18 AM

*sighs*

Patrick Bulteel 11-13-2003 02:56 PM

Ok, so to recap what's happened so far (sorry for delay in getting back to you - lots of work) you've disabled the firewall successfully. You've used DHCP and set the ip address (hardcoded it) yourself.

The fact that you CAN get an ip address via DHCP sounds like you can communicate with the router.

You say you can't ping the router. What about traceroute? Have you tried a packet sniffer and seeing what happens there?

Type tcpdump -i <eth-interface> and see what happens. Try to ping the router in another console. Ping that machine from another one on your network. BTW to use tcpdump you need root access. Also try pinging the router forcing the interface.

ping <router-ip> -I <eth-interface>

Note the difference in the -i and -I for each one. With tcpdump you should be able to see something happening.

Let me know what you see.

johnleemk 11-14-2003 06:50 AM

Actually, no, "ifconfig eth0" when using DHCP doesn't output any IP address at all.

How would one go about tracing routes(I know it's tracert in Windows)? I don't know of any packet sniffers for Linux.

Even when logged in as root using su, I am told tcpdump is an invalid command.

I still get destination unreachable when pinging the router in that manner. I haven't tried it under DHCP, though.

DogMeat482 11-14-2003 07:29 AM

Don't feel alone, John. I've got very similar problems. Dual-booting 98/nix, nix doesn't wanna talk to my XP machine. Everything else works ok. My ifconfig looks just like yours, except my machines are .100 and .101, using a wired Linksys router. HOW-TO's are kinda useless for that setup. If we used a PC as a router, we might have better luck, but I'm not getting rid of my router.

If I find out anything, or get it working....I'll let you know.

Patrick Bulteel 11-14-2003 03:59 PM

type:
traceroute <ip>

tcpdump might not be installed. Install it from the Mandrake CDs. It'll be great help. tcpdump is a packet sniffer. You can also try ethereal or lots of others, but tcpdump is the simplest and it'll be good enough to debug this.

What's the ifconfig -a output when you use DHCP? Do you get an error saying that it failed to get the lease? Try pinging it when you have DHCP enabled. You might even try using a different dhcp client since sometimes one works but not another one.

pump and dhclient are the two that come to mind.

other things we know is that there isn't a hardware problem because it works in windows without changing anything.

I must admit it's hard to debug with this type of delay.. trying thing one day later. =)

Now lets go back to hardware. Do you see the leds on the back of the card light up when you try to ping? From the picture I can't see if it has more than one led, one to tell you you're connected and another to tell you if there's activity. Can you see if anything flashes while you try to ping?

Try relisting the route in linux type "route" or "netstat -rn". I find the entry 169.254.0.0 to be a problem, but it's what it gets when it cannot get an IP address. BTW, try doing ifdown eth0 and then ifup eth0. Also, check the /var/log/messages file for any error messages that it might be spitting out that you don't see.

I'll check back later.

/bin/bash 11-14-2003 04:28 PM

Could you post these files:

/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0

They should probably look something like this:

cat /etc/sysconfig/network
HOSTNAME=spongebob
NETWORKING=yes
GATEWAY=192.168.1.1
GATEWAYDEV=eth0

cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes

If you change something in those scripts you can test it out by doing this:

service network restart

johnleemk 11-15-2003 01:03 AM

I'll try to do those things, guys.

The router uses the same LEDs to indicated activity; they are lit when a connection is detected, but isn't active; blank when there is no connection; and flash when there is activity.

johnleemk 11-15-2003 02:28 AM

When I do traceroute, it just outputs my static IP(192.168.1.4) three times, since I did that before setting my computer to use DCHP.

The following is the output of tcpdump -i when using a static IP and then pinging the router:
Code:

tcpdump -i eth0
tcpdump: listening on eth0
16:02:46.921107 John.who > 192.168.1.255.who: udp 108 (DF)
16:05:36.089432 NetBeui Packet
16:05:46.931106 John.who > 192.168.1.255.who: udp 132 (DF)
16:05:58.207485 arp who-has 192.168.1.1 tell John
16:05:59.200212 arp who-has 192.168.1.1 tell John
16:06:00.200209 arp who-has 192.168.1.1 tell John
16:06:01.209394 arp who-has 192.168.1.1 tell John
16:06:02.200210 arp who-has 192.168.1.1 tell John
16:06:03.200214 arp who-has 192.168.1.1 tell John
16:06:04.230495 arp who-has 192.168.1.1 tell John
16:06:05.230223 arp who-has 192.168.1.1 tell John
16:06:06.230218 arp who-has 192.168.1.1 tell John
16:06:07.231529 arp who-has 192.168.1.1 tell John
16:06:08.230224 arp who-has 192.168.1.1 tell John
16:06:09.230222 arp who-has 192.168.1.1 tell John
16:06:10.231515 arp who-has 192.168.1.1 tell John
16:06:11.230223 arp who-has 192.168.1.1 tell John
16:06:12.230224 arp who-has 192.168.1.1 tell John
16:06:13.230747 arp who-has 192.168.1.1 tell John
16:06:14.230213 arp who-has 192.168.1.1 tell John
16:06:15.230222 arp who-has 192.168.1.1 tell John
16:06:16.230844 arp who-has 192.168.1.1 tell John
16:06:16.880534 John.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138) (DF)
16:06:16.880602 John.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138) (DF)
16:06:17.230226 arp who-has 192.168.1.1 tell John
16:06:18.230221 arp who-has 192.168.1.1 tell John
16:06:49.949012 192.168.1.156.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138)
16:06:49.951027 arp who-has 192.168.1.1 tell John
16:06:50.950208 arp who-has 192.168.1.1 tell John
16:06:51.950211 arp who-has 192.168.1.1 tell John
16:06:54.960878 arp who-has 192.168.1.1 tell John
16:06:55.960242 arp who-has 192.168.1.1 tell John
16:06:56.960205 arp who-has 192.168.1.1 tell John
16:08:46.940793 John.who > 192.168.1.255.who: udp 132 (DF)

The following its output when using DCHP and then pinging the router:
Code:

tcpdump -i eth0
tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: listening on eth0

Pinging from the static side got the usual Destination Host Unreachable Message; when using DCHP, ping returned a network unreachable message.

The following was route's output after switching to DHCP:
Code:

route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
127.0.0.0      *              255.0.0.0      U    0      0        0 lo

The following was the output of netstat -rn, also after switching to DHCP:
Code:

netstat -rn
Kernel IP routing table
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
169.254.0.0    0.0.0.0        255.255.0.0    U        0 0          0 eth0
127.0.0.0      0.0.0.0        255.0.0.0      U        0 0          0 lo

I changed the appropriate files as bin/bash instructed, but not before saving their contents. The etc/sysconfig/network file revealed:
Code:

HOSTNAME=John
NETWORKING=yes
GATEWAY=192.168.1.1

Meanwhile, the etc/sysconfig/network-scripts/ifcfg-eth0 contained:
Code:

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.4
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes
MII_NOT_SUPPORTED=yes


/bin/bash 11-15-2003 03:30 AM

Since dhcp works in windows why don't you change BOOTPROTO=dhcp and try a service network restart.

What is the hostname in windows? I don't think it matters but possibly the router has been setup to use that hostname.

Can you ping localhost?

On my router if I set my browser to http://192.168.0.1 I get a login. From there I can configure the router/firewall. Does your router have anything you can do to check the configuration?

Try running the below script. It logs everything comming in and going out of your computer. Then try pinging the router and see what shows in the log. CAUTION: This could fill your /var partition quickly if your network is working so flush iptables when you are done using the script.
To monitor do this in an xterm:
tail -f /var/log/messages
Code:

#!/bin/bash
#
# rc.test-iptables - test script for iptables chains and tables.
#
# Copyright (C) 2001  Oskar Andreasson <bluefluxATkoffeinDOTnet>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program or from the site that you downloaded it
# from; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#

#
# Filter table, all chains
#
iptables -t filter -A INPUT -p icmp --icmp-type echo-request \
-j LOG --log-prefix="filter INPUT:"
iptables -t filter -A INPUT -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="filter INPUT:"
iptables -t filter -A OUTPUT -p icmp --icmp-type echo-request \
-j LOG --log-prefix="filter OUTPUT:"
iptables -t filter -A OUTPUT -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="filter OUTPUT:"
iptables -t filter -A FORWARD -p icmp --icmp-type echo-request \
-j LOG --log-prefix="filter FORWARD:"
iptables -t filter -A FORWARD -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="filter FORWARD:"

#
# NAT table, all chains except OUTPUT which don't work.
#
iptables -t nat -A PREROUTING -p icmp --icmp-type echo-request \
-j LOG --log-prefix="nat PREROUTING:"
iptables -t nat -A PREROUTING -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="nat PREROUTING:"
iptables -t nat -A POSTROUTING -p icmp --icmp-type echo-request \
-j LOG --log-prefix="nat POSTROUTING:"
iptables -t nat -A POSTROUTING -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="nat POSTROUTING:"
iptables -t nat -A OUTPUT -p icmp --icmp-type echo-request \
-j LOG --log-prefix="nat OUTPUT:"
iptables -t nat -A OUTPUT -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="nat OUTPUT:"

#
# Mangle table, all chains
#
iptables -t mangle -A PREROUTING -p icmp --icmp-type echo-request \
-j LOG --log-prefix="mangle PREROUTING:"
iptables -t mangle -A PREROUTING -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="mangle PREROUTING:"
iptables -t mangle -I FORWARD 1 -p icmp --icmp-type echo-request \
-j LOG --log-prefix="mangle FORWARD:"
iptables -t mangle -I FORWARD 1 -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="mangle FORWARD:"
iptables -t mangle -I INPUT 1 -p icmp --icmp-type echo-request \
-j LOG --log-prefix="mangle INPUT:"
iptables -t mangle -I INPUT 1 -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="mangle INPUT:"
iptables -t mangle -A OUTPUT -p icmp --icmp-type echo-request \
-j LOG --log-prefix="mangle OUTPUT:"
iptables -t mangle -A OUTPUT -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="mangle OUTPUT:"
iptables -t mangle -I POSTROUTING 1 -p icmp --icmp-type echo-request \
-j LOG --log-prefix="mangle POSTROUTING:"
iptables -t mangle -I POSTROUTING 1 -p icmp --icmp-type echo-reply \
-j LOG --log-prefix="mangle POSTROUTING:"


Here's the iptables flush script.
Code:

#!/bin/sh
#
# rc.flush-iptables - Resets iptables to default values.
#
# Copyright (C) 2001  Oskar Andreasson <bluefluxATkoffeinDOTnet>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program or from the site that you downloaded it
# from; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA

#
# Configurations
#
IPTABLES="/usr/sbin/iptables"

#
# reset the default policies in the filter table.
#
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT

#
# reset the default policies in the nat table.
#
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT

#
# reset the default policies in the mangle table.
#
$IPTABLES -t mangle -P PREROUTING ACCEPT
$IPTABLES -t mangle -P OUTPUT ACCEPT

#
# flush all the rules in the filter and nat tables.
#
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
#
# erase all chains that's not default in filter and nat table.
#
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X



All times are GMT -5. The time now is 12:27 PM.