I've got the following netplan config in a Ubuntu server 18.04.1:
$ cat /etc/netplan/01-netcfg.yaml
network:
ethernets:
ens160:
dhcp4: true
ens192:
addresses:
- 192.168.10.104/27
dhcp4: false
routes:
- metric: 50
table: 1
to: 0.0.0.0/0
via: 192.168.10.126
routing-policy:
- from: 192.168.10.104/32
table: 1
- table: 1
to: 192.168.10.104/32
renderer: networkd
version: 2
Along the following tables:
$ cat /etc/iproute2/rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
1 lan2
My requirement is that the server answers to requests in both the dhcp network (ens160) and the statically configured network (ens192) at the same time.
The thing is the configuration does not work once I reboot the server. I have no access to the server via anything coming from the static network (ens192) but access via the dhcp interface works without any problems.
But once I do:
$ sudo ip link set ens192 down
$ sudo ip link set ens192 up
It starts working perfectly.
I've been trying to debug the problem for a while but unsuccessfully, any ideas?