Configuring default gateway for two interfaces.
Dear Support, I have a problem with configuring a default gateway for 2 ethernet interfaces in openSUSE. When I start the network service, the configuration happens only for one of the interfaces, and the other one is not able to use the gateway. The ip route command also shows that the default gateway is only configured for one interface. I tried configuring the interfaces by editing /etc/sysconfig/network/routes and /etc/sysconfig/network/ifroute-eth? files, by ip route command and also through YaST - neither worked. What should the configuration look like in my case? I am using openSUSE Leap 15.4. Thank you for your help. Szymon
On Friday, 22 September 2023 16:53:12 BST Szymon Bławat wrote:
Dear Support,
I have a problem with configuring a default gateway for 2 ethernet interfaces in openSUSE. When I start the network service, the configuration happens only for one of the interfaces, and the other one is not able to use the gateway. The ip route command also shows that the default gateway is only configured for one interface. I tried configuring the interfaces by editing /etc/sysconfig/network/routes and /etc/sysconfig/network/ifroute-eth? files, by ip route command and also through YaST - neither worked. What should the configuration look like in my case? I am using openSUSE Leap 15.4.
Thank you for your help. Szymon
Hi Szymon Unless you are trying to do something very advanced, let me suggest that this is a case of bending your understanding to the situation, rather than bending the situation to your understanding? The default routing is for the device as a whole, the question of setting a default route for an interface does not arise. When the default routing for the device is required, the routing software sends via the interface which is connected to the required default route. Bear in mind that every TC-PIP station is effectively a router, even if singly connected - and therefore has a single interface for sending default traffic. At first glance, this answer may not appear helpful, but please think on this from first principles. Perhaps if you explained what you are trying to achieve, people may be able to help you either meet the requirement or understand what ia wrong with the requirement. Regards
Ken Schneider
On Sep 22, 2023, at 1:25 PM, outbox@difrenchal.scot wrote:
On Friday, 22 September 2023 16:53:12 BST Szymon Bławat wrote:
Dear Support,
Keep in mind this support list is a bunch of openSUSE users who volunteer their time to help other users.
I have a problem with configuring a default gateway for 2 ethernet interfaces in openSUSE. When I start the network service, the configuration happens only for one of the interfaces, and the other one is not able to use the gateway. The ip route command also shows that the default gateway is only configured for one interface.
This is normal operation as you can only have one ‘default route’. The second interface would be used to connect to a different network.
I tried configuring the interfaces by editing /etc/sysconfig/network/routes and /etc/sysconfig/network/ifroute-eth? files, by ip route command and also through YaST - neither worked. What should the configuration look like in my case? I am using openSUSE Leap 15.4.
Thank you for your help. Szymon
I would suggest offering a little more information as to what you are trying to set up, network wise, so we can offer more detailed help.
On 22.09.2023 18:53, Szymon Bławat wrote:
Dear Support,
I have a problem with configuring a default gateway for 2 ethernet interfaces in openSUSE. When I start the network service, the configuration happens only for one of the interfaces, and the other one is not able to use the gateway.
It is absolutely unclear what you mean. Show output of ip a ip -4 r ip -6 r as well as full command and its complete output that demonstrates that "interface is not able to use the gateway"
The ip route command also shows that the default gateway is only configured for one interface. I tried configuring the interfaces by editing /etc/sysconfig/network/routes and /etc/sysconfig/network/ifroute-eth? files, by ip route command and also through YaST - neither worked. What should the configuration look like in my case? I am using openSUSE Leap 15.4.
Thank you for your help. Szymon
Fri, 22 Sep 2023 17:53:12 +0200 Szymon Bławat <szyb2809@gmail.com>:
What should the configuration look like in my case?
ifroute(5) has no specific example how the 5th row is supposed to look like to specify a "preference". I guess the usual try&error procedure is required, and perhaps a documentation bug once the correct syntax is found... Good luck, Olaf
On 24.09.2023 22:33, Olaf Hering wrote:
Fri, 22 Sep 2023 17:53:12 +0200 Szymon Bławat <szyb2809@gmail.com>:
What should the configuration look like in my case?
ifroute(5) has no specific example how the 5th row is supposed to look like to specify a "preference".
Preference only changes, which gateway will be used. It does not change anything in the fact that only one gateway will be used.
I guess the usual try&error procedure is required, and perhaps a documentation bug once the correct syntax is found...
Good luck, Olaf
participants (5)
-
Andrei Borzenkov
-
kschneider bout-tyme.net
-
Olaf Hering
-
outbox@difrenchal.scot
-
Szymon Bławat