Last active
August 29, 2015 13:55
-
-
Save 10sr/8753923 to your computer and use it in GitHub Desktop.
Static IP address configuration for systemd (https://wiki.archlinux.org/index.php/Network_Configuration#Static_IP_address)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Network connectivity (eth0) | |
Wants=network.target | |
Before=network.target | |
BindsTo=sys-subsystem-net-devices-eth0.device | |
After=sys-subsystem-net-devices-eth0.device | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/ip link set dev eth0 up | |
ExecStart=/usr/bin/ip addr add 133.11.238.38/25 broadcast 133.11.238.127 dev eth0 | |
ExecStart=/usr/bin/ip route add default via 133.11.238.1 | |
ExecStop=/usr/bin/ip addr flush dev ech0 | |
ExecStop=/usr/bin/ip link set dev eth0 down | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment