Love - Computing Science - Thompson Rivers University

Download Report

Transcript Love - Computing Science - Thompson Rivers University

Introduction and Overview
Computer Networks
Computing Science
Thompson Rivers University
Overview – How the Internet works







Network?
Computer network?
The Internet?
A sort of well disciplined or organized way of communication among
computing devices
We will see the correct definition later.
History of the Internet
Warriors of the net
TRU-COMP3270
Overview
2
Overview – How the Internet works



Do you really use the Internet?
We use the applications that use the services running on the Internet
An example of service on the Internet


Web surfing or Internet surfing
What is the web?
TRU-COMP3270
Overview
3
Overview – How the Internet works

WWW
Love
CBC
How many computers are connected to the Internet?
TRU-COMP327
Overview
4
Overview – How the Internet works





Love <--> CBC
How can Love show a web page on CBC to its screen?
(Let’s discuss this question as a network designer.)
Actually not Love
Then?
Application
IE
TRU-COMP3270
Overview
Love
CBC
5
Overview – How the Internet works


Love <--> CBC
How can Love show a web page stored on CBC to its screen?
IE
There are two issues.
Can you identify them?
Love
CBC
6
Overview – How the Internet works

Love <--> CBC

Applications







TRU-COMP3270
FireFox
IE
Chrome
Safari
Opera
How can IE on Love retrieve web pages
from the web server (software, not hardware)
on CBC computer system (hardware)?
Web browsers also can support
other services, such as e-mail and ftp.
Overview
7
Overview – How the Internet works

Love <--> CBC

Applications








IE
FireFox
Chrome
Safari
Opera
How can IE on Love retrieve web pages
from the web server on CBC?
The user always have to initiate. What does the user want to do with IE?
URL


Uniform Resource Locator
Syntax – service://address[:port]/path


Example – http://cs.tru.ca/~mlee/comp3270/
An address is given
from the user.
What is an address?
HTTP


TRU-COMP3270
Hyper Text Transfer Protocol
What is a protocol? How to use?
Overview
8
Overview – How the Internet works


1.
2.
An application needs to exchange some data with its peer application
running on another computer system.
Packets are sent.
What information does IE on Love need to know to send packets to its
peer application running on CBC?
How does IE on Love send packets to its peer application running on
CBC?
TRU-COMP3270
Overview
9
Overview – How the Internet works

Addressing – computer systems

Which one is CBC (www.cbc.ca)?
Love
How many computers?
TRU-COMP327
Overview
10
Overview – How the Internet works

Addressing – computer systems




Which one is CBC?
Globally unique address, called domain name, of CBC – www.cbc.ca
(But only some computers have
domain names.)
However the Internet does not
use domain names for
packet forwarding
toward the location of CBC
Love
Then?
CBC
(no domain name)
(www.cbc.ca)
TRU-COMP3270
Overview
11
Overview – How the Internet works

Addressing – computer systems






Which one is CBC?
www.cbc.ca is associated to a globally unique IP address of CBC –
208.38.45.174, a number of 32bits.
This is the physical location of CBC.
The Internet uses IP addresses to forward packets.
But users use domain names mostly.
Then?
Love
(no domain name)
(142.24.44.21)
CBC
(www.cbc.ca)
(208.38.45.174)
TRU-COMP3270
Overview
12
Overview – How the Internet works

Addressing – computer systems




Which one is CBC?
IP address of CBC
We need a mechanism
to translate domain names
to their corresponding
IP addresses. How?
DNS



Domain Name System
Love
It is a service.
(no domain name)
It is a protocol. (142.24.44.21)
CBC
(www.cbc.ca)
(208.38.45.174)
TRU-COMP3270
Overview
13
Overview – How the Internet works

Addressing – applications


Web
Mail
Pizza, Steak
There could be many applications
running on the CBC computer system.
How to find the web server on CBC?
HTTP/IE

Another locally unique addresses
on each computer is required to
distinguish running applications.
TRU-COMP3270
Overview
Love
CBC
14
Overview – How the Internet works

Web
(80)
Addressing – applications



Mail
(25)
Pizza, Burger
How to find the web server?
Well known port address
HTTP (TCP 80)
HTTP/IE
TRU-COMP3270
Overview
Love
CBC
15
Overview – How the Internet works

How does IE on Love send packets to its peer application on CBC?



Command from the user for WWW:
http://www.cbc.ca/
Ask HTTP to retrieve index.html on 208.38.45.174
HTTP


Request and response, with IP address 208.38.45.174 and TCP port 80
Client and server service model
IE
TRU-COMP3270
Overview
Love
CBC
16
Overview – How the Internet works

Intermediate summary







HTTP, DNS, ...
Domain name – globally unique
IP address – globally unique
DNS (Domain Name System)
Applications

Port address – E.g., TCP 80 – locally unique
Packets carry …





Applications, sch as IE, ...
Computer systems


Users
Application
HTTP
Address types
Destination IP address
Destination port address
…
Data
Forwarding
TRU-COMP3270
Overview
17
Overview – How the Internet works

How does HTTP send packets?




Request: sending a request packet
Response: receiving a response packet
How to send a packet to 208.38.45.174, with TCP port number 80?
Note: Packets could be lost while they are being forwarded to the
destination through the network.
IE
TRU-COMP3270
Overview
Love
CBC
18
Overview – How the Internet works

HTTP






HTTP packet
Request: sending a request packet
Response: receiving a response packet
Reliable data delivery is required.
TCP packet
IP packet
Encapsulation
There are many other services or protocols that prefer reliable data
delivery (lost packet recovery and error packet recovery). E.g., …
Then?
TCP (Transmission Control Protocol)





Reliable data delivery between two end applications or protocol entities
It includes error recovery and packet loss recovery routines.
How to send TCP packets to the destination through the jungle of
computers on the Internet?
There are other similar protocols, e.g., UDP, in the same level, which is used
for application layer protocols to send data faster, i.e., best effort delivery.
They use IP (Internet Protocol) that provides best effort delivery service
between two hosts.
TRU-COMP3270
Overview
19
Overview – How the Internet works
HTTP packet

Forwarding


IP (Internet Protocol) forwards IP packets
from 142.24.44.21 to 208.38.45.174
through many networks.
But how to forward?
TCP packet
IP packet
Decapsulation
Love
(no domain name)
(142.24.44.21)
CBC
(www.cbc.ca)
(208.38.45.174)
TRU-COMP3270
Overview
20
Overview – How the Internet works

Forwarding


IP packets from 142.24.44.21 to 208.38.45.174
Forwarding and routing on Love and intermediate nodes, called routers



It decides the next node
and forwards packets to
the next node.
How to decide?
with the dest addr
Love
If you decide (…)
wrong ones,…
(142.24.44.21)
Love
(142.24.44.27)
Router
(142.24.44.254)
TRU-COMP3270
CBC
(www.cbc.ca)
(208.38.45.174)
Router
(…)
Overview
21
Overview – How the Internet works

Forwarding

Similar example: How to drive to Vancouver from Kamloops?
TRU-COMP3270
Overview
22
Overview – How the Internet works

Forwarding

Similar example: How to drive to Vancouver?



At every intersection, we need to check the road signs with your destination.
We decide the road to the next intersection that seems to be better.
In the Internet,

Decide the next hop, i.e., the next router, using the routing table
with the destination IP address and forward the packet to the next hop.






The destination IP address – Vancouver
Routers – intersections
Routing tables – road signs and maps
Repeat the above steps until the packet arrives at the destination.
How to construct the routing table on each node?
Now we know how IP packets are forwarded to the destination. But how does Love get
back any message from CBC?
TRU-COMP3270
Overview
23
Overview – How the Internet works

Intermediate summary



Application – Chrome, …
HTTP
TCP


Header: source port, destination port
GET index.html
Header: source address,
destination address, protocol id
DA; SA; TCP
DP; SP
GET index.html
Network layer


Router
Packet forwarding



DP; SP
IP


GET index.html
Routing table
Routing
Encapsulation/Decapsulation
TRU-COMP3270
Overview
24
Overview – How the Internet works

Before we go further

At a host, what kind of
Information is needed
to exchange packets?








Love
router
router
IP address of the host
IP address of a DNS server computer system
IP address of a default gateway (oac router)
Subnet mask
Set dynamically or manually
ipconfig/all on the command window
ifconfig on Linux
What kind of information must be
stored in IP packets?
LAN (Local Area Network)
TRU-COMP3270
Overview
25
Overview – How the Internet works

LAN


IP is independent of underlying physical networks.
How to forward an IP packet from a node to the next node through a
transmission link?
Love
TRU-COMP3270
Next node
Overview
26
Overview – How the Internet works

LAN

How to forward an IP packet from a node to the next node?
Love
Switch or hub,
not router yet
UTP cable and NIC
TRU-COMP3270
Overview
27
Overview – How the Internet works

LAN



How to forward an IP packet from a node to the next node?
Underlying networks could be Ethernet, WLAN, FDDI, X.25, ATM, …
Ethernet





TRU-COMP3270
It delivers packets from a node to another node.
MAC (Medium Access Control):
Many computers are
connected together.
Each node has another
different type address, called physical
or hardware address, or MAC address.
set on NIC (Network Interface Card).
We need another mechanism
to translate IP addresses
to the corresponding physical addresses.
ARP (Address Resolution Protocol)
Overview
How many different types
of addresses so far?
How many different layers
so far?
28
Overview – How the Internet works

LAN

How can Ethernet delivers a packet from a node to another node?
UTP cable and NIC
TRU-COMP3270
Overview
29
Overview – How the Internet works

LAN


How can Ethernet delivers a packet from a node to another node?
Electric or electromagnetic signal




How?
Encoding/Decoding
It also could be lost on the transmission.
Ethernet also includes
error recovery routines.


How?
Framing
UTP cable and NIC
TRU-COMP3270
Overview
30
Overview – How the Internet works

Summary
Chrome/HTTP (destination address; data)
TCP (destination address; dp, sp, data)
IP (da, sa; TCP, data)
IP
Ethernet (dpa, spa; IP, data)
FDDI
Packet
decapsulation
Packet
encapsulation
CBC
Love
The Internet
TRU-COMP3270
Overview
31
Overview – How the Internet works

Summary of layered network architecture
Application
Transport
Network
Data link
Physical
CBC
Love
The Internet
TRU-COMP3270
Overview
32
Overview – How the Internet works

Summary of layered network architecture
Layer
Protocol
Address
Application
IE, …
DNS, HTTP, …
URL;
Port address (port
number + transport
layer protocol id)
Transport
TCP
UDP, …
Network
IP, ARP, …
IP address
Data link
Ethernet, …
Physical address
(oac MAC address
or hardware
address)
Physical
Ethernet, …
TRU-COMP3270
Overview
Delivery
End-to-end
- Error recovery
Host-to-host
- Addressing
- Routing
- Forwarding
Node-to-node
- Framing
- MAC, …
Node-to-node
- Encoding
- Bit streaming
33