LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-18-2005, 02:56 PM   #16
pfunk
Member
 
Registered: Jun 2002
Distribution: Suse, Redhat, Knoppix
Posts: 104

Original Poster
Rep: Reputation: 15

I tried using 192.168.1.1 as a nameserver - that didn't help. I removed that line altogether and used just the "outside" one - that didn't help either.

now about the gateway ... maybe this is the problem.

there are two lines output when i type route -n - here's the first three columns:

192.168.1.0 0.0.0.0 255.255.255.0
default 192.168.1.1 0.0.0.0


is this good enough? or does the gateway have to be set for the router too? can that be done from the command line?
 
Old 03-18-2005, 04:45 PM   #17
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
well, i'm confused as to which ip addresses you listed were real and which were typo's. you said originally that the nameserver listed in resolv.conf AND in windows was 192.168.0.1 - this is strange if you linksys router is 192.168.1.1 (which it probably is).

you said you've successfully logged into your router, did you use 192.168.1.1? if so, good. that's what i want to know.

then, check this out:

[root@lightstar:/etc]$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1

if your routing table looks different, post it up. the line i'm interested in is the gateway. if you don't have it, or it looks different, try this:


route add default gw 192.168.1.1
 
Old 03-18-2005, 05:36 PM   #18
pfunk
Member
 
Registered: Jun 2002
Distribution: Suse, Redhat, Knoppix
Posts: 104

Original Poster
Rep: Reputation: 15
the only address that was a typo was the IP address of my linux machine (it is 192.168.1.100 but i typed 192.168.100.1)

yes i used 192.168.1.1 to get on my router.

Ok, I did route -n and I posted it in the previous message - here it is again


Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

the only difference from what you posted is mine says default in the second line instead of 0.0.0.0
 
Old 03-18-2005, 06:05 PM   #19
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
so 192.168.0.1 really was showing up as your nameserver? both in windows and in resolv.conf? that's weird. not sure what to make of it. try pinging it, try loggin in from a browser. on my network that address doesn't respond to anything at all - it doesn't exist. see if you can find anywhere where that address is listed (resolv.conf, rc.inet1.conf, anything like that) because i don't think it should be anything.

and with the gateway listed in route -n you can access the internet and ping various sites? it just takes a long time right? you never answered my question about the cables. when you connected directly to the modem and experienced a performance boost, were you using the same ethernet cable? or not? those things can fail very quickly and without warning, so if you have the ability, i'd suggest swapping out cables and eliminating that as a possible problem.
 
Old 03-18-2005, 06:26 PM   #20
pfunk
Member
 
Registered: Jun 2002
Distribution: Suse, Redhat, Knoppix
Posts: 104

Original Poster
Rep: Reputation: 15
yes i swapped cables and they all work on the windows box just fine.

Like I've said from the beginning I can ping sites fast - no difference whether i'm behind the router for that or not. I can ping them by hostname or IP address and the result is the same - they are both fast.

192.168.0.1 is my dsl modem address. i can open the config page for the modem through a browser. I can ping it just fine as well from linux and windows.

the only thing i can't do quickly is browse the internet from my linux box when i'm behind hte linksys router. i haven't tried other types of network traffic like ftp since i can't even browse quickly.
 
Old 03-18-2005, 06:30 PM   #21
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
i'm sorry, i'm just racking my brain for something to suggest. try using a different browser (like lynx from the command line) and see if that makes a difference.

are you forwarding/filtering/blocking any ports on your router?

Last edited by mcd; 03-18-2005 at 06:37 PM.
 
Old 03-18-2005, 07:07 PM   #22
pfunk
Member
 
Registered: Jun 2002
Distribution: Suse, Redhat, Knoppix
Posts: 104

Original Poster
Rep: Reputation: 15
I appreciate your help - i have tried mozilla and konqueror web browsers. I don't have lynx on that system but i can install that and test it a little later.

I haven't set up any filtering or blocking of packets on the router.

I don't know if this helps but this is the routing table from the router itself.

Code:
Dest LAN IP     Subnet Mask       Deafault Gateway   Hop Count    Interface
0.0.0.0             0.0.0.0                192.168.0.1             1                   Internet
192.168.0.0     255.255.255.0    0.0.0.0                     1                   Internet
192.168.1.0     255.255.255.0    0.0.0.0	             1                   Local

Last edited by pfunk; 03-18-2005 at 07:08 PM.
 
Old 03-18-2005, 07:32 PM   #23
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
i have no idea. i'll check to see if i can find the routing table on my router at home when i head back there. it looks like your router is using your modem as it's default gateway, but i don't know what that implies. since your windows box is working no problem i doubt that could be the problem. i forget, did you say you were running a firewall or not?
 
Old 03-18-2005, 10:01 PM   #24
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
well, my router has the following routing table:

Routing Table Entry List
Destination LAN IP Subnet Mask Default Gateway Hop Count Interface
0.0.0.0_____0.0.0.0_____4.7.68.1_____1_____WAN
4.7.68.0_____255.255.252.0_____0.0.0.0_____1_____WAN
192.168.1.0_____255.255.255.0_____0.0.0.0_____1_____LAN


and the router is set to obtain it's ip automatically, so it doesn't consider my dsl modem at all. i've tried pinging my modem and accessing it through a browser like my router but i can't. it's like 192.168.0.1 doesn't exist, which makes sense because my router is connecting directly to verizon.

so. maybe you shouldn't be looking to your router for an ip and gateway. maybe you should try connecting your linux box directly to the modem. make 192.168.0.1 your default gateway and use dhcp, you can set this in /etc/rc.d/rc.inet1.conf. try resolv.conf both with and without it. also go over the config for the modem and make sure everything looks ok.

Last edited by mcd; 03-18-2005 at 10:04 PM.
 
Old 03-21-2005, 03:21 PM   #25
pfunk
Member
 
Registered: Jun 2002
Distribution: Suse, Redhat, Knoppix
Posts: 104

Original Poster
Rep: Reputation: 15
first, i am not running a firewall through the router. i have some iptables stuff configured on the linux machine though.

if i connect my linux box directly to the DSL modem everything works fine but then i can't have my windows machine on-line as well. this is why i got the router in the first place.

so the problem remains - i can't browse the web from my linux machine when it's connected to the linksys router.

here's some more tests I've run - when i type in IP addresses directly into the browser then it's fast. so it seems like a nameserver problem. but then when i ping it's fast whether i am using hostnames or IP addresses.

So the basic question is how does ping act differently than mozilla or konqueror? Is there some caching of hostname/IP numbers that ping uses but Mozilla does not?
 
Old 03-21-2005, 03:53 PM   #26
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
i really don't know what to suggest. maybe try listening with tcpdump while you ping various sites, and while you use mozilla. see if that helps. here's a tcpdump session on my laptop (192.168.1.51) where i pinged 66.102.7.104 (www.google.com) and then www.google.com:

[root@lightstar:/var/log]$ tcpdump -i eth1 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
13:20:19.787567 IP 192.168.1.50.138 > 192.168.1.255.138: NBT UDP PACKET(138)
13:20:42.690382 IP 192.168.1.51 > 66.102.7.104: icmp 64: echo request seq 1
13:20:42.750631 IP 66.102.7.104 > 192.168.1.51: icmp 64: echo reply seq 1
13:20:43.696912 IP 192.168.1.51 > 66.102.7.104: icmp 64: echo request seq 2
13:20:43.760114 IP 66.102.7.104 > 192.168.1.51: icmp 64: echo reply seq 2
13:20:44.706940 IP 192.168.1.51 > 66.102.7.104: icmp 64: echo request seq 3
13:20:44.733688 IP 66.102.7.104 > 192.168.1.51: icmp 64: echo reply seq 3
13:20:45.716911 IP 192.168.1.51 > 66.102.7.104: icmp 64: echo request seq 4
13:20:45.749187 IP 66.102.7.104 > 192.168.1.51: icmp 64: echo reply seq 4
13:20:46.726910 IP 192.168.1.51 > 66.102.7.104: icmp 64: echo request seq 5
13:20:46.776988 IP 66.102.7.104 > 192.168.1.51: icmp 64: echo reply seq 5
13:20:50.457736 IP 192.168.1.53.138 > 192.168.1.255.138: NBT UDP PACKET(138)
13:20:57.169471 IP 192.168.1.51.33152 > 4.2.2.4.53: 44560+ A? www.google.com. (32)
13:20:57.205537 IP 4.2.2.4.53 > 192.168.1.51.33152: 44560 4/0/0 CNAME[|domain]
13:20:57.206139 IP 192.168.1.51 > 66.102.7.147: icmp 64: echo request seq 1
13:20:57.249972 IP 66.102.7.147 > 192.168.1.51: icmp 64: echo reply seq 1
13:20:57.250382 IP 192.168.1.51.33152 > 4.2.2.4.53: 55990+ PTR? 147.7.102.66.in-addr .arpa. (43)
13:20:57.290089 IP 4.2.2.4.53 > 192.168.1.51.33152: 55990 NXDomain 0/1/0 (103)
13:20:58.216913 IP 192.168.1.51 > 66.102.7.147: icmp 64: echo request seq 2
13:20:58.240937 IP 66.102.7.147 > 192.168.1.51: icmp 64: echo reply seq 2
13:20:58.241269 IP 192.168.1.51.33152 > 4.2.2.4.53: 17291+ PTR? 147.7.102.66.in-addr .arpa. (43)
13:20:58.261614 IP 4.2.2.4.53 > 192.168.1.51.33152: 17291 NXDomain 0/1/0 (103)
13:21:00.037382 IP 192.168.1.51.33152 > 4.2.2.4.53: 44519+ AAAA? ironmonkey.homelinu x.net. (42)
13:21:00.037933 IP 192.168.1.51.33153 > 4.2.2.4.53: 44668+ AAAA? imap.myrealbox.com. (36)
13:21:00.061329 IP 4.2.2.4.53 > 192.168.1.51.33152: 44519 0/1/0 (103)
13:21:00.061656 IP 192.168.1.51.33154 > 4.2.2.4.53: 56235+[|domain]
13:21:00.063718 IP 4.2.2.4.53 > 192.168.1.51.33153: 44668 0/1/0 (78)
13:21:00.063996 IP 192.168.1.51.33155 > 4.2.2.4.53: 54911+ AAAA? imap.myrealbox.com. dsl-verizon.net. (52)
13:21:00.090677 IP 4.2.2.4.53 > 192.168.1.51.33154: 56235 NXDomain 0/1/0 (128)
13:21:00.091009 IP 192.168.1.51.33156 > 4.2.2.4.53: 10319+ A? ironmonkey.homelinux.n et. (42)
13:21:00.093882 IP 4.2.2.4.53 > 192.168.1.51.33155: 54911 NXDomain 0/1/0 (122)
13:21:00.094074 IP 192.168.1.51.33157 > 4.2.2.4.53: 7241+ A? imap.myrealbox.com. (36 )
13:21:00.116328 IP 4.2.2.4.53 > 192.168.1.51.33157: 7241 1/0/0 A 192.108.102.201 (52 )
13:21:00.116679 IP 192.168.1.51.32920 > 192.108.102.201.143: S 1476868703:1476868703( 0) win 5840 <mss 1460,sackOK,timestamp 486607 0,nop,wscale 0>
13:21:00.126927 IP 4.2.2.4.53 > 192.168.1.51.33156: 10319 1/0/0 A[|domain]
13:21:00.127195 IP 192.168.1.51.32921 > 4.7.71.191.143: S 1490939251:1490939251(0) wi n 5840 <mss 1460,sackOK,timestamp 486609 0,nop,wscale 0>
13:21:00.167413 IP 192.108.102.201.143 > 192.168.1.51.32920: S 171214316:171214316(0) ack 1476868704 win 6144 <mss 1436,wscale 0,nop,sackOK,nop,nop>
13:21:00.167472 IP 192.168.1.51.32920 > 192.108.102.201.143: . ack 1 win 5840


the icmp packets are the pings. you can see that i resolve www.google.com into an ip address by asking 4.2.2.4 (my provider's nameserver) on port 53. and anyway, you can tell that the conversation is ok. in your case, hopefully there will be some errors or something that will tell what's taking so long...
 
Old 03-21-2005, 07:26 PM   #27
pfunk
Member
 
Registered: Jun 2002
Distribution: Suse, Redhat, Knoppix
Posts: 104

Original Poster
Rep: Reputation: 15
mcd - thanks for teaching me the tcpdump command!

here's what was happening - when i edited /etc/resolv.conf to take out 192.168.0.1 as a nameserver i restarted my eth0 interface as i said in a couple postings (i thought that had to be done for the changes to take effect) however, when i did that SUSE queried for a new nameserver and IP address from the router so i lost my changes. I discovered that by looking at those tcpdump logs.

so the moral of the story is that 192.168.0.1 should not be listed as a nameserver like everyone thought. SUSE requires that you set some environment variables so that /etc/resolv.conf is not changes each time eth0 starts up. I set those environment variables and voila everything works great.

i owe you one mcd!!! thanks for all the help and time you put in on my behalf.
 
Old 03-21-2005, 07:39 PM   #28
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
woot! great news man!

Quote:
i owe you one mcd!!! thanks for all the help and time you put in on my behalf.
no problem, i'm just glad all my rambling helped. take it easy.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linksys router in linux reefa Linux - Networking 7 03-14-2005 02:19 AM
Linksys router question on Linux? wardialer Linux - Security 3 02-03-2005 06:26 PM
LINKSYS vs LINUX Router? bryan1138 Linux - Security 1 01-19-2004 03:53 PM
Linksys router + linux problem demowipper Linux - Networking 21 10-08-2003 08:09 PM
Linux Windows Linksys Router? Tuzinor Linux - Networking 0 12-02-2001 09:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration