Can't add sub-interfaces to the network adapter. In the old version it was easy to do. If it is possible to add sub-interfaces prompt how to do it.

Bug #1830556 reported by Irina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

Can't add sub-interfaces to the network adapter. In the old version it was easy to do. If it is possible to add sub-interfaces prompt how to do it.
I have a vds server with one ens3 network card and 2 statistical ip addresses, I need to add a sub-interface for my second ip, but after trying all the options described in the various manuals I do not get what I need, the second ip is added to the same interface as a secondary or local.
I have:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.*.*.*/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:22:00:91:4e:41 brd ff:ff:ff:ff:ff:ff
    inet 1.1.1.1/20 brd 1.1.1.1 scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::********:4e41/64 scope link
       valid_lft forever preferred_lft forever

I need to get the following:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.*.*.*/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:22:00:91:4e:41 brd ff:ff:ff:ff:ff:ff
    inet 1.1.1.1/20 brd 1.1.1.1 scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::********:4e41/64 scope link
       valid_lft forever preferred_lft forever
3: ens3:0:<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:22:00:91:4e:41 brd ff:ff:ff:ff:ff:ff
    inet 2.2.2.2/20 brd 1.1.1.1 scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::********:4e41/64 scope link
       valid_lft forever preferred_lft forever
How do I do that? Here's mine /etc/netplan/01-netcfg.yaml Ubuntu 18.04
network:
 version: 2
 renderer: networkd
 ethernets:
  ens3:
   addresses:
    - 1.1.1.1/20
   gateway4: *.*.*.*
   nameservers:
    addresses:
     - 94.8.8.8
     - 94.7.7.7
     - 77.88.8.8
     - 8.8.8.8
     - 1.1.1.1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.