Computer Networks (lecture 9)

Содержание

Слайд 2

Full information

http://www.stanford.edu/class/cs101/network-1-introduction.html
http://www.stanford.edu/class/cs101/network-2-internet.html

Full information http://www.stanford.edu/class/cs101/network-1-introduction.html http://www.stanford.edu/class/cs101/network-2-internet.html

Слайд 3

Outline

How to send data?
Dividing into packets
Protocols (HTTP, FTP, SMTP)
Error correction
Types of network
LAN,

Outline How to send data? Dividing into packets Protocols (HTTP, FTP, SMTP)
WAN, MAN
How to send data to correct address?
Ethernet, and MAC-address
TCP-IP protocol, IP-address
IPv4, IPv6
DNS, domain names
How to send data faster?
P2P, Torrents

Слайд 4

Basics of network

The computer network is like a phone system
When a user

Basics of network The computer network is like a phone system When
enters sdu.edu.kz in browser:
the browser sends a request to sdu.edu.kz (request is small, weights 1 KB)
sdu.edu.kz server responses to the browser
(response is bigger can weights 200 KB).

Слайд 5

LAN, WAN, MAN

A LAN (local area network) is a group of computers

LAN, WAN, MAN A LAN (local area network) is a group of
and network devices connected together, usually within the same building. By definition, the connections must be high speed and relatively inexpensive (e.g., token ring or Ethernet). Most Indiana University Bloomington departments are on LANs. A MAN (metropolitan area network) is a larger network that usually spans several buildings in the same city or town. The IUB network is an example of a MAN. A WAN (wide area network), in comparison to a MAN, is not restricted to a geographical location, although it might be confined within the bounds of a state or country. A WAN connects several LANs, and may be limited to an enterprise (a corporation or an organization) or accessible to the public. The technology is high speed and relatively expensive. The Internet is an example of a worldwide public WAN.

Слайд 7

Packets data from here to there

Problem:
Send image from one computer to another

Packets data from here to there Problem: Send image from one computer
on ethernet
e.g. 50KB image.jpg (50,000 bytes)
How to send the image.jpg on the wire? (on right side)

Packets
Divide bytes of image.jpg into packets
Say each packet is 1500 bytes (varies)
Then image.jpg divides into about 32 packets
Ethernet: transmit one packet between computers

Слайд 8

dividing file into packets

dividing file into packets

Слайд 9

Problem:
While sending packets through errors may occur
Solution:
We must check if received packet

Problem: While sending packets through errors may occur Solution: We must check
is same as it was sent

Error control

Слайд 10

Each packet has extra checksum bytes, to detect if some bits were

Each packet has extra checksum bytes, to detect if some bits were
corrupted while transporting to receiver
Simple checksum can be:
last two digits of the sum of all bytes
Receiver sums all bytes and checks if sums are equal

checksum vs errors

Слайд 11

checksum example

checksum example

Слайд 12

Ethernet is the type of computer network:
One wire shared by all the

Ethernet is the type of computer network: One wire shared by all
computers
No central control -- distributed, collaborative
Like talking at a party

What is Ethernet?

How to send:
Every computer has a unique address on the wire
Packet includes to:addr of recipient
Sender waits for period of silence on the wire, sends packet
Packet spreads out on wire, reaching all computers
More "broadcast" than "send"
Receive:
All computers listen to the wire all the time
Pick out packets addressed to them, ignore other packets

Слайд 13

ethernet data sending

ethernet data sending

Слайд 14

MAC (Media Access Control)
MAC address is burned at the factory
Every computer

MAC (Media Access Control) MAC address is burned at the factory Every
(phone, desktop, laptop) has its own globally unique address
On Linux MAC address can be changed
example: ab:cc:dd:12:34:56

MAC address (Physical Address)

Слайд 15

Wi-Fi wireless networking
Similar strategy to Ethernet (simplifying)
Every computer has a radio
The

Wi-Fi wireless networking Similar strategy to Ethernet (simplifying) Every computer has a
radio-channel used is the shared medium
One computer transmits at a time
Everyone listens

Wi-Fi

Слайд 16

wifi example

wifi example

Слайд 17

‘Protocol’ is a fancy word for simply saying “an agreed way to

‘Protocol’ is a fancy word for simply saying “an agreed way to
do something”. You might have heard it in a cheesy cop show -- “argh Jim, that’s against protocol!!!” -- or heard it used in a procedural sense, such as how to file a tax return or sit a driving test. We all use protocols, every day. Think of when you’re in class. The protocol for asking a question may be as follows: raise your hand, wait for a nod from the teacher then begin asking your question.

What is protocols

Слайд 18

HTTP

The HyperText Transfer Protocol (HTTP) is the most common protocol in use

HTTP The HyperText Transfer Protocol (HTTP) is the most common protocol in
on the internet. The protocol’s job is to transfer HyperText (such as HTML) from a server to your computer. It’s doing that right now. You just loaded the Field Guide from the servers where it is hosted. Hit refresh and you’ll see it in action.
HTTP uses a request/response pattern for solving the problem of reliable communication between client and server. The “ask for” is known as a request and the reply is known as a response. Both requests and responses can also have other data or resources sent along with it.

Слайд 19

Previously .. LAN, e.g. ethernet, Wi-Fi, one house
Internet - world-wide network built

Previously .. LAN, e.g. ethernet, Wi-Fi, one house Internet - world-wide network
on open standards
Internet is like a phone system for computers
Every computer has a unique address
Every computer can try to "call" any other computer

TCP-IP standard

Слайд 20

IP address

Every computer on the internet has an "IP address" that identifies

IP address Every computer on the internet has an "IP address" that
it (like a phone number)
The IP address is 4 bytes, written between dots, like "171.64.2.3". The left part of the address encodes in part where that IP address is in the whole internet -- for example any 171.64.(anything) is part of Stanford (like the area code of a phone number). More specifically, in my part of the Gates building, all the IP addresses begin 171.64.64.XX varying only in that last byte.

Слайд 21

IPv4 vs IPv6

IPv4 can contain 2^8^4 = 2^32 = about 4.3 billion

IPv4 vs IPv6 IPv4 can contain 2^8^4 = 2^32 = about 4.3
addresses
IPv6 can contain 2^128 addresses (about 3.4 * 10^38 addresses)
Example of IPv6:
2001:0db8:85a3:0042:1000:8a2e:0370:7334
IPv6 addresses are represented as eight groups of four hexadecimal digits separated by colons

Слайд 23

Internet of Things

The Internet of Things (IoT) is the network of physical

Internet of Things The Internet of Things (IoT) is the network of
objects or "things" embedded with electronics, software, sensors, and network connectivity, which enables these objects to collect and exchange data.
So your refrigerator, and kettle will be online and you can send them commands.
Experts estimate that the IoT will consist of almost 50 billion objects by 2020.

Слайд 24

What is web-site

Web-site is some resource located on web-server
Web-server is computer:
always

What is web-site Web-site is some resource located on web-server Web-server is
turned on
accessible through internet
have fixed IP address. Why ?

Слайд 25

Domain names

Basically human-readable synonyms for IP addresses
codingbat.com (synonym for 173.255.219.70)
Domain names are

Domain names Basically human-readable synonyms for IP addresses codingbat.com (synonym for 173.255.219.70)
easy for people to remember and type
Domain system can look up an IP addr from a domain name
So when you use a domain name, it is looked up to get an IP addr for the actual packets

Слайд 26

DNS, hosts.txt

When you enter vk.com it sends request to DNS
DNS lookups in

DNS, hosts.txt When you enter vk.com it sends request to DNS DNS
its database and responses IP address of entered domain, and request is send to specified IP address.
On operating systems there is file which is called hosts.txt file.
In hosts.txt on each line IP address and corresponding domain name are stored.
You can match any pair of domain address IP address

Слайд 27

Router

Router has multiple connections, copies/routes packets between them
My office computer is at

Router Router has multiple connections, copies/routes packets between them My office computer
171.64.64.16
That computer connects "upstream" to router 171.64.64.1
That router handles traffic for a few local computers
Left side of computer and router IP addresses typically the same -- same neighborhood

Слайд 28

the way by which request goes from browser to site

the way by which request goes from browser to site

Слайд 29

Note that 10.x.x.x , 172.16.x.x and 192.168.x.x addresses are special "local" IP

Note that 10.x.x.x , 172.16.x.x and 192.168.x.x addresses are special "local" IP
addresses
These addresses are not valid out on the internet at large
These are translated to a real IP addr as a packet makes its way
Frequently given out by Wi-Fi routers .. why I mention them
127.0.0.1 (IPv4) is own address of computer
::1 (IPv6) is own address of computer

Local IP address

Слайд 30

Ping and traceroute

Ping is command to check computer on some address is

Ping and traceroute Ping is command to check computer on some address
working
Traceroute to find which routers were visited by packet before reaching destination

Слайд 31

Switch

A switch connects multiple computers together in a LAN. After the first

Switch A switch connects multiple computers together in a LAN. After the
data transfer, it creates a “switch table” which matches ports to connected devices by their MAC addresses. Switches, unlike hubs, are able to differentiate between computers as the first time data passes through the switch, it looks to see which MAC addresses are connected to which ports and remembers the layout.
http://www.makeuseof.com/tag/whats-difference-routers-hubs-switches/

Слайд 32

Hub

A hub connects multiple computers together in a Local Area Network (LAN).

Hub A hub connects multiple computers together in a Local Area Network
All information sent to the hub is then sent through each port to every device in the network. Hubs are unable to tell one computer from another, so they receive information on one port and then blindly forward it to all other ports — whether it was intended for those computers or not. So even though you may only want to send information to one other computer, if you have five total computers on your network, then there will be four other computers receiving data that wasn’t intended for them.

Слайд 33

Proxy server

Server software which is located between server and client. So that

Proxy server Server software which is located between server and client. So
all requests from computers of network go through proxy, and proxy requests to servers.
Proxy can save all requests and filter the requests to Internet

Слайд 34

Proxy server

Proxy server

Слайд 35

TOR - The Onion Router

Tor is a network that keeps users anonymous

TOR - The Onion Router Tor is a network that keeps users
on the Internet.
It works by moving data across many Tor servers, called "hops".
The role of each server is to only move that data to another server.
With the final hop moving data to the end site.
Information is transmitted in way so it is hard to trace.

Слайд 36

Tor network

Tor network

Слайд 37

TOR is used for?

Because TOR don’t track users, it is mostly used

TOR is used for? Because TOR don’t track users, it is mostly used for illegal uses
for illegal uses

Слайд 38

Darknet

Darknet is located inside TOR network
TOR network recognizes .onion domain requests and

Darknet Darknet is located inside TOR network TOR network recognizes .onion domain
sends it to specified servers
Darknet mostly contains web-sites that are illegal

Слайд 39

Server-client network

On a client-server network, resources are located on and controlled by

Server-client network On a client-server network, resources are located on and controlled
a central computer known as a server
client-server networks are often more expensive to set up than their peer-to-peer equivalents, as server hardware and software is more expensive than regular desktop computers

Слайд 40

P2P network

In contrast to server-client network, P2P doesn’t have server.
All computers

P2P network In contrast to server-client network, P2P doesn’t have server. All
in P2P network contain parts of resources, and can work as client or server.

Слайд 41

BitTorrent

BitTorrent protocol for peer-to-peer file sharing.
File is located not in one server,

BitTorrent BitTorrent protocol for peer-to-peer file sharing. File is located not in
but on different peers.
So to download file, pieces of it are requested from different peers. After downloading piece of file, peer can immediately share it to other peers.

Слайд 43

Because in server-client network there is only one server, and many clients.
Server

Because in server-client network there is only one server, and many clients.
has limited bandwidth, and it will be divided to many clients.
In p2p network there are many peers that share file, so bandwidth is much more.

Why loading by Torrent is usually faster than loading from server?

Слайд 44

Firechat

Mobile application that creates network from nearby devices, sends messages without using

Firechat Mobile application that creates network from nearby devices, sends messages without
Internet, and cellular connection, using only WiFi or Bluetooth.

Слайд 45

Skype

Skype (Sky peer to peer) was originally hybrid of client-server and peer-to-peer

Skype Skype (Sky peer to peer) was originally hybrid of client-server and
technology.
Now it uses Microsoft’s supernode servers.
Имя файла: Computer-Networks-(lecture-9).pptx
Количество просмотров: 38
Количество скачиваний: 0