Table of Contents | ||
---|---|---|
|
Our openstack clouds are set up with addressing-resources allowing us to assign IPv6-prefixes to openstack-internal networks. The IPv6-addresses assigned will be globally unique, and also globally reachable. The following page guides you through the steps needed to get globally routed IPv6-addresses on your openstack network.
Using the web interface
Info |
---|
Web-interface guide is coming soon |
Openstack allows you to create networks addressed with IPv6. SkyHiGh is configured with global routable IPv6 prefixes, and this article is about to explain how you can create a virtual network with global routable IPv6 addresses.
Table of Contents | ||
---|---|---|
|
Using the web interface
...
Using the command line clients
Creating an IPv4 subnet, and give it external access
When creating a network in openstack using the cli clients; it is common to do something like so:
...
The essence is that we create a network (DemoNet), and to this network we create a subnet (DemoNet-v4) for IPv4 addresses. This subnet is using local RFC 1918 addresses. We then create a router (DemoRouter), which we use to connect the subnet to the rest of the world (ext-net). To "hide" our local addresses, the router would run NAT.
Creating an IPv6 subnet
There are one important key difference between the IPv4 and the IPv6 subnets; IPv4 uses local addresses which allows you to select whichever addresses you like while still being able to route traffic externally using NAT. In IPv6 we use global addresses; which means that each virtual network in the cloud needs unique addresses. This allows the virtual machines to get global addresses directly, and it removes the need for NAT.
To create a IPv6 subnet named "DemoNet-v6" attached to the network "DemoNet", you would As the IPv6 addresses are globally unique you cannot assign them manually; but you will need to get then assigned to you by openstack. To see if your openstack-platform have addresses for assignment you can use the following command:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$ openstack subnet createpool list +--ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --use-default-subnet-pool --network DemoNet DemoNet-v6 +-------------------+-----+-------------+-------------------------+ | Field ID | Value | Name | Prefixes | +--------------------------------------+------------------+-------------------------+ | allocation_pools | ::2-::ffff:ffff:ffff:ffff | | cidr | ::/64 | ... | name | DemoNet-v6 | | network_id | b3f3d1c6-5e1c-49a0-8a3c-4f706745fac9 | ... | subnetpool_id | prefix_delegation | | updated_at | 2017-08-10T08:20:26Z | | use_default_subnetpool | True | +776f3d48-f65c-40fc-8eeb-115f2d060195 | selfservice-ipv6 | 2001:700:1d00:ea00::/55 | +--------------------------------------+------------------+-------------------------+ |
At this point you have an IPv6 subnet which is addressed using a temporary IPv6 prefix as a placeholder until the subnet gets a proper IPv6 prefix assigned.
Connecting an IPv6 subnet to the world.
The IPv6 subnet is connected to the world using a router; the same way as IPv4 subnets. When an IPv6 network is connected to a router (which has an external gateway set), the router would request to get an IPv6 prefix to assign to the subnet.To create a IPv6 subnet named "DemoNet-v6" attached to the network "DemoNet" with addresses from the subnet-pool "selfservice-ipv6" you would use the following command:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$ openstack routersubnet addcreate --subnet DemoRouter DemoNet-v6 |
Verify the configuration
After connecting the IPv6 subnet to an external router, and giving the prefix-delegation some time (a minute or so) to do its work, you could verify that a global unique prefix is delegated to your subnet:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
eigilo@access:~$ openstack subnet show-pool selfservice-ipv6 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --network DemoNet DemoNet-v6 +----------------------+-----------------------------------------------------------------------------------------------------+ | Field | Value | +----------------------+-----------------------------------------------------------------------------------------------------+ | allocation_pools | 2001:700:1d00:e88aea07::2-2001:700:1d00:e88aea07:ffff:ffff:ffff:ffff | | cidr | 2001:700:1d00:e88aea07::/64 | ... | gateway_ip | 2001:700:1d00:e88aea07::1 | | host_routes | | ... | id | 97c4f25a-0765-4d55-918c-39b762500264 | | id | 7b242c30-40e2-4727-83d7-18e5bbe18a8a | | ip_version | 6 | | ipv6_address_mode | slaac | | ipv6_ra_mode | slaac | ... | name | DemoNet-v6 | | network_id | 24722854-3af0-45f7-b562-d5c1174f51d6 | ... +----------------------+-----------------------------------------------------------------------------------------------------+ |
At this point you have an IPv6 subnet which is addressed using an assigned IPv6 prefix.
Connecting an IPv6 subnet to the world.
The IPv6 subnet is connected to the world using a router; the same way as IPv4 subnets. When an IPv6 network is connected to a router (which has an external gateway set), the router will make sure to announce the connected IPv6 subnet to the rest of the NTNU Network.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$ openstack router add subnet DemoRouter DemoNet-v6 |
Verify the configuration
After connecting the IPv6 subnet to an external router the network should be globally reachable quite quickly. You can verify that the network is reachable by pinging the first address in the subnet:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$ ping 2001:700:1d00:ea07::1 PING 2001:700:1d00:ea07::1(2001:700:1d00:ea07::1) 56 data bytes 64 bytes from 2001:700:1d00:ea07::1: icmp_seq=1 ttl=60 time=19.9 ms |
Configuring incoming access over IPv6
After an IPv6 subnet is created it is important to update the access groups if one wants to allow external access to the virtual machines over IPv6.
Allow incoming SSH
To allow any host at NTNU in Gjøvik to log in to your virtual machines over SSH you would need to add the following rule to the security-group assigned to the VM (The examples adds the rule to the group 'default'):
...
It is important to emphasize that the IPv6 addresses are global routable. This means that they are "directly" connected to the internet. It is thus important with proper firewalling. You should therfore ONLY open what is needed trough the security groups, to the addresses needed. For example should SSH (TCP port 22) only be opened for networks which needs to log in to your VM's. Please see the section "
IPv6 address prefixes
...
NTNU uses the following IPv6 prefixes
IPv6 address prefixes
This section covers which IPv6 addresses certain organizations are using; to help you create proper IPv6 access group rules.
...
:
- 2001:700:300::/46 - NTNU i Trondheim
- 2001:700:b00::/48 - NTNU i Trondheim (Gamle HiST)
- 2001:700:1d00::/48 - NTNU i Gjøvik
- 2001:700:1200::/48 - NTNU i Ålesund
Norwegian ISP's:
This list covers some norwegian ISP's. Are you missing one, let us know and we will add it.
- Uninett:
- 2001:700::/32
- Altibox:
- 2a00:dec0::/32
- 2a00:fd00::/32
- 2a01:798::/29
- BKK:
- 2a00:14d8::/29
- 2a00:ce60::/32
- Broadnet:
- 2001:840::/29
- 2a00:be40::/32
- 2a00:be44::/32
- Eidsiva:
2a02:a18::/32
- Get
2a02:fe0::/29'
- Lynet:
- 2a00:c440::/29
- Nextgentel:
- 2a03:96e0::/33
- 2a04:980::/29
- Signal:
2a00:e08::/32
- Telenor Norge:
- 2001:4600::/24
- 2a02:a38::/32
- 2a02:2120::/30
- 2a02:2640::/32
- Telia Norge:
- 2001:2020::/32
- 2001:2021::/32
Other ISP's:
- Nordunet:2001:948::/32