mirror of https://github.com/k3s-io/k3s
Add the gateway parameter in netplan
Signed-off-by: Manuel Buil <mbuil@suse.com>pull/6292/head
parent
3c0cd6f2dc
commit
6b804fe224
|
@ -12,13 +12,16 @@ sysctl -w net.ipv6.conf.eth1.forwarding=0
|
|||
if [ -z "${os##*ubuntu*}" ]; then
|
||||
netplan set ethernets.eth1.accept-ra=false
|
||||
netplan set ethernets.eth1.addresses=["$ip4_addr"/24,"$ip6_addr"/64]
|
||||
netplan set ethernets.eth1.gateway6="$ip6_addr_gw"
|
||||
netplan apply
|
||||
elif [ -z "${os##*alpine*}" ]; then
|
||||
iplink set eth1 down
|
||||
iplink set eth1 up
|
||||
ip -6 addr add "$ip6_addr"/64 dev eth1
|
||||
ip -6 r add default via "$ip6_addr_gw"
|
||||
else
|
||||
ip -6 addr add "$ip6_addr"/64 dev eth1
|
||||
ip -6 r add default via "$ip6_addr_gw"
|
||||
fi
|
||||
ip addr show dev eth1
|
||||
ip -6 r add default via "$ip6_addr_gw"
|
||||
ip -6 r
|
||||
|
|
Loading…
Reference in New Issue