Re: Traffic NOT moving through the correct network interface?



"Calab" <myspam@xxxxxx> writes:

rout
"Moe Trin" <ibuprofin@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:slrnfodevd.m7q.ibuprofin@xxxxxxxxxxxxxxxxxxxx
On Thu, 10 Jan 2008, in the Usenet newsgroup alt.os.linux, in article
<oFjhj.37168$EA5.19884@pd7urf2no>, Calab wrote:

Machine is running Debian 4.0r1 2.6.22-3-686. This machine has three
network
connections.

and the key is in the routing table (/sbin/route -n).

ROOT:~#route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.0.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
68.145.52.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
68.145.56.0 0.0.0.0 255.255.252.0 U 0 0 0 eth2
239.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
0.0.0.0 68.145.52.1 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 68.145.56.1 0.0.0.0 UG 0 0 0 eth2
0.0.0.0 10.0.11.1 0.0.0.0 UG 0 0 0 eth0


eth0:
- static IP of 10.0.11.16 with a mask of 255.255.255.0
- connected to a router, which is connected to the rest of my LAN and a
cable modem #1

This ALONE would be OK

eth1:
- dynamic IP
- connected directly to cable modem #2

and you probably expect this to lead to the world - why bother, when
eth0 already fulfills that need.

eth2:
- dynamic IP
- connected directly to cable modem #1

And why should the kernel use this in preference to eth0?

Because the connections on eth1 and eth2 are INBOUND.

eth0 is a gigabit ethernet connection to my LAN. It is used for file access
within the LAN and any incidental (unplanned) outbound internet traffic such
as package retrieval, etc.

eth2 is USB to cable modem #1. This is the inbound connection used for
services accessible from the internet - web, ssh, ftp, etc. I'd expect any
inbound connections to automatically use this port for the corresponding
outbound traffic. This is the least used interface as far as bandwidth is
concerned.

That is NOT how it works. the system looks at the IP address on the packet
and then looks at the route and sends it out on the most specific route. If
two routes are tied it sends it on the most recent. eth0 is probably the
most recent. That means ALL packets, ALL, except for 68.145.52.x
and 68.145.56.x go thorugh eth0. All. No matter where the packet they are
replies to came from. The routing system has no memory. It looks at the
packet and ships it out. If it had to remember where the packet this is a
reply to, it would have to know what it was a reply to and look for
previous packets ( that could be haldf an hour ago) it was a reply to--
totally hopeless.


eth1 is 100mb to cable modem #2. This is for the planned, high bandwidth
applications on my Linux PC. bittorrent client, large file transfers, etc.

There are no such things. You told it to send stuff for addresses of the
form 68.145.56.x out that port. That is it.
There can only be ONE default route. And the system uses the most recent
assuming that that is what you want.




Applications are specifically bound to this interface in their configuration
files.

No they are not. That is not how routing works. applications have nothing
to do with it. The address is all.



At this point, all outbound traffic is going over eth0 regardless of where
the connection originated. bittorrent connections come in eth1, and go out
eth0. Same with SSH and FTP connections.

Of course. That was what you told it to do.


See the Adv-Routing-HOWTO which should be on your system. Any time
you have more than one route that will take you "someplace", the kernel
will choose the one with the lowest metric - and if the metric is equal,
will choose the last one configured.

I've pasted the results from ifconfig below.

Your munging makes the ifconfig information completely useless.

All three interfaces are on seperate subnets... Shouldn't make a difference
if the IP's are actually real.

NO idea what you are trying to say.


WHAT is going on here? Can someone point me in the right direction as
far as troubleshooting this?

-rw-rw-r-- 1 gferg ldp 297491 Sep 4 2003 Adv-Routing-HOWTO

Person who set up the routing doesn't understand the way networking uses
the word "default" meaning as when NOTHING ELSE applies, use this. You
have three defaults - which one to use?

I assumed that outbound connections would pass through the same interface as
the inbound connection that spawned them.

How could the network software know what inbound packet spawned them? That depends
on the details of the programs. The routing would have to know and
understand in detail every program running on your system, and obviously
impossible task.



I'll read over the HOWTO... I appreciate the help!

Routing is stupid. hand it a packet, it looks at the address, and routes
the packet. That is it. If it spent time analysing the packet trying to
figure out where it came from your network data rates would be like
snailmail.





.



Relevant Pages

  • Strange network routing behaviour when routing locally generated packets
    ... Strange network routing behaviour when routing locally generated packets ... I encountered two linked weird behavior of the network paquet routing process ... I must say that all does not occur when routing packet generated from another computer. ... And second, which is somehow related, if there is an available route entry for a destination ...
    (Linux-Kernel)
  • Re: Routing table drops packets via ppp0
    ... > three network connections. ... > private network on the 192.168.17.0/24 address range. ... > From the debian box, I can ping other machines connected via the ADSL ... > The routing table looks like: ...
    (Debian-User)
  • Re: Routing with 2 ISP
    ... I had a small network with one ISP and firewall. ... I will add the second routing table named "adsl" and configure routing ... Also, unless you have nothing but machines and people you trust on all these little subnets, have the external ISP connections on NICs not reachable from the private machines without going through your firewall. ...
    (Fedora)
  • Re: IP Routing in Windows XP Pro
    ... network design perspective you need to create what Microsoft calls a network ... on the routing algorithms that work well under highly dynamic conditions, ... IP packet to determine the ultimate destination. ... Thus, when the packet is passed to the NIC driver, it ...
    (microsoft.public.windowsxp.network_web)
  • Re: Cannot recieve UDP packets that are broadcast on inter - network.
    ... Just want to ask do you mean that computer do receive the packet (so all ... connections are not important) but winsock didn't sent it to your app? ... Network Sniffer) detects and shows all the response frames that were ...
    (microsoft.public.win32.programmer.networks)