Networking Basics

Multiple computers connected to each other form a network. For making connection between them connection media is required, also known as connection cable. There are three types of connection media available, twisted, co-axial and fiber optics. Machine sending information is called sender and receiving node known as receiver. Entire process of sending information to receiver is divided into smaller modules. This modular design help designer to concentrate on a specific portion of process at a time.

For example one module take responsibility of converting information into binary representation. Now there are numerous binary encoding techniques, so these encoding technique need to be communicated to other party so that corresponding decoding technique can be used.

To cope with above discussed problems, two model have been proposed OSI and TCP/IP

	 	+------------------+              +----------------------+
		|    Application   |              |                      |
		+------------------+              |                      |
		|   Presentation   |              |    Application       |
		+------------------+              |                      |
		|    Session       |              |                      |
		+------------------+              +----------------------+
		|   Transport      |              |    Transport         |
		+------------------+              +----------------------+
		|      Network     |              |    Internet          |
                +------------------+              +----------------------+	
                |    Data Link     |              |                      |
                +------------------+              |  Network Interface   |	
                |    Physical      |              |                      |
                +------------------+              +----------------------+
                       OSI                             TCP/IP

In TCP/IP model application, presentation and session layers combined into one layer. Physical and data link layer combined into "network interface" layer. In TCP/IP model application layer represents application running on system. Whenever any application wants to communicate to another application running on different machine then application layer's rule is used. In networking context rule which govern communication or which specify how to communicate is known as Protocol.

TCP/IP model

  • Application layer is responsible for performing encoding, encryption etc.

  • Transport layer provide service of courier. In real life whenever we want to send a packet to another place, we go to courier shop and give them packet with address. Transport layer is the courier for communication.

  • Internet layer determine the path how to route the packet to target destination. In above example once packet is given to courier company, then on wards courier send that packet through some transport ( car, bus or truck). Now driver has to decide which way to go in order to reach destination. So internet layer perform that work.

Networking through real life example

Networking protocols are inspired by our real life communication rules. Diagram shown below depicting process of sending some packets to another person B. Person A will packaged those packets and go to a delivering company, in our case courier company. Courier company categorize all packet on the basis of their destination address.

Once categorization is done, all packet belongs to same city will be shipped together to that city. Before shipping to that city path planner will decide which way to follow in order to ship consignment to target destination. After deciding path, it is given to transport department which will follow the path and deliver packets to target city.

Above discussed process can be depicted using layered diagram.

TCP/IP Model

TCP/IP model has four layers, first layer is application layer. Application layer responsible for representation of data, packing of data into packet. These packet are forwarded to transport layer then. Transport layer combine data packet destined to same destination into one packet and send them to network layer. Transport layer is responsible for providing application to application delivery. Transport layer rely on internet layer for deciding path to destination.

Internet layer do routing of data packet. Once route is decided, Interface layer execute according to decided route.

Transport layer has tcp and udp protocol. TCP protocol before sending data to target party first take permission of another party. Once permission is granted, TCP start sending data.

UDP protocol don't take any permission, it simply send data directly. In this communication data can be lost, because UDP don't take any responsibility for guaranteed delivering of data.