我正在尝试转换这个ip
隧道创建过程:
sudo ip tuntap add tun0 mode tun
sudo ip addr add 192.168.7.2/25 dev tun0
sudo ip link set dev tun0 up
sudo ip addr show tun0
到 netplan 配置,但需要在 netplan 中指定更多参数以覆盖ip
版本中默认的内容。
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: false
dhcp6: false
addresses: ["192.168.7.2/25"]
tunnels:
tun0:
mode: gre
addresses: ["192.168.8.2/25"]
remote: 192.168.8.100
local: 192.168.7.2
相当于什么netplan mode
?
ip
我怎样才能在命令行上执行我所做的操作netplan
?
也可以看看:
- https://wiki.linuxfoundation.org/networking/tunneling#sit-tunnels
- https://manpages.ubuntu.com/manpages/jammy/en/man8/ip.8.html
- https://netplan.readthedocs.io/en/latest/netplan-yaml/#properties-for-device-type-tunnels
- https://manpages.debian.org/bookworm/systemd/systemd.netdev.5.en.html
- https://manpages.debian.org/bookworm/systemd/systemd.network.5.en.html