Re: Routing over multiple uplinks
- From: Unruh <unruh-spam@xxxxxxxxxxxxxx>
- Date: 2 May 2006 18:20:52 GMT
Udo Giacomozzi <udo.news@xxxxxxxxxxxx> writes:
Hello all,
I have an embedded system that connects to the Internet using two
different uplinks. One goes through a Ethernet connection and a
router, the other is using a GPRS connection.
Basically any Internet host can be reached with one of the two links.
I need a way to send UDP packets over a explicitly choosen link. How
can this be done?
For example, I want to send a UDP packet to host X using the GPRS
connection even if the Ethernet connection is online and could reach
host X faster.
I tried to bind the local IP address to the local IP address but the
packets get routed through the automatically choosen gateway anyway.
Even worse, the packets get sent with the wrong source IP address (the
one belonging to the other interface).
Here is an example of the routing table:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.99.0.1 * 255.255.255.255 UH 0 0 0 ppp0
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
default 217.201.249.40 0.0.0.0 UG 0 0 0 ppp0
default 10.1.1.10 0.0.0.0 UG 0 0 0 eth1
It will only ever use the latest default entry. Two default entries make no
sense. If you want to route to specific hosts or netc, put it in explicitly
route add -net 111.222.333.0 netmask 255.255.255.0 ppp0
will route everything to any machine on 111.222.333.x through ppp0
10.1.1.10 is the local router.
217.201.249.40 is the remote IP of the GPRS uplink.
The Ethernet address of the device is 10.1.1.119.
When both links are active and I send a packet bound to 10.1.1.119 to
a Internet address, the packet gets routed through ppp0.
Is there any way to tell sendto() and friends which interface to use?
Thanks,
Udo
--.
- Follow-Ups:
- Re: Routing over multiple uplinks
- From: Udo Giacomozzi
- Re: Routing over multiple uplinks
- References:
- Routing over multiple uplinks
- From: Udo Giacomozzi
- Routing over multiple uplinks
- Prev by Date: Routing over multiple uplinks
- Next by Date: 'scp' using broadband?
- Previous by thread: Routing over multiple uplinks
- Next by thread: Re: Routing over multiple uplinks
- Index(es):
Relevant Pages
|