A computer network can be defined as two or more computers are connected together (called Hosts) for the purpose of exchanging communication, or sharing resources either by wired connection like a LAN cable or by wireless like Wifi.
A network not only includes the host but also many other devices to transmit data and information are called Network devices like switches, routers, or hubs.
A network can be only for a specific geographic location like an organization or an office which are connected through physical cable is called LAN (Local Area Network) connection. We cannot able to access this network from outside the LAN network.
Opposite to the LAN network, we can connect the computer over the world with and without the help of a cable, which we call as internet or WAN (Wide Area Network) network. There are a lot of protocols and rules for transmitting data through the network.
Internet is called a network of networks around the world. It is a global network that contains trillions of computers and network devices that connect together to form a massive network. Internet is connected together using a lot of wired connections like optic fiber and wireless connections. Internet uses different protocols for the safe and secure transmission to data through networks and TCP/IP is the most popular protocol that the internet uses at present.
Now each host on the internet has its own unique identification number that we call an IP address. It helps to know a unique host in that ocean of hosts or systems in the internet.
In general, we are accessing all websites using the www and we call it as the internet. In fact, the www or World Wide Web and internet are not the same. World Wide Web or www is a network of different hosts and network devices and servers to form a giant network that can be connected through the internet.
Internet will act as a skeleton or a medium that the www uses to transmit data from the server to the user in response to the user's request. Web browsers for example chrome, firefox, safari, etc. help the users to access the www and its servers using the infrastructure called the internet.
Before going to discuss the internet working, we need to understand some terms and details about the internet so that it will be easy for learning the working of internet.
Client and Server: The Internet is based on a client and server relationship, where the system we are using to browse different websites are the clients and the websites that we access are located in the servers. Servers also have an IP address and the collection of servers are stored is called a data center.
Once the client sent a request to access a webpage through a browser, the server process that request and sent the webpage to the client through the browser.
IP Address: Clients are not directly connected to the internet. The internet service providers commonly called ISP connect clients to the internet and they give each client a unique id to identify the client, which is called an IP address.
DNS Domain Name Service: As we said the server and websites are also having an IP address. For a user, remembering the IP address of different websites is not an easy task, so the internet provides a domain name for each IP address of different websites like learnetutorials.com, facebook.com, google.com, etc.
Please keep in mind that the internet cant able know the domain names as they just know the IP address of the websites and once we enter the domain name, internet search and find the IP address of that domain name and forward our request to that IP address. It is the same as we same names for phone numbers on our mobile.
When we type a domain name in our browser address bar, the request for that corresponding IP address will be sent from our system to the DNS server. Once the IP address is received from the DNS server, the request for the specific information is sent to that IP address.
The request once reaches the server, the server process that requests and sends the webpage that the client requested.
This transfer of data from the server to the client and vice versa is happening through a series of network devices like modem, switch, router, hub, and optic cables.
Data is sent from a client to server and server to client through specific rules and regulations to overcome the errors and attackers, which are commonly known as protocols. The most common protocols are TCP/IP and UDP.
Data transfer across the internet in the form of packets, which have a header part for address and data part for storing data and trailer part for flow and error correction.
There are different network types in computer networking that are used for some specific function. Some of them are,
Switches: A switch is a network device that helps us to connect a device to a network. The switch helps us to share the resource and communicate in a network thereby reducing the cost.
Routers: Routers are special devices in the network that helps the data packets to move around the network by selecting the best path. Router helps you to analyze the data, which is sent across the network and helps to connect different devices to a single internet connection.
Transfer Media: This is the physical medium through which the data is sent across the network like the optic fiber, coaxial cable, etc. it is also called a channel or link.
Access Points: Access points are the points where a device can connect to a network wirelessly. A mobile hotspot is an access point.
Shared Data: Data that is shared to a network can be a LAN or a WAN network. It can be accessed by any user on that network.
Network Interface Card (NIC): Each computer is connected to a network using a NIC, it controls, sends, and accepts the data between a network and a computer.
Network Operating System: Network Operating system is an operating system that runs on the server, which allows the computers to connect to the network.
Protocols: Data is transferred through the network using a different set of rules that are commonly called protocols. Example, TCP, IP, UDP, FTP etc
Hub: Hub is a place where the distribution occurs in a network. Hub splits the connection to different systems. If a system needs any data it sends the request to the Hub and Hub distributes that request to the network.
OSI Model: It is a reference model to make the network functions easy and simple to understand.
Hostname: the system which is connected to a network that may be the client of the network is Host.
DNS server: we already discussed the DNS server, which converts a specific domain name to its IP address.
Port: We are using a system, which has different applications running like FTP client, Telnet, and browsers like that. So each application transfer and communicate with the network using different ports. It is a logical channel that helps to connect an application to a network.
Socket: A socket is a mix of IP address and port number that is used by applications running on a system.
ARP: ARP is Address Resolution Protocol, which converts the IP address of a system in a network to its physical address.
RARP: It is Reverse Address Resolution Protocol, which is the reverse process of ARP. It converts the physical address of a system to the IP address.