Internet and ftp are slow

Issues related to configuring your network
vermio
Posts: 9
Joined: 2014/01/09 14:49:49

Internet and ftp are slow

Post by vermio » 2014/04/18 16:34:23

Hi,
I have Centos 6.5 installed in an old pc.
I have some network configuration issues which are:
a) internet loads pagee very slowly (only the 1st time. the 2nd it's quick - probably reads the cache). From windows pc works fine (the router is the same).
b) ftp (vsftpd) from my windows client is very slow to login (I wait about 20 sec after I give the password). Then it works ok.
I have de-activated all the firewalls (router, client, unix) but it didn't get better.

I know that I didn't give you any detail (files, outputs) but you can assist me if you want because I don't have much experience in linux.

Thanks

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Internet and ftp are slow

Post by avij » 2014/04/18 17:52:57

Perhaps it's a name server issue? Are the name servers configured in /etc/resolv.conf the same ones you have on your Windows machine?

vermio
Posts: 9
Joined: 2014/01/09 14:49:49

Re: Internet and ftp are slow

Post by vermio » 2014/04/19 15:14:16

First of all, I want to say that resolv.conf has changed.
I have those lines in the file
# Generated by NetworkManager
domain Home
search Home lnx.gr
nameserver 192.168.2.1

The file was changed by networkmanager.
This is probably because the router gave new ip to the linux server (yesterday it was 192.168.2.6 and today is 192.169.2.3).
So, many questions came out.
1) Is it possible to make router not to change the ip's although I have dns? If yes, how?
2) should i disallow network manager to change that file?
3) Is the resolv.conf correct?

Now, after that change, ftp from windows to unix server doesn't work at all!
Something very strange is happening.
I type ftp 192.168.2.3 and I'm getting ftp> as reply. No message at all! Not even connection refused or sth like that.
I disabled iptables again but the same.
You can see the screenshot.

And something else.
putty and telnet from windows to linux work perfect!
Attachments
Untitled.png
Untitled.png (23.71 KiB) Viewed 5469 times

buzz9
Posts: 7
Joined: 2013/10/07 00:25:07

Re: Internet and ftp are slow

Post by buzz9 » 2014/04/19 21:54:18

vermio wrote: 1) Is it possible to make router not to change the ip's although I have dns? If yes, how?


Add your computers MAC address to the routers dhcp table for a static ip, you will have that ip every time (so long as you connect to the network with same network card) you'll IP will be the same regardless of operating system. You can do this by running ifconfig on your machine, then add MAC address on router admin page. Though that's probably not the issue. Go to network manager and see if your connection settings are good. Open network manager, select your network interface, select edit, select IPv4 Setting, mine is setup for automatic dhcp, and probably for you too. That might be the easiest fix. I'd restart the computer in between changes or bare minimum restart network manager.

vermio
Posts: 9
Joined: 2014/01/09 14:49:49

Re: Internet and ftp are slow

Post by vermio » 2014/04/22 21:04:33

buzz9 wrote:
vermio wrote: 1) Is it possible to make router not to change the ip's although I have dns? If yes, how?


Add your computers MAC address to the routers dhcp table for a static ip, you will have that ip every time (so long as you connect to the network with same network card) you'll IP will be the same regardless of operating system. You can do this by running ifconfig on your machine, then add MAC address on router admin page. Though that's probably not the issue. Go to network manager and see if your connection settings are good. Open network manager, select your network interface, select edit, select IPv4 Setting, mine is setup for automatic dhcp, and probably for you too. That might be the easiest fix. I'd restart the computer in between changes or bare minimum restart network manager.


Well.
I tried to add to my router the macaddresses and a static ip for each machine I want to use. But although this option existed in the manual, there wasn't into my router's setup!!!
So, I decided to put a static ip to each machine I use.
I gave xxx.xxx.x.3 to my windows pc and xxx.xxx.x.4 to linux.
Windows worked without any issues.
Linux finally - after many efforts - worked partially.
Ftp works very fast now.
But internet does not work at all.

And there is something that it doesn't seem correct to me:
I have two network interfaces: ifcfg-eth0 and ifcfg-eth0.static.
If I delete the static, network doesn't startup!!!

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Internet and ftp are slow

Post by gerald_clark » 2014/04/22 21:34:06

Turn off NetworkManager and turn on network.
chkconfig NetworkManager off
service NetworkManager stop
chkconfig network on
service network restart.

You need to add the GATEWAY to /etc/sysconfig/network
and you nameserver to /etc/resolv.conf.

See the FAQ. http://wiki.centos.org/FAQ/CentOS6

vermio
Posts: 9
Joined: 2014/01/09 14:49:49

Re: Internet and ftp are slow

Post by vermio » 2014/04/24 17:15:15

I did what you said.
No change at all.
I'm uploading the two files in case I made a mistake (nameserver maybe).
Attachments
files.zip
(552 Bytes) Downloaded 101 times

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Internet and ftp are slow

Post by gerald_clark » 2014/04/24 17:18:06

I don't download random zip files.

vermio
Posts: 9
Joined: 2014/01/09 14:49:49

Re: Internet and ftp are slow

Post by vermio » 2014/04/26 22:16:10

OK,
Here they are:
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=mguru.lnx.gr
GATEWAY=192.168.2.1


/etc/resolv.conf
# Generated by NetworkManager
search lnx.gr


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
DNS1=192.168.2.4
DNS2=8.8.8.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Internet and ftp are slow

Post by TrevorH » 2014/04/26 22:25:47

Your resolv.conf is completely wrong. When it says

Code: Select all

# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
it means that you should put lines like that in the ifcfg-ethX file, not in resolv.conf. If you want to update resolv.conf directly then you should update it to have lines like

Code: Select all

search mydomain.net
nameserver 192.168.2.4
nameserver 8.8.8.8
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply