Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3567

System and Network configuration • ip rule show -shows lots of duplicates

$
0
0
in /etc/NetworkManager/dispatcher.d
#!/bin/bash
grep "vlan1" /etc/iproute2/rt_tables >/dev/null 2>&1 || echo "1 vlan1" >> /etc/iproute2/rt_tables
grep "vlan3" /etc/iproute2/rt_tables >/dev/null 2>&1 || echo "3 vlan3" >> /etc/iproute2/rt_tables

/usr/sbin/ip route add 10.10.10.0/24 dev eth0.1 table vlan1
/usr/sbin/ip route add 10.10.20.0/24 dev eth0.3 table vlan3
/usr/sbin/ip route add default via 10.10.10.1 dev eth0.1 table vlan1
/usr/sbin/ip route add default via 10.10.20.1 dev eth0.3 table vlan3
/usr/sbin/ip rule add from 10.10.10.3 lookup vlan1
/usr/sbin/ip rule add from 10.10.20.3 lookup vlan3
/usr/sbin/ip rule add from all iif eth0.1 lookup vlan1
/usr/sbin/ip rule add from all iif eth0.3 lookup vlan3

Statistics: Posted by evinrude — 2024-07-12 11:36 — Replies 2 — Views 62



Viewing all articles
Browse latest Browse all 3567

Trending Articles