Created
July 9, 2025 05:35
-
-
Save ensean/446ae5334ec1a5193b210ada3c3fc2fe to your computer and use it in GitHub Desktop.
config ipv6 for rocky 9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` | |
MAC_ADDRESS=`curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/network/interfaces/macs/` | |
IPv6_ADDRESS=`curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/network/interfaces/macs/${MAC_ADDRESS}/ipv6s` | |
sudo ip -6 addr add ${IPv6_ADDRESS}/128 dev eth0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment