computer networling notes from kunal kushwaha course
computer networling notes from kunal kushwaha course
computer networling notes from kunal kushwaha course
Computer Networking
1. Network -> Computers connected together is a network.
2. Internet -> Collection of computer network connected to each other on a global scale is called
internet.
3. Protocol -> A protocol is a set of rules and guidelines for communicating data. Rules are defined
for each step and process during communication between two or more computers. Networks
have to follow these rules to successfully transmit data.
4. World wide web (www) -> The World Wide Web (WWW) is a network of online content that is
formatted in HTML and accessed via HTTP. The term refers to all the interlinked HTML pages that
can be accessed over the Internet.
5. Internet Society creates protocols for communicating data.
6. When we type google.com on our local machine (client) , it sends the request to the google
server, google server send back the response to our local machine(client) with all the required
web page and google web page opens on our local machine.
7. TCP -> TCP stands for transmission control protocol. It is a type of protocol. TCP makes sure
your data reaches its destination in complete format , without data been corrupted.
8. UDP -> UDP stands for User Datagram Protocol. It is a type of protocol. The UDP helps to
establish low-latency and loss-tolerating connections establish over the network.When we do
not care whether 100 percent data is reaching to the destination. example - Video conferencing.
9. HTTP -> HTTP stands for hyper text transfer protocol. It is a type of protocol. It defines the
format of the data that is transferred between clients and server.
10. Data is transferred in the form of packets.
11. IP address -> IP (Internet Protocol) addresses are used to identify hardware devices on a
network. The addresses allow these devices to connect to one another and transfer data on a
local network or over the internet.
12. IP address format x . x . x . x , where every x can range from 0-255. When we type google.com it
resolves to a particular IP address.
13. curl ifconfig.me -s -> Check IP address of our own computer given by internet provider.
14. We have Internet service provider (ISP) . ISP gives us a router. Router is going to have a global IP
address. The devices connected to the router have the local IP address given by the router.
Router assigns the local IP address to the device connected to it using DHCP protocol. DHCP
stands for dynamic host configuration protocol. If you make a request to google.com from your
device, the google server will see the global IP address of the router and not your device local IP
address.
15. When the response comes from google server to the router through ISP, the router will check
which device requested for the google page using Network address Translation(NAT).
16. But which application in the device made the request ? -> We can know that using Port. IP
address decides which device to send the data and port decide which application to send the
data in that device.
17. Port -> Port are 16 bit number. 65000 port number are available. Every application in a device
1 of 7 20/12/22, 15:53
Computer Networking - Evernote https://www.evernote.com/client/web?login=true#?n...
have a port number and they are running on that specific port.
18. HTTP -> Port 80. MongoDB -> Port 27017.
19. Ports from 0 to 1023 are reserved ports.
20. Ports from 1024 to 49152 are registered for specific applications. example - mongodb , mysql.
SQL server -> port 1433. Remaining ports we can use.
21. 1 Mbps -> 10^6 bits per second. 1 Gbps -> 10^9 bits per second. 1Kbps -> 10^3 bits per second.
22. Upload speed -> Speed with which you are sending the data from your computer to the other
computer via internet.
23. Download speed -> Speed with which you are downloading the data on your computer, send by
some other computer via internet.
24. Local Area Network (LAN) -> A local area network (LAN) is a collection of devices connected
together in one physical location, such as a building, office, or home. A LAN can be small or
large, ranging from a home network with one user to an enterprise network with thousands of
users and devices in an office or school.
25. Metropolitan Area Network (MAN) -> A metropolitan area network (MAN) is a computer
network that connects computers within a metropolitan area, which could be a single large city,
multiple cities and towns, or any given large area with multiple buildings.
26. Wide Area Network (WAN) -> A wide area network (WAN) is a large computer network that
connects groups of computers over large distances(country) using optical fibre cables.
27. Modem -> Modem is used to convert the digital signals to analog signals and vice versa. The
digital data from your computer,modem can convert it into electrical signals so that you can
transfer it via telephone lines.
28. Router -> Router is a device that routes the data packet based on their IP address.
29. Topology -> Topology defines the structure of the network of how all the components are
interconnected to each other.
30. Bus topology -> The bus topology is designed in such a way that all the stations are connected
through a single cable known as a backbone cable.If the backbone cable gets broken entire
network is spoiled. Only one person can send the data over particular time.
31. Ring topology -> Computers are connected in a ring with one another. If one of the cable breaks
you cannot transmit the data.Unnecessary lot of calls are made.
32. Star topology -> One central device that is connected to all computers. If computer A wants to
communicate with computer B it will communicate via Central Device. If central device fails,
your network will go down.
33. Tree topology -> Combination of bus and star topology. Many central devices are connected in
bus sort of a way.Many computers are connected to the central devices. has more fault tolerance.
34. Mesh topology -> Every single computer is connected to every single computer. It is
expensive(many wires). Scalability issues.
35. OSI Model -> OSI stands for open system interconnection model. It is a standard about how two
devices interconnect with each other. There are 7 layers in OSI model. Application layer,
Presentation layer, Session layer, Transport layer, Network layer,Data link layer, Physical layer.
36. Abstract of OSI model -> Application layer consist of the application with which user is
interacting.Then the data is send from application layer to presentation layer.The data from the
2 of 7 20/12/22, 15:53
Computer Networking - Evernote https://www.evernote.com/client/web?login=true#?n...
3 of 7 20/12/22, 15:53
Computer Networking - Evernote https://www.evernote.com/client/web?login=true#?n...
text transfer protocol. 2.) DHCP -> DHCP stands for dynamic host control protocol.DHCP is used
to assign the local IP addresses to the devices connected to the router. 3.) SMTP -> SMTP stands
for simple mail transfer protocol. It is used while sending email. 4.) POP3 and IMAC -> These are
used to receive emails. 5.) SSH - SSH stands for secure shell. It is a method for secure remote
login from one computer to another. 6.) Telnet -> Telnet is an application protocol that helps
users communicate with a remote system.SSH is more secured than telnet as it encrypts the
data.
48. Socket -> Sockets allow communication between two different processes on the same or
different machines.
49. HTTP in detail -> It is a client server protocol and it tells us how you request the data from
server and how the server will send back the data to the client. Application layer protocol also
requires transport layer protocol. HTTP uses TCP. It is stateless protocol.
50. HTTP method -> 1. GET -> Requesting some data from server 2. POST -> Client giving something
to the server. example - username,password. 3. PUT -> Puts data at a specific location. 4.
DELETE -> delete data from the server, you will send the delete request.
51. Status Codes -> 1. 200 -> Request was successful. 2. 404 -> Server cannot find the requested
resource. 3. 400 -> Bad Request.400 Bad Request response status code indicates that the server
cannot or will not process the request due to something that is perceived to be a client error 4.
500 -> Internal Server error. This error is usually returned by the server when no other error code
is suitable. It is generic error response.
52. Status codes -> 1. 1xx range -> informational category 2.2xx range -> success codes 3. 3xx
range -> Redirecting 4.4xx range -> client error 5..5xx range -> server error.
53. Cookies -> Cookie is a unique string. It is stored on the client browser. When we visit the website
for the first time,cookie is set. And after that whenever you make a new request,in that request
header,cookie will be sent.Then the server will know that the request is coming from the this
specific person, the server will check the database and it will find the state for that.
54. Third party cookies -> A third-party cookie is placed on a website by someone other than the
owner (a third party) and collects user data for the third party. For example, a user visits a
website called news.com. Cookies placed on this domain by news.com are first-party cookies. A
cookie placed by any other site, such as an advertiser or social media site, is a third-party
cookie.
55. How Email Works -> Simple mail transfer protocol (SMTP) is used to send email to the other
person. And POP3 to receive email. This is on the application layer protocol. Email uses TCP as a
transport layer protocol. If a person is sending an email from yahoo.com to gmail.com account.
How does is work? -> Firstly sender sends the email to sender's SMTP server.Senders SMTP
sever then makes the connection with Receivers SMTP server.And then the email is transferred
to the receiver SMTP server.When the receiver logs into the email client,it downloads the email
from the server and it is visible to the receiver.
56. nslookup -type=mx gmail.com -> Name and IP address of SMTP server for gmail.
57. POP -> POP stands for post office protocol. It is used to receive emails. First the client connects
to the pop server using TCP port 110. Then the client asks the pop server to give all the
emails.Client authorizes the pop server and pop server transact the emails to client.
4 of 7 20/12/22, 15:53
Computer Networking - Evernote https://www.evernote.com/client/web?login=true#?n...
58. IMAP -> It is also used to get emails. It stands for internet message access protocol. It allows to
view your emails on multiple devices.
59. Domain Name System (DNS) -> Domain names are mapped to IP addresses. When we type
google.com http protocol will use DNS to find the IP address of google server. It is difficult to
remember the IP address therefore we use domain name. DNS is a directory database of url and
ip address. Directory is divided into various classes of domains. In mail.google.com mail is sub-
domain,google is second level domain, .com is top level domain. There are multiple
databases for these 3 categories. Top one is known as Root DNS server. They have top level
domain. eg- .io , .org, .com. These themselves have commclassroom.org , google.com etc. These
are second level domains. Top level domains are managed by ICANN.
60. What happens when you hit url in browser -> Person enters a url into the browser and hits
enter. URL stands for universal resource locator.URL has 4 components. eg- http://example.com
/product/electric/phone. http is a scheme. It tells the browser to connect to the server using
http protocol. Another one is https which means that connection is encrypted. example.com is a
domain name of the site. product/electric is a path. /phone is a resource. Browser needs to
know how to reach to the server, in this case example.com. This is done with a process called as
DNS lookup. It is kind of phone book to the internet. DNS translates domain name to ip
addresses so browser can know the resources. To make lookup process fast DNS info is heavily
cached. First the Browser looks up IP in cache. If it is not in the browser cache the browser asks
the OS for it. OS also has it's own cache which it keeps for certain period of time. If the OS
doesn't have the IP, it makes the query out to the internet to the DNS resolver. It makes a chain
of request until the IP address is resolved. Now finally the browser has the IP address of the
server, in our case example.com. Then the browser establishes a TCP connection with the server
using the IP address it got for it. Now the browser sends an HTTP request to the server over the
established TCP connection. The server process the request and sends back a response. The
browser receives the response and renders the content.
61. dig google.com -> to check messages received by the DNS server. It is a DNS lookup utility.
62. Transport Layer -> Role of transport layer is to take the information(message), from the
network to the application and vice versa. If the data needs to transferred from one network to
another it is done by network layer. Suppose you are sending message,files and video call
simultaneously to your friend. Transport layer has a multiplexer which receives all the 3 items.
(message,file and video call). This will pass it to the demultiplexer and demultiplexer will send it
to your friend application. If the message application wants to send something to other
application it will give it to sockets. These sockets have port numbers. Data travels in packets.
Transport layer will attach these socket port numbers. Therefore it knows from which
application the data is coming and to which application data needs to send. Transport layer also
takes care of congestion control. While sending the data, data might be corrupted or lost. To
deal with this transport layer has something called as checksums.
63. Checksum -> When you are sending some data to your friend. Using this data a particular string
value is calculated using some algorithm.Then that data and value is send to your friend. The
receiver side will also calculate a checksum and generate a random string value based on the
data received.Then both the string value are matched. If both are same then data received is
5 of 7 20/12/22, 15:53
Computer Networking - Evernote https://www.evernote.com/client/web?login=true#?n...
6 of 7 20/12/22, 15:53
Computer Networking - Evernote https://www.evernote.com/client/web?login=true#?n...
Created By -
Yash Patil.
7 of 7 20/12/22, 15:53