Home / OCI

OCIChecklistAdvanced

Bringing your own public IPv4 range to OCI (BYOIP) - a migration checklist from ROA to advertisement and cutover

Moving a public IPv4 block from on-premises or another cloud to OCI with BYOIP. RIR token and ROA, validation, public IP pools, a controlled BGP cutover, and how to back out without losing the range.

Deepak Bhardwaj7 min read

Applies toOCI Networking BYOIP (IPv4 /24 to /8, IPv6 /48 or larger), public IP pools, reserved public IPs, OCI CLI 3.x; ARIN, RIPE NCC and APNIC registrations

Use this when

Customers or partners allow-list your public addresses: SFTP endpoints, payment gateways, mail relays, or API front ends behind a partner firewall. You are moving the workload to OCI and can't renumber. BYOIP lets OCI advertise your own block from one region, so the addresses keep working after the move.

The hard parts aren't the OCI commands. They are the registry paperwork, which takes days, and the moment when two networks could announce the same prefix. This checklist is ordered to keep both under control.

Constraints to confirm first

  • Prefix size: IPv4 from /24 to /8. IPv6 must be /48 or larger. A /25 can't be brought on its own, because the internet won't accept routes that specific.
  • One region: an imported range is tied to a single OCI region. For multi-region designs, split the block into separate /24s and import each into its region.
  • One compartment at a time, and a tenancy-wide cap on imported ranges. Check the current BYOIP limits.
  • Not available on Free Tier.
  • Registry: ARIN (direct allocation or assignment), RIPE NCC or APNIC. You need the account that can edit the range's registry objects and create ROAs. Find that person now, because it is often a network team outside your group.
  • Current announcer: write down who announces the prefix today (your ISP, your own AS, another cloud) and who can withdraw it. That change has to happen inside your cutover window.

Phase 1: create the range and prove ownership

  • Create the BYOIP range in the target region and compartment:
export OCI_CLI_REGION=uk-london-1
oci network byoip-range create -c "$NET_COMP" \
  --cidr-block 203.0.113.0/24 --display-name byoip-sftp-edge
BYOIP=$(oci network byoip-range list -c "$NET_COMP" --all \
  --query 'data.items[?"cidr-block"==`203.0.113.0/24`].id | [0]' --raw-output)
oci network byoip-range get --byoip-range-id "$BYOIP" \
  --query 'data.{state:"lifecycle-state", details:"lifecycle-details", token:"validation-token"}'
  • Format the token. The API returns the raw token, and you have to build the registry string yourself:
    • IPv4: OCITOKEN::203.0.113.0/24:<validationToken>
    • IPv6: OCITOKEN::<ipv6-prefix>:<validationToken>
  • Add the token to the address range object, not the organisation object:
    • ARIN: Public Comments on the network
    • RIPE NCC: a new descr attribute on the inetnum/inet6num
    • APNIC: the remarks field, sent to the APNIC helpdesk from the authorised contact
  • Create a ROA authorising Oracle's ASN: 31898 for the commercial realm. Some regions use a different ASN (Serbia Central uses 14544), so check the BYOIP page for your region. Set the ROA expiry at least six months out. If you'll also announce from your own AS during a transition, or use BYOASN, add ROAs for both origin ASNs.
  • Wait for the registry to publish the change (up to a day). Then check it from outside:
whois -h whois.arin.net 'n + 203.0.113.0/24' | grep -i OCITOKEN       # ARIN
whois -h whois.ripe.net 203.0.113.0/24 | grep -i OCITOKEN             # RIPE
  • Submit for validation only after the token is visible publicly:
oci network byoip-range validate --byoip-range-id "$BYOIP"

Tip

Validation and provisioning can take up to 10 business days. Start Phase 1 at least two weeks before the planned cutover. A "Validation Failed" result is almost always a token problem: the wrong object, a malformed OCITOKEN:: string, or a submission sent before the registry published the change.

  • Wait for lifecycle-state to reach PROVISIONED. Don't advertise yet.

Phase 2: build the target while nothing is announced

  • Create a public IP pool and add the block, or a subrange of it:
oci network public-ip-pool create -c "$NET_COMP" --display-name pool-sftp-edge
POOL=$(oci network public-ip-pool list -c "$NET_COMP" --all \
  --query 'data.items[?"display-name"==`pool-sftp-edge`].id | [0]' --raw-output)
oci network public-ip-pool add --public-ip-pool-id "$POOL" \
  --byoip-range-id "$BYOIP" --cidr-block 203.0.113.0/24
  • Reserve the exact addresses partners have allow-listed. Map each old IP to its OCI resource in a table before you start:
oci network public-ip create -c "$APP_COMP" --lifetime RESERVED \
  --public-ip-pool-id "$POOL" --display-name sftp-vip

If the pool hands out addresses in its own order, list what you got and check it against the allow-list. Reserved IPs can't be renumbered, so delete and recreate any that don't match.

  • Attach the reserved IPs to their targets (instance private IP via oci network public-ip update --private-ip-id, or as the reserved IP of a load balancer at creation).
  • Test everything that doesn't need the internet route: security rules, NSGs, the listener configuration, certificates with the right SANs. Test from inside OCI against the private IPs.
  • Lower DNS TTLs on any names that point at these IPs, so you have a fallback if something needs to change.

Phase 3: cutover

The prefix should have exactly one origin at a time. If both networks announce it, traffic splits based on each partner's BGP path and you get intermittent failures.

Step Owner Command / action
1. Freeze changes, announce window to partners You n/a
2. Withdraw the prefix at the old origin ISP / network team Remove the route announcement
3. Confirm withdrawal globally You Looking glass / RIPEstat: no route for 203.0.113.0/24
4. Advertise from OCI You oci network byoip-range advertise --byoip-range-id "$BYOIP"
5. Confirm origin AS 31898 is visible You Looking glass: route present, origin 31898, RPKI valid
6. External tests You + partners Connect from outside to each reserved IP
oci network byoip-range advertise --byoip-range-id "$BYOIP"
oci network byoip-range get --byoip-range-id "$BYOIP" --query 'data."lifecycle-state"'   # expect ACTIVE

Warning

Withdrawing first and then advertising means a gap where nothing announces the prefix. Global propagation takes minutes. Keep the window short and plan it with that in mind. The alternative is announcing from both networks at once, which needs ROAs for both origins and gives non-deterministic routing during the overlap. Choose the gap unless you can't tolerate any outage at all.

Phase 4: back out if needed

  • Withdraw from OCI: oci network byoip-range withdraw --byoip-range-id "$BYOIP"
  • Ask the old origin to re-announce.
  • Keep the range, the pool and the reserved IPs in OCI. Withdrawing keeps them, so you can retry without going through validation again.

Caution

Don't delete the BYOIP range as part of a rollback. Deleting de-provisions it, and using the block in OCI again means repeating the whole token, ROA and validation process, which can take up to 10 business days.

Phase 5: after cutover

  • Remove the old ROA for the previous origin ASN once you are sure you won't roll back. A stale ROA lets the old network hijack the prefix by mistake.
  • Update IP geolocation and abuse-contact records if your provider used to manage them.
  • Add the reserved public IPs to Terraform with prevent_destroy. A deleted reserved IP can be re-created from the pool, but other resources may take the address in the meantime.
  • Alarm on the partner-facing health checks from outside OCI, because internal checks won't see a withdrawn route.
  • Record the decommission order for later: release the reserved IPs, public-ip-pool remove, withdraw, then delete. Deletion fails while any subrange is still allocated to a pool.