You are not logged in.
Overall I am trying to setup static routes and while reading the wiki found that it should be easy to change the name of the interface which would be nice to help keep the interfaces strait
(The overall thing I am trying to solve is multiple physical connections. But when all of them are up then there is no internet (I assume because it is attempting to use the one that has no internet to reach google etc))
For what I am stuck at now is naming the interfaces
Based on this wiki page I should just need to add:
`SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="net1` to `/etc/udev/rules.d/10-network.rules`
I have tried using both the mac address (which does not change) and the device location: (mine) `SUBSYSTEM=="net", ACTION=="add", DEVPath=="/devices/pci*/*1.3/*.2/*5.0/*23*/net/*", NAME="openstacknetwork20"`
I have changed the name to use both dashes and hyphens. This page on debian indicates that using `/etc/udev/rules.d/70-persistent-net.rules` might work. It however did not
What am I missing? I have checked for typos by both manually typing in the configuration as well as copy pasting it.
Offline
You can choose a favorite route by lower the metric number.
# ip route add default via GATEWAY_ADDRESS metric NUMBER
You can also use systemd-networkd to assign a static gateway with a low metric number.
https://wiki.archlinux.org/index.php/Systemd-networkd
Or using dhcpcd
https://wiki.archlinux.org/index.php/Dh … c_route(s)
Last edited by solskog (2020-10-20 05:46:46)
Offline
so use ip route for one off and systemd for persistent networking configuration?
Based on what I was reading udev rules are being deprecated, (debian say deprecation with debian 11, didn't see anything for arch) is systemd what is replacing the udev rules?
Is metric number the only way to direct traffic? My limited understanding on routes was that you could specify a physical connection to use for a specified address range with udev
Last edited by agentsix (2020-10-20 21:18:08)
Offline
so use ip route for one off and systemd for persistent networking configuration?
Yes, both systemd-networkd and dhcpcd can do this very well.
is systemd what is replacing the udev rules?
Systemd-udevd is the service to activate network udev renaming rules. /lib/udev/rules.d/80-net-setup-link.rules you can define your rules by "man systemd.link".
Is metric number the only way to direct traffic? specify a physical connection to use for a specified address range
Metric is the easiest way to prioritize routes. Subnetting on your router is the proper way to direct traffic. Once you divide public/private subnets, and provide a default public gateway on your multihoming host with a low metric.
# ip route add PUBLIC_SUBNET dev INTERFACE metric LOW_NUMBER
# ip route add default via PUBLIC_GATEWAY_ADDRESS metric LOW_NUMBER
Last edited by solskog (2020-10-21 01:28:19)
Offline
Systemd-udevd is the service to activate network udev renaming rules. /lib/udev/rules.d/80-net-setup-link.rules you can define your rules by "man systemd.link".
Is that why my udev rules are not taking effect because I don't have the systemd service set to activate them?
Subnetting on your router is the proper way to direct traffic.
All three networks are behind separate routers though, is the best way to still set up default routes on each router?
Offline
Is that why my udev rules are not taking effect because I don't have the systemd service set to activate them?
No, your rule will be triggered by systemd-udevd. Not taking effect because something in the rule isn't correct.
The point is, don't renaming interface to separate routes. Instead use subnetting on router in combination with default route plus low metric on multihoming host to prioritize routes.
All three networks are behind separate routers though, is the best way to still set up default routes on each router?
Without your specific subnetting topology it's hard to tell, But, you need only one default route with low metric on your multihoming host to reach out public internet.
Last edited by solskog (2020-10-21 03:20:12)
Offline