Expert · Automation, SDN and cloud networking · topic 53 of 57 · 35 min
Virtualisation, VRFs and cloud networking
Explanation
Virtualisation: many machines on one server
A physical server is often busy only 10 to 20 percent of the time. Virtualisation splits it into many virtual machines (VMs). Each VM is a complete computer in software, with its own operating system, CPU share, memory and network card. The program that creates and runs VMs is called a hypervisor.
| Type 1 (bare metal) | Type 2 (hosted) | |
|---|---|---|
| Runs on | Directly on the server hardware | On top of a normal operating system |
| Examples | VMware ESXi, Microsoft Hyper-V, KVM | Oracle VirtualBox, VMware Workstation |
| Used for | Data centres and the cloud | Labs and testing on a laptop |
VMs need a network too. The hypervisor provides a virtual switch, a software switch inside the server. Each VM's virtual network card plugs into it, and it connects to the physical network through the server's real network cards, usually on an 802.1Q trunk so different VMs can sit in different VLANs.
Containers are a lighter form of virtualisation. A container packs one application and its libraries, but shares the host's operating system kernel instead of running a whole OS. Containers start in seconds and use less memory than VMs. Docker builds and runs containers, and Kubernetes runs many of them across many servers.
VRFs: several routers inside one
A VRF (virtual routing and forwarding instance) is a separate routing table on one router. Interfaces placed in a VRF can only route to other interfaces in the same VRF. So one physical router can serve two customers, or keep a company's guest and staff networks fully apart, even if both use the same addresses such as 10.0.0.0/24. Using VRFs without MPLS is called VRF-lite.
ip vrf CUST-A
ip vrf CUST-B
!
interface GigabitEthernet0/1
ip vrf forwarding CUST-A
ip address 10.0.0.1 255.255.255.0
interface GigabitEthernet0/2
ip vrf forwarding CUST-B
ip address 10.0.0.1 255.255.255.0
!
show ip route vrf CUST-ACloud service and deployment models
| Model | You manage | Provider manages | Example |
|---|---|---|---|
| IaaS (infrastructure as a service) | OS, apps, data, and your network design | Hardware, data centre, hypervisor | Virtual machines and VPCs on AWS, Azure or Google Cloud |
| PaaS (platform as a service) | Your app and data | Servers, OS, runtime | A managed database or app hosting service |
| SaaS (software as a service) | Only your data and users | Everything else | Gmail, Microsoft 365, Zoho |
Deployment models say who uses the cloud. A public cloud is shared by many customers. A private cloud is used by one organisation. A hybrid cloud connects the two, for example a bank keeping its core banking servers in its own data centre and its website in the public cloud. A community cloud is shared by organisations with common needs, such as government departments.
Cloud networking building blocks
In IaaS you design your own private network inside the provider's data centre. AWS and Google Cloud call it a VPC (virtual private cloud); Azure calls it a VNet (virtual network). It works like the networks you have built in this course.
- VPC or VNet: your private address range, for example 10.0.0.0/16. On AWS an IPv4 VPC can be from /16 down to /28.
- Subnets: smaller ranges inside the VPC, for example 10.0.1.0/24 for web servers and 10.0.2.0/24 for databases. On AWS each subnet lives in one availability zone (one data centre group), and AWS and Azure keep 5 addresses of every subnet for themselves.
- Route table: the routing table for a subnet. A public subnet has a default route (0.0.0.0/0) to an internet gateway; a private subnet does not.
- Internet gateway: lets resources with public IP addresses reach and be reached from the internet.
- NAT gateway: lets servers in a private subnet start connections to the internet (for updates) while nobody on the internet can start a connection to them.
- Security group: a stateful firewall attached to a VM or its network interface. It has allow rules only. Stateful means reply traffic is allowed back automatically.
- Network ACL: a stateless filter on a whole subnet, with numbered allow and deny rules. Stateless means you must allow the reply traffic too, usually the high ephemeral ports.
Connecting the office to the cloud
There are three common ways. Over the internet, using HTTPS to public services, is simple but has no private path. A site-to-site IPsec VPN builds an encrypted tunnel over the internet between your office router or firewall and the cloud's VPN gateway; it is cheap and quick to set up. A private dedicated link, such as AWS Direct Connect or Azure ExpressRoute, is a circuit through a telecom partner that does not cross the public internet; it gives steadier speed and delay, at a higher cost.
Location matters too. AWS has the Mumbai (ap-south-1) and Hyderabad (ap-south-2) regions; Azure has Central India (Pune), South India (Chennai) and West India (Mumbai); Google Cloud has Mumbai and Delhi. Indian companies choose these for low delay to their users and for data rules, such as the RBI requirement to store payment system data in India.
Need help?
Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.
Try:
Watch the lesson
Virtualisation, VRFs and cloud networking · 1/8
In this lesson you will see how networks work inside servers and inside the cloud.
Prefer a video by a teacher? Find free videos on “cloud networking VPC subnets internet gateway NAT gateway security group vs NACL” on YouTube ↗
In real life: An online pharmacy on AWS Mumbai
A startup in Hyderabad runs its online pharmacy in the AWS Mumbai region. Its VPC is 10.50.0.0/16, chosen so it never overlaps the office range 192.168.0.0/16. Public subnets in two availability zones hold the load balancers; private subnets hold the app servers and the database. App servers download updates through a NAT gateway, the database security group allows port 5432 only from the app servers' security group, and the office connects over a site-to-site VPN. When orders grow, they plan to add AWS Direct Connect for a steadier link.
VPC 10.50.0.0/16 (ap-south-1, Mumbai)
public-a 10.50.1.0/24 route 0.0.0.0/0 -> internet gateway
public-b 10.50.2.0/24 route 0.0.0.0/0 -> internet gateway
app-a 10.50.11.0/24 route 0.0.0.0/0 -> NAT gateway
app-b 10.50.12.0/24 route 0.0.0.0/0 -> NAT gateway
db-a 10.50.21.0/24 no internet route
db-b 10.50.22.0/24 no internet routePractice (0/3 done)
AWS keeps 5 addresses in every subnet for itself (network, VPC router, DNS, one for future use, and the last address). Write usable_cloud_ips(cidr) that returns how many addresses are left for your servers, using the ipaddress module. Example: "10.0.1.0/24" gives 251.
Write plan_ok(vpc, subnets). vpc is a CIDR string like "10.50.0.0/16" and subnets is a list of CIDR strings. Return True only if every subnet is inside the VPC AND no two subnets overlap. Otherwise return False.
Design the network for a college admission portal in the Azure Central India region or the AWS Mumbai region. The office uses 192.168.0.0/16. You need public web servers, private app servers and a private database, in two zones. Write the VPC or VNet range, the subnets, the route for each subnet, and the firewall rules.
Quick quiz
Read more (free)
Related help
Before this, learn
This topic builds on these. If something here feels new, open them first.
Related topics
- REST APIs and JSONAutomation, SDN and cloud networking · same module
- Why automate: SDN and controller-based networkingAutomation, SDN and cloud networking · same module
- VPC basics: CIDR, subnets and gatewaysCloud Computing (AWS, Azure, Google Cloud) · Networking and databases: VPC and RDS
- VPC security and connectivityCloud Computing (AWS, Azure, Google Cloud) · Networking and databases: VPC and RDS
- Public, private, hybrid and multi-cloudCloud Computing (AWS, Azure, Google Cloud) · What cloud computing is
- Azure networking, Functions, databases and monitoringCloud Computing (AWS, Azure, Google Cloud) · Microsoft Azure essentials
Questions people ask about this
Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.
Which is a type 1 hypervisor?
Answer: VMware ESXi
ESXi runs directly on the server hardware, so it is type 1. VirtualBox and Workstation run on top of an operating system (type 2).
What does a VRF give a router?
Answer: A separate routing table, so networks can be kept apart
Each VRF has its own routing table; interfaces in different VRFs cannot route to each other by default.
A private app server must download updates from the internet but must not accept connections from it. What does its subnet route to?
Answer: A NAT gateway
A NAT gateway lets private servers start outbound connections while blocking inbound ones.
Which statement about security groups and network ACLs is true?
Answer: Security groups are stateful; network ACLs are stateless
Security groups remember connections, so replies are allowed automatically. Network ACLs are stateless, have allow and deny rules, and apply to a subnet.
Gmail used by a company is an example of which service model?
Answer: SaaS
With SaaS you only use the finished software; the provider runs everything else.
Which is a private, dedicated connection to the cloud that does not cross the public internet?
Answer: AWS Direct Connect
Direct Connect (and Azure ExpressRoute) are private circuits. A site-to-site VPN is encrypted but still runs over the internet.
An app server in a private subnet must download OS updates but must not accept connections from the internet. What does its route table need?Related
Answer: 0.0.0.0/0 to a NAT gateway
A NAT gateway allows outbound connections from private subnets while blocking inbound ones.
Which services can use a gateway VPC endpoint?Related
Answer: S3 and DynamoDB
Gateway endpoints exist only for S3 and DynamoDB. Other services use interface endpoints.
What is the main drawback of a private cloud compared with public cloud?Related
Answer: Up-front hardware cost and the need for a skilled team
You buy and run the hardware yourself, so you pay up front and need staff.
VNet A is peered with B, and B is peered with C. Can A reach C through B by default?Related
Answer: No, peering is not transitive
Peering connects only the two VNets in the pair. Use a hub with a firewall or direct peering for A to C.
Pass the quiz (60% or more) or mark this topic as done when you are ready.
Your progress is saved on this device only.
Next steps
- This is the last topic of “Automation, SDN and cloud networking”. The module exam comes next.
- Module 11 exam: Automation, SDN and cloud networking · 13 questions · 20 min, without help. 4 topics of this module still to finish first.
- Then the next module, Troubleshooting and the CCNA exam. 57 topics left in the course before the final exam.
← Previous: Configuration management: Ansible, Puppet, Chef and NETCONF