Find the answer to your Linux question:
Results 1 to 3 of 3
Hi. i am running ubuntu 8.04 in a laptop. through the wired connection i am currently connected to an aDSL modem router Linksys wag354g. My network is 192.168.1.0 /24 Also ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Posts
    5

    2 connections 2 routes


    Hi. i am running ubuntu 8.04 in a laptop.
    through the wired connection i am currently connected to an aDSL modem router Linksys wag354g. My network is 192.168.1.0 /24
    Also my neighbor has the same model of router and i am connected through the wireless of my laptop to his router. His network is 172.16.1.0 /24

    My question is how to connect to both networks simultaneously and divide the traffic between the two connections based on application. For example i would like to have the internet browsing to go through the wired connection (network 192.168.1.0) and all the other traffic through the wireless connection (network 172.16.1.0).

    Any ideas anyone?

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    I've seen this question come up from time to time,
    and it seems there is no easy way to do this.
    Your system is designed to be able to have routes
    to different destinations, but you can't set different
    routes for different applications.

    One address is the default gateway. All traffic will go there
    unless otherwise specified. You can create other routes
    with the route command, saying that traffic to
    thus and such destination should be sent to this gateway
    and traffic to some other destination sent to whatever
    gateway. There is no facility to say send port 80 traffic
    to one gateway and port 25 traffic to another.

  3. #3
    Just Joined! bclark4444's Avatar
    Join Date
    Dec 2003
    Posts
    55
    I think the command you may want will look like the following:
    route add -net 172.16.1.0 netmask 255.255.255.0 dev eth1

    Except you would change the eth1 to whatever your wireless adapter is. This will route all 172.16.1.0/24 through the wireless and put everything else through the default device (which im assuming is your hardwired eth0 device).

    As rcgreen stated above, there isnt any defined way to split the traffic by port, only by nets.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •