5. Networking Services (II) Flashcards

1
Q

VPC Peering

A

For 2 separate VPC to communicate between one another, they must do it over the inet. To do it privately - VPC Peering service.

  • helps reduce latency
  • improves network security
  • reduces network cost
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

VPC Peering: independency

A

Each VPC has its own firewall rules etc.

Peering must be done from both sides, not just from the side of one VPC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

VPC Peering: Rules

A
  • CIDR range cannot overlap, so IP addresses of the two networks cannot overlap
  • Transitive peering is not supported: if A is connected to B, and C is connected to B, A cannot communicate with C unless they both agree.
  • Internal DNS between A and C is also unavailable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

VPC Peering: Setup demo

A

Same as the large demo before but do it for two separate projects and have only one subnet per project.

  1. Once created, go to VPC network –> network Peering
  2. Create a new connection there using the project name of the 2nd VPC and the VPC network name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Shared VPC: concepts

A

Within a Shared VPC network there can be several projects in different zones and they are grouped under a Host Project.

Each Host Project can have several Service Projects, each Service Projects can however have only one Host Project connection.

Projects that are not part of any of the above are called standalone projects.

Shared Networks are created to share the same resources available in the organisation between the projects in the shared network.

Note: external IP addresses within a host project are only available for use to the projects in this Host Project
Note: Service Projects communicate between one another using an Internal static IP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Permissions within a Shared VPC

A

Shared VPC Admin – like an owner, has access to the whole shared VPC

Service Project Admin:
- Project-level permissions – allowed to work with all the subnets within a specific project in the shared VPC
- Subnet-level permissions – only allowed to work with a specific subnet(region) of a network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

VPC Flow Logs (definition)

A

To monitor incoming and outgoing traffic from VM instances to the VPCs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

VPC Flow Logs: exporting

A

Logs can be exported to Cloud Logging for 30 days.

If they need to be stored for longer, they can be sent to a Cloud Storage bucket.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

VPC Flow Logs: number of packets

A

1 of every 10 packets are captured (roughly), this cannot be modified.

To compensate for the loss of logs, it interpolates the data using the captured packets info.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

VPC Flow Logs: use cases

A
  1. Network Monitoring
  2. Analyse network usage: countries, expenses
  3. Network Forensics: when incidents occur
  4. Real-time security analysis: using Pub/Sub and integrate with SIEM (Splunk, Rapid7, LogRhythm)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

VPC Flow Logs: record format (the way in which the logs are saved)

A
  • Core Fields: Base (connection, start/end time, bytes sent, packets sent..) + IP details (src IP, src port, dest IP…, protocol)
  • Additional Fields: Metadata (src instance, src vpc, dest instance…) + Instance Details, Geo Details, GKE details etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

VPC Flow Logs: exporting (costs)

A

Filtering by Core/Additional Fields, eg. by specific Metadata, allows to export only those specific logs and hence save money.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

DNS Fundamentals: info storage

A

To store info about how the human-readable version is translated into an IP, a Zone File is created/used. The file is hosted/stored by the Nameserver.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

DNS Record Types

A

Name Server Records (NS): which DNS server contains the current records for domain

A and AAAA records: address records for IPv4 (A) and IPv6 (AAAA); associated with the domain names, so A will point to google.com not the IP version

CNAME records: connect shop.bowtie.co and ftp.bowtie.co to botie.co

TXT records

MX records: which email the mail should go to

PTR records: pointer records. Points to the IP version and only then retrieves the domain name. When we search for an IP not a specific domain name.

SOA records: start of authority - stores info about the zone, zone cannot work without this info.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Network Address Translation (NAT)

A

Translate private IP addresses to public IPs.

Static NAT: maps 1 private IP to 1 public IP
Dynamic NAT: maps 1 private to a pool of public IP addresses
Port Address Translation (PAT): multiple private IPs to 1 public IP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Network Address Translation (NAT): Static NAT

A

Private to connect with Public.

They cannot do it directly because Internal IP cannot just connect to External IP.

So a NAT table is used that translates the Internal/Private IP to its public version - happens through router.

Devices are allocated the permanent public IPs.

17
Q

Network Address Translation (NAT): Dynamic NAT

A

1 to Many Public ones.

The mapping from private to public happens based on the first come first served sort of. So the translated public IP doesn’t stay with the private device forever.

This works in the cases when several devices share the same public IP pool.

18
Q

Network Address Translation (NAT): Port Address Translation - PAT

A

Many to 1 Public.

19
Q

Cloud DNS

A

Manages DNS servers for your specific zones.

  • global service, but impossible to select a Google location
  • domain name must be purchased

Can manage:
- public zones: visible to the public internet
- private zone: DNS data is not exposed to the public, visible only within your network

20
Q

DNS peering

A

VPC network peering in not required for the DNS cloud peering zone to operate.

21
Q

DNS - managed private zone - DEMO

A

Network Services –> Cloud DNS –> create a zone

Once the zone is created the DNS records are also created:
1. Name Server Records (NS records)
2. Start of Authority Records (SOA records)