network systems - scsvmv - 30sep08 - modified vasan sanat tech pvt ltd
TRANSCRIPT
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
1/49
Discussion onNetwork Systems, Proxies andServers
inNational level Technical SymposiumSCSVMV, Kanchipuram
30-Sep-08Vasan V S([email protected])
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
2/49
Agenda
Network System definition wrt Internet
Network Addressing
Network Proxy
Other network server applications
Questions?
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
3/49
Whats the Internet: nuts and bolts view
millions of connectedcomputing devices: hosts= end systems
running network apps
communication links fiber, copper, radio,
satellite
transmission rate =bandwidth
routers:forward packets(chunks of data)
local ISP
companynetwork
regional ISP
router workstation
servermobile
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
4/49
Cool internet appliances
Worlds smallest web server
http://www-ccs.cs.umass.edu/~shri/iPic.html
IP picture frame
http://www.ceiva.com/
Web-enabled toaster +
weather forecaster
Internet phones
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
5/49
Whats the Internet: nuts and bolts view
protocolscontrol sending,receiving of msgs e.g., TCP, IP, HTTP, FTP, PPP
Internet:network of
networks loosely hierarchical
public Internet versusprivate intranet
Internet standards RFC: Request for comments
IETF: Internet EngineeringTask Force
local ISP
companynetwork
regional ISP
router workstation
servermobile
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
6/49
A closer look at network structure:
network edge:applications andhosts
network core: routers
network ofnetworks
access networks,physical media:communication links
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
7/49
The Network Core
mesh of interconnectedrouters
thefundamentalquestion: how is datatransferred through net?
circuit switching:dedicated circuit percall: telephone net
packet-switching: datasent thru net indiscrete chunks
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
8/49
Access networks and physical media
Q: How to connect endsystems to edge router?
residential access nets
institutional access
networks (school,company)
mobile access networks
Keep in mind:
bandwidth (bits persecond) of accessnetwork?
shared or dedicated?
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
9/49
Residential access: point to point access
Dialup via modem
up to 56Kbps direct access torouter (often less)
Cant surf and phone at sametime: cant be always on
ADSL: asymmetric digital subscriber line
up to 1 Mbps upstream (today typically < 256 kbps)
up to 8 Mbps downstream (today typically < 1 Mbps) FDM: 50 kHz - 1 MHz for downstream
4 kHz - 50 kHz for upstream
0 kHz - 4 kHz for ordinary telephone
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
10/49
Company access: local area networks
company/univ local areanetwork (LAN) connectsend system to edge router
Ethernet:
shared or dedicated linkconnects end systemand router
10 Mbs, 100Mbps,
Gigabit Ethernet, 10 Gigabit Ethernet
(Coming soon)
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
11/49
Wireless access networks
shared wirelessaccessnetwork connects end systemto router via base station aka access
point
wireless LANs: 802.11b/g (WiFi): 11 or 54 Mbps
wider-area wireless access provided by telco operator
3G ~ 384 kbps
Will it happen??
GPRS in Europe/US
basestation
mobilehosts
router
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
12/49
Home networks
Typical home network components: ADSL or cable modem
router/firewall/NAT
Ethernet
wireless accesspoint
wirelessaccesspoint
wirelesslaptops
router/firewallcablemodem
to/from
cableheadend
Ethernet
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
13/49
Physical Media
Bit: propagates betweentransmitter/rcvr pairs
physical link: what liesbetween transmitter &receiver
guided media: signals propagate in solid
media: copper, fiber, coax
unguided media: signals propagate freely,
e.g., radio
Twisted Pair (TP) two insulated copper
wires Category 3: traditional
phone wires, 10 MbpsEthernet
Category 5:100Mbps Ethernet
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
14/49
Internet structure: network of networks
roughly hierarchical at center: tier-1 ISPs (e.g., MCI, Sprint, AT&T, Cable
and Wireless), national/international coverage
treat each other as equals
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
Tier-1providersinterconnect
(peer)privately
NAP
Tier-1 providersalso interconnectat public networkaccess points(NAPs)
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
15/49
Tier-1 ISP: e.g., Sprint
Sprint US backbone network
Seattle
Atlanta
Chicago
Roachdale
Stockton
San Jose
Anaheim
Fort Worth
Orlando
Kansas City
CheyenneNew York
PennsaukenRelayWash. DC
Tacoma
DS3 (45 Mbps)
OC3 (155 Mbps)
OC12 (622 Mbps)
OC48 (2.4 Gbps)
to/from customers
peering
to/from backbone
.
POP: point-of-presence
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
16/49
Internet structure: network of networks
Tier-2 ISPs: smaller (often regional) ISPs Connect to one or more tier-1 ISPs, possibly other tier-2 ISPs
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
NAP
Tier-2 ISPTier-2 ISP
Tier-2 ISP Tier-2 ISP
Tier-2 ISP
Tier-2 ISP paystier-1 ISP forconnectivity torest of Internet tier-2 ISP iscustomeroftier-1 provider
Tier-2 ISPsalso peerprivately witheach other,interconnectat NAP
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
17/49
Internet structure: network of networks
Tier-3 ISPs and local ISPs last hop (access) network (closest to end systems)
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
NAP
Tier-2 ISPTier-2 ISP
Tier-2 ISP Tier-2 ISP
Tier-2 ISP
local
ISPlocal
ISP
local
ISP
local
ISP
local
ISP Tier 3
ISP
local
ISP
local
ISP
local
ISP
Local and tier-3 ISPs arecustomersofhigher tierISPs
connectingthem to restof Internet
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
18/49
Internet structure: network of networks
a packet passes through many networks!
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
NAP
Tier-2 ISPTier-2 ISP
Tier-2 ISP Tier-2 ISP
Tier-2 ISP
local
ISPlocal
ISP
local
ISP
local
ISP
local
ISP Tier 3
ISP
local
ISP
local
ISP
local
ISP
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
19/49
How do loss and delay occur?
packets queuein router buffers packet arrival rate to link exceeds output link capacity
packets queue, wait for turn
A
B
packet being transmitted (delay)
packets queueing (delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
20/49
Four sources of packet delay
1. nodal processing: check bit errors
determine output link
A
B
propagation
transmission
nodalprocessing queueing
2. queueing time waiting at output
link for transmission
depends on congestion
level of router
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
21/49
Delay in packet-switched networks
3. Transmission delay: R=link bandwidth (bps)
L=packet length (bits)
time to send bits into
link = L/R
4. Propagation delay: d = length of physical link
s = propagation speed inmedium
propagation delay = d/s
A
B
propagation
transmission
nodalprocessing queueing
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
22/49
Real Internet delays and routes
What do real Internet delay & loss look like?
Traceroute program: provides delaymeasurement from source to router along end-endInternet path towards destination. For all i: sends three packets that will reach router ion path
towards destination
router iwill return packets to sender
sender times interval between transmission and reply.
3 probes
3 probes
3 probes
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
23/49
Real Internet delays and routes
1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms4 jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16 ms 11 ms 13 ms
5 jn1-so7-0-0-0.wae.vbns.net (204.147.136.136) 21 ms 18 ms 18 ms6 abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22 ms 18 ms 22 ms7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms
13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms17 * * *18 * * *
19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136ms
traceroute: gaia.cs.umass.edu to www.eurecom.frThree delay measurements fromgaia.cs.umass.edu to cs-gw.cs.umass.edu
* means no response (probe lost, router not replying)
trans-oceaniclink
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
24/49
Packet loss
queue (aka buffer) preceding link in bufferhas finite capacity
when packet arrives to full queue, packet is
dropped (aka lost) lost packet may be retransmitted by
previous node, by source end system, ornot retransmitted at all
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
25/49
Internet protocol stack
application: supporting networkapplications FTP, SMTP, HTTP
transport: process-process data
transfer TCP, UDP
network: routing of datagrams fromsource to destination
IP, routing protocols link: data transfer between
neighboring network elements PPP, Ethernet
physical:bits on the wire
application
transport
network
link
physical
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
26/49
sourceapplicationtransportnetwork
linkphysical
Ht
Hn
M
segment Ht
datagram
destination
applicationtransportnetwork
linkphysical
HtHnHl M
HtHn M
Ht MM
networklink
physical
linkphysical
HtHnHl M
HtHn M
HtHn M
HtHnHl M
router
switch
Encapsulationmessage M
Ht M
Hnframe
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
27/49
Agenda
Network System definition wrt Internet
Network Addressing
Network Proxy
Other network server applications
Questions?
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
28/49
The Internet Network layer
forwardingtable
Host, router network layer functions:
Routing protocols
path selectionRIP, OSPF, BGP
IP protocoladdressing conventions
datagram formatpacket handling conventions
ICMP protocolerror reportingrouter signaling
Transport layer: TCP, UDP
Link layer
physical layer
Networklayer
IP d f
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
29/49
IP datagram format
ver length
32 bits
data(variable length,typically a TCP
or UDP segment)
16-bit identifier
headerchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented ateach router)
forfragmentation/reassembly
total datagram
length (bytes)
upper layer protocolto deliver payload to
head.len
type ofservice
type of dataflgs
fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) E.g. timestamp,record routetaken, specifylist of routersto visit.
how much overheadwith TCP?
20 bytes of TCP
20 bytes of IP
= 40 bytes + app
layer overhead
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
30/49
IP Addressing: introduction
IP address: 32-bitidentifier for host,router interface
interface:connection
between host/routerand physical link routers typically have
multiple interfaces
host typically has one
interface IP addresses
associated with eachinterface
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2223.1.3.1
223.1.3.27
223.1.1.1 = 11011111 00000001 00000001 00000001
223 1 11
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
31/49
Subnets
IP address: subnet part (high
order bits)
host part (low orderbits)
Whats a subnet ? device interfaces with
same subnet part of IPaddress
can physically reacheach other withoutintervening router
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2223.1.3.1
223.1.3.27
network consisting of 3 subnets
subnet
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
32/49
Subnets 223.1.1.0/24 223.1.2.0/24
223.1.3.0/24
Recipe To determine the
subnets, detach eachinterface from its
host or router,creating islands ofisolated networks.Each isolated network
is called a subnet.Subnet mask: /24
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
33/49
NAT: Network Address Translation
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
138.76.29.7
local network(e.g., home network)
10.0.0/24
rest ofInternet
Datagrams with source or
destination in this networkhave 10.0.0/24 address forsource, destination (as usual)
Alldatagrams leavinglocal
network have same single sourceNAT IP address: 138.76.29.7,different source port numbers
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
34/49
NAT: Network Address Translation
Motivation: local network uses just one IP address asfar as outside world is concerned:
range of addresses not needed from ISP: just one IPaddress for all devices
can change addresses of devices in local networkwithout notifying outside world
can change ISP without changing addresses ofdevices in local network
devices inside local net not explicitly addressable,visible by outside world (a security plus).
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
35/49
NAT: Network Address TranslationImplementation: NAT router must:
outgoing datagrams:replace(source IP address, port#) of every outgoing datagram to (NAT IP address,new port #). . . remote clients/servers will respond using (NAT
IP address, new port #) as destination addr.
remember (in NAT translation table)every (sourceIP address, port #) to (NAT IP address, new port #)translation pair
incoming datagrams:replace(NAT IP address, newport #) in dest fields of every incoming datagramwith corresponding (source IP address, port #)stored in NAT table
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
36/49
NAT: Network Address Translation
10.0.0.1
10.0.0.2
10.0.0.3
S: 10.0.0.1, 3345
D: 128.119.40.186, 80
1
10.0.0.4
138.76.29.7
1: host 10.0.0.1sends datagram to128.119.40.186, 80
NAT translation tableWAN side addr LAN side addr
138.76.29.7, 5001 10.0.0.1, 3345
S: 128.119.40.186, 80D: 10.0.0.1, 3345 4
S: 138.76.29.7, 5001D: 128.119.40.186, 802
2: NAT routerchanges datagramsource addr from10.0.0.1, 3345 to138.76.29.7, 5001,
updates table
S: 128.119.40.186, 80D: 138.76.29.7, 5001 3
3: Reply arrivesdest. address:138.76.29.7, 5001
4: NAT routerchanges datagramdest addr from138.76.29.7, 5001 to 10.0.0.1, 3345
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
37/49
Agenda
Network System definition wrt Internet
Network Addressing
Network Proxy
Other network server applicationsQuestions?
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
38/49
Web caches (proxy server)
user sets browser: Webaccesses via cache
browser sends all HTTP
requests to cache object in cache: cache
returns object
else cache requestsobject from origin
server, then returnsobject to client
Goal: satisfy client request without involving origin server
client
Proxy
server
clientoriginserver
originserver
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
39/49
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
40/49
Conditional GET
Goal:dont send object ifcache has up-to-date cachedversion
cache: specify date ofcached copy in HTTP requestIf-modified-since:
server: response contains noobject if cached copy is up-to-date:HTTP/1.0 304 Not
Modified
cache server
HTTP request msgIf-modified-since:
HTTP responseHTTP/1.0
304 Not Modified
objectnot
modified
HTTP request msg
If-modified-since:
HTTP responseHTTP/1.0 200 OK
objectmodified
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
41/49
Agenda
Network System definition wrt Internet
Network Addressing
Network Proxy
Other network server applications FTP
SMTP
Questions?
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
42/49
FTP: the file transfer protocol
transfer file to/from remote host
client/server model
client:side that initiates transfer (either to/from
remote) server:remote host
ftp: RFC 959
ftp server: port 21
file transferFTP
server
FTPuser
interface
FTPclient
local file
system
remote file
system
userat host
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
43/49
FTP: separate control, data connections
FTP client contacts FTPserver at port 21, specifyingTCP as transport protocol
Client obtains authorizationover control connection
Client browses remotedirectory by sendingcommands over controlconnection.
When server receives filetransfer command, serveropens 2ndTCP connection (forfile) to client
After transferring one file,server closes dataconnection.
FTPclient
FTPserver
TCP control connectionport 21
TCP data connectionport 20
Server opens another TCPdata connection to transferanother file.
Control connection: out of
band FTP server maintains state:
current directory, earlierauthentication
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
44/49
FTP commands, responses
Sample commands: sent as ASCII text over
control channel
USERusername
PASS password LISTreturn list of file in
current directory
RETR filenameretrieves
(gets) file STOR filenamestores
(puts) file onto remotehost
Sample return codes status code and phrase (as
in HTTP)
331 Username OK,
password required 125 data connection
already open;
transfer starting
425 Cant open data
connection 452 Error writing
file
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
45/49
Electronic Mail
Three major components: user agents
mail servers
simple mail transfer
protocol: SMTP
User Agent
a.k.a. mail reader
composing, editing, reading
mail messages e.g., Eudora, Outlook, elm,
Netscape Messenger
outgoing, incoming messagesstored on server
user mailbox
outgoingmessage queue
mail
server
useragent
useragent
useragent
mailserver
useragent
useragent
mailserver
useragent
SMTP
SMTP
SMTP
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
46/49
Electronic Mail: mail servers
Mail Servers mailbox contains incoming
messages for user
messagequeue of outgoing
(to be sent) mail messages SMTP protocol between mail
servers to send emailmessages
client: sending mail
server server: receiving mail
server
mailserver
useragent
useragent
useragent
mail
server
useragent
useragent
mailserver
useragent
SMTP
SMTP
SMTP
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
47/49
Electronic Mail: SMTP [RFC 2821]
uses TCP to reliably transfer email message from clientto server, port 25
direct transfer: sending server to receiving server
three phases of transfer
handshaking (greeting) transfer of messages
closure
command/response interaction
commands: ASCII text
response: status code and phrase
messages must be in 7-bit ASCII
l d B b
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
48/49
Scenario: Alice sends message to Bob
1) Alice uses UA to compose
message and [email protected]
2) Alices UA sends messageto her mail server; messageplaced in message queue
3) Client side of SMTP opensTCP connection with Bobsmail server
4) SMTP client sends Alices
message over the TCPconnection
5) Bobs mail server places themessage in Bobs mailbox
6) Bob invokes his user agent
to read message
useragent
mailserver
mailserver user
agent
1
2 3 4 56
-
7/29/2019 Network Systems - SCSVMV - 30Sep08 - Modified Vasan Sanat Tech Pvt Ltd
49/49
Questions?
Thank You