Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Connecting to internet using two network interfaces ?

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Posts
    36

    Default Connecting to internet using two network interfaces ?

    hi all

    distro : BT4 final

    I have searched google and other forums a lot but no luck

    I want to connect to internet using wireless card (wlan0) and using ethernet (eth0) at the same time at the same time .
    (wlan0) should connects to AP and (eth0) connects to ethernet my home router

    NOTE: there should be two different connections (networks) , two IPs at the same time

    wcid , it only connects either wireless (wlan0) or ethernet (eth0) but not both


    reason:
    I want this because with the ethernet I run VNC server and I open vncviewer with windows computer to control it and with other network (wlan0) I want to do some stuff ...etc not to mention

    VNC over ethernet cable is fast while transfering screen ... etc
    Last edited by Radar_mX; 07-19-2010 at 02:37 PM.

  2. #2
    Member macphail's Avatar
    Join Date
    Jun 2010
    Location
    East Coast, USA
    Posts
    164

    Default Re: Connecting to internet using two network interfaces ?

    ifconfig(8): configure network interface - Linux man page
    http://linux.die.net/man/8/iwconfig
    How To Add Multiple IP Addresses On Linux / Fedora Core / Fedora
    etc etc etc....

    you may want to spend some small amount of time brushing up on your google-fu. the links above may not be the best for you (and certainly not BT specific), just the most obvious hits from the first page of the search.
    good luck with that.
    -----------
    ~peace
    MacPhail

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Posts
    36

    Default Re: Connecting to internet using two network interfaces ?

    first thanks for the reply

    the second link talks about connecting with multiple ips using same interface and same network so it is not what I want

    I think I was searching wrong key words so there were no good results in searches

    btw I am not a beginner
    I will try to read ifconfig manual

  4. #4
    Member macphail's Avatar
    Join Date
    Jun 2010
    Location
    East Coast, USA
    Posts
    164

    Default Re: Connecting to internet using two network interfaces ?

    np.
    at its core, 'ifconfig <device> <address>' is pretty much what you want. there are other considerations, but i'm thinking you can handle it.
    -----------
    ~peace
    MacPhail

  5. #5
    Good friend of the forums gunrunr's Avatar
    Join Date
    Jan 2010
    Location
    shining my spoon
    Posts
    265

    Default Re: Connecting to internet using two network interfaces ?

    actually if hes using the command line to connect his wifi he would be using iwconfig instead of ifconfig. an example would be
    Code:
    iwconfig wlan0 interface essid "ap essid here"
    or interface ap "mac address here"
    or
    iwconfig --help
    for help
    Wielder of the spoon of doom
    Summercon, Toorcon, Defcon, Bsides, Derbycon, Shmoocon oh my
    Come hang out with hackers on twitter @gunrunr556

  6. #6
    Moderator KMDave's Avatar
    Join Date
    Jan 2010
    Posts
    2,281

    Default Re: Connecting to internet using two network interfaces ?

    So you do have two different providers at your house?

    Just wondering how the setup works.

    Well sure there are ways on how to get this set up but will need more info about your environment first. Where do you get the WLAN from?
    Tiocfaidh ár lá

  7. #7
    Super Moderator lupin's Avatar
    Join Date
    Jan 2010
    Posts
    2,943

    Default Re: Connecting to internet using two network interfaces ?

    Setting up two network interfaces is not actually any more complicated than setting up one - the routing is the only thing that you have to concern yourself with, maybe by following something like this or this. Also, if you want traffic destined for particular non directly connected networks to go via particular interfaces, you will need to configure static routes.
    Capitalisation is important. It's the difference between "Helping your brother Jack off a horse" and "Helping your brother jack off a horse".

    The Forum Rules, Forum FAQ and the BackTrack Wiki... learn them, love them, live them.

  8. #8
    Member macphail's Avatar
    Join Date
    Jun 2010
    Location
    East Coast, USA
    Posts
    164

    Default Re: Connecting to internet using two network interfaces ?

    Quote Originally Posted by gunrunr View Post
    actually if hes using the command line to connect his wifi he would be using iwconfig instead of ifconfig. an example would be
    Code:
    iwconfig wlan0 interface essid "ap essid here"
    or interface ap "mac address here"
    or
    iwconfig --help
    for help
    hence, my original link to iwconfig as well as ifconfig manpages.

    -----------
    ~peace
    MacPhail

  9. #9
    Senior Member fnord0's Avatar
    Join Date
    Jul 2008
    Posts
    144

    Default Re: Connecting to internet using two network interfaces ?

    Quote Originally Posted by lupin View Post
    Setting up two network interfaces is not actually any more complicated than setting up one - the routing is the only thing that you have to concern yourself with, maybe by following something like this or this. Also, if you want traffic destined for particular non directly connected networks to go via particular interfaces, you will need to configure static routes.
    wow, lupin - those 2 links are paydirt. I had never seen the 'Linux Advanced Routing & Traffic Control HOWTO', that really is a great doc. it covers ALOT of ground, even goes into using Zebra for dynamic routing protocols (which really is an awsome project). I also bookmarked that second link calling the larger doc = 'Guide to IP Layer Network Administration with Linux'.

    thanks, I love shit like this... volumes of good information.

    johnny 5: "Input, more input, intput, more input, Ahhhhhhh, more input!"

    oh, yes - and to be "on topic": here's how to route out both interfaces, "this process is actually ECMP, or Equal Cost Multipath Routing. It takes care of using all the interfaces available, but keeps TCP pairs on one interface - a requirement of the protocol."[1]

    * ifconfig your IP/netmask and interface "UP"
    * then produce the default routes like so :

    ip route add default \
    scope global \
    nexthop dev eth0 \
    nexthop dev wlan0
    * type 'ip route' to display the current known ip routes::
    #ip route
    default
    nexthop dev eth0 weight 1
    nexthop dev wlan0 weight 1
    "If you know one connection is faster than another you can weight the routes. This causes the ratio of traffic going to different interfaces to change accordingly. An example of a 1:2 ratio is below"[2]
    ip route add default \
    scope global \
    nexthop dev eth0 weight 1 \
    nexthop dev wlan0 weight 2
    I just read the quoted article yesterday, figured it was pertinent. =)
    [1] quote from article - HackThisZine #10 Using Multiple Interfaces to get 1MB+/s - Anonymous
    [2] quote from article - HackThisZine #10 Using Multiple Interfaces to get 1MB+/s - Anonymous
    Last edited by fnord0; 07-20-2010 at 05:30 PM.
    'see the fnords!'

  10. #10
    Junior Member
    Join Date
    Apr 2008
    Posts
    36

    Default Re: Connecting to internet using two network interfaces ?

    This is easy
    problem solved

    for people who wants to know
    Code:
    iwconfig [wireless_interface_here] essid [ap_name_here] key [key_here]
    then we need to get ip with dhclient
    Code:
    dhclient [wireless_interface_here]
    then check if you have two ips with
    Code:
     ipconfig -a
    Now I connect to both networks using (eth0) and (wlan0) interfaces and I checked by going to router configuration page it opens

    Thank you guys
    macphail I read iwconfig manual then I figured out the solution in minutes , I thought I would need some sort of special things to do but sometimes solutions are easy to find around us

Page 1 of 2 12 LastLast

Similar Threads

  1. /etc/network/interfaces file
    By promark in forum Beginners Forum
    Replies: 2
    Last Post: 06-28-2010, 04:57 PM
  2. Replies: 0
    Last Post: 02-10-2010, 01:43 AM
  3. no network interfaces
    By theokiedokie in forum OLD Newbie Area
    Replies: 2
    Last Post: 07-26-2008, 08:01 AM
  4. No detection of network interfaces
    By DrFeelgood in forum OLD LiveCD Support
    Replies: 5
    Last Post: 07-08-2008, 05:46 AM
  5. Strange thing with network interfaces
    By zonkers in forum OLD Newbie Area
    Replies: 11
    Last Post: 07-23-2007, 04:12 PM

Tags for this Thread

Posting Permissions

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