LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 09-14-2009, 03:45 AM   #1
flybob
LQ Newbie
 
Registered: Sep 2009
Location: Sweden
Distribution: debian
Posts: 6

Rep: Reputation: 0
Unhappy Routing issues with dual interfaces on debian server


Hey and hello!

After several weeks of trying to resolve this issue, I finally turn to you for help... I simply can't figure out what the problem is due to lacking knowledge of routing in linux.

Setup:
A debian server with dual network interfaces.
An office network with a few workstations and laptops on the internal interface (eth0)
An external network with several other offices on the external (eth1)
Computers on the internal net are using win/mac

Symptoms:
Connection is very slow, dropping packages. Music can't be played over the network, samba copies files at 1 MB/s at most. SCP with filezilla is even slower. Problem occurs on all computers trying to copy files from the server. Samba does not seem to be the issue, neither is router (tried with replacement). SHutting down the external interface and trying does not do anything to help the speed.

Configurations:
This is what 'route' gives:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
130.236.246.0 * 255.255.255.0 U 0 0 0 eth1
default fuego.ks.liu.se 0.0.0.0 UG 0 0 0 eth1

(fuego is the external nets firewall to the outside world, internet)


This is what 'route -C' gives:


Kernel IP routing cache
Source Destination Gateway Flags Metric Ref Use Iface
ko.stuff.liu.se 130.236.246.255 130.236.246.255 ibl 0 0 17 lo
192.168.0.42 Klas.forte Klas.forte 0 1 0 eth0
192.168.0.42 Klas.forte Klas.forte 0 1 0 eth0
Klas.forte 192.168.0.42 192.168.0.42 il 0 0 29 lo
192.168.0.42 unknown.forte unknown.forte 0 0 0 eth0
ypsilon.y.linte 130.236.246.255 130.236.246.255 ibl 0 0 0 lo
register.shgo.s 130.236.246.255 130.236.246.255 ibl 0 0 17 lo
130.236.246.57 130.236.246.255 130.236.246.255 ibl 0 0 13 lo
130.236.246.253 130.236.246.255 130.236.246.255 ibl 0 0 0 lo
130.236.246.84 130.236.246.255 130.236.246.255 ibl 0 0 44 lo
130.236.246.213 130.236.246.255 130.236.246.255 ibl 0 0 3 lo
unknown.forte 192.168.0.42 192.168.0.42 il 0 0 9 lo
192.168.0.42 unknown.forte unknown.forte 0 0 8 eth0
130.236.246.59 130.236.246.255 130.236.246.255 ibl 0 0 6 lo
ek-xtra1.ks.liu 130.236.246.255 130.236.246.255 ibl 0 0 0 lo
130.236.246.209 ALL-SYSTEMS.MCA ALL-SYSTEMS.MCA ml 0 0 0 lo
foo63.shgo.stud 255.255.255.255 255.255.255.255 ibl 0 0 1 lo
localhost localhost localhost l 0 0 1 lo
130.236.246.58 130.236.246.255 130.236.246.255 ibl 0 0 13 lo
localhost localhost localhost l 0 0 1 lo

As you can see, routs to several other offices also appear (ypsilon, xtra1, foo63 etc). Why?

For some reason, i wonder why so many routes are going through the lo, can this be causing any problems?

Anything else you would like to see that can determine the problem with the routing?
 
Old 09-14-2009, 05:02 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,295

Rep: Reputation: 123Reputation: 123
It seems nothing is sent to default gw, eth1.
* What ip do you get for fuego.ks.liu.se, what is in your /etc/hosts?
* Can you reach fuego.ks.liu.se - try pinging for example.
* You could try to remove and add back default gateway
 
Old 09-15-2009, 05:31 AM   #3
flybob
LQ Newbie
 
Registered: Sep 2009
Location: Sweden
Distribution: debian
Posts: 6

Original Poster
Rep: Reputation: 0
cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 satasata.forte satasata
192.168.0.x otherserver

---------------------------------------------------

ping fuego.ks.liu.se
PING fuego.ks.liu.se (130.236.246.1) 56(84) bytes of data.
64 bytes from fuego.ks.liu.se (130.236.246.1): icmp_seq=1 ttl=64 time=4.08 ms
64 bytes from fuego.ks.liu.se (130.236.246.1): icmp_seq=2 ttl=64 time=1.42 ms

--- fuego.ks.liu.se ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 1.424/2.752/4.081/1.329 ms

----------------------------------------------------

If i can read it right, it seems like the internal interface does not have any gateway. I know we earlier had a problem with having dual gateways so the internal one was removed.

This is done in /etc/network/interfaces, the gateway part is commented out (used to be 192.168.0.1).

perhaps i should add it back again and configure the routes somehow, but how?

//Josef
 
Old 09-16-2009, 02:51 AM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,295

Rep: Reputation: 123Reputation: 123
Quote:
it seems like the internal interface does not have any gateway
No defaultgateway for eth0, which is correct. The line
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
tells where packets to internal network shall go.
Do not add eth0 as default gateway!

The routing cache is wrong, however. Should clear itself after a while, try clearing it manually. I don't know how unfortunately, you'll have to search a bit.
 
Old 09-17-2009, 04:29 AM   #5
flybob
LQ Newbie
 
Registered: Sep 2009
Location: Sweden
Distribution: debian
Posts: 6

Original Poster
Rep: Reputation: 0
Ok, thanks for clearing that up.

I could clear the cache (just not right now since im off location), but how come the cache gets the wrong routes at all?

Is there anyone else adding info to the cache perhaps?
 
Old 09-17-2009, 04:47 AM   #6
flybob
LQ Newbie
 
Registered: Sep 2009
Location: Sweden
Distribution: debian
Posts: 6

Original Poster
Rep: Reputation: 0
I just flushed the cache with
'ip route flush cache'

and it looks a bit more "normal":

Source Destination Gateway Flags Metric Ref Use Iface
192.168.0.42 unknown.forte unknown.forte 0 0 6 eth0
* 255.255.255.255 255.255.255.255 bl 0 0 1 lo
register.shgo.s 130.236.246.255 130.236.246.255 ibl 0 0 1 lo
fuego.ks.liu.se patapata.forte. patapata.forte. il 0 0 0 lo
patapata.forte. h-60-198.A163.p fuego.ks.liu.se 0 1 0 eth1
192.168.0.42 unknown.forte unknown.forte 0 0 6 eth0
uu1.stuff.liu.s 130.236.246.255 130.236.246.255 ibl 0 0 1 lo
130.236.246.58 130.236.246.255 130.236.246.255 ibl 0 0 16 lo
130.236.246.245 ALL-SYSTEMS.MCA ALL-SYSTEMS.MCA ml 0 0 0 lo
unknown.forte 192.168.0.42 192.168.0.42 il 0 0 16 lo
130.236.246.84 130.236.246.255 130.236.246.255 ibl 0 0 14 lo
h-60-198.A163.p patapata.forte. patapata.forte. l 0 0 83 lo
foo63.shgo.stud 255.255.255.255 255.255.255.255 ibl 0 0 0 lo

although the entry for interface eth0 is added two time.. but since it's actually the same route, there shouldn't be any problems i hope.

BUT

a few minutes later i notice that the routing cache is HUGE one again and that the speed of the network is slow. The routing cache is now much bigger than before, i have six entries for eth0, two for eth0 and 42 for lo... is this normal in any way?

What can be wrong.... :/
 
Old 09-17-2009, 03:06 PM   #7
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,295

Rep: Reputation: 123Reputation: 123
This is really strange, I'm stumbling in the dark.
Let's get some more info, maybe it'll help. Send output of:
# ifconfig
# arp -v

And that host
127.0.1.1 satasata.forte satasata
you have in /etc/hosts, is that really correct? Kinda strange adress really.
I'm wrong here, standard adress of your computer. Forget about this.

(Btw, the routing cache gets large, that's ok. It's kind of a quick-list of connections, once a path is found that path is entered in the cache for faster routing next time.)

Last edited by pingu; 09-17-2009 at 03:11 PM. Reason: Correcting myself
 
Old 09-17-2009, 03:22 PM   #8
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,295

Rep: Reputation: 123Reputation: 123
Also post /etc/network/interfaces
What is the netmask for fuego.ks.liu.se - 130.236.246.1 ?
From your computer - or any connected to internal network - do a traceroute to server.

I don't really know what I'm looking for, just hoping to find something.
I am really concerned about lines like these:
30.236.246.58 130.236.246.255 130.236.246.255 ibl 0 0 16 lo
Why is gateway adress .255 and not .1? Should be 130.236.246.1 and interface eth1! 130.236.246.255 is (normally) broadcast adress, this puzzles me.
 
Old 09-25-2009, 04:38 AM   #9
flybob
LQ Newbie
 
Registered: Sep 2009
Location: Sweden
Distribution: debian
Posts: 6

Original Poster
Rep: Reputation: 0
Hey! Some more info coming right up!

ifconfig:


eth0 Link encap:Ethernet HWaddr 00:1D:7D:06:7E:C8
inet addr:192.168.0.42 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21d:7dff:fe06:7ec8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:983012 errors:0 dropped:0 overruns:0 frame:0
TX packets:1091368 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:147320530 (140.4 MiB) TX bytes:1432374624 (1.3 GiB)
Interrupt:169 Base address:0xe000

eth1 Link encap:Ethernet HWaddr 00:E0:4C:DA:96:59
inet addr:130.236.246.116 Bcast:130.236.246.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:feda:9659/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6465992 errors:0 dropped:0 overruns:0 frame:0
TX packets:6129661 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:561411556 (535.4 MiB) TX bytes:383207918 (365.4 MiB)
Interrupt:50 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13802 errors:0 dropped:0 overruns:0 frame:0
TX packets:13802 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1743494 (1.6 MiB) TX bytes:1743494 (1.6 MiB)

--------------------------

arp -v

Address HWtype HWaddress Flags Mask Iface
192.168.0.142 ether 00:24:2B:7F:74:53 C eth0
192.168.0.102 ether 00:0C:6E:A7:D5:D5 C eth0
130.236.246.1 ether 00:90:FB:00:36:36 C eth1
130.236.246.1 ether 00:90:FB:00:36:36 C eth1
Entries: 4 Skipped: 0 Found: 4

--------------------------

cat /etc/network/interfaces

auto lo
iface lo inet loopback

# The primary network interface (internal)
allow-hotplug eth0
iface eth0 inet static
address 192.168.0.42
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
# gateway 192.168.0.1 (gateway disabled)

allow-hotplug eth1
iface eth1 inet static
address 130.236.246.116
network 130.236.0.0
netmask 255.255.255.0
broadcast 130.236.246.255
gateway 130.236.246.1

------------------------------

traceroute 130.236.246.1
traceroute to 130.236.246.1 (130.236.246.1), 30 hops max, 40 byte packets
1 130.236.246.1 (130.236.246.1) 0.336 ms 1.414 ms 0.212 ms

traceroute from a client on the internal net to the server only goes through one jump, to server directly:

C:\Users\Forte>tracert 192.168.0.42
Spårar väg till SATASATA [192.168.0.42] över högst 30 hopp:
1 <10 ms <10 ms <10 ms SATASATA [192.168.0.42]

------------------------------

As you said, the .255 gateway seems wierd, since the gateway is configured as .1 in /etc/network/interfaces
Where does that information come from? Is someone getting a wrong gateway address from somewhere else?

Meanwhile.. i still can't find any problems. Also asked the admins for the bigger net if they have any input on the configurations of the nets.

I dont like this at all.. :(
 
Old 09-28-2009, 07:41 AM   #10
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,295

Rep: Reputation: 123Reputation: 123
HA! Found it!
From your /etc/network/interfaces:

allow-hotplug eth1
iface eth1 inet static
address 130.236.246.116
network 130.236.0.0
netmask 255.255.255.0
broadcast 130.236.246.255
gateway 130.236.246.1

See? Check the lines I put in italics: With netmask 255.255.255.0 the network shall be 130.236.246.0!

This probably occurred because 130.x.x.x as standard is a class B network (meaning per default the network in your case is 130.236.0.0). However you are using it as a class C - which is quite ok and very common. But you must then change the network adress to 130.236.246.0.

Change that line in /etc/network/interfaces and restart network. Hopefully the problems will be gone.
 
  


Reply

Tags
network, route, routing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setting up a DHCP server with multiple network interfaces - Debian Srz0rz Linux - Networking 5 06-08-2011 11:33 PM
Two interfaces routing problem, Debian, kernel 2.4 clintp Linux - Networking 4 10-31-2008 12:24 AM
grub issues: dual boot Debian i386 & Debian amd64 ErrorBound Debian 1 03-09-2007 07:41 PM
routing issues - debian spargonaut Linux - Networking 4 05-24-2006 01:13 AM
Routing Between Virtual Interfaces on Web Server Louie55 Linux - Networking 2 02-20-2004 09:17 AM


All times are GMT -5. The time now is 12:00 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration