Netplan default routes does not accept 0/0 notation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Triaged
|
Low
|
Unassigned |
Bug Description
The documentation `man netplan` indicates that {default, 0/0, 0.0.0.0/0} are all equivalent tokens for the default route.
Documentation
=============
`man netplan`
<snip>
- to: default # could be 0/0 or 0.0.0.0/0 optionally
</snip>
Configuration
=============
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: no
addresses:
- 192.168.1.11/26
routes:
- to: 0/0 <<<<<<<<<<<< (Ok when 0.0.0.0/0 or default)
via: 192.168.1.1
on-link: true
nameservers:
addresses: [1.1.1.3, 1.0.0.3]
Error
=====
When using `0/0` notation in netplan configuration, the follow error occurs.
<snip>
jason@HIDDEN:~$ sudo netplan apply
/etc/netplan/
- to: 0/0
^
</snip>
Version
=======
jason@HIDDEN:~$ dpkg --list | egrep netplan
ii libnetplan0:amd64 0.105-0ubuntu2~
ii netplan.io 0.105-0ubuntu2~
Seen on a fresh install of 22.04.1 LTS Server
<snip>
jason@HIDDEN:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
jason@HIDDEN:~$ uname -a
Linux HIDDEN 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
</snip>
summary: |
- Netplan default routes doesn't accept 0/0 notation + Netplan default routes does not accept 0/0 notation |
Seen on a fresh install of 22.04.1 LTS Server, Issue also seen in latest 22.10 (kinetic) Server AMD64
<snip>
jason@HIDDEN:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
jason@HIDDEN:~$ uname -a
Linux HIDDEN 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
</snip>