Overview CS 332 – Computer Networks 1CS332 - Computer Networks.
Understanding computer networks
-
Upload
narendran-thangarajan -
Category
Education
-
view
1.292 -
download
1
description
Transcript of Understanding computer networks
![Page 1: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/1.jpg)
Narendran Thangarajan,
Final Year CSE, SSNCE.
![Page 2: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/2.jpg)
What makes a computer network Uses Explain how TCP/IP model evolved
◦ TCP/IP Model Network Access Layer
Internet Layer
Transport Layer
Application Layer
Sockets What happens when we open a website Various fields of research
![Page 3: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/3.jpg)
Two computers connected with a cable
More than two computers connected using an internetworking device
![Page 4: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/4.jpg)
Resource Sharing ◦ Hardware (Processor, Storage, Printers) ◦ Software (Google Docs)
Information Sharing ◦ Access required information anywhere (Files, DB) ◦ Search for Information (Google!)
Communication ◦ eMail and Chat ◦ Forums
Remote Computing Distributed Processing
◦ Grid Computing ◦ Hadoop
![Page 5: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/5.jpg)
![Page 6: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/6.jpg)
Two Sub-layers ◦ Physical Layer ◦ Data Link Layer
Physical Layer ◦ Consists of the basic networking hardware
transmission technologies ◦ Defines how raw bits are transmitted between
computers. ◦ Eg: Ethernet, SONET, USB, Wifi, WiMAX, Bluetooth, IRDA
Data Link Layer ◦ Provides a unique address to each computer.
(MAC Address)
![Page 7: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/7.jpg)
Two major divisions ◦ Wired
Ethernet Physical Cables – Coaxial, UTP
SONET – Synchronous Optical Networking
USB
◦ Wireless
IEEE 802.11 – Popularly called “Wifi”
WiMAX
Bluetooth
IRDA
![Page 8: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/8.jpg)
![Page 9: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/9.jpg)
Infrastructure WLAN Access point bridges the wired network and the wireless network
Adhoc Wireless Networks Decentralized – Does not depend upon preexisting infrastructure
![Page 10: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/10.jpg)
Once physically connected to the network, our computer is identified to the other systems using a hardware address called MAC Address
MAC Address is unique
48-bit address burnt into the NIC of every machine
![Page 11: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/11.jpg)
Hub (Layer 1) Transmits the incoming data to all the nodes attached to it
Switch (Layer 2) Transmits the incoming data to the receiver alone
![Page 12: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/12.jpg)
There must be atleast one switch that knows the location of all the systems in the network.
Any solutions?
![Page 13: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/13.jpg)
Group a set of computers under a single IP network address.
There are many IP host addresses under a single network address. ◦ Eg: Network Address = 10.0.0.0
Host addresses = 10.0.0.1, 10.0.0.2,10.0.0.254
Each group is called a LAN (Local Area Network) and systems are connected using a Switch.
![Page 14: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/14.jpg)
Routers make the Internet Layer of the TCP/IP stack.
![Page 15: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/15.jpg)
![Page 16: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/16.jpg)
Using the IP Address we can find a computer uniquely.
But communications take place between specific processes running on different computers
PORT NUMBERS to the rescue!
Port numbers is a number given to a software-construct and a logical endpoint (not a hardware component). Eg: HTTP – 8080, MySQL - 3306
![Page 17: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/17.jpg)
IP Address Unique computer Port number Unique process
(IP Address : Port Number) Unique process in a given computer. The endpoint for any communication ie. A socket.
Eg: www.facebook.com would be running on 40.0.0.10:8080. 8080 is the port number since it’s a website.
![Page 18: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/18.jpg)
Client Server Applications
Network
A client, A server, and network
Client Server
Client machine Server machine
The Web Service is provided by the server and the clients use these services
This is where sockets come in !!
![Page 19: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/19.jpg)
Sockets
Introduced in BSD 4.1 UNIX 1981.
Sockets are the endpoints of any communication over the internet.
Sockets are identified by socket addresses.
Socket Address = IP Address + Port Number
![Page 20: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/20.jpg)
Why IP Address + Port number?
• IP Address is of the form 10.0.0.1 • Port Number can be anything from 0 to 65,535.
![Page 21: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/21.jpg)
IP Address – Choose network
Destination Socket = 10.0.0.2 : 80
10.0.0.0
20.0.0.0
30.0.0.0
40.0.0.0
![Page 22: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/22.jpg)
IP Address -> MAC Address – Locate the specific system
Destination Socket = 10.0.0.2 : 80
10.0.0.1
10.0.0.2
![Page 23: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/23.jpg)
Port Number – Process specific
Port 10000
Port 11000
Port 120000
![Page 24: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/24.jpg)
Understanding Ports
Transport Layer
Port 1 10000
Port 2 11000
Port 3 12000
Port 4 13000
Gmail OutLook Express
YM AVG
Update
Port num 10000
Data “Hi!”
Packet
Network layer
![Page 26: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/26.jpg)
Browser looks up IP Address
Browser DNS Cache OS Cache Router Cache ISP DNS Cache Recursive search After all this we get an IP address! The IP Address of
the actual web server where the files of facebook.com are stored.
![Page 27: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/27.jpg)
Browser sends a HTTP request to the webserver
Browser cache?! – Not possible. Facebook is dynamic
GET http://facebook.com/ HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/xaml+xml, [...] User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; [...] Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: facebook.com Cookie: datr=1265876274-[...]; locale=en_US; lsd=WW[...]; c_user=2101[...]
![Page 28: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/28.jpg)
Get the response from facebook.com server
Facebook sends back a permanently moved 301 to redirect the browser to www.facebook.com
HTTP/1.1 301 Moved Permanently Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Expires: Sat, 01 Jan 2000 00:00:00 GMT Location: http://www.facebook.com/ P3P: CP="DSP LAW" Pragma: no-cache Set-Cookie: made_write_conn=deleted; expires=Thu, 12-Feb-2009 05:09:50 GMT; path=/; domain=.facebook.com; httponly Content-Type: text/html; charset=utf-8 X-Cnection: close Date: Fri, 12 Feb 2010 05:09:51 GMT Content-Length: 0
![Page 29: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/29.jpg)
Browser takes the redirection
Browser gets the actual IP address and makes a HTTP request to that address.
GET http://www.facebook.com/ HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/xaml+xml, [...] Accept-Language: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; [...] Accept-Encoding: gzip, deflate Connection: Keep-Alive Cookie: lsd=XW[...]; c_user=21[...]; x-referer=[...] Host: www.facebook.com
![Page 30: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/30.jpg)
Facebook.com server handles the request
First the web server handles the request.
Then the Request Handler (PHP, Perl, Java, etc.) takes the required data from the request and prepares the output.
![Page 31: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/31.jpg)
Facebook.com sends the requested web page
HTTP/1.1 200 OK Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Expires: Sat, 01 Jan 2000 00:00:00 GMT P3P: CP="DSP LAW" Pragma: no-cache Content-Encoding: gzip Content-Type: text/html; charset=utf-8 X-Cnection: close Transfer-Encoding: chunked Date: Fri, 12 Feb 2010 09:05:55 GMT (Compressed data)2b3��������T�n�@����[...]
![Page 32: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/32.jpg)
Actual data (after decompression)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="facebook" class=" no_js"> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-language" content="en" /> ...
![Page 33: Understanding computer networks](https://reader034.fdocuments.in/reader034/viewer/2022052522/54943ccaac79591d2e8b4aa1/html5/thumbnails/33.jpg)
End of story