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:
$this->bbcode_second_pass_code('', '
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
$this->bbcode_second_pass_code('', '
[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: 300
Joined: Thu Jan 05, 2012 7:55 pm

Return to User Questions

Who is online

Users browsing this forum: No registered users and 12 guests