Basic Concepts of Computer Networking for Hackers!
This tutorial is a part of ethical hacking series. In this tutorial I’m discussing some important computer networking concept and networking devices that will help you a lot later.
Before you try to hack something you should know your limits and where exactly do you exist on any network. So, make sure you understand everything written in this article.
I have taught you only the basic and important topic, for detailed understanding of a computer networks and concepts you should do self study as well.
Table of Contents [Quick Links]
What is a Computer Network?
When two or more computers are connected in such a way that they can share data and resources, they are said to be in computer networking.
A computer network can be small or large and on the basis of their size and geographical scope they can be categorize into LAN (Local Area Network), MAN (Metropolitan Area Network) and WAN (Worldwide Area Network).
What is Internet?
Internet is a giant network of computer networks. Internet is a WAN (Worldwide Area Network).
What is an IP Address?
Any computer connected to a computer network is assigned an address of 32 bit which is called IP address. IP stands for Internet Protocol.
IP address may be static or dynamic. Static IP address sticks to your connection and dynamic IP address changes every time when you connect to Internet.
An example of IP address is 192.168.1.1. You can check your public IP address by typing “what is my IP” on Google or by visiting http://whatismyip.com.
You can connect any network device or service running on a network using IP address. If the device or service has authentication system then you have to provide credentials (set of username and password).
Public vs. Private IP Address
A public IP address is an IP address that is provided to you by your ISP (Internet Service Provider). It remains unique throughout the Internet and can be used to identify your device on the Internet.
A private IP address is address that is provided to you by your router (gateway or access point). Private IP is only valid in your LAN (Local Area Network) and is meaningless on Internet.
Public vs. Private Network
All network devices have public address, it is a public network. Internet is public network. A public IP is needed to communicate between different devices over this network.
All network devices having private/local IP addresses forms your private or local area network.
What you have to understand is that all the hacking practices should made under your private network (LAN).
Domain names system (DNS)
Some computers connected to Internet are actually Servers. Servers are computers that provide resources to you and run 24/7/365 so that you can access these resources anytime.
Some servers host websites, while other host web applications. So, when you type a domain name www.himanshunegi.in in a browser, you are actually contacting an online computer (or a server) to provide you requested resources.
As said all devices and computers connected on internet have IP address, these computers also have IP addresses. So if you want to reach www.google.com you have to type IP address 18.104.22.168.
Now, remembering 2-3 IP address for a normal human is fine but when you wish to visit more than a dozen websites? Will you be able to remember IP of all these websites? This process becomes complicated.
At this situation, Domain Name System (DNS) comes into play and all IP’s are converted into domain name. Humans can easily remember domain names compared to some random IP addresses.
You can find IP address of any website using ping command. You can type “ping google.com” command in CMD Command prompt or bash/terminal. You can also refer to an article where I’m pinging Google.com to check Internet is Working or Not!
I’m adding a video that demonstrates how fast whole DNS (Domain NAme System) works.
Now, your web-browser knows the exact IP address of the website you wish to visit (Of course, with the help of DNS). Now it tries connect to the site by making a HTTP connection request (a process called 3-way handshake is involved).
Know About Common Networking Devices
In a computer network, many computers stay connected to each other at any time, it’s made possible because of networking devices only. Some networking devices like hub, switches, router and modems are very common.
They almost do the same work of forwarding traffic but there are some differences that are necessary to understand. So keep on reading.
HUB – A Simple device that forwards all incoming traffic to all connected devices.
SWITCH – A little smarter device that forwards traffic according to computer’s MAC addresses.
ROUTER – Smarter device that forwards and manages traffic according to local IP.
MODEM – It stands for Modulator-Demodulator. It converts telephonic analog signal to digital and vice-versa.
They all look quite similar, watch the video to know about their working!
SUMMARY- Computers, Servers, Networks & Internet
- Now I will try to summarize all above stuff into following statements:
- Computers are connected to each other with the help of networking devices and thus form a computer network.
- These different computer networks connects together to form a super network called Internet.
- Some computers on computer networks are servers and some are just computers (clients).
- Client computers access websites and other stuff on servers over Internet with the help of an IP address or a domain name.
- You can create your own private local area network using networking devices and you can perform your entire hacking task on it.
Now you know about many networking devices and their importance. I will suggest you to read this tutorial again to develop clear networking concepts in your mind.