Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Using WiFi and Ethernet Connections

  1. #11
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,719
    Blog Entries
    20

    Default Re: Using WiFi and Ethernet Connections

    I just had a fiddle with one of my laptops has both wireless and wired.
    I can go to networkmanager and toggle to wireless and it says connecting to > then connected to
    But it's actually still only using the wired.

    My guess is, you will need to configure connections via ifup
    and force wired eth0 to some kind of LAN setup to the remote device

    A guess mind you
    Leap 15_KDE
    My Articles Was I any help? If yes: Click the star below

  2. #12
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Using WiFi and Ethernet Connections

    I'm not understanding a few things, can you explain a bit more please:
    1. what do you mean by "client's network" and "client networks"? Can you describe it?
    2. what device is at I.P. address 192.168.0.1
    3. what device is at I.P. address 192.168.1.1
    4. are you trying to set up Internet Connection Sharing with the machine we're talking about here being the ICS server which will feed the Internet to the "client networks"?
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  3. #13

    Default Re: Using WiFi and Ethernet Connections

    Well, this is a routing problem. First you need to ensure that both interfaces get IP addresses, then you need to decide where you want you default gateway to be and which hosts you want to route to which interface and finally, you need to decide which DNS you are going to use.

    So, yes, it can be made to work, but you probably need to clue up on advanced routing at tldp.org.

  4. #14
    Join Date
    Jul 2009
    Location
    Kissimmee, FL
    Posts
    28

    Default Re: Using WiFi and Ethernet Connections

    Quote Originally Posted by swerdna View Post
    what do you mean by "client's network" and "client networks"? Can you describe it?
    I mean I'm sitting in a building owned by a client of mine. And connecting to a wired network (ethernet) owned by that client in that client's building. This network is just a bunch of file servers sitting in a closet with a hub and ethernet cable running to cubicles. I'm plugging one of those cables into the ethernet port on my notebook (OS openSUSE 11.2).

    Quote Originally Posted by swerdna View Post
    what device is at I.P. address 192.168.0.1
    The wired connection (eth0) is using the IP 192.168.0.189 issued by DHCP server (and default gateway) 192.168.0.1.

    Quote Originally Posted by swerdna View Post
    what device is at I.P. address 192.168.1.1
    The wireless (wi-fi) connection (wlan0) is using the IP 192.168.1.3 issued via DHCP by the MiFi 2200 Mobile Wi-Fi device and default gateway 192.168.1.1.

    Quote Originally Posted by swerdna View Post
    are you trying to set up Internet Connection Sharing with the machine we're talking about here being the ICS server which will feed the Internet to the "client networks"?
    I am not trying to do Internet Sharing or anything particularly "fancy." It's basically just being connected to two networks, through two different interfaces at the same time. Linux is an OS designed to network. This has to be possible.

    This works so easily with a Windows machine. To put it simply, in Windows it just routes the request packet to one connection, if there's no response it sends it through the next connection. Can't Linux be set up to look at both networks?

  5. #15
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,832
    Blog Entries
    2

    Default Re: Using WiFi and Ethernet Connections

    Yes, this is a routing problem but it should be easy to resolve.
    I haven't done this personally when using Network Manager, but try this...

    The idea is to assign a higher priority metric to your wireless gateway metric than your wired gateway metric. AFAIK the only way to do this is delete an existing route, then add it back in with the modified metric.

    I didn't notice whether you said this is a portable laptop which will travel from network to network or a fixed machine where these two network connections are permanent.

    The following isn't detailed but should hopefully be sufficient, the exact and complete command syntax or your specific situation should be available in the man route and if necessary Internet.

    First step is to configure the temporary (session only) solution:
    1. Run route -n (maybe even write to file for a permanent record) to display your current routing table. You likely will notice that your wired gateway has an equal or higher priority now.
    2. Remove one of the gateway routes using route del
    3. Add the gateway route back in using route add but with a modified metric, assign 1 to your wireless gateway and 16 to your wired gateway.
    4. Repeat steps 2 and 4 for the other gateway route accordingly.
    5. Run route -n again and compare to your original routing table to check your handiwork.

    The result should be that unless there is very congestion over your wireless connection, you should use that as your primary connection to the Internet. If that connection is unavailable, then your wired connection would be tried.

    If this works, it will be session-specific and work only until your next reboot which would be appropriate if you machine is a laptop which will connect to varying networks. In any case, if this is a standard configuration, you will likely want to preserve these commands in a script for one-click invocation.

    If you want to make this a permanent solution, then you'll have to write your routes permanently to the appropriate files or configure this script to run automatically. Since Network Manager runs so late in the booting process, properly configuring this might be a trick, but some recent things I've seen in init.d/rcX.d scripting leads me to believe that approach can specify networkmanager as a dependency.

    HTH,
    Tony

  6. #16
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,832
    Blog Entries
    2

    Default Re: Using WiFi and Ethernet Connections

    This works so easily with a Windows machine. To put it simply, in Windows it just routes the request packet to one connection, if there's no response it sends it through the next connection. Can't Linux be set up to look at both networks?
    Actually, it shouldn't work any differently for a Windows machine. Since your machine is assigned two default gateways by two different DHCP, short of disabling or physically disconnecting one of the two network links, it should be a toss-up which link a windows box would use also (Many moons ago I had to troubleshoot this scenario on Windows boxes setup by a compatriot). Unless an unstated parameter in the setup exists (eg different routing algorithms for each network), given enough time or varying traffic/load conditions you would start seeing problems unless you modified the routing metrics the same way I posted (but using Windows route commands).

    Tony

  7. #17
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,190
    Blog Entries
    3

    Default Re: Using WiFi and Ethernet Connections

    Note that I haven't tried this.

    I'm using 11.3 with KDE.

    Open "Personal Settings" and then "Network Settings". Click on "Wired".

    If there are no connections defined for wired, then click the "Add" button and create one. (I called it "home LAN"). Then, when editing that info, click the "IP Address" tab. At the bottom of the screen, I see "Basic Settings". I can change that to "Routes". The resulting page has a place to select "Use only for resources on this connection".

    I'm not sure if all of those settings are there for 11.2. If they are, it should prevent you getting a default route on your wired connection, allowing the wired connection to be only usable locally.

  8. #18
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    1,906

    Default Re: Using WiFi and Ethernet Connections

    Please post the results of
    Code:
    route -n
    command here and we will tell You the exact commands to make it work.
    Also You can check
    Code:
    netstat -rn
    while on windows and edit the routing table on Your openSUSE to look accordingly.

    Best regards,
    Greg
    Best regards,
    Greg

Page 2 of 2 FirstFirst 12

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
  •