WLAN to LAN routing

Hi,
I have a special setup here at the company that I cannot change.
My access to the internet is via WLAN, and only WLAN. My Laptop with Leap 15.1, KDE, network manager, can access this without problem. On this laptop I also have a LAN connector. I want to connect a second computer to this LAN and exchange information (of course).
My problem is, that as soon as I connect the LAN, the wireless is disconnected and I even can’t force network manager to connect again. Disconnecting the LAN connects the WLAN again.

How can I force network manager to keep the WLAN connecton alive?

Second problem: Is there a small How-To to tell the Laptop to act as router, so that what comes in from the LAN is routed to the WLAN (the second computer doesn’t have WLAN).

Edit: Of course the IP addresses of the WLAN is 192.168.x.x, where the LAN would have 10.10.x.x. So they are very different.
I have found similar questions on the web, and the answers all pointing to different subnets (not applicable) and interface metric. So I have set the priority of the WLAN to 100, LAN to 10…

Thanks,
Johannes

It is not clear to me if the system you talk about is only situated “here at the company”, or if it is taken often to another place with other Wifi connections.

When it is not a “walking around” system, I never would use NetworkManager. Using Wicked it is very easy to configure both NICs to be started on boot, each with it’s own set of parameters independent from the other, like
the one that uses Wifi with DHCP and the other one with a fixed Ip address, etc.

BTW, the remark

Of course the IP addresses of the WLAN is 192.168.x.x,

is nonsense. While many home networks use the private address range 192.168.0.0/16, it is by no means “of course”. Specialy not when you are “in your company” where it would be very logical to use either a larger private address range like 10.0.0.0/8 (of which you seem to use a subnet of 10.0.0.0/16) or a non private address range.

Show output of “ip l”, “ip a” and “ip r” before and after LAN is connected.

I’m guessing you’re using Network Manager to manage your networking.
If so,
Then your system likely configured wLAN connection to the Internet automatically.
You need to click on the Network applet in your Panel tray and create a new network connection for your LAN network.
Depending on how your LAN is set up, you should configure your connection either as a DHCP client, or a static address and network mask and possibly a DNS, but without a Default Gateway, if that is set up could cause problems on your machine when you already have a DG set up for your WLAN connection.

Note that without additionally configuring IP routing, nothing in your LAN should be able to use your machine as a gateway to the Internet, the setup only configures so that your machine can access both WLAN and LAN simultaneously.
And, be sure that you’re not breaking security by setting this up, if your LAN is highly secured and not supposed to have even indirect access to the Internet, you shouldn’t do this.

TSU

@hcvv](https://forums.opensuse.org/member.php/180-hcvv):

Ok, it is not a “Walking around” system. But I have to use a new password every day. I remember using “wicked” this could be somewhat uncomfortabel…

What can I say. With “of course” I only wanted to point out, that I used two very differenct IP addresses… The WIFI service is for guests only, the company has about 3k people, and uses the private 192.168.x.x

@ arvidjaar

WLAN connected, LAN Disconected

ip l

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether a0:b3:cc:28:63:7c brd ff:ff:ff:ff:ff:ff
3: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 8c:70:5a:a9:f2:ba brd ff:ff:ff:ff:ff:ff

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether a0:b3:cc:28:63:7c brd ff:ff:ff:ff:ff:ff
3: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 8c:70:5a:a9:f2:ba brd ff:ff:ff:ff:ff:ff
inet 192.168.64.112/20 brd 192.168.79.255 scope global noprefixroute dynamic wlan1
valid_lft 43083sec preferred_lft 43083sec
inet6 fe80::e667:7e1e:4394:c39/64 scope link noprefixroute
valid_lft forever preferred_lft forever

ip r

default via 192.168.79.254 dev wlan1 proto dhcp metric 600
192.168.64.0/20 dev wlan1 proto kernel scope link src 192.168.64.112 metric 600

WLAN disconnected, LAN conected

> ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether a0:b3:cc:28:63:7c brd ff:ff:ff:ff:ff:ff
3: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 02:2e:50:88:1f:47 brd ff:ff:ff:ff:ff:ff

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether a0:b3:cc:28:63:7c brd ff:ff:ff:ff:ff:ff
3: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 02:2e:50:88:1f:47 brd ff:ff:ff:ff:ff:ff

ip r

You mean that the Wifi access point has another passphrase every day?
I am afraid that no automation can battle that and I am not sure that Wicked is able to ask you for the passphrase of the day during boot. :frowning:

I understood that and it is important information that those are two different networks, but the “of course” struck me.

EDIT:
Seeing your other post above:
There is an important, but not easy to find feature on the forums.

Please in the future use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.

An example is here: Using CODE tags Around your paste.

@** tsu2**](https://forums.opensuse.org/member.php/2578-tsu2)

I tried. But then I have two LAN connections and my WLAN connection. But the result is the same…

OK,
Try this to see if it works just for troubleshooting, I’m not saying you will have to keep doing this…

With your WLAN up and working, run this in an elevated console

ifup etho0

I’m guessing you’ll have both WAN and LAN working.

Also noting that if you’ve configured your LAN interface, I don’t see that it’s done right…
It only has an IPv6 address and nothing else.
How are you testing network connectivity on your LAN?
What other machines or devices do you have on your LAN network?

TSU

Are you <really> sure you’ve configured a LAN connection?

	@jkegmxde

Yes, there is no IPv4 address on eth0
I am not using NM, thus I quit here, but I think that it is realy important that you post your NM configuration.

Next step would be journal output; normally NetworkManager is not expected to do it. Provide “journal -b” output as root after connecting LAN cable.

Also what notebook do you have (manufacturer, model)? Some notebooks have BIOS setting that does exactly that - disables WiFi when LAN is connected.

@ arvidjaar

OMG, the laptop is an HP Elite, older model. And it really has a BIOS option “LAN/WLAN” switch, which was enabled.
Disabling this solved the problem.

Thanks a lot. I would have never looked into the BIOS for this issue… and I never had heard of it before…:’(

Thanks again,
Johannes

That is where we have the forums for. Bundling knowledge of many people. :wink: