LinHES Forums
http://forum.linhes.org/

Network - eth0 working but I can't get out
http://forum.linhes.org/viewtopic.php?f=2&t=6280
Page 1 of 1

Author:  capndan [ Sun Oct 02, 2005 7:37 pm ]
Post subject:  Network - eth0 working but I can't get out

Everything worked fine (well except video) at my house, but then I brought my Myth box to school and all of the sudden I can't get out onto the net. netcardconfig shows no errors and ifconfig shows eth0 working fine with an ip address of 192.168.1.104
I can ping anyone else currently on the network (we're all connected to the linksys router) but I can't ping outside the network (google, etc.)
I know its not the card at fault because I was downloading with wget earlier today, I'm assuming its something to do with the router settings. Are there any specific ports that should be opened/forwarding or some setting that needs to be on or off for linux to get out onto the net?
I have a laptop with a wireless card running Suse 9.3 that can get out onto the net just fine.
Thanks ^__^

Capndan

Author:  tjc [ Mon Oct 03, 2005 6:27 pm ]
Post subject: 

At a guess the routing is your problem. You'll need to dertermine what the correct gateway machine for that network is and set up an appropriate route to it.

Author:  capndan [ Mon Oct 03, 2005 10:29 pm ]
Post subject: 

is there a specific file or command that I can set a Gateway with? (the gateway is 192.168.1.1)

Author:  cesman [ Mon Oct 03, 2005 10:48 pm ]
Post subject: 

Code:
netcardconfig

Author:  capndan [ Mon Oct 03, 2005 10:58 pm ]
Post subject: 

Well I turned off DHCP and it let me set all the settings
Ip: 192.168.1.104
netmask: 255.255.255.0
broadcast 192.168.1.255
gateway: 192.168.1.1

It found all the correct nameservers (according to what this windows machine has)

still can't ping websites like google, but pinging the network computers is fine
Should I post any other information that might be relevant?

Author:  tjc [ Tue Oct 04, 2005 12:28 pm ]
Post subject: 

Are you sure that's really the right gateway address for your network? It looks like the default guess. What is the local IP of the Linksys router you're plugged into? That's probably what you should be using. The "netstat -nr" output from your box would be helpful...

Author:  capndan [ Tue Oct 04, 2005 6:02 pm ]
Post subject: 

Alright Im pretty positive it's 192.168.1.1 because thats what the windows machine is using for the gateway.
Here is the output of netstat -nr:
Destination
192.168.1.0
0.0.0.0

Gateway
0.0.0.0
192.168.1.1

Genmask
255.255.255.0
0.0.0.0

Flags
U
UG

MSS
0
0

Window
0
0

irtt
0
0

Iface
eth0
eth0

Should there be two listed in here? And whats with the 0.0.0.0?

Author:  SnapperDragon [ Tue Oct 04, 2005 6:06 pm ]
Post subject: 

Yes, in your case you should have 2 routes.

The first one is for your home network, as defined by your LinkSys.

The second one, 0.0.0.0 is your default route. This is the one used when communicating with any networks not specified by another route.

I would recommend this test: first, find out what the default route is that your LinkSys got from your ISP. It's in the status menu, I think.

Next, ping your router. If this works, then try pinging the default router in the LinkSys setup. If this works, then networking (at the IP level) is ok.

If it does not, maybe you have a duplicate IP? You can check this. Get the 192.168.1.1 MAC on your linux box by becoming root and typeing "arp -a".

Compare this to what your linksys has. This is a long shot, but I've seen this happen before.

You can also just disconnect everything from the linksys except the Myth box. This will also remove the duplicate (again, long shot).

Author:  tjc [ Tue Oct 04, 2005 7:10 pm ]
Post subject: 

Wow what did you do to mangle that netstat output? it should look like this:
Code:
root@black2:~# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

Looks like 192.168.1.1 is the default address for the little Linksys (now Cisco) routers after all.

The 0.0.0.0 under Gateway means just send it out via your local interface. The 0.0.0.0 under Destination means to match everything.

Matching works like this, take the IP address, do a bitwise AND with the mask and the result should be equal to the destination. So a 192.168.1.101 AND 255.255.255.0 -> 192.168.1.0, it matches the first rule and just gets sent out ETH0 as is. Anything else, say 64.30.204.166 AND 0.0.0.0 -> 0.0.0.0 and it matches the second rule, it gets forwarded to 192.168.1.1 via ETH0. A point to point route has a mask of 255.255.255.255 and is matched to a single exact address.

Author:  capndan [ Tue Oct 04, 2005 7:41 pm ]
Post subject: 

Well I can ping the router at 192.168.1.1 but the default can't be pinged from the linux box. What I got from arp -a doesn't match the MAC in the status screen either.
I think for now I'm going to go ahead and drop this thread because I'm going to have to replace just about all the hardware anyway. I stuck the PVR in an old Asus Terminator (a7vc mobo not even supported by Asus any more) and its given me nothing but problems (it uses the old VIA chipset which apparently has a lot of problems with the PVR cards) and the 150 watt PSU seems to be chugging along when I do watch my one channel (can only get PBS lol) so thanks for all the help and hopefully the new hardware will solve the problem. If not, Ill be back ^__^

Author:  capndan [ Wed Oct 12, 2005 8:51 am ]
Post subject: 

Alright this is now the final remaining problem left to getting my box completely working.

I have experimented and found that when I disconnect the rest of my flatmates from the router my Myth box connects just fine, but I'm positive its not a duplicate IP because I can sit there and change my IP all day long and it won't fix anything (the others are 100 through 104 and even at 130 it still won't work).

The thought did occur that when I pull out all the cables one of them is leading to a second router, so I should probably investigate the settings on it to see that it's not doing something funny. I didn't really suspect anything though becuase I don't see what it could be doing that would cause problems with Linux and not the 4 windows machines.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/