Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 21, 2022 12:01 pm GMT

Networking

Basic Networking Terms:-

LAN.png
LAN -> Local Area Network

  • Collection of devices connected together in one physical location.
  • Each device has a unique IP(Internet Protocol) address.
  • Devices communicate via these IP addresses.

ip-addressing.jpg

IP -> Internet Protocol

  • 32-bit value.
  • 1 bit : 1 or 0.
  • 00000000 : 0
  • 11111111 : 255

Eg; 172.16.0.0

  • IP addresses can range from 0.0.0.0 to 255.255.255.255

Switch.png

Switch

  • Sits within the LAN.
  • Facilitates the connection between all the devices within the LAN

Gateway.jpg

Gateway -> IP address of Router.

Router.jpg

Router

  • Sits between LAN & outside networks (WAN: Wide Area Network).
  • Connects devices on LAN & WAN.
  • Allows networked devices to access the Internet.

Subnet -> Logical subdivision of an IP network.

Subnet.png

How to know whether the other device is inside or outside the LAN?

  • It knows because of the IP address of the target device.
  • Devices in the LAN belong to the same IP address range.

Subnetting -> Process of dividing a network into two or more networks.

IP address range

ip range.png

CIDR*(Classless Inter-Domain Routing)* Block

  • Subnet Mask dictates how many bits are fixed.
  • 255.255.0.0 -> means that 16 bits are fixed
  • 255.255.255.0 -> means that 24 bits are fixed

CIDR block.jpg

Any device needs 3 pieces of data for communication:

  • IP address
  • Subnet
  • Gateway

NAT*(Network Address Translation):*

  • The IP address range is chosen by an administrator.
  • Each device gets a unique IP from that range.

How to make sure that IP addresses don't overlap?

  • IP addresses within LAN are not visible to the outside network or internet.
  • Your laptop's private IP address is replaced by the router.

NAT.png

Benefits of NAT;

  • Security & Protection of devices within LAN.
  • Reuse IP addresses.

Limited no. of IPv4 addresses available - 4,294,967,296 public addresses.

Firewall

  • A system that prevents unauthorized access from entering a private network.
  • Using Firewall Rules you can define, which requests are allowed.

Firewall.png

Firewall Rules;

  • Which IP address in your network is accessible
  • Which IP address can access your server.
  • You can, e.g., allow any device to access your server.
  • Allows device IP address at the port to be accessed.
  • This is also called Port Forwarding

Firewall Rule.png

What is a Port?

Port -> every device has a set of ports.

  • You can allow specific ports(doors).
  • You can allow specific ports(doors) AND specific IP addresses (guests).
  • Different Applications listen to specific ports.

Ports.jfif

Standard Ports for many applications:-

  • Port 80 -> Web Servers
  • Port 3306 -> MySQL DB
  • Port 5432 -> PostgresQL DB

For every application, you need a port!

Each port is unique on a device.

DNS -> Domain Name Service

  • Translates domain names to IP addresses.

what-is-dns.png

Why do we use names instead of IP addresses?

  • Humans are better at remembering words & names instead of numbers.

Eg; www.facebook.com -> 69.63.176.13 Mapping IP addresses to Names.

How does DNS manage all these IP addresses?

  • Domain Names have a hierarchical structure.

Root Domains (there are 13 root domains named from a to m)

Top Level Domain

TopLevelDomainNames.jpg

There are also geographical domains that were added later.

domains.gif

Who manages these names?

Who can keeps track of the availability of names?

This is all regulated by a dedicated organization called Internet Corporation for Assigned Names & Numbers (ICANN).

ICANN.png

  • Manages the TLD development and architecture of the internet domain space.
  • Authorizes Domain Name Registrars, which register & assign domain names.

Each domain name can have a subdomain name with IP address range of domain name

How does the DNS Resolution work?

rc24-how-dns-works.webp

DNS entries are cached for efficiency

Networking Commands:

  • ifconfig -> shows all network details.
  • netstat -> shows active connection on your machine.
  • ps -aux -> shows currently running applications on which port they are listening, computer resources they are consuming, etc.
  • nslookup -> you can get the IP address of any domain name.
  • ping -> checks whether a service/application is accessible.

These are used to

  • Troubleshoot your network
  • Of course, there are parameters for all those commands.

Original Link: https://dev.to/kcdchennai/networking-1g41

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To