DEV Community

ontrack
ontrack

Posted on

I Stopped Learning Cloud Networking as Services

I Stopped Learning Cloud Networking as Services

The moment I started thinking about packets instead of memorizing cloud products.

For a while, cloud networking felt like a list of services I needed to memorize.

VPC.

Subnet.

Route table.

Security group.

NAT Gateway.

Internet Gateway.

Network ACL.

The more services I learned, the more complicated networking seemed.

Then I changed the way I looked at it.

Instead of asking:

"What does this AWS service do?"

I started asking:

"Where is the packet going?"

That question made cloud networking much easier.


Start with the packet

Imagine a Linux server trying to reach another server.

The packet has:

Source IP
Destination IP
Protocol
Source port
Destination port
Enter fullscreen mode Exit fullscreen mode

The machine then has to figure out where to send it.

Linux gives us tools to inspect that process.

For example:

ip addr
Enter fullscreen mode Exit fullscreen mode

shows the interfaces and addresses.

And:

ip route
Enter fullscreen mode Exit fullscreen mode

shows how the operating system decides where traffic should go.

You can think of the route table as a set of directions:

Destination
    ↓
Route
    ↓
Next hop
    ↓
Network interface
Enter fullscreen mode Exit fullscreen mode

That same way of thinking works surprisingly well in the cloud.


Then move the idea into a VPC

Take a simple architecture:

VPC
└── Private Subnet
    └── EC2
Enter fullscreen mode Exit fullscreen mode

The EC2 instance needs to reach something outside its subnet.

Don't start with:

"Which AWS service do I need?"

Start with:

"Where is the destination?"

Then:

"What route should the packet follow?"

You might eventually discover a path such as:

EC2
  ↓
Subnet
  ↓
Route Table
  ↓
NAT Gateway
  ↓
Internet
Enter fullscreen mode Exit fullscreen mode

Now the architecture isn't a collection of AWS services anymore.

It's a packet path.

That mental shift matters.


Linux already taught us most of this

Before cloud networking, Linux was already teaching us the fundamentals.

You had:

ip addr
ip route
ss
ping
traceroute
dig
iptables
nftables
Enter fullscreen mode Exit fullscreen mode

Each tool answers a different networking question.

For example:

dig example.com
Enter fullscreen mode Exit fullscreen mode

asks:

"Can I resolve the name?"

While:

ip route
Enter fullscreen mode Exit fullscreen mode

asks:

"Where will my machine send the traffic?"

And:

ss -tulpn
Enter fullscreen mode Exit fullscreen mode

asks:

"What is actually listening on this machine?"

These questions don't disappear when you move into AWS.

They simply become part of a larger system.


Cloud networking adds another layer

This is where things become interesting.

A request might travel through several layers:

Application
    ↓
Linux networking
    ↓
Cloud network interface
    ↓
Subnet
    ↓
Route table
    ↓
Cloud security controls
    ↓
Network gateway
    ↓
Destination
Enter fullscreen mode Exit fullscreen mode

If something fails, don't immediately change everything.

Find the layer where the packet stopped.

That is much more useful than guessing.


The firewall is only one piece

A common troubleshooting mistake is assuming:

"The security group must be blocking it."

Maybe.

But networking can fail before the firewall even becomes the problem.

For example:

DNS failure
     ↓
Wrong destination IP
     ↓
Missing route
     ↓
Network filtering
     ↓
Linux firewall
     ↓
Application not listening
Enter fullscreen mode Exit fullscreen mode

All of these can produce what looks like:

"The server can't connect."

The symptom is similar.

The cause isn't.


The question I use now

When something can't connect, I start with five questions:

1. What is the destination IP?

2. Which route should handle it?

3. What is the next hop?

4. Where can the traffic be allowed or blocked?

5. What is supposed to receive the connection?
Enter fullscreen mode Exit fullscreen mode

This works whether I'm looking at a Linux server or a cloud environment.


Why this changed how I learn AWS

I stopped trying to memorize isolated definitions.

Instead of:

"A NAT Gateway does X."
Enter fullscreen mode Exit fullscreen mode

I think:

"A private workload needs an outbound path."
Enter fullscreen mode Exit fullscreen mode

Instead of:

"A route table contains routes."
Enter fullscreen mode Exit fullscreen mode

I think:

"The packet needs a decision about where to go."
Enter fullscreen mode Exit fullscreen mode

Instead of:

"A security group allows traffic."
Enter fullscreen mode Exit fullscreen mode

I think:

"Something needs to decide whether this connection is permitted."
Enter fullscreen mode Exit fullscreen mode

The terminology becomes easier once the problem makes sense.


The real advantage of Linux knowledge

Cloud platforms abstract away a huge amount of networking.

That's convenient.

But abstraction can also hide what's happening.

Linux gives you a place where you can see many of the fundamentals directly:

interfaces
addresses
routes
sockets
DNS
firewall rules
Enter fullscreen mode Exit fullscreen mode

That knowledge becomes extremely valuable when cloud networking doesn't behave the way you expect.

You can go one layer deeper.


Final thoughts

I don't think cloud engineers need to memorize every networking service.

I'd rather understand how a packet moves.

Start here:

Who sent it?

Where is it going?

What route handles it?

What happens next?

What can block it?

Who receives it?
Enter fullscreen mode Exit fullscreen mode

Once you start thinking this way, VPCs stop looking like complicated cloud diagrams.

They start looking like something much simpler:

A collection of decisions about where packets are allowed to go.

And that is a much better way to learn cloud networking.

Thanks

Top comments (0)