LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Weird LAN Problem : Linux Vs. Windows , HTTP sites respond in Win and not in Linux (https://www.linuxquestions.org/questions/slackware-14/weird-lan-problem-linux-vs-windows-http-sites-respond-in-win-and-not-in-linux-593900/)

duryodhan 10-23-2007 07:18 AM

Weird LAN Problem : Linux Vs. Windows , HTTP sites respond in Win and not in Linux
 
Hey,
I am in a University LAN , where we are assigned IPs in the private space (172.*.*.*) based on our MACs via DHCP. (i.e dhcpcd gives me a ip).

This whole setup was working fine, until a couple of weeks ago when I found that local sites weren't responding.
Quote:


bash-3.1$ time wget abcd/home.htm
--17:37:31-- http://abcd/home.htm
=> `home.htm'
Resolving abcd... 172.24.2.36
Connecting to abcd|172.24.2.36|:80... connected.
HTTP request sent, awaiting response...

real 23.240 user 0.000 sys 0.010 pcpu 0.04
(I pressed ctrl+c to stop the loading)

As you can see ... for nearly 23 secs the site still hadn't loaded. I even tried to wait for mins at end and it still didn't load. It is a site on the intranet so it generally opens in a sec or so.

I restarted to my Windows XP and all seems to be fine over there. I then proceeded to boot my computer on a ubuntu live CD and there seems to be the same problem over there. So, it seems that only linux is having a problem.

Could anyone please help me out over here?! I am mainly stumped by the nature of this problem , as in ... how could there be a difference between windows and linux? I tried changing the user-agent in konqueror, unticked the send identification (even though I am using wget too) , but nothing changed.

1. I have tried replacing the LAN cable
2. I have tried on a different linux
3. It is not a problem with the port as it works fine in windows.

dracolich 10-23-2007 07:59 AM

My first thought is the DNS servers. When I had similar problems the problem was due to having a line at the beginning of /etc/resolv.conf like this:

search NETGEAR
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

NETGEAR was the name of my network. I removed that line and the problem went away. You might also check that Windows and Linux are getting the same DNS servers. Keep in mind that when using DHCP the file will be overwritten each time. I believe there's a switch you can use with dhclient to tell it to not overwrite resolv.conf but I don't recall what it is.

duryodhan 10-23-2007 08:35 AM

Thanks for the reply.

If I remove the search <domain> line ;
then the intranet sites just stop opening ...


Quote:

bash-3.1# wget abcd
--18:59:58-- http://abcd/
=> `index.html'
Resolving abcd... failed: Name or service not known.
Morever, if it is a DNS issue .. I won't be getting the ip from the hostname ,but that is not the case here. I might be wrong though ...

pbhj 10-23-2007 09:20 AM

Could it be the MTU setting. I had a similar problem with Kubuntu where the MTU was at 1500 and wouldn't access any websites, just failed or went extremely slowly and then timed out.

Code:

sudo ifconfig eth0 mtu 1400
worked for me

duryodhan 10-23-2007 01:12 PM

Hey
Thanks a lot !

changing the MTU seems to have helped a little , but not completely solved it. (atleast I think it has helped, such random times when it worked were present before too)

Any other things that I should check?

How do I find the nameserver my windows is using ?

Again, thanks...

My present MTU is 1300, how low should I allow it to go ?

lord-fu 10-23-2007 03:08 PM

Quote:

How do I find the nameserver my windows is using ?
ipconfig /all

And I think you know this all ready but for Linux.

cat /etc/resolv.conf

hth

aherrys 10-23-2007 03:30 PM

If I were you I would have sniff it... Use ethereal, wireshark whatever to sniff what is going on on the wire. See what is the difference between Windows and Linux, which machine stops sending packets etc.
BTW you use wget to access the site you couldn't access, do you use the same application under XP ? Or do you use something else to access the site when you run XP, that could make the difference, may be the server on the site cannot respond properly to wget request.

duryodhan 10-23-2007 04:31 PM

Quote:

BTW you use wget to access the site you couldn't access, do you use the same application under XP ? Or do you use something else to access the site when you run XP, that could make the difference, may be the server on the site cannot respond properly to wget request.
Yeah, but I tried doing it the most basic way too ... telnet abcd , GET index.html HTTP/1.1 etc. ... that still didn't work out.

Quote:

If I were you I would have sniff it... Use ethereal, wireshark whatever to sniff what is going on on the wire. See what is the difference between Windows and Linux, which machine stops sending packets etc.
How exactly would I do this? I never used wireshark in my life ... I have it installed right now ...

lord-fu 10-24-2007 08:51 AM

Quote:

bash-3.1# wget abcd
--18:59:58-- http://abcd/
=> `index.html'
Resolving abcd... failed: Name or service not known.
This is telling you what your problem is, it is very simple, sort out your DNS and/or gateway.

Quote:

may be the server on the site cannot respond properly to wget request.
A web server does not know if you are requesting command line or not and does not care, a get is a get is a get.

Quote:

If I were you I would have sniff it... Use ethereal, wireshark whatever to sniff what is going on on the wire. See what is the difference between Windows and Linux, which machine stops sending packets etc.
Why? It is a DNS or gateway issue, no need to install another tool for something this simple. Although these are cool things and very useful utilities.


If you are still having this problem, what does your /etc/hosts look like? What is your machine name, is it on a domain, are you using the right DNS servers?

acummings 10-24-2007 11:20 PM

BTW lord-fu if you look further up in the thread you'll see that this is not a resolving problem -- it did resolve, it got the ip, sent http request and then stalled.

Quote:

How exactly would I do this? I never used wireshark in my life ...
I need to fire that one up again. It's so much fun!

Been a while since I used it.

Um, it (used to) seem easy to just scan/monitor 100% all lan traffic (I did on small lan). Of course if lan is big then there could be copius overall output -- in such case you might ability just watch certain protocols only, say http for example (so as to reduce what you look at).

May easier run Wireshark from another box so can have wireshark switched on (monitoring on) when do with Linux and then again when do with (rebooted to) Win

(used to) you'd set a specified amount of time for wireshark to be in monitoring mode, for example 5 minutes. In real time during the live monitoring you can watch the output. At end of for example 5 minutes you can then scrutinize the entire 5 minutes of output due to wireshark has saved it in a file for you.

Might need to run wireshark as root (can't remember).

--
Alan.

duryodhan 10-25-2007 03:00 AM

k. will try it out .. but will require a lot of time :)

duryodhan 10-25-2007 07:50 AM

Weird thing is ... even normal www sites which I access through a HTTP Proxy (squid) are slow to open, but if I use https they are fast (https goes through the same proxy).

My ipconfig /all in WinXP is :
Quote:


Windows IP Configuration

Host Name . . . . . . . . . . . . : xxxx
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : xxxx

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : xxxx
Description . . . . . . . . . . . : Marvell Yukon 88E8053 PCI-E Gigabit
Ethernet Controller
Physical Address. . . . . . . . . : 00-11-D8-3D-10-6A
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 172.16.6.57
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.6.254
DHCP Server . . . . . . . . . . . : 172.24.2.10
DNS Servers . . . . . . . . . . . : 172.24.2.71
Lease Obtained. . . . . . . . . . : 25 October 2007 18:04:36
Lease Expires . . . . . . . . . . : 02 November 2007 18:04:36


And cat /etc/dhcpc/dhcpcd-eth0.info gives :
Quote:

IPADDR=172.16.6.57
NETMASK=255.255.255.0
NETWORK=172.16.6.0
BROADCAST=172.16.6.255
GATEWAY=172.16.6.254
DOMAIN='xxxx'
DNS=172.24.2.71
DHCPSID=172.24.2.10
DHCPGIADDR=172.16.6.254
DHCPSIADDR=0.0.0.0
DHCPCHADDR=00:11:D8:3D:10:6A
DHCPSHADDR=00:0D:65:C8:CA:BF
DHCPSNAME=''
LEASETIME=691200
RENEWALTIME=345600
REBINDTIME=604800
INTERFACE='eth0'
CLASSID='Linux 2.6.23 i686'
CLIENTID=00:11:D8:3D:10:6A

I am finding wireshark difficult to use ! :(

acummings 10-25-2007 11:48 AM

(I could or may be all wet here) But, nonetheless, FWIW:

Have you tried a different NIC

(I'm wondering if it has to do with the Linux driver for Marvell gig ethernet hardware).

http://www.google.com/linux?hl=en&q=...it&btnG=Search

It seems that near a year and a half ago an onboard the motherboard Marvell gig that I had wouldn't work at that time in Linux. I took the easy way out -- I didn't need gig (10/100 would do) so I just stuck in a 3com 3c905-b pci card 10/100 network card and hooked my cat 5 cable to the 3com -- worked fine.

--
Alan.

acummings 10-25-2007 11:51 AM

Is the right Linux module/driver loaded (for the marvell)?

List the pci hardware -- or is it in this case list the pci-e hardware?

--
Alan.

riodeuno 10-25-2007 12:52 PM

i have the same problem but mine is not a Marvell ethernet adapter
i use Realtek ethernet adapter, I too am connected to the same local area network as Duryodhan..


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