You are not logged in.

#1 2017-10-27 09:00:07

arch_fuz
Member
Registered: 2015-01-31
Posts: 34

[SOLVED] Perstist static routes

Hi.
I am on a laptop using dhcp for connectivity.
The laptop has 2 interfaces ( one lan interface, one wlan interface). For both interfaces I need to set up a static route like that:
ip ro add 192.168.xxx.xxx/24 via 192.168.xxx.xxx dev wlp2s0 (for the wlan interface)
ip ro add 192.168.yyy.yyy/24 via 192.168.yyy.yyy dev enp3s0f1 (for the lan interface)

I enter the commands manually each time I need to connect to those nets.

Which way is the recommended way for arch to make this routes persistent to have them applied automatically when system comes up?

For wlan to connect I use wifi-menu.
I am not using nm.

Thanks,
fuz

Last edited by arch_fuz (2017-10-28 08:24:36)

Offline

#2 2017-10-27 09:45:30

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: [SOLVED] Perstist static routes

arch_fuz wrote:

I am on a laptop using dhcp for connectivity.

Do you mean dhcpcd?
https://wiki.archlinux.org/index.php/Dh … ute.28s.29

Offline

#3 2017-10-28 08:23:16

arch_fuz
Member
Registered: 2015-01-31
Posts: 34

Re: [SOLVED] Perstist static routes

Thanks a lot nesk.
The link provided the info which solved my issue (use a hook in /var/lib/dhcpcd/dhcpcd-hooks/ which provides the routes).

fuz

Offline

Board footer

Powered by FluxBB