/srv/irclogs.ubuntu.com/2022/06/22/#netplan.txt

Guest19Hi, I don't know if anyone can help me with a netplan configuration.15:30
Guest19The computer has two network interfaces (eno1, eno2) connected to the same network. What I want to do is that if the connection comes from eno1, it goes out on eno1, if it comes from eno2, it goes out on eno2.15:30
Guest19I try this config:15:30
Guest19#cat /etc/netplan/00-installer-config.yaml15:30
Guest19network:15:30
Guest19  ethernets:15:30
Guest19    eno1:15:30
Guest19      dhcp4: no15:30
Guest19      addresses:15:30
Guest19      - 192.168.2.16/2415:30
Guest19      gateway4: 192.168.2.115:30
Guest19      nameservers:15:30
Guest19        addresses:15:30
Guest19        - 192.168.2.115:30
Guest19        search:15:31
Guest19        - domain.com15:31
Guest19    eno2:15:31
Guest19      dhcp4: no15:31
Guest19      addresses:15:31
Guest19      - 192.168.2.13/2415:31
Guest19but netplan generate show me this15:31
Guest19** (generate:26443): WARNING **: 15:15:42.939: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.15:31
Guest19Error: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in eno1 but also in eno215:31
Guest19any idea?15:31
slyonGuest19: sorry I'm afk right now. But as the error message suggests, you need to make use of policy routing, e.g. using a "from:" rule, to route a package depending on its source address16:10
Guest19I set that in the configuration and it still shows the error16:23
=== Pimmetje5 is now known as Pimmetje

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!