Skip to content

Instantly share code, notes, and snippets.

@zsteva
Last active May 3, 2025 03:45
Show Gist options
  • Save zsteva/b81e0ebdf21c1a642310ba7616719c8c to your computer and use it in GitHub Desktop.
Save zsteva/b81e0ebdf21c1a642310ba7616719c8c to your computer and use it in GitHub Desktop.
systemd-networkd wired custom mac #linux #networking #systemd
# /etc/systemd/network/wired.network
[Match]
Name=en*
[Link]
MACAddress=02:00:00:21:01:01
[Network]
DHCP=ipv4
[DHCP]
RouteTable=253
[Address]
Address=10.4.5.11/24
[Route]
Destination=10.4.0.0/16
Gateway=10.4.5.1
[Route]
Destination=10.4.0.0/16
Gateway=10.4.5.1
Table=2
[RoutingPolicyRule]
From=10.4.5.11
Table=2
Priority=202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment