Basic Networking: Internet, IP and MAC Addresses

Search for a command to run...

No comments yet. Be the first to comment.
In this series, I am going to be describing a broad range of concepts of networking like DNS, Networks, HTTP, etc
What is a domain? Domain Name System (DNS) is a simple way to communicate with devices on the internet without remembering the specific IP address. A simple way of explaining it, is that a domain is the address for your house. But a more complicated ...
During in the process of reverse engineering binaries, a common problem arises. How do I reverse engineer stripped binaries? There are no symbols to break on, offsets change, scripts don't work, and you ask yourself why am I doing this? Luckily there...

When I was learning how to tackle pwn challenges in CTFs, I had a tough time finding a single, clear guide that could show me the ropes of actually carrying out these exploits. That's why I decided to put together a complete guide that covers everyth...

Using python to capture and project data

Intro This is a write-up for PicoCTF 2022: Buffer Overflow 1. This is one of my favourite challenges to do. I recommend solving it for yourself before you read this write-up. What is a Buffer Overflow? Before we get started we need to first know what...

What is a BadUSB? A BadUSB is a USB device that acts as a keyboard and injects preprogrammed keystrokes into a computer. A BadUSB is Indistinguishable from a generic keyboard, making it near impossible to detect and patch. You can setup reverse shell...

Today, I am going to start blogging about what is a public and private network, IP Addresses, MAC Addresses. I am going to assume you know a bit about routers, computers and servers.
When you go to the basics; it is just a bunch of devices connected with a global network of physical cables and a couple of wireless connections. But it is so much more then that. At the base of it is two thing: public and private networks.
A network is simply two or more computers that are linked, connected and talk to each other. Some of the common methods that a network can be connected through is a wireless access point, ethernet cable, radio, satelites, etc.
A Private Network is any network that has restrictions established to make a secure environment. This essentially means that very little traffic from outside then network can get in without prior approval. You can see in this diagram that all the machines in the green is in a private network.

A public network is a private network that anybody can connect to. So in this diagram it would be the internet.
Their are mainly two ways to identify machines:
An IP Address is one of the main ways to identify a machine on a network. Their are two types of IP addresses; ipv4 and ipv6. Lets see what an ipv4 looks like bellow:

An ipv4 address is separated into 4 octet. The first three octet's are generally a Network ID and the last one is a Host ID. A Network ID tells us where the network belongs to. The Host ID specifies TCP/IP network ie, your network.
An ipv6 address looks very different compared to an ipv6. Instead of a bunch of numbers it is a lot more letters and number. But why do we have two different IP address? The IPv4 Protocol was made in 1980. Ever since then, the internet has grown rapidly and now their is a shortage of ipv4 addresses. There are only 2^32 IPv4 addresses (4.29 billion). Enough for the 1980s but not with the billions of devices in 2022. Now their is a new protocol for IP addresses that helped resolve this issue, IPv6.
Below is a picture comparing the two of them.

You have two types of IP Addresses, a public one and a private one. Just like the networks, a private IP is used for all your internal network like messaging another laptop connected to your WiFi or contacting your router. You can give this one away, it has little other use then on your network.
A public IP Address is the thing that all things on the internet contacts you by. An example would be this blog here, or google. This address is automatically assigned to you by your ISP (internet service provider) and is generally dynamic. You have to be a bit more careful with this address as if is put in the wrong hands then they could many things to you like DDoS or finding your general location.
A mac address is a 16 digit hexadecmial address in all network cards. Some people call it a physical address as they are generally baked into a network card by the manufacturer. Another good thing to know about MAC addresses is that your ethernet and Wifi card have differnet MAC addresses. Although mac addresses are baked into your network card, It is possible to spoof your MAC address. This can get pass poorly implemented security measures based solely on allowing specfic MAC address through a firewall.
Next blog post will probably be about how the protocols work. Most of the information is from tryhackme. It is a great website and probably explains it better then me, so go check it out.