LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to ignore the routing table (https://www.linuxquestions.org/questions/linux-networking-3/how-to-ignore-the-routing-table-74832/)

155092376 07-22-2003 07:56 AM

how to ignore the routing table
 
Hello,

I know a bit about programming sockets in c in Linux. Now I've got two NICs:
eth0 with 192.168.1.100 and
eth1 with 192.168.1.101 .

I want to send two datagrams to an internetlocation. One datagram over eth0 and the other over eth1. But they always go over eth0 because the default gateway is set like this. ( route add default gw 192.168.0.1 eth0) .

I tried to do it the way a DHCP-client send its packets, but then the other site won't recognize my packets as UDP/IP anymore.

Do you think it is possible without reprogramming the kernel?
I think the kernel controls the contents of the ethernet header.

I hope you can help me.

Marco de Wit

jharris 07-22-2003 08:24 AM

Where are you sending the packets? This is what will decide the route they take. As eth0 and eth1 are both on the same subnet why do you want to use a specific interface?

cheers

Jamie...

155092376 07-22-2003 08:59 AM

Well, the real situation is a bit more complex, it's about ESS transition :
I've got two wireless NIC's and when one is busy sending (VoIP) the other should find a better AP and connect to that ESS (ESS of eth0 can be different than that of eth1), and then the VoIP should also go over that other NIC, but the routing table in Linux takes two seconds to have effect. So after I do route add default gw 192.168.0.1 eth1 , it takes two seconds before the VoIP packets go over eth1.

That's why I want to bypass the routing table.

Marco

jharris 07-22-2003 09:04 AM

Sounds to me like you want to look into some of the QoS and advanced routing stuff. You can load balance the links or route packets on their type/mark/anything you want really.

http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/index.html

HTH

Jamie...

155092376 07-22-2003 09:35 AM

No, I just want to walk downtown and call someone over WLAN. And when I walk away my other NIC should pick up a better connection (To another AP with probably a different ESSID.) And when this new connection is made the Voice traffic should go over it at once. I don't want to wait 2 seconds before the routing table has its effect.

Marco


All times are GMT -5. The time now is 04:03 PM.