Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

ipv6 under rancherOS #2593

Open
changemenemo opened this issue Dec 4, 2018 · 10 comments
Open

ipv6 under rancherOS #2593

changemenemo opened this issue Dec 4, 2018 · 10 comments

Comments

@changemenemo
Copy link

RancherOS Version: (ros os version)
1,4,2
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)

rancheros in kvm.
I need to run an openvpn client container but I need ipv6 activated... How is it possible to activate static ipv4 and auto config for ipv6?
there is no doc page for that...

@niusmallnan
Copy link
Contributor

niusmallnan commented Dec 5, 2018

Currently, we have not tested on ipv6 yet.
But you can try these:

# For ipv6 dhcp
rancher:
  network:
    interfaces:
      eth0:
        dhcp: true
        dhcp_args: "dhcpcd -MA6"

# For ipv6 static
rancher:
  network:
    interfaces:
      eth0:
        dhcp: false
        address: <your-ipv6-adress>
        gateway_ipv6: xxx

@changemenemo
Copy link
Author

I can't merge any yml with the line dhcp_args: "-MA6" nor can I add through config set.
but then I guess you didn't separate the ipv4 and ipv6 commands ? so if you activate dhcp it's for both stacks ? You didn't separate the 2 stacks?

@changemenemo
Copy link
Author

is it a docker configuration ?

@niusmallnan
Copy link
Contributor

We tested ipv6 on AWS and vSphere, they did not work fine.
We need to take some time to officially support it.

@niusmallnan niusmallnan added this to the v1.5.1 milestone Dec 6, 2018
@jlelse
Copy link

jlelse commented Dec 14, 2018

Great to see this. I already tried adding IPv6 failed and thought it's my fault. Great to see you working on this. IPv6 is increasingly important.

@niusmallnan niusmallnan self-assigned this Dec 24, 2018
@niusmallnan niusmallnan modified the milestones: v1.5.1, v1.6.0 Feb 5, 2019
@fransvanberckel
Copy link

fransvanberckel commented Feb 17, 2019

Creating a cloud-config.yml, like the blog example. Adding network / interfaces / eth0, with a ipv4 as well a ipv6 address, it's complaining about using dashes. Is there anything changed in how to? ... http://tinyurl.com/yx8n5kmj

@niusmallnan
Copy link
Contributor

@fransvanberckel I can use ipv6 on AWS, here are my steps, not sure this would be helpful.

  1. Create a vpc, subnet(enable ipv6), route tables. Make sure you add the ::/0 to internet gateway if you want to access the external ipv6 address.

  2. Boot a vm(ROS v1.5.1) with ipv6 enabled subnet, and try this ros config.

ros c set rancher.network.interfaces.eth0.dhcp true
ros c set rancher.network.interfaces.eth0.dhcp_args "dhcpcd -MA"

system-docker restart network
  1. Check you instannce, and make sure you get the ipv6 address.
[root@ip-172-31-8-119 rancher]# ip address show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 06:5e:9e:26:64:64 brd ff:ff:ff:ff:ff:ff
    inet 172.31.8.119/20 brd 172.31.15.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2600:1f11:9f:9c33:8da4:1295:9e25:4242/128 scope global dynamic noprefixroute
       valid_lft 407sec preferred_lft 107sec
    inet6 fe80::3ca9:e07a:6983:8ebd/64 scope link
       valid_lft forever preferred_lft forever

[root@ip-172-31-8-119 rancher]# ip -6 route
2600:1f11:9f:9c33::/64 dev eth0 proto kernel metric 202 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::412:5cff:fe97:e445 dev eth0 metric 202 pref medium
  1. Try ping6 to test the ipv6 connection.
[root@ip-172-31-8-119 rancher]# ping6 ipv6.google.com
PING ipv6.google.com (2607:f8b0:4020:805::200e): 56 data bytes
64 bytes from 2607:f8b0:4020:805::200e: seq=0 ttl=51 time=1.297 ms
64 bytes from 2607:f8b0:4020:805::200e: seq=1 ttl=51 time=1.276 ms
64 bytes from 2607:f8b0:4020:805::200e: seq=2 ttl=51 time=1.333 ms
64 bytes from 2607:f8b0:4020:805::200e: seq=3 ttl=51 time=1.294 ms

@mei-tech
Copy link

mei-tech commented Mar 4, 2019

static is already working for me in RancherOS 1.5.1 ( Just to mention, and providing you an configuration example:

rancher:
  network:
    #pre_cmds:
    # - /var/lib/iptables/rules.sh pre_cmds
    post_cmds:
    - /var/lib/iptables/rules.sh post_cmds set iptables
    dns:
      nameservers:
        - 1.1.1.1
        - 1.0.0.1
        - 2606:4700:4700::1111
        - 2606:4700:4700::1001
    interfaces:
      # lo:
      #   pre_up:
      #     - /var/lib/iptables/rules.sh pre_up lo
      #   post_up:
      #     - /var/lib/iptables/rules.sh post_up lo
      "mac=XX:XX:XX:XX:XX:X1":
        addresses:
          - XXX.XXX.XXX.XXX/22
          - XXXX:XXXX:XXXX:XXXX::1/64
        gateway: XXX.XXX.XXX.1
        gateway_ipv6: fe80::1
        mtu: 1500
        dhcp: false
        # pre_up:
        #   - /var/lib/iptables/rules.sh pre_up eth0
        # post_up:
        #   - /var/lib/iptables/rules.sh post_up eth0
      "mac=XX:XX:XX:XX:XX:X2":
        address: 172.16.2.1/24
        gateway: 172.16.2.254
        mtu: 1500
        dhcp: false

The only thing to mention is iptables for ipv6:

[rancher@master ~]$ sudo iptables -6 -L
This is the IPv4 version of iptables.
Try `iptables -h' or 'iptables --help' for more information.

also ip6tables is not available.

iptables to work is for ipv6 complusory.

UPDATE: Created an issue: #2694

@itsezc
Copy link

itsezc commented Aug 28, 2019

Any news on IPv6 support for RancherOS?

@rouing
Copy link

rouing commented Apr 25, 2020

As IPv6 is now the only IP Space being provisioned for new ASN's, this is critical.

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

No branches or pull requests

8 participants