Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem using router to connect to the internet
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Fri May 31, 2002 11:45 pm    Post subject: Problem using router to connect to the internet Reply with quote

I try to setup a static IP so I edit the files exactly as it says in the install guide setting my IP to 192.168.0.50, and the gateway as 192.168.0.168 (my router). But when I try to emerge rsync I get unresolved host errors, and I can't ping. Is there anything else I need to be doing to get it working with my Linksys BEFSR41?
Back to top
View user's profile Send private message
handsomepete
Guru
Guru


Joined: 21 Apr 2002
Posts: 548
Location: Kansas City, MO

PostPosted: Fri May 31, 2002 11:47 pm    Post subject: Reply with quote

Did you set up your resolv.conf with your DNS server's IPs?
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Fri May 31, 2002 11:48 pm    Post subject: Reply with quote

You need to add your ISP's name servers to /etc/resolv.conf, one per line.
Back to top
View user's profile Send private message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Fri May 31, 2002 11:54 pm    Post subject: Reply with quote

Yes I did that. I followed the install instructions to the letter. I'll double check the IPs though JIC..
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Fri May 31, 2002 11:56 pm    Post subject: Reply with quote

If you've got the IPs right, try traceroute'ing to one of them, and see where the traceroute dies. Also, what output do you get from the command 'route'?
Back to top
View user's profile Send private message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Sat Jun 01, 2002 12:09 am    Post subject: Reply with quote

pinging works but I usually get 80% packet loss, I forgot the Linux traceroute command, and route gives me a thing saying interface, etc. but nothing listed underneath it.
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sat Jun 01, 2002 12:26 am    Post subject: Reply with quote

Ping shouldn't /be/ working, if your routing table is empty. But if it is, and you're getting 80% packet loss, that sounds like a bad wire.

So, it appears you have two problems:

1. Your route isn't configured, so the kernel has no idea where to send packets.

2. You may have a bad wire, resulting in high packet loss.

In your /etc/conf.d/net, look near the bottom. What is the 'gateway' line set to? And for that matter, what does the iface_eth0 line near the top say?

As for the wire, if you have the tools to make your own, I'd highly recommend cutting the tips off and putting new ones on. There's a good guide to the pinouts of 10/100 ethernet wire here. If your wire is going straight from the compter to the router, it may need to be a crossover cable. Follow those instructions if that's the case.
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sat Jun 01, 2002 12:30 am    Post subject: Reply with quote

As a guide, here's how your /etc/conf.d/net should look, based on what you said in your first message.

Code:

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.0.50 broadcast 192.168.255.255 netmask 255.255.0.0"

# For setting the default gateway
#
gateway="eth0/192.168.0.168"

Back to top
View user's profile Send private message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Sat Jun 01, 2002 12:43 am    Post subject: Reply with quote

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.0.50 broadcast 192.168.0.255 netmask 255.255.0.0"

# For setting the default gateway
#
gateway="eth0/192.168.0.168"

is how it looks. Also I got plenty of cat5 wire. Part of my dads work...
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sat Jun 01, 2002 12:48 am    Post subject: Reply with quote

Your broadcast and your netmask don't match up. (If you want a long gruesome detailed explanation of why, I suppose I could provide one.) I'd suggest changing the broadcast to .255.255 at the end, instead of .0.255

the rest of it looks fine. Hmmm. What happens if you do this:
Code:
/sbin/route add -net default gw 192.168.0.168 netmask 0.0.0.0 metric 1

and then try to connect to the net? (Make sure it adds the new route to the output of 'route')
Back to top
View user's profile Send private message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Sat Jun 01, 2002 12:59 am    Post subject: Reply with quote

When doing the /sbin/route thing I get:
SIOCADDRT: File Exists

I also edited /conf.d/net as you suggested.
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sat Jun 01, 2002 1:02 am    Post subject: Reply with quote

That error means that the routing daemon believes that route already exists. At this point, rather than try and delete it, I'd recommend a reboot, just to flush out any residual problems that may have resulted from the improperly configured broadcast address. Since it's not working anyway, I can't imagine this being much of a problem. (Besides. Gentoo reboots quickly.)
Back to top
View user's profile Send private message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Sat Jun 01, 2002 1:13 am    Post subject: Reply with quote

rebooted, emerge rsync does not work still...is there a command to reset all the network settings back to default?
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sat Jun 01, 2002 1:17 am    Post subject: Reply with quote

Not that I know of. Let's not give up yet though. What is the output of 'ifconfig'?
Back to top
View user's profile Send private message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Sat Jun 01, 2002 1:34 am    Post subject: Reply with quote

eth0 Link encap:Ethernet HWaddr: 00:(rest left out)
inet addr: 192.168.0.50 Bcast: 192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric: 1
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sat Jun 01, 2002 1:48 am    Post subject: Reply with quote

Huh. That looks valid. At this point, I think I may have to conceed defeat. Sorry I couldn't solve it for you.
Back to top
View user's profile Send private message
FINITE
Guru
Guru


Joined: 10 May 2002
Posts: 449

PostPosted: Sat Jun 01, 2002 1:50 am    Post subject: Reply with quote

If ifconfig shows up and running in the output then your connection is there but something is constricting it. Also isn't ifconfig supposed to show more info like rxpackets and txpackets sent and received and collisions etc etc? Was everything working fine before the router was added?
Back to top
View user's profile Send private message
FINITE
Guru
Guru


Joined: 10 May 2002
Posts: 449

PostPosted: Sat Jun 01, 2002 2:00 am    Post subject: Reply with quote

Also who is you r isp and are the addresses assigned dynamically or are they entered static?
Back to top
View user's profile Send private message
handsomepete
Guru
Guru


Joined: 21 Apr 2002
Posts: 548
Location: Kansas City, MO

PostPosted: Sat Jun 01, 2002 2:17 am    Post subject: Reply with quote

Also, not to insult you, but make sure that your router is set up properly (i.e. don't use dhcp if you're using static IPs, if you changed the router's IP make sure you hit 'apply' (if you need to, reset the router with that tiny little button on the front) use the reported DNS servers (they should be fresh for a while at least) from the setup tab, don't include any setting/port blockings that don't make sense). And of course, switch out cables. Theoretically your nic should be working, but if you *really* want to troubleshoot it, maybe you could set your router to 192.168.1.1 and do it all by hand again:

ifconfig eth0 192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0
route add -net default gw 192.168.1.1 netmask 0.0.0.0 metric 1

(doing it from memory but that looks right to me... those are pretty safe settings and the befsr default addy is always 192.168.1.1)

You'd probably have to route del -net default gw 192.168.1.1 before doing this, but what's the worst that could happen (this comes with no guarantees... :) )
Back to top
View user's profile Send private message
padawan
n00b
n00b


Joined: 01 Jun 2002
Posts: 37
Location: California, USA

PostPosted: Sat Jun 01, 2002 7:37 am    Post subject: Reply with quote

Hey!

I was just about to post that I was having the same problem, (I just installed
Gentoo over the last couple of days), but when I was gathering information
I spotted something, and I think I fixed it.

I have 4 PC's behind a DSL router (actually not all mine, but anyway...).
The router is 192.168.100.1, and the others are 2,3,4,5. The Gentoo box
is 3. Netmask is 255.255.255.0. All can access the net and talk to each
fine except the Gentoo box. (Although it's dual boot, and works fine with
wind*ze running, so no hardware or cable problems).

When Gentoo was booted with static IP, I could ping the other PCs, but I
couldn't ping the router! If I dropped the static IP, and ran dhcpcd, then
everything worked fine. Here's the route table for both:

Static:
Code:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.100.1   0.0.0.0         UG    1      0        0 eth0


Dynamic:
Code:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.100.1   0.0.0.0         UG    0      0        0 eth0


The only difference is the metric. I modified /etc/init.d/net.eth0 to set
the metric to 0, same as the dynamic setting, and now it works as static!

(I'm posting this from my Gentoo box with static IP)

8)
Back to top
View user's profile Send private message
padawan
n00b
n00b


Joined: 01 Jun 2002
Posts: 37
Location: California, USA

PostPosted: Sat Jun 01, 2002 7:46 am    Post subject: Reply with quote

Doh! Ignore that previous post...

Right after I posted, it just spontaneously stopped working again. Same symptoms. I could ping the other local machines, but not the router. I'm back on dhcp again. :(
Back to top
View user's profile Send private message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Sat Jun 01, 2002 4:45 pm    Post subject: Reply with quote

I'm currently cleaning all the dust off my computer and moving it to a new case a acquired a couple weeks ago. I'll change the PCI slot position of the NIC and see what happens. Otherwise, I'll reinstall Gentoo...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum