LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Networking basics not working (https://www.linuxquestions.org/questions/slackware-installation-40/networking-basics-not-working-378378/)

TomlinAS 10-30-2005 01:27 PM

Networking basics not working
 
Howdy,

I'm sure this seems really moronic. It seems really moronic to me as well. Just installed 10.2 on my system, everything seems fairly great so far. Trying to do as much of this by hand from the command line as I ran RH for awhile and didn't fell like I was getting a very good understanding of what the GUI tools were doing for me.

Now my problem is that when I ping anything besides loopback I get "Destination not reachable," including my WRT54G router. Worked fine 4 hours ago under RH. eth0 has an ip address of 192.168.1.102, BCast 192.168.1.255, netmask 255.255.255.0, gateway of 192.168.1.1. Gateway is unreachable. I tried using netconfig and typing the exact same info in there that I used on my old machine, then doing /etc/rc.d/rc.inet1 restart; no joy. Also tried it by hand with infconfig eth0 192.168.1.102 netmask 255.255.255.0, followed by a route add default gw 192.168.1.1 and an inet1 restart. Again no love.

Also cannot ping this box from my .101 machine. Any tips?

Alex

Brian1 10-30-2005 01:45 PM

To clear the basics.
Is it the same nic card?
Is it the same ethenet cable?
Plugged in the same port?
Does the switch and or nic light up when cable is plugged in?

Is the router setup as a dhcp server?
What is the output of ' ifconfig '?
What is the output of ' ifconfig -a '?
What is the output of ' route '?
When you use the command ' /sbin/ifup eth0 ', as root, Is there any errors?
Post contents of /etc/sysconfig/network-scripts/ifcfg-eth0
Is the module for the card loaded?
What brand and model is the card?

Login to router and review the lan settings.
Hope this helps
Brian1

TomlinAS 10-30-2005 03:53 PM

[QUOTE]Originally posted by Brian1
Is it the same nic card? Yes
Is it the same ethenet cable? Yes
Plugged in the same port? Yes
Does the switch and or nic light up when cable is plugged in? Yes

Is the router setup as a dhcp server? No
What is the output of ' ifconfig '?
What is the output of ' ifconfig -a '? These two both look correct.
What is the output of ' route '?

Here is where I become suspicious. Route looks like this:
localnet * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 1 0 0 eth0

When you use the command ' /sbin/ifup eth0 ', as root, Is there any errors?
/sbin/ifup: no such file or directory. I'm unfamiliar with where this should be in slack :/

Post contents of /etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig: no such file or directory :/
Is the module for the card loaded? looked in lsmod, wasn't able to figure out if there is one loaded for this card or not.
What brand and model is the card? Broadcom Gigabit Lan, BCM 4401

Login to router and review the lan settings. Yes, the router is all good, it was routing happily away to this machine earlier when it had RH on it...but as you can tell RH will let you set up LAMP and such whilst remaining a total noob, and I want to actually know what is going on :P

Alex

gbonvehi 10-30-2005 04:46 PM

Post the output of ifconfig.
The files you can't find are RH (and maybe other distros..) specific, don't worry.

To find out exactly which module you need, take a look at the output of lspci and search on the web for the module you need for that card.

Brian1 10-30-2005 05:04 PM

The only thing that throws me is the metric value of 1 on the default line. To me it should be a 0 value. I would remove all routes and add a default gateway route. Isn't there a gui tool in that distro to help setup?

Sorry about the specfic locations forgot which distro we were working on. Never installed a slackware distro so I don't know the structure of files are.

Hope this helps
Brian1

ralvez 10-30-2005 05:27 PM

I do not see anything "strange" or wrong per-se in your route.
I gather (based on one of your comments) that you are using Slack and that you are assigning static addresses to your cards.
Go to /etc/hosts and add in there your router and your machine. Just as an example here is my hosts:
Code:

# For loopbacking.
127.0.0.1              localhost

192.168.1.1            it2web          it2web  <-- this is the router
192.168.1.2            spitfire        spitfire
192.168.1.21            dragonfly      dragongly  <-- that is my machine
192.168.1.31            fireball        fireball
192.168.1.20            dragonkiss      dragonkiss

Then make sure that when you do /sbin/ifconfig you see something like:

Code:

eth0      Link encap:Ethernet  HWaddr 00:13:D3:1C:B4:99
          inet addr:192.168.1.21  Bcast:192.168.1.255  Mask:255.255.255.0

which confirms that your ethernet card is up and running.
Then ping your router both (by name -it2web in my case - and by address) and that you get an answer.
If that works then make sure to add your DNS server to /etc/resolv.conf
It should look like:

Code:

nameserver 24.151.23.60
nameserver 24.151.22.192
nameserver 24.151.23.66

Hope this helps.

Rick

TomlinAS 10-31-2005 10:35 AM

bout ready to throw this out the window.
 
Well, I've tracked down that b44 is indeed my NIC's module and has been loaded all along, so I am not sure what to do next, as it seems the module is loaded.

ethtool eth0:
Supported Ports [ MII ]
Supported link modes: 10BaseT Half / 10BaseT Full
100BaseT Half / 100BaseT Full
Supports Auto-negotiation: Yes
Advertised link modes: 1000BaseT/Full
Advertised auto-negotiation: Yes
Speed: 100 Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transciever: internal
Auto-negotiation: on
Current message level: (0x000000ff) 255
Link detected: Yes


mii-tool eth0:
negotiated 100Base Tx-FD flow-control, link ok

ifconfig:
eth0 Link encap:Ethernet HWaddr 00:EO:18:AE:A0:F4
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:27
collisions:0 txqueuelen:1000
RX bytes:6096 (5.9 Kb) TX bytes:3072 (3.0 Kb)
Interrupt: 9

lo Link encap:Local Loopback
inet addr: 127.0.0.1 Mask: 255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:4902 (4.7 Kb) TX bytes:4902 (4.7 Kb)

and finally, route:
Localnet * 255.255.255.0 U 0 0 0 eth0
Loopback * 255.0.0.0 U 0 0 0 lo
default wrt54g 0.0.0.0 UG 1 0 0 eth0

yes, wrt54g resolves correctly, if I try to ping it it resolves to 192.168.1.1 which is what it is. Anything you can point out as a place to start would be GREAT as I am extremely frustrated at this point :/

Alex

Brian1 10-31-2005 04:41 PM

If you can ping the router then what is not working now. Just going over all the post and the first one says you could not ping the router but the last says that is working. Just wondering what is not now.

Could you post the steps you used to set this up. Commands used, files edited and what they are like now. Just in the sequence you did them in.

Got to go, trick or treaters here.
Brian1

ralvez 10-31-2005 04:42 PM

OK ... have you checked your switch box? That is the only common device between all your computers and you.
If the switch has a problem, then nothing will be reachable.
Try powering it off and back on. Then try to ping again.
Log onto the router box and ping 192.168.1.102 (your box) see if you can reach it and also ping some of the other systems in the network. If from the router you cannot reach other systems then the problem has to be the switch box.
If you can reach something, then switch cables in the box; plug your system to the switch connection that worked and ping again see if you get an answer... and we will take it from there.

Rick

TomlinAS 11-01-2005 06:58 PM

Thanks guys
 
Thanks for all the help. The solution, it seems, is to install debian. I'm sure it's just because I am a noob, but with debian, the b44 module, and the exact same network settings, everything works. :) Take it easy.

Alex


All times are GMT -5. The time now is 09:00 AM.