Skip to content

Instantly share code, notes, and snippets.

@awsvpc
Forked from zsteva/wired.network
Created May 3, 2025 03:45
Show Gist options
  • Save awsvpc/6cbc0b3742ef89b3e590e8f850b8fa05 to your computer and use it in GitHub Desktop.
Save awsvpc/6cbc0b3742ef89b3e590e8f850b8fa05 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