how to add static route at boot

Ask questions about Arch Linux ARM. Please search before making a new topic.

how to add static route at boot

Postby karog » Tue Apr 11, 2017 7:26 pm

I can manually add the following route:
Code: Select all
route add -net 192.168.12.0/24 gw 192.168.11.19 dev eth0


I want this added automatically at boot. After some research I tried the following which did not work

/etc/systemd/network/eth0.network
Code: Select all
[Match]
Name=eth0

[Network]
DHCP=yes

[Route]
Gateway=192.168.11.19
Destination=192.168.12.0/24


What is the proper way to add static routes at boot? Thanks.
karog
 
Posts: 183
Joined: Thu Jan 05, 2012 7:55 pm

Return to User Questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron