# Computer Networking

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675733457283/da78bc63-bde2-4157-8da4-cc1f736048e1.jpeg align="center")

## Client-server architecture :

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675791942232/e4502eff-65f5-4fee-91af-d458fc33ecb2.png align="center")

In this client-server architecture, the client requests some data to the server by using protocols and after the request from the client-server sends the information in the form of a response. This information is not in a single form it comes in the form of small packets.

### Peer-To-Peer architecture :

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675792753481/8e392809-536a-4e3d-aa2e-448da06099e5.png align="center")

In peer-to-peer (P2P) networking, a group of computers is linked together with equal permission and responsibilities for processing data.

### Protocol :

Protocol means the set of rules or steps to perform a particular task. These rules are set by Internet society.

### Some of the protocols

### TCP (Transmission Control Protocol) :

This protocol ensures the data that reaches the destination is not corrupted or lost on the way.

e.g: Email

### UDP (User Datagram Protocol) :

In this data may be lost or corrupted during transmission.

e.g: video conference

### HTTP (Hyper Text Transfer Protocol) :

It is used in web browser. It defines the format of the data transfer between the web client and the web server.

e.g: Google Chrome

### Status code :

HTTP status codes are response codes sent by web servers in response to HTTP request. It is 3 digit number in which the first digit decides the class of response.

1xx : Informational

2xx : Success

3xx : Redirection

4xx : Client error

5xx : Server error

### HTTP methods :

GET: This method is used to request some data from the server.

POST: This method is used to give some data to the server.

PUT: This method is used to put the data in a particular location.

DELETE: This method is used to delete the data from the server.

### Types of Networks:

LAN (Local Area Network): Local Area Network is a group of computers connected to each other in a small area such as a building, office.

MAN (Metropolitan Area Network): A metropolitan area network is a network that covers a larger geographic area by interconnecting a different LAN to form a larger network.

WAN (Wide Area Network): A Wide Area Network is a network that extends over a large geographical area such as states or countries.

## Some IMP points

* Each system/computer communicates with the internet and is identified using IP address.
    
* DHCP (Dynamic Host Control Protocol) is used by routers to give an IP address to devices that are connected to it.
    
* DNS (Domain Name System) converts the URL into an IP address.
    

### Port Number :

It is a 16 bit number that is used to decide which application to send the data in the device. There are almost 65,000 port numbers. from which

0 - 1023 -&gt; Reserved ports

1024 - 46152 -&gt; Reserved for some applications

remaining -&gt; we can use it

### Different types of Topologies to connect one computer with you

1. BUS Topology :
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675790589827/7c5fc976-dfa0-41d4-a577-bbc1ff725252.jpeg align="center")

1. RING Topology :
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675790665580/16b66abb-184f-4e67-bf2b-fb9c3d19b066.jpeg align="center")

1. STAR Topology :
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675790721754/72043926-30a1-4fb6-8e82-5b9d97297569.jpeg align="center")

1. TREE Topology :
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675790771823/4e1f07dd-eb64-4e9e-b260-b2f0da7973e2.png align="center")

1. MESH Topology :
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675790824142/a9ea4b98-8f00-42c5-9d2c-52fc7713fbd8.jpeg align="center")

# OSI Model : (Open Systems Interconnection Model)

There are a total of seven layers are present in the OSI model. It is a reference model.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675791020725/31750f13-89f1-4b37-a2df-d32683216354.jpeg align="center")

# TCP/IP Model :

This model is actually implemented inside the devices.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675791441883/d58434ab-23ae-4e44-a7c6-688d32db8801.png align="center")

### Two key features of the TCP/IP model :

1. End node verification: The two endpoints of any data transfer are responsible for making sure it was successful.
    
2. Dynamic routing: The end node can transfer data over multiple paths and the network chooses the best path for individual data transfer.
