Skip to main content

Command Palette

Search for a command to run...

Everything related to Networking – Networking 101

Published
3 min read

How system connect with other system using internet?

We should assign a unique IP address to a device and IP address is like a home address which is used to find another device in the internet and transfer data between them and there are two types of IP address

1.IPv6 2.IPv4

How system internal service talk to each other and external system find internal system service accurately?

Now, We assigned IP address to each device and each device run many number of service like a server or process (eg. Express server, MySQL Database, Spring boot server).

Each server or process have specific port number (eg. localhost:5173) and port number is used to communication between each service (eg. localhost:3000/backend/api/user-details).

What is firewall and why it is very important in networking?

Now each device can communicate with other device and it can lead to security issue like data breach or network attack by hackers so, to prevent this firewall is introduced. Which is nothing but a group of polices and it can block a request or response from a device.

There are mainly two types of firewall

1.Host firewall - Which present in each system and monitor that particular system network traffic. 2.Network firewall - Which present in whole network and monitor whole network traffic and block request or response which is not fulfill the policy.

What is NAT?

Network address translation is a technique used to binding multiple private IP address to single public IP within a network. Which is mainly used for security basically attacker can’t directly connect with internal private system.

Why cloud exists?

When we scale managing many number of physical server become very hard, to solve this cloud is introduced.

In cloud physical server are managed by service provider (eg. AWS, Google Cloud, Azure, Oracle) and our work is to maintain server in network and software basis don’t need to interact with server physically, But the networking principle between physical and cloud server don’t differentiate much.

How networking works in Docker?

When we develop a micro service we can get a famous problem “Its works on my machine” to solve this docker is introduced which can run server or process in isolated environment.

In default system network can’t interact with docker container network. Each docker container have it own network which cant expose in external system network so we have to do port binding;

“docker run -d -p 8080:80 --name my-web-server nginx”

This code means docker container internal port 8080 expose in localhost:80 port.

How kubernetes network works and can deploy and delete server without downtime?

Kubernetes single unit is known as pod which contain a server or process (eg. Express server, MySQL database) and it can be flexibly deploy and delete the pod and IP address of the pod will also get deleted which lead to a frontend server pod cant find backend server pod because frontend pod don’t know newly deployed pod IP adress of backedn pod, to make it static network service is introduced in kubernetes.

The pod can be deleted and new pod can deployed but the network service can’t be deleted and so newly deployed pod will be bind with same existed service IP address, so the IP address will be same.