0

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?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.