Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dualhomed hosts.

2 views
Skip to first unread message

Sidney_Kotic

unread,
Aug 1, 2021, 8:04:44 PM8/1/21
to
I'm trying to set up a small network of computers. 2 are running 15.3 and 1 is
at 15.1 (yes, it's obsolete just like me).

All of the computers are working with dynamic IP's via WiFi on wlan0.
What I want to add is a network of static IP's via eth0 and a small switch.

If I change the configuration, via yast, to bring up the eth0 device it shuts
down the wlan0 (even though both are defined).

Seems like I can get either one or the other, but not both.

Is there a place where I can look to see how this should be configured?

20 years ago I used to run a smallish network like this at work...servers had
their own network via a switch and another card (no WiFi, not secure enough for
the environment, we used fiber) to the network where all the desktop machines
lived. Even before that I had a BSD machine with 2 NIC's in it at home.

Carlos E. R.

unread,
Aug 1, 2021, 8:45:00 PM8/1/21
to
On 02/08/2021 02.04, Sidney_Kotic wrote:
> I'm trying to set up a small network of computers.  2 are running 15.3
> and 1 is at 15.1 (yes, it's obsolete just like me).
>
> All of the computers are working with dynamic IP's via WiFi on wlan0.
> What I want to add is a network of static IP's via eth0 and a small switch.
>
> If I change the configuration, via yast, to bring up the eth0 device it
> shuts down the wlan0 (even though both are defined).

Are you sure the wlan device is switched off? Normally they are both on,
just that the eth0 device gets preference because of a shorter path - if
they are on the same lan. If they are on different lans, the routing
rules decide which one is used for each destination.


--
Cheers,
Carlos E.R.

William Unruh

unread,
Aug 1, 2021, 9:03:10 PM8/1/21
to
Yes, I would say, look at the routing table to see where it thinks
things should be sent to. I suspect that when you brought up eth0, the
system assigned it as the route for all packets. Thus wlan0 is up, but
nothing is being sent to it.

Remember that the routing table sends packets on the most specific route
that encompasses the address you are sending to, and if two routes are
equally specific, then the latest one that brought up.

route -n
or
ip route

Show us the output of those commands after you bring up eth0 and you
think wlan0 is shut down.


>
>

Carlos E. R.

unread,
Aug 1, 2021, 9:31:07 PM8/1/21
to
The one with smaller metric.

--
Cheers,
Carlos E.R.

Sidney_Kotic

unread,
Aug 1, 2021, 10:18:56 PM8/1/21
to
On 8/1/21 5:03 PM, William Unruh wrote:

> ip route
>
> Show us the output of those commands after you bring up eth0 and you
> think wlan0 is shut down.

I try again tomorrow. I need to get another computer, a 15.3 machine, out from
behind a desk so I can plug a cable into it.

In the meantime here is the result from a 15.3 machine. Sorry about the wrap
and length.

Running Network Manager.

bill@crab~> 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 6c:4b:90:39:fb:f7 brd ff:ff:ff:ff:ff:ff
altname enp1s0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group
default qlen 1000
link/ether 60:14:b3:c9:d3:39 brd ff:ff:ff:ff:ff:ff
altname wlp2s0
inet 192.168.1.2/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
valid_lft 86092sec preferred_lft 86092sec
inet6 fe80::6720:3ee1:afcd:bfa2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
bill@crab~> ip route
default via 192.168.1.1 dev wlan0 proto dhcp metric 600
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.2 metric 600


Switched to Wicked Service, to make changes. Everything stayed the same.

Added eth0.

bill@crab~> 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 6c:4b:90:39:fb:f7 brd ff:ff:ff:ff:ff:ff
altname enp1s0
inet 10.10.13.4/32 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::6e4b:90ff:fe39:fbf7/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group
default qlen 1000
link/ether 60:14:b3:c9:d3:39 brd ff:ff:ff:ff:ff:ff
altname wlp2s0
inet 192.168.1.2/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
valid_lft 85598sec preferred_lft 85598sec
inet6 fe80::6720:3ee1:afcd:bfa2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
bill@crab~> ip route
default via 192.168.1.1 dev wlan0 proto dhcp
default via 192.168.1.1 dev wlan0 proto dhcp metric 600
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.2 metric 600

No route/gateway to 10.10.13.*

bill@crab~> netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0

---------------------

Here is the result from a 15.1 machine.

bill@kraken~> 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 mq state UP group
default qlen 1000
link/ether 30:9c:23:60:da:33 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 f4:28:53:18:42:7e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.3/24 brd 192.168.1.255 scope global noprefixroute dynamic wlan1
valid_lft 84694sec preferred_lft 84694sec
inet6 fe80::f42e:8ace:b97:feb2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
bill@kraken~> ip route
default via 192.168.1.1 dev wlan1 proto dhcp metric 600
192.168.1.0/24 dev wlan1 proto kernel scope link src 192.168.1.3 metric 600

bill@kraken~> 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 mq state UP group
default qlen 1000
link/ether 30:9c:23:60:da:33 brd ff:ff:ff:ff:ff:ff
inet 10.10.13.2/24 brd 10.10.13.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::329c:23ff:fe60:da33/64 scope link
valid_lft forever preferred_lft forever
3: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether f4:28:53:18:42:7e brd ff:ff:ff:ff:ff:ff
bill@kraken~> ip route
10.10.13.0/24 dev eth0 proto kernel scope link src 10.10.13.2

Andrew

unread,
Aug 2, 2021, 5:16:10 AM8/2/21
to
I have a somewhat similar setup.
- Two network cards, no wlan.
- one is the internal network, fixed ip-addresses
- the other is the external network, dhcp from the modem/router

In addition there are a couple of PCs which only have one network card
and use the ones above as gateways. They are configured to use a fixed
ip-address as a gateway and I have to update their settings to use the
other one.
Writing this reminds me that the IPV6 routing is currently not working,
it did under Leap 15.1 and maybe 15.2 but not any more.

Fixed IP Adresses means I use wicked rather than Network Manager, radvd
is my IPV6 routing software. Originally I had the gateway(s) set up as
dns caching servers but nowadays I have the clients pointing to external
servers.

Carlos E. R.

unread,
Aug 2, 2021, 6:09:07 AM8/2/21
to
Example (sorry for the line wrap):

Legolas:~ # ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.127 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::f8a0:12a3:7a65:18ab prefixlen 64 scopeid 0x20<link>
ether 1c:83:41:1b:d8:33 txqueuelen 1000 (Ethernet)
RX packets 35556277 bytes 50832961148 (47.3 GiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 7595205 bytes 534799628 (510.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1228 bytes 120671 (117.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1228 bytes 120671 (117.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.6 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::aa28:a4be:a123:aed9 prefixlen 64 scopeid 0x20<link>
ether a0:d3:7a:a5:1d:4c txqueuelen 1000 (Ethernet)
RX packets 728222 bytes 1083459059 (1.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 227080 bytes 21781259 (20.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Legolas:~ #


As you can see, both eth0 and wlan0 are configured and active.


Legolas:~ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0
wlan1
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0
wlan1
Legolas:~ #


And as you can see, both routing entries are active and "default". The
difference is in the metric.

And it works.

--
Cheers,
Carlos E.R.

grinch

unread,
Aug 2, 2021, 6:38:57 AM8/2/21
to

> If I change the configuration, via yast, to bring up the eth0 device it
> shuts down the wlan0 (even though both are defined).
>
> Seems like I can get either one or the other, but not both.

If they are in the same subnet that is correct behaviour,Ethernet is
preferred over wlan. I don't know how is made to work in Linux but it does.

My personal laptop is setup like that, when it is on its docking station
the traffic goes via the Ethernet even though both eth0 and wlan0 have a
LAN IP address in the same subnet.

>
> Is there a place where I can look to see how this should be configured?
>
> 20 years ago I used to run a smallish network like this at
> work...servers had their own network via a switch and another card (no
> WiFi, not secure enough for the environment, we used fiber) to the
> network where all the desktop machines lived.  Even before that I had a
> BSD machine with 2 NIC's in it at home.

Try adding a second different subnet on the eth0 .

or

You could try static routes via eth0 to each box from each box if you
need to keep the same subnet.

i.e. IP route 192.168.1.100 /24 via eth0's IP address the repeat for
each separate box

The static routes should take precedence due to the longest match rule,
well they would in a cisco router which is what I am used to.

This can cause weird routing problems though ,I would not recommend it.


or

A more elegant solution would be to make the subnet on your router
larger so say a /23 then have 2 separate /24 subnets

/23 255.255.252.0

So wlan 192.168.0.0/24
eth0 192.168.1.0/24
Default gateway 192.168.0.x /23
0 new messages