Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipv6 address not configured #193

Open
giovannicandido opened this issue May 18, 2018 · 6 comments
Open

ipv6 address not configured #193

giovannicandido opened this issue May 18, 2018 · 6 comments

Comments

@giovannicandido
Copy link

Ubuntu Xenial Image do not get ipv6 address on boot.

I think is because eth0 do not exist and is not guarantee to exist on different linux distributions

IP=$(scw-metadata --cached IPV6_ADDRESS)
GW=$(scw-metadata --cached IPV6_GATEWAY)
MASK=$(scw-metadata --cached IPV6_NETMASK)
run ip -6 addr add dev eth0 $IP/$MASK
run ip -6 route add default via $GW

Assume eth0, while ip a show ens2

@giovannicandido
Copy link
Author

Manual configuration works

@giovannicandido
Copy link
Author

I change the network name as a work around but no luck.

To change the interface name, in ubuntu create a file /etc/udev/rules.d/70-persistent-net.rules

With the contents:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:01:02:03:04:05",  ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="eth0"

Change to mac address of interface.

Still manual configuration need to take place.

How to debug this? Is a systemd service?
I try systemctl status scaleway there is no such services.

@giovannicandido
Copy link
Author

I did a test with Ubuntu 18 is working as expected.

Not all server flavors has Bionic available as image. START1-XS and C1 are examples.

@botanegg
Copy link

botanegg commented Jun 16, 2018

VC1S + Debian Stretch cannot autoconfigure too
Manual configuration works fine

I made workaround:
Got a script from scaleway blog and change eth0 to ens2 then add it to /etc/crontab

/root/ipv6.sh

#!/bin/sh
# Load all IPv6 setting from the metadata service
IPV6_NETMASK=$(scw-metadata IPV6_NETMASK)  
IPV6_GATEWAY=$(scw-metadata IPV6_GATEWAY)  
IPV6_ADDRESS=$(scw-metadata IPV6_ADDRESS)  
# Add your IPv6
ip addr add ${IPV6_ADDRESS}/${IPV6_NETMASK} dev ens2  
# Add your default IPv6 gateway
ip -6 r add default via ${IPV6_GATEWAY} dev ens2  

/etc/crontab

@reboot root /root/ipv6.sh

@botanegg
Copy link

botanegg commented Jun 17, 2018

But on archlinux i got

CROND[264]: (root) CMDOUT (/root/ipv6.sh: line 6: scw-metadata: command not found) 

@ghost
Copy link

ghost commented Feb 6, 2019

add /usr/local/bin to the PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants