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

Thread: Connect to two networks

  1. #1

    Default Connect to two networks

    Dear openSuse users,

    My netbook shall be connected to two networks at the same time. Network 1 is my internal ethernet network where certain devices are connected and operated. Network 2 is the house wlan router that gives access to the internet.

    Network 1 has a fixed IP (192.168.10.200), Network 2 currently uses DHCP. I dont have direct access on the wlan router but could ask for it if required. Right now Network 1 works and Network 2 doesnt.

    What shoud I do^^?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,673
    Blog Entries
    3

    Default Re: Connect to two networks

    Some questions:

    1. Which opensuse version are you using?
    2. Which desktop (KDE or Gnome, for example) are you using?
    3. Is your system configured for "ifup" or for "NetworkManager"?


    At present, your problem is not clear.

    Maybe post the output from:
    Code:
    /sbin/ifconfig -a
    and use code tags to post that. You can use the "#" near the top of the edit box to generate the code tags.

    You may run into the problem that the system gives preference to ethernet (wired network). That is, it will attempt to route internet traffic via your wired connection. You will probably need to setup some manual routing to avoid that.

    But first we need to know more about what you are doing (the questions above).
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,700
    Blog Entries
    1

    Default Re: Connect to two networks

    You need to answer nrickert's questions. For the record, I'm using openSUSE 13.1 with Network Manager, and frequently connect to two networks during the course of my work in the manner you describe.

  4. #4

    Default Re: Connect to two networks

    Quote Originally Posted by nrickert View Post
    Some questions:

    1. Which opensuse version are you using?
    2. Which desktop (KDE or Gnome, for example) are you using?
    3. Is your system configured for "ifup" or for "NetworkManager"?


    At present, your problem is not clear.

    Maybe post the output from:
    Code:
    /sbin/ifconfig -a
    and use code tags to post that. You can use the "#" near the top of the edit box to generate the code tags.

    You may run into the problem that the system gives preference to ethernet (wired network). That is, it will attempt to route internet traffic via your wired connection. You will probably need to setup some manual routing to avoid that.

    But first we need to know more about what you are doing (the questions above).
    1. openSuse 12.3 (Dartmouth) (i586)
    2. KDE 4.10.00 "release 1"
    3. I think NetworkManager, at least thats the only thing I encountered so far.

    Code:
    /sbin/ifconfig -a
    
     eth0      Link encap:Ethernet  Hardware Adresse 88:51:FB:C8:FF:0E   
               inet Adresse:192.168.10.200  Bcast:192.168.255.255  Maske:255.255.0.0
               inet6 Adresse: fe80::8a51:fbff:fec8:ff0e/64 Gültigkeitsbereich:Verbindung
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:3684 errors:0 dropped:0 overruns:0 frame:0
               TX packets:1238 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 Sendewarteschlangenlänge:1000  
               RX bytes:4702013 (4.4 Mb)  TX bytes:239036 (233.4 Kb)
     
    
     lo        Link encap:Lokale Schleife   
               inet Adresse:127.0.0.1  Maske:255.0.0.0
               inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine
               UP LOOPBACK RUNNING  MTU:65536  Metric:1
               RX packets:6677 errors:0 dropped:0 overruns:0 frame:0
               TX packets:6677 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 Sendewarteschlangenlänge:0  
               RX bytes:855303 (835.2 Kb)  TX bytes:855303 (835.2 Kb)
     
    
     wlan0     Link encap:Ethernet  Hardware Adresse F4:B7:E2:C6:4F:E1   
               inet6 Adresse: fe80::f6b7:e2ff:fec6:4fe1/64 Gültigkeitsbereich:Verbindung
               UP BROADCAST MULTICAST  MTU:1500  Metric:1
               RX packets:1173 errors:0 dropped:0 overruns:0 frame:0
               TX packets:1173 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 Sendewarteschlangenlänge:1000  
               RX bytes:149731 (146.2 Kb)  TX bytes:181815 (177.5 Kb)
    Thanks for a help description that I can understand .

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,673
    Blog Entries
    3

    Default Re: Connect to two networks

    Quote Originally Posted by straubie View Post
    3. I think NetworkManager, at least thats the only thing I encountered so far.
    If you are using NetworkManager, there should be a network icon in the tray of your KDE panel (usually at the bottom right of the screen).

    Maybe

    Code:
    ps -ef | grep Network
    will tell you if NetworkManager is running.

    If it is running, but you don't have that icon, then right click on the tray, and click "System Tray Settings". Then make sure that the box for "Network Management" is checked.

    If you do have the icon, you should be able to use it to configure a WiFi connection. That will require the network key if network security crypto is in use. My memory of 12.3 and KDE, is that it works best if you select "System Connection" and "Connect Automatically" when setting it up, though that will prompt for the root password during the setup.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  6. #6

    Default Re: Connect to two networks

    Code:
    24641 24524 0 14:17 pts/1 00:00:00 grep  --color=auto Network
    If you are using NetworkManager, there should be a network icon in the tray of your KDE panel (usually at the bottom right of the screen).
    Yes there is. It was not started (might have something to do that I did the configuration with YAST?). I started it now. Sadly it doesnt show me a single connection when I go to "manage connections" (roughly translated from german).

    I have the network key and the root password.

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,673
    Blog Entries
    3

    Default Re: Connect to two networks

    Quote Originally Posted by straubie View Post
    Code:
    24641 24524 0 14:17 pts/1 00:00:00 grep  --color=auto Network
    By contrast, this is what I get on my laptop:

    Code:
    % ps -ef | grep Network
    root       730     1  0 09:09 ?        00:00:00 /usr/sbin/NetworkManager --no-daemon
    root       894   730  0 09:10 ?        00:00:00 /sbin/dhclient -d -sf /usr/lib/nm-dhcp-client.action -pf /var/run/dhclient-wlp2s4.pid -lf /var/lib/NetworkManager/dhclient-27c72209-79e8-4621-bf26-45bf43d03ba4-wlp2s4.lease -cf /var/lib/NetworkManager/dhclient-wlp2s4.conf wlp2s4
    rickert   1573  1445  0 09:13 pts/0    00:00:00 grep Network
    %
    So, no, you are not currently running NetworkManager. You are apparently setup for "ifup".

    I suggest you start by trying to switch to using NetworkManager.

    Yast --> Network Devices --> Network Settings

    Click on the "Global Options" tab.

    Select the box "User Controlled with Network Manager"

    Presumably you will see that in German, but it should be easy enough to recognize.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  8. #8

    Default Re: Connect to two networks

    Ok did that.

    Code:
    ps -ef | grep Network
    18828 18801 0 17:34 pts/1 00:00:00 grep  --color=auto Network
    25647     1 0 16:37 ?     00:00:00 /usr/sbin/NetworkManager  --no-daemon
    Now it shows that both networks are connected but the wlan does not work.

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,673
    Blog Entries
    3

    Default Re: Connect to two networks

    Quote Originally Posted by straubie View Post
    Now it shows that both networks are connected but the wlan does not work.
    I would expect the wlan to work locally -- you should be able to ping other computer on the home network. But it won't route to the Internet until some routing is configured.

    I'll have to experiment on my laptop, to see how to do that. I reply again later.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,673
    Blog Entries
    3

    Default Re: Connect to two networks

    Quote Originally Posted by straubie View Post
    Now it shows that both networks are connected but the wlan does not work.
    I've never needed to force routing, because I don't have your two-network situation.

    I'm assuming that you do have a wlan connection, and that you know the IP address of the router for that connection.

    This is what should work:

    Hold the mouse over the NetworkManager icon in the tray. Click "Manage Connections"

    Select (click) the wlan connection that you are using, and then click "Edit". You may be prompted for the root password.

    Next, click the IPv4 tab.

    When I do that, there's a button that reads "Basic Settings". I can switch that button to show "Routes".

    After that switch, I see a screen listing the routes. The initial list is empty.

    Click "Add".

    In the first column (labeled "Address" here), type in "0" (without the quotes).
    The second column ("Netmask") should default to "255.0.0.0", which is correct.
    The third column ("Gateway") needs the IP address of your router.
    For the fouth column ("Metric"), enter "1" (without the quotes).

    Save the results, and test whether you can now get to the Internet.

    Hmm. You might have to do the same for the wired network. In that case, you will want
    First column: "192.168.10.0"
    Second column: "0.0.0.0"
    Third column: the IP address for the wired router
    Fourth column: "0" (without the quotes).
    But also check the box "ignore automatically obtained routes".

    The reason for doing this for the wired network, is so that it won't try to route Internet through the wired connection. I'm not actually sure if that will be needed.

    I might have those netmask wrong. My output from "netstat -rn" gives:

    Code:
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    0.0.0.0         192.168.254.254 0.0.0.0         UG        0 0          0 enp4s0
    127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
    192.168.254.0   0.0.0.0         255.255.255.0   U         0 0          0 enp4s0
    which seems to suggest that you need 0.0.0.0 for the netmask for wlan and 255.255.255.0 for the wired.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

Page 1 of 2 12 LastLast

Posting Permissions

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