Oracle Cloud Infrastructure: Network Setup for DBAs

55
Oracle Cloud Infrastructure: Network Setup for DBAs Robert Marz

Transcript of Oracle Cloud Infrastructure: Network Setup for DBAs

Page 1: Oracle Cloud Infrastructure: Network Setup for DBAs

Oracle Cloud Infrastructure:

Network Setup for DBAs

Robert Marz

Page 2: Oracle Cloud Infrastructure: Network Setup for DBAs

Robert Marz – Independent Consultant

Senior Technical Architect

with database centric view of the world

Primary Job Role

Active Member of Database Community

Responsible for Cloud Topics

DOAG(German Oracle User Group)

@RobbieDatabee

robbie.databee.org

[email protected]

Page 3: Oracle Cloud Infrastructure: Network Setup for DBAs

bit.ly/OracleACEProgram

500+ Technical Experts

Helping Peers Globally

Nominate yourself or someone you know: acenomination.oracle.com

Page 4: Oracle Cloud Infrastructure: Network Setup for DBAs

Why Networking for DBAs?

After Subscribing to IaaS Cloud Services

You start with an empty virtual Datacenter

©a

go

uld

de

sig

n-

sto

ck.a

do

be

.co

m

Page 5: Oracle Cloud Infrastructure: Network Setup for DBAs

Do I have to do it all by myself?

OMG no.

Ask someone who knows this stuff by heart.

(And probably is in Charge for these topics)

©a

go

uld

de

sig

n-

sto

ck.a

do

be

.co

m

Page 6: Oracle Cloud Infrastructure: Network Setup for DBAs

Do I realy need to know all this

stuff?

Nope.

But Oracle Cloud Infrastructure is network driven.

It's the topic of this session - Knowledge never hurts!

©a

go

uld

de

sig

n-

sto

ck.a

do

be

.co

m

Page 7: Oracle Cloud Infrastructure: Network Setup for DBAs

What is it good for?

You can help yourself.

Think about adding DNS-Entries for Scanlisteners

©a

go

uld

de

sig

n-

sto

ck.a

do

be

.co

m

Page 8: Oracle Cloud Infrastructure: Network Setup for DBAs

IaaS Clouds

Wh

at

are

C

lou

ds m

ad

e o

f?

Linux Servers

Mostly

Network Components

Other supporting stuff

Software Defined (SDx)

Everything is Virtual

For Cloud-Users

©2020 Robert Marz @RobbieDatabee 8

Page 9: Oracle Cloud Infrastructure: Network Setup for DBAs

OCI Basics

9

Page 10: Oracle Cloud Infrastructure: Network Setup for DBAs

Oracle Cloud Infrastructure Overview

©2020 Robert Marz @RobbieDatabee 10

Page 11: Oracle Cloud Infrastructure: Network Setup for DBAs

Identity Domains, Tenants & Cloud-Account

Identity Domains, Tenants

& Cloud Account

Mean the same thing:Your Cloud Space

Part of your Cloud URLs

Enter your Identity Domain;Login with user & password

©2020 Robert Marz @RobbieDatabee 11

Page 12: Oracle Cloud Infrastructure: Network Setup for DBAs

Co

mp

art

me

nts Logical Dividers Namespaces

Subdomains

Separation Departments

Applications

“New Features”nestable (6 levels) Nov. 1, 2018

Renameable Sept. 7, 2017

Deleteable Oct. 18, 2018

Cloud ResourcesStay in their Compartment (not anymore)

See each other

Compartments

©2020 Robert Marz @RobbieDatabee 12

Page 13: Oracle Cloud Infrastructure: Network Setup for DBAs

Virtual Cloud Network Wizard

©Y

ug

an

ov

Ko

nsta

ntin

-sto

ck.a

do

be

.co

m

Page 14: Oracle Cloud Infrastructure: Network Setup for DBAs

Virtual Cloud Network WizardV

CN

Wiz

ard

Launched via Menu

Networking > Virtual Cloud

Networks > Create Virtual

Network

Creates Resources

in one easy step

Start VCN Wizard

VCN with Internet Connectivity

… and Site-to-Site VPN Connect

All created resources

can be modified afterwards

Exception: VCN IP Range

©2020 Robert Marz @RobbieDatabee 14

©D

mitri

y-

sto

ck.a

do

be

.co

m

Page 15: Oracle Cloud Infrastructure: Network Setup for DBAs

©n

irow

orld

-sto

ck.a

do

be

.co

m

Page 16: Oracle Cloud Infrastructure: Network Setup for DBAs

The Virtual Cloud Network Wizard (Network only)

©2020 Robert Marz @RobbieDatabee 16

Page 17: Oracle Cloud Infrastructure: Network Setup for DBAs

The Virtual Cloud Network Wizard (Network only) [zoom]

©2020 Robert Marz @RobbieDatabee 17

Page 18: Oracle Cloud Infrastructure: Network Setup for DBAs

The Virtual Cloud Network Wizard (Network only) - Results

©2020 Robert Marz @RobbieDatabee 18

Page 19: Oracle Cloud Infrastructure: Network Setup for DBAs

The Virtual Cloud Network Wizard (Network + related Resources)

©2020 Robert Marz @RobbieDatabee 19

Page 20: Oracle Cloud Infrastructure: Network Setup for DBAs

The Virtual Cloud Network Wizard (+ related Resources) Results

©2020 Robert Marz @RobbieDatabee 20

Page 21: Oracle Cloud Infrastructure: Network Setup for DBAs

Networking in OCI

©M

ike

Esp

en

ha

in -

sto

ck.a

do

be

.co

m

Page 22: Oracle Cloud Infrastructure: Network Setup for DBAs

OCI Networking Components (1/3)N

etw

ork

ing

VCN Virtual Cloud Network

IPv4 only

Covers Network Addresses

single, contiguous CIDR block

Subnets Scope Regional

Availability Domain specific

contain VNICs with same

route table

security lists

DHCP Options

©2020 Robert Marz @RobbieDatabee 22

Page 23: Oracle Cloud Infrastructure: Network Setup for DBAs

Private & Public IPs

Standardized Private IP-Adresses

Used over and over againPackets with private IP address aren’t forwarded into the Internet

IPv4 Addresses are limited

Not enough unique IPs

Public IPs are Unique

World Wide

©everythingpossible - stock.adobe.com

©2020 Robert Marz @RobbieDatabee 23

Page 24: Oracle Cloud Infrastructure: Network Setup for DBAs

Private IP Networks

RFC1918 name IP address rangenumber of

addresses

largest CIDR block

(subnet mask)classful description

24-bit block10.0.0.0 –

10.255.255.25516777216 10.0.0.0/8 (255.0.0.0)

single class A

network

20-bit block172.16.0.0 –

172.31.255.2551048576

172.16.0.0/12

(255.240.0.0)

16 contiguous class

B networks

16-bit block192.168.0.0 –

192.168.255.25565536

192.168.0.0/16

(255.255.0.0)

256 contiguous

class C networks

https://en.wikipedia.org/wiki/Private_network©2020 Robert Marz @RobbieDatabee 24

Page 25: Oracle Cloud Infrastructure: Network Setup for DBAs

no routing required

IP Addresses in the same Subnet are considered local

Binary Operation “AND”

Subnet Masking

“Network Calculator”

“IP Subnet Calculator”

Google

IP Subnetworks – Masking & CIDR

IPv4 Addresses are 4 Bytes 192 168 132 197

Each Byte has 8 Bits, 0-255 1100 0000 1010 1000 1000 0100 1100 0101

Subnet Masks 255 255 255 0

CIDR counts the 1s (3 x 8 = 24) 1111 1111 1111 1111 1111 1111 0000 0000

Network Adress (logical AND) 192 168 132 0

Network 192.168.132.0 mask 255.255.255.0

CIDR 192.168.132.0/24

©2020 Robert Marz @RobbieDatabee 25

Page 26: Oracle Cloud Infrastructure: Network Setup for DBAs

IP Masked IP

192.168.132.197 192.168.132.192

Subnet masking in Action

Network 192.168.132.197/28

netmask 255.255.255.240

©everythingpossible - stock.adobe.com

©2020 Robert Marz @RobbieDatabee 26

Page 27: Oracle Cloud Infrastructure: Network Setup for DBAs

IP Masked IP

192.168.132.197 192.168.132.192

192.168.132.190 192.168.132.176

Subnet masking in Action

Network 192.168.132.197/28

netmask 255.255.255.240

©everythingpossible - stock.adobe.com

©2020 Robert Marz @RobbieDatabee 27

Page 28: Oracle Cloud Infrastructure: Network Setup for DBAs

IP Masked IP

192.168.132.197 192.168.132.192

192.168.132.190 192.168.132.176

192.168.132.209 192.168.132.208

Subnet masking in Action

Network 192.168.132.197/28

netmask 255.255.255.240

©everythingpossible - stock.adobe.com

©2020 Robert Marz @RobbieDatabee 28

Page 29: Oracle Cloud Infrastructure: Network Setup for DBAs

IP Masked IP

192.168.132.197 192.168.132.192

192.168.132.190 192.168.132.176

192.168.132.209 192.168.132.208

192.168.132.200 192.168.132.192

Subnet masking in Action

Network 192.168.132.197/28

netmask 255.255.255.240

©everythingpossible - stock.adobe.com

©2020 Robert Marz @RobbieDatabee 29

Page 30: Oracle Cloud Infrastructure: Network Setup for DBAs

Network Low IP

Network Adr

High IP

Broadcast Adr

# Adrs Netmask

192.168.132.197/28 192.168.132.193192.168.132.192

192.168.132.206192.168.132.207

14 255.255.255.240

172.24.19.100/20 172.24.16.1172.24.16.0

172.24.19.254172.24.19.255

4096 255.255.240.0

10.100.0.0/16 10.100.0.110.100.0.0

10.100.255.25410.100.255.255

65534 255.255.0.0

Examples of IP-Subnets

©2020 Robert Marz @RobbieDatabee 30

Page 31: Oracle Cloud Infrastructure: Network Setup for DBAs

IP

Routing whenever a Packet has to

leave its subnet

“Destination is not on the switch”

Addresses in own Subnet are considered local

no routing

NEVER OVERLAP IP-Ranges in Networks

Pla

n

Ahead

Use only “new” IP-Ranges for Networks

as small as possible

as big as necessary at least 3 Subnets for Availability Domains

A Cloud Account is a new Datacenter

Chance for a fresh Start

Quick and Dirty Trials Don’t let them become productive

Destroy and rebuild

IP Routing – Why planning ahead is important

©2020 Robert Marz @RobbieDatabee 31

Page 32: Oracle Cloud Infrastructure: Network Setup for DBAs

Ne

two

rkin

g VNICVirtual Network Interface Card

Private IPAssigned to each VNIC

primary

unchanged during lifetime

Public IPRoutable

from Internet

OptionalAssigned to VNIC

50 static IPs free of charge

RequirementsPublic Subnet, Internet Gateway

OCI Networking Components (2/3)

©2020 Robert Marz @RobbieDatabee 32

Page 33: Oracle Cloud Infrastructure: Network Setup for DBAs

Ne

two

rkin

g Route Tables .

Routes from Subnet to outside VCN

Default empty

Security Lists

Virtual Firewall Rules Stateful, Stateless

Ingress = inbound; egress = outbound

Default Set (stateful) Ingress: allow ssh, icmp type 3+4

Egress: allow any

DHCP Options

Configuration Set

Limited Options DNS Type

Search Domain

OCI Networking Components (3/3)

©2020 Robert Marz @RobbieDatabee 33

Page 34: Oracle Cloud Infrastructure: Network Setup for DBAs

©n

irow

orld

-sto

ck.a

do

be

.co

m

Page 35: Oracle Cloud Infrastructure: Network Setup for DBAs

OCI Networking: Security Lists & DHCP Options

©2020 Robert Marz @RobbieDatabee 35

Page 36: Oracle Cloud Infrastructure: Network Setup for DBAs

Gate

wa

ys (

GW

) V

irtu

al R

ou

ters

Dynamic Routing GW (DRG)

private Network traffic

VCN and on-Premises

Internet GW provides direct Internet Access

NAT GW Network Address Translation

Connects Cloud resources to Internet

without Public IP

Service Gateway Peers VCN with other Oracle Cloud Services

e.g. Object Storage

Local Peering GW (LPG)

Peer VCNs in sameRegion

Remote Peering Connection

Peer VCNs in differentRegions

OCI Networking Gateways

©2020 Robert Marz @RobbieDatabee 36

Page 37: Oracle Cloud Infrastructure: Network Setup for DBAs

Connecting to the Cloud

©K

irill Ma

ka

rov

-sto

ck.a

do

be

.co

m

Page 38: Oracle Cloud Infrastructure: Network Setup for DBAs

Pa

ths in

to

the C

loud

ssh Tunnel to public IP Ends on Compute Server

Testing and Development only

Custom Firewall Appliance

Compute Instance Custom Image

Custom VPN Setup e.g. OpenVPN

IPSec VPN Connect on-Premises VPN to Dynamic Routing Gateway (DRG)

Routing through public Internet

OCI FastConnect

Private Connection

Peering Private

Public

Expensive + Provider (leased Line)

+ Datacenter

Connecting on-Premises to the Cloud

©2020 Robert Marz @RobbieDatabee 38

Page 39: Oracle Cloud Infrastructure: Network Setup for DBAs

Paths into the Cloud: ssh Tunnel

opens Port on local host

ssh Tunnel

IP Packets to ssh-destination

„jumpserver“

tunnels

IP Packets to any host/port

accessable from jumpserver

forwards

©2020 Robert Marz @RobbieDatabee 39

Page 40: Oracle Cloud Infrastructure: Network Setup for DBAs

Paths into the Cloud: Automomous Database

can‘t have VNICs

Autonomous DBs

encrypted via Internet

Access

Download zip-Archive

Import directly to SQL Developer

unzip & configure for SQLNet

Wallet

©2020 Robert Marz @RobbieDatabee 40

Page 41: Oracle Cloud Infrastructure: Network Setup for DBAs

OCI Networking Costs - Currencies

©H

en

nin

g M

arq

ua

rdt

-sto

ck.a

do

be

.co

m

©a

lfe

xe

-sto

ck.a

do

be

.co

m

©Ja

n B

ecke

-sto

ck.a

do

be

.co

m

©2020 Robert Marz @RobbieDatabee 41

Page 42: Oracle Cloud Infrastructure: Network Setup for DBAs

OCI Networking – Costs EUR - Euro (€)

Assumptions:

1GBit Connection

1 TB Data transfer

takes 3h (roughly)

24h x 30 / (3h * TB) ≈ 240 TB

240 TB – 10 TB ≈ 230.000 GB

230.000 * 0,0074€ = 1.702€

max per Month

https://cloud.oracle.com/networking/pricing as of 01-JAN-2019

©2020 Robert Marz @RobbieDatabee 42

Page 43: Oracle Cloud Infrastructure: Network Setup for DBAs

FastConnect Pricing EUR - Euro (€)

24h * 31 = 744h

1 Gbps:

744 * €0,1845 = €137,27

10 Gbps:

744 * €1,107 = €823,61

Additional costs:

+ Network Provider

(leased line)

+ Datacenter Provider

https://cloud.oracle.com/fastconnect/pricing as of 01-JAN-2019©2020 Robert Marz @RobbieDatabee 43

Page 44: Oracle Cloud Infrastructure: Network Setup for DBAs

Oracle Cloud Cost Estimator EUR – Euro (€)

https://cloud.oracle.com/en_US/cost-estimator as of 01-JAN-2019©2020 Robert Marz @RobbieDatabee 44

Page 45: Oracle Cloud Infrastructure: Network Setup for DBAs

OCI Networking – Costs USD - US-Dollar ($)

Assumptions:

1GBit Connection

1 TB Data transfer

takes 3h (roughly)

24h x 30 / (3h * TB) ≈ 240 TB

240 TB – 10 TB ≈ 230.000 GB

230.000 * $0.0085 = $1,955.0

max per Month

https://cloud.oracle.com/networking/pricing as of 24-JUN-2020

©2020 Robert Marz @RobbieDatabee 45

Page 46: Oracle Cloud Infrastructure: Network Setup for DBAs

FastConnect Pricing USD - US-Dollar ($)

24h * 31 = 744h

1 Gbps:

744 * $0.2125 = $158.10

10 Gbps:

744 * $1.275 = $948.60

Additional costs:

+ Network Provider

(leased line)

+ Datacenter Provider

(+ OCI Outbound Traffic)

https://www.oracle.com/cloud/networking/fastconnect.html#pricing as of 24-JUN-2020

©2020 Robert Marz @RobbieDatabee 46

Page 47: Oracle Cloud Infrastructure: Network Setup for DBAs

Oracle Cloud Cost Estimator – USD - US-Dollar ($)

https://cloud.oracle.com/en_US/cost-estimator as of 24-JUN-2020©2020 Robert Marz @RobbieDatabee 47

Page 48: Oracle Cloud Infrastructure: Network Setup for DBAs

OCI Networking – Costs NOK – Norwegian Krone (kr)

Assumptions:

1GBit Connection

1 TB Data transfer

takes 3h (roughly)

24h x 30 / (3h * TB) ≈ 240 TB

240 TB – 10 TB ≈ 230.000 GB

230.000 * kr0.0696 = kr16,008

max per Month

https://cloud.oracle.com/networking/pricing as of 01-JAN-2019©2020 Robert Marz @RobbieDatabee 48

Page 49: Oracle Cloud Infrastructure: Network Setup for DBAs

FastConnect Pricing USD - NOK – Norwegian Krone (kr)

24h * 31 = 744h

1 Gbps:

744*kr1.7406 = kr1,295.01

10 Gbps:

744*kr10.4434 = kr7,769.89

Additional costs:

+ Network Provider

(leased line)

+ Datacenter Provider

+ OCI Networking

https://cloud.oracle.com/fastconnect/pricing as of 01-JAN-2019©2020 Robert Marz @RobbieDatabee 49

Page 50: Oracle Cloud Infrastructure: Network Setup for DBAs

Oracle Cloud Cost Estimator NOK – Norwegian Krone (kr)

https://cloud.oracle.com/en_US/cost-estimator as of 01-JAN-2019©2020 Robert Marz @RobbieDatabee 50

Page 51: Oracle Cloud Infrastructure: Network Setup for DBAs

Scripting the Cloud

©iQ

on

ce

pt-

sto

ck.a

do

be

.co

m

Page 52: Oracle Cloud Infrastructure: Network Setup for DBAs

Building up and tearing down of virtualenvironments happens frequently in the Cloud

Some changes can only be made by recreating the resource

Provisioning Cloud Resources by Clicking the UI is tedious and error prone

Use the Web-UI for Orientation only

Scripting is automation and documentation at the same time: Software Defined Infrastructure

Scripting means Automation: Infrastructure as Code

©2020 Robert Marz @RobbieDatabee 52

Page 53: Oracle Cloud Infrastructure: Network Setup for DBAs

Scrip

tin

g

Options

REST API“The Master”

Provides Access to ALL Resources and Options

More Programming than Scripting

OCI CLIPython Based CLI

Unix & Windows

OpenSource Hosted on GitHub

HashiCorp TerraformScripting across all Major IaaS Providers

Provider by Oracle

Defacto Standard for Scripting Cloud Resources

AnsibleAgentless Orchestration and Automation

OCI Module provided by Oracle

Scripting Options – Automate all the Things!

©2020 Robert Marz @RobbieDatabee 53

Page 54: Oracle Cloud Infrastructure: Network Setup for DBAs

Conclusion

©H

atc

ha

po

ng

Pa

lurtc

ha

ivo

ng

-sto

ck.a

do

be

.co

m

Page 55: Oracle Cloud Infrastructure: Network Setup for DBAs

Automate your Cloud

The Sky Cloud is the Limit

Networking

in the Cloud:

same as on premises

Cloud-Account

is like a new Datacenter:

Plan ahead

The Web-UI

is only second-best:

script everything

©2020 Robert Marz @RobbieDatabee 55