We know that netplan is used in Ubuntu 17.04 + instead of netplan来代替/etc/network/interfaces
So there are two ways.

One:

Uninstall netplan and reuse interfaces
apt-get remove netplan
Then refer to the comments in /etc/network/interfaces, because there is no Ubuntu machine, and so on.

Two:

Take the famous he-ipv6 as an example

  1. Create /etc/systemd/network/he-ipv6.network
[Match]

[Network]
Tunnel=he-ipv6
  1. Create /etc/systemd/network/he-ipv6-tunnel.netdev
[Match]                                                                                                                                                                                                            

[NetDev]                                                                                                                                                                                                           
Name=he-ipv6                                        
Kind=sit                                            

[Tunnel]
Independent=true                                            
Local=192.168.0.x #Private IP if behind NAT or Public IP without NAT                                   
Remote=184.105.250.46 #Tunnel broker's IPv4 address                         
TTL=255
  1. Configuration /etc/netplan/01-netcfg.yaml

nano /etc/netplan/01-netcfg.yaml
Use your favorite editor, nano here
Ubuntu Network Configuration

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
      he-ipv6:
          dhcp4: no
          dhcp6: no
          addresses: ['2001:470:xxx:xxx::2/64']
          gateway6: 2001:470:xxx:xxx::1
      enp0s3:
      ...

The order will be different, but we must pay attention to the format!
Do you want that dhcp?
4.Restart the network
systemctl restart systemd-networkd && netplan apply

Part from:https://askubuntu.com/questions/990195/ipv6-tunnel-in-ubuntu-17-10

Last modification:August 25th, 2019 at 07:33 pm
If you think my article is useful to you, please feel free to appreciate