как преобразовать 16.04lts маршрутизацию на основе политики / etc / network / interfaces в netplan

Глядя на обновление этого примера маршрутизации на основе политик на основе 16.04lts / etc / network / interfaces в netplan

# # Being able to reply to anyone that contact this host requires # Policy-Base routing setup that also requires a that a routing # table be defined in /etc/iproute2/rt_tables. ie append lines: # # # # # Source Policy-Base Route Table # 200 Policy-Based # # Update enp4s0f0 to the interface of your installation, # set output of "sudo lshw -short -class network" auto enp4s0f0 iface enp4s0f0 inet static address 172.19.X.Y netmask 255.255.255.0 # By default use a NAT service gateway 172.19.X.254 # except when # communicating to another UW IPv4 hosts up ip route add 10.0.0.0/8 via 172.19.X.1 up ip route add 172.16.0.0/12 via 172.19.X.1 # or replying to someone who communicated directly to this host up ip route add default via 172.19.X.1 table Policy-Based post-up ip rule add from 172.19.X.Y lookup Policy-Based # remember to clean up if the interface is taken down down ip route del 10.0.0.0/8 via 172.19.X.1 down ip route del 172.16.0.0/12 via 172.19.X.1 down ip rule del from 172.19.X.Y down ip route flush table Policy-Based
1
задан 16 November 2017 в 22:02

0 ответов

Другие вопросы по тегам:

Похожие вопросы: