What is Computer Networks?
Computer Network is a group of computers that are connected together to share files, folders or printers etc. Connecting those computers is termed as Computer Networking. Basically Networking is to share computer recourses (e.g. files or Printers) with other computers. We can create a local network through an Internet Cable and a Router. A local network may of may not have an active internet connect as it does not require internet to connect to other computers locally.
What is the Internet?
Internet is basically a network of Computers connected together. Internet is basically nothing more than a \”Interconnected Network\”. The webpage you are seeing right now is also just a file which is saved on a computer somewhere around the world.
How does the internet work?
Computer Networks uses IP Addresses to communicate to each others. IP Stands for \”Internet Protocol\”. Routers assign and manage IP addresses. There are two types of IPs. \”Public IP Address\” which are usable globally. \”Private IP Address\” which are usable locally. Internet Service Provider (ISP) assign a Public IP Address to you, and Routers assign Private IP Address. Private IP addresses are only usable locally and Public is usable globally. Internet basically uses TCP/IP or UDP Protocol to communicate and transfer data to each other.
When you try to open Google, your computer uses the TCP/IP protocol to communicate and retrieve the webpage from the Google\’s server. It first sends the request to the router with his private IP so that router knows who sent the request. Router then decide where to send that request and which will be the shortest path. Router attach the public IP with the data. Now when Google return the data containing Google\’s webpage it will send it to the Public IP which then received by the router. Router then determines that which local IP had sent this request and It will forward the data to that device.
How does the internet works?
Internet uses TCP or UDP to communicate to the server. in the above example, when you open Google, your device establishes the connection with Google server before requesting the webpage. To establish the connection, TCP uses its \”Three-Way Handshake\”, and to end the connection it uses \”Four-Way Handshake\”. You can read more about TCP Handshakes here. In Three-Way Handshake, TCP uses \”SYN\” and \”ACK\” flags to establish the connection and \”FIN\” and \”ACK\” to terminate the connection. You can read more about Flags here.