bionic:

root@lp1867375-b:~# cat /etc/systemd/network/10.network 
[Match]
Name=eth0

[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6

[DHCP]
RouteMetric=100
UseMTU=true
UseRoutes=false
UseGateway=true


root@lp1867375-b:~# dpkg -l systemd|grep systemd
ii  systemd        237-3ubuntu10.40 amd64        system and service manager
root@lp1867375-b:~# systemctl restart systemd-networkd
root@lp1867375-b:~# ip a show eth0
102: eth0@if103: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state 
UP group default qlen 1000
    link/ether 00:16:3e:f8:cb:57 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.202.51.83/24 brd 10.202.51.255 scope global dynamic eth0
       valid_lft 3598sec preferred_lft 3598sec
    inet6 fe80::216:3eff:fef8:cb57/64 scope link 
       valid_lft forever preferred_lft forever
root@lp1867375-b:~# ip r
10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.83 


root@lp1867375-b:~# dpkg -l systemd|grep systemd
ii  systemd        237-3ubuntu10.41 amd64        system and service manager
root@lp1867375-b:~# systemctl restart systemd-networkd
root@lp1867375-b:~# ip a show eth0
102: eth0@if103: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state 
UP group default qlen 1000
    link/ether 00:16:3e:f8:cb:57 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.202.51.83/24 brd 10.202.51.255 scope global dynamic eth0
       valid_lft 3598sec preferred_lft 3598sec
    inet6 fe80::216:3eff:fef8:cb57/64 scope link 
       valid_lft forever preferred_lft forever
root@lp1867375-b:~# ip r
default via 10.202.51.1 dev eth0 proto dhcp src 10.202.51.83 metric 100 
10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.83 
10.202.51.1 dev eth0 proto dhcp scope link src 10.202.51.83 metric 100 


and to verify UseRoutes still works:

root@lp1867375-b:~# cat /etc/systemd/network/10.network 
[Match]
Name=eth0

[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6

[DHCP]
RouteMetric=100
UseMTU=true
UseRoutes=false
#UseGateway=true

root@lp1867375-b:~# systemctl restart systemd-networkd
root@lp1867375-b:~# ip r
10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.83 


** Tags removed: verification-needed verification-needed-bionic
** Tags added: verification-done verification-done-bionic

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1867375

Title:
  systemd-networkd: UseRoutes behavior change with introduction of
  UseGateway param

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1867375/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to