Detailed Tutorial of Oracle Cloud Oracle Cloud Enabling Native IPv6 Address - Simple, Universal, Free, Double stack

Little assistant reads articles 00:00 / 00:00

reminder:
The content described in this article is dependent and may differ from the expectation due to different soft and hard conditions, so please take the actual situation as the criterion for reference only.

Oracle Cloud Oracle Cloud has fully opened IPv6 around April 15 (previously only in GOV government regions), all cloud infrastructures (Oracle Cloud Infrastructure, OCI) support IPv6.

For us, to put it simply, the virtual machine (Compute Instance) can also allocate IPv6. The operation is very simple. No restart is required. It is free to use. Does Oracle support IPv4/IPv6 dual stack become more popular?


Related articles:

Oracle Cloud Oracle Cloud Object Storage ObjectStorage API (OCI) Detailed Instructions
Oracle Cloud Oracle Cloud announced to provide lifelong free VPS, object storage, database and other services, with tutorial evaluation


IPv6 allocation can be divided into two situations: one is to create a new host instance, and the other is to allocate IPv6 to the created instance.

For the first case, when creating a host instance, check IPv6:

The second situation is the focus of this article. The general process is: ① Assign CIDR → ② Configure subnet → ③ Configure route → ④ Configure security rules → ⑤ Assign IPv6. The first four steps are described in detail below Network>Virtual Cloud Network>Virtual Cloud Network Details The last step is in the VNIC Details Middle operation:

 000.INDEX.jpg

Assign CIDR

Path: Network>Virtual Cloud Network>Virtual Cloud Network Details>CIDR Block, directly click Add IPv6 CIDR Block That is, an IPv6 address block of/56 size will be allocated by default:

 001.CIDR.jpg

Configure Subnet

Path: Network>Virtual Cloud Network>Virtual Cloud Network Details>Subnet, click three points on the right of the subnet, and then click Edit:

 002.SUBNET.jpg

Check Enable IPv6 CIDR Block , fill in any hexadecimal number of 00-FF, and then save it. Here, an IPv6 address block with the size of/64 will be allocated:

 002.SUBNET.02.jpg

Configure Routes

Path: Network>Virtual Cloud Network>Virtual Cloud Network Details>Routing Table, click Add Routing Rule , set and save according to the screenshot example:

 003.ROUTE.jpg

For IPv4/IPv6 dual stack to work properly, the following two routes should be available (::/0, 0.0.0.0/0):

 003.ROUTE.02.jpg

Configure security rules

Path: Network>Virtual Cloud Network>Virtual Cloud Network Details>Network Security Group. To add outbound rules and inbound rules, click Add Rule , set according to the screenshot example (open all) and save:

 004.RULE.jpg

The IPv4/IPv6 dual stack should have the following two rules (::/0, 0.0.0.0/0) to work normally:

 004.RULE.02.jpg

Assign IPv6

Path: Calculation>Instance>Instance Details>Additional VNIC>VNIC Details, click Assign IPv6 address , fill in the IPv6 address suffix in the box, and then click Assign:

 005.SIGNED.jpg

Test IPv6

Now the host instance should have obtained the IPv6 address (some systems may need to be updated manually). Test it:

 006.DONE.jpg

It can be seen that PING is available, and the PING value is very low. It is very likely that Google is directly connected to the computer room.

In the actual test, it is found that none of the machine rooms in the three networks are directly connected to IPv6, so it is useless?

Problem points

1、 NotAuthorizedOrNotFound

Confirm that IPv6 is not checked for the instance that has been activated, and this error will appear for the account that has passed the 30 day trial period. You can re create a subnet and check IPv6 (IPv4 will change), or you can directly add IPv6 through auxiliary means.

Without deleting the subnet allocation IPv6 method, accounts that have passed the probation period can also achieve:

I、 Click Cloud Shell in the upper right corner of the console:

 Open Cloud Shell.png

II、 Get compartment_id:

In Cloud Shell, enter:

 oci iam compartment list

 Get ID.png

III、 Get subnet_id:

Enter in Cloud Shell( [compartment_id] Replace with the one queried in the previous step compartment_id ):

 oci network subnet list --compartment-id [compartment_id]

 Get subnet ID.png

Note that if there are multiple subnets, multiple IDs will be obtained here to identify the operation.

IV、 Get CIDR block address

 001.CIDR.jpg

V、 Assign IPv6 to subnet

Enter in Cloud Shell( [subnet_id] Replace with the one found in step III subnet_id [cidr] Replace with the IPv6 CIDR block added in the previous step. Note that the block size allocated to the subnet is /64 , not /56 ):

 oci network subnet update --subnet-id [subnet_id] --ipv6-cidr-block [cidr]

 Update IP.png

If the allocation is successful as shown in the figure, then refer to the above steps to configure routes, configure security rules, and allocate IPv6.


For pure command line operations, refer to《 Oracle Cloud Oracle Cloud uses API (OCI) to allocate and enable native IPv6 detailed instructions - prompt NotAuthorizedOrNotFound can also operate 》The advantage is faster and more convenient.

2. IPv6 address cannot be assigned

That is, IPv6 has been allocated in the management console step by step, but the host still does not have IPv6.

This problem exists in some compact versions of the system. In fact, the network already supports IPv6, but it fails to obtain IPv6 finally. At this time, we can directly assign the IPv6 address to the network card:

 root@oc-kr :~# ifconfig ens3 inet6 add [IPv6]/64 up

Note that [IPv6] is changed to the actual IPv6 address, and the suffix is fixed as /64 The default network cards of Oracle's native Linux images are all ens3

You can also try to use the following methods to enable IPv6 (for earlier versions, for reference, do not copy):

 root@oc-kr :~# echo "net.ipv6.conf.all.disable_ipv6 = 0" >> /etc/sysctl.conf root@oc-kr :~# echo "net.ipv6.conf.default.disable_ipv6 = 0" >> /etc/sysctl.conf root@oc-kr :~# echo "net.ipv6.conf.ens3.disable_ipv6 = 0" >> /etc/sysctl.conf root@oc-kr :~# echo "net.ipv6.conf.lo.disable_ipv6 = 0" >> /etc/sysctl.conf root@oc-kr :~# sysctl -p net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.ens3.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0 root@oc-kr :~# dhclient -6

Or write the IPv6 address directly into the network card configuration file (take CentOS as an example, for reference, do not copy it):

 root@oc-kr :~# vim /etc/sysconfig/network-scripts/ifcfg-ens3 DEVICE="ens3" BOOTPROTO="dhcp" ONBOOT="yes" TYPE="Ethernet" NM_CONTROLLED="no" IPV6_AUTOCONF="yes" IPV6INIT="yes" NOZEROCONF="yes" IPV6ADDR_SECONDARIES="2001::f001/64" ZONE=public

For Ubuntu system, please refer to the following configuration:

 root@oc-kr :~# vim /etc/netplan/50-cloud-init.yaml # This file is generated from information provided by the datasource.   Changes # to it will not persist across an instance reboot.   To disable cloud-init's # network configuration capabilities,  write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: ens3: dhcp4: true dhcp6: false match: macaddress: 02:00:17:01:2e:* addresses: - 2603:c022:8001:*:*:*:*:*/128 set-name: ens3

be careful, macaddress MAC address after, and addresses Please change the IPv6 address to the address you applied for.


Reference article

1、《 IPv6 on Oracle Cloud Infrastructure
2、《 Oracle Cloud Infrastructure Documentation - IPv6 Addresses


ArmxMod for Typecho
Personalized, adaptive and powerful responsive theme

extension

Continue to browse about VPS Deployment Tutorial Free Admission ipv6 oracle Oracle Virtual machine Double stack 's article

This article was last updated on 2021/11/05 16:03:40 , which may be different from the current situation due to years

Please specify: VirCloud's Blog > experience > Detailed Tutorial of Oracle Cloud Oracle Cloud Enabling Native IPv6 Address - Simple, Universal, Free, Double stack

Selected comments

  1.  Oracle starts IPv6 - a small station of Rimo
  2.  Ah Jie
    Ah Jie reply

    Mac OS X 10_15_7 Safari 605.1.15 Great God from Fujian

    Thanks, it has been successfully opened! icon_wink.gif

  3.  free
    free reply

    Linux Firefox 91.0 God from Guangdong

    Thanks for the blogger's detailed sharing, I also successfully opened IPv6! Follow the above steps to obtain IPv6 after operating on the web page, but the machine does not, run
    ifconfig ens3 inet6 add [IPv6]/64 up
    Then it was OK.

  4.  lee
    lee reply

    Mac OS X 10_15_7 Chrome 101.0.4951.41 Great God from America

    The IP6 address is also allocated, Ping6 Google is also normal, but it can't ping the ipv6 address. What's the situation? Ask for your advice

    1.  Owens

      That is to say, the intranet can access the internet, but the internet can't access the intranet. This is probably a firewall problem. Visit the web console or use the cli command to see whether IPv6 is released (the firewall only allows IPv4 by default)