Download Networking and Web slides

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Remote Desktop Services wikipedia , lookup

Lag wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Airborne Networking wikipedia , lookup

IEEE 1355 wikipedia , lookup

Computer network wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Net neutrality wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

TCP congestion control wikipedia , lookup

Deep packet inspection wikipedia , lookup

Net bias wikipedia , lookup

Net neutrality law wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Internet protocol suite wikipedia , lookup

Hypertext Transfer Protocol wikipedia , lookup

Transcript
Networking
• Basic network components and layered
architecture
• Internet and WWW basics
• IP, TCP, URL, HTTP
Jean Walrand, Communication Networks, a first course, McGraw-Hill 1998 (2nd edition).
CSCI 1106, Fall 2008
net 1
Types of computer networks:
• Point-to-point connection (link) between two computers
e.g. PPP, SLIP
• Store-and-forward transmission: packets
A
B
C
e.g. token ring
• Datagram packet switching: destination address in packet
• also, LAN, WAN, ATM (virtual circuit switching), wireless
CSCI 1106, Fall 2008
net 2
• multiple access networks (e.g. ALOHA, Ethernet)
CSCI 1106, Fall 2008
net 3
CSCI 1106, Fall 2008
net 4
CSCI 1106, Fall 2008
net 5
CSCI 1106, Fall 2008
net 6
CSCI 1106, Fall 2008
net 7
Review of components
•
Hosts
–
–
•
Hubs
–
–
•
depending on level of switch complexity, anywhere from a hub to a router
Routers
–
–
•
attaches two physically identical LANs together, physical layer processing
forwards only traffic which is destined for “the other side”
Switches
–
•
acts as an “extender” - similar in effect to taking all incoming lines and twisting the
wires together
Does not do any processing - acts only at the physical layer
Bridges
–
–
•
Considered a “node” or “end point” in the network (client/server/printer)
Processes all levels of the protocol stack
Processing at the Network layer
Route packets between networks with potentially different lower level protocol
stacks (i.e., different physical and data link layers)
Gateways
–
–
CSCI 1106, Fall 2008
Processes all levels of the protocol stack
Used to connect networks with different protocol stacks
net 8
Layered communication model
Message received
Message sent
Layer n
Layer 2
Layer 1
Sender
Communication
medium
Recipient
Coulouris, Dollimore, Kindberg, Distributed Systems, Addison Wesley 2001 (3rd ed)
CSCI 1106, Fall 2008
net 9
ISO-OSI layer model
Open systems interconnection reference model
A
B
communication services
7.
Application
7.
local syntax, secure,
efficient connections
6.
Presentation
6.
communication services, e.g. file transfer,
email, …
e.g. compression, security, format conversion
connections
5.
Session
5.
supervises connections between end systems
delivery of messages
4.
Transport
4.
supervises end-to-end transmission
3.
Network
3.
guides the packet from source to destinations
2.
Data Link
2.
implements packet delivery service between two
nodes on the same physical link
1.
Physical
1.
Implements digital communication link that
delivers bits
CSCI 1106, Fall 2008
net 10
Layer
Application
Presentation
Session
Transport
Network
Data link
Physical
Description
Protocols that are designed to meet the communication requirements of
specific applications, often defining the interface to a service.
Protocols at this level transmit data in a network representation that is
independent of the representations used in individual computers, which may
differ. Encryption is also performed in this layer, if required.
At this level reliability and adaptation are performed, such as detection of
failures and automatic recovery.
This is the lowest level at which messages (rather than packets) are handled.
Messages are addressed to communication ports attached to processes,
Protocols in this layer may be connection-oriented or connectionless.
Transfers data packets between computers in a specific network. In a WAN
or an internetwork this involves the generation of a route passing through
routers. In a single LAN no routing is required.
Responsible for transmission of packets between nodes that are directly
connected by a physical link. In a WAN transmission is between pairs of
routers or between routers and hosts. In a LAN it is between any pair of hosts.
The circuits and hardware that drive the network. It transmits sequences of
binary data by analogue signalling, using amplitude or frequency modulation
of electrical signals (on cable circuits), light signals (on fibre optic circuits)
or other electromagnetic signals (on radio and microwave circuits).
CSCI 1106, Fall 2008
Examples
HTTP, FTP , SMTP,
CORBA IIOP
Secure Sockets
(SSL),CORBA Data
Rep.
TCP, UDP
IP, ATM virtual
circuits
Ethernet MAC,
ATM cell transfer,
PPP
Ethernet base- band
signalling, ISDN
net 11
What is a protocol
`A protocol is a set of rules governing message
interchanges which occur between a number of
computers in a distributed system; each of these
messages implement functions of the system. A
protocol is also used to establish a connection and
allow entities to exchange data about themselves, for
example the operating system they are using and the
format of the data that they intend passing; this is
known as a handshake. ‘
D. Ince
CSCI 1106, Fall 2008
net 12
CSCI 1106, Fall 2008
net 14
Application message
TCP header
port
IP header TCP
Ethernet header IP
Ethernet frame
CSCI 1106, Fall 2008
net 15
IP Header
CSCI 1106, Fall 2008
net 16
• Around 4 billion IP addresses
CSCI 1106, Fall 2008
net 17
Transport layer protocols
• TCP (Transmission Control Protocol):
– connection-oriented
– Reliable packet delivery in sequence
• UDP (User Datagram Protocol):
–
–
–
–
–
–
connectionless (datagram)
Unreliable packet delivery
Packets may arrive out of sequence or duplicated
Less overhead
Simply adds port addressing to IP
Checksum is optional
• Internet Control Message Protocol
– Used by the nodes in the internet to implement IP
CSCI 1106, Fall 2008
net 18
TCP and UDP Header
CSCI 1106, Fall 2008
net 19
Name
Port/Protocol
ftp-data
20/tcp
ftp
21/tcp
telnet
23/tcp
smtp
25/tcp
bootps
67/udp
bootpc
68/udp
# BOOTP/DHCP client
hostnames
101/tcp
hostname
sunrpc
111/udp
rpcbind
sunrpc
111/tcp
rpcbind
finger
79/tcp
pop3
110/tcp
# Post Office
nntp
119/tcp
usenet
imap
143/tcp
# Internet Message Access
ssh
22/tcp
# Secure SHell
who
513/udp
whod
kerberos
750/udp
kdc
xaudio
1103/tcp
Xaserver
stel
10005/tcp
# Secure Telnet
CSCI 1106, Fall 2008
Comment
mail
# BOOTP/DHCP server
# usually to sri-nic
# Network News Transfer
# Kerberos key server
# X Audio Server
net 20
The Internet around 1990
Jean Walrand, Communication Networks, a first course, McGraw-Hill 1998 (2nd edition).
The first three chapters give you a nice overview of the working of networks and the Internet.
CSCI 1106, Fall 2008
net 21
MCI backbone
Retrieved from: http://global.mci.com/about/network/maps/?flash=1&theme=/, Sept 5/2003
See this site also for interesting network statistics (e.g. latencies)
CSCI 1106, Fall 2008
net 22
Internet network architecture
ISP
ISP
ISP
ISP
NAP
NAP
ISP
ISP
NAP
NAP
ISP
Backbone
Network Service Provider
ISP
ISP
ISP
Internet Service Provider
Private Networks / hosts
Adapted from Electronic Commerce: A Managerial Perspective. Turban, Lee, King and Chung, 2000. Pg. 385
CSCI 1106, Fall 2008
net 23
a.cs.dal.ca
CSCI 1106, Fall 2008
b.atr.go.jp
net 24
URL: A Global Address
http://www.cs.dal.ca/cs1200/week1/x.html
CSCI 1106, Fall 2008
•
•
•
•
Scheme
Server name
Path
File
net 25
a.cs.dal.ca
123.777.19.6
CSCI 1106, Fall 2008
b.atr.go.jp
168.12.13.3
net 26
Routing and congestion control
Send information of nodes and links to each node of the network. This might
include some physical properties such as maximal size of packets, typical time
delays, …
 Build map of network
 Use routing algorithm to build routing tables
for example: OSPF (Open Shortest Path First)
if every router uses the same algorithm and maps they build consistent tables
 Hierarchical Routing:
`use local map to get to the highway, use highway map to get to your
destination town, use local map to get to your friends house’.
More sophisticated routing on `highway’ (BGP, Border Gateway Protocol)
How is congestion controlled?
CSCI 1106, Fall 2008
net 27
How is congestion controlled?
Flow control  TCP
Destination publishes maximal acceptable window size in reply
message
Source destination discovers congestion from unusually long delay
times of response
 additive increase, multiplicative decrease
CSCI 1106, Fall 2008
net 28
Application layer:Programming example in Java
The JAVA Socket class
Socket oldSock = new Socket("penny.open.ac.uk", 1048);
remote computer penny in the domain open.ac.uk with communication occurring
via port 1048.
 InputStream
CSCI 1106, Fall 2008
net 29
Network (internet) applications
WWW & Semantic Web
CSCI 1106, Fall 2008
net 30
Tim Berners-Lee
CSCI 1106, Fall 2008
net 31
World Wide Web
Web server
Borg
Internet
Public_html
Index.html
Parts of the puzzle
•URL
•HTTP
•HTML
Web browser
Your Machine
CSCI 1106, Fall 2008
net 32
HTTP: Hyper Text Transfer Protocol
• Lightweight protocol that browsers and servers use to
communicate with one another
• On top of (in the application layer of) the TCP/IP model
• HTTP session begins when a client’s browser requests a
Web page. Once the server responds by sending the
page requested, the HTTP session ends
CSCI 1106, Fall 2008
net 33
client request:
Server response:
GET /index.html HTTP/1.1
User-Agent: Lynx/2.4
Connection: Keep-Alive
Host: www.openaccess.com
Accept: text/html
HTTP/1.1 200 OK
Date: Thu, 22 July 1998 18:40:55 GMT
Server: Apache 1.3.5 (Unix) PHP/3.0.6
Last-Modified: Mon, 19 July 1997
16:03:22 GMT
Content-Type: text/html
Content-Length: 12987
...
MIME type
(Multipurpose Internet Mail Extension)
CSCI 1106, Fall 2008
net 34
HTTP is stateless!!!
• stateless because every request that a browser makes
opens a new connection that is immediately closed after
the document is returned
• even a web page with many objects (graphics, sound,
video, etc) requires separate HTTP requests for each
object
• each operation is unaware of any other connection
• the server cannot maintain state information about
successive requests easily
CSCI 1106, Fall 2008
net 35
Web client/server communication
•
Like any other client/server application, web
browsers and servers need a way to:
1. Locate each other so they can send requests and
responses back and forth
•
Uniform Resource Locator (URL)
2. Communicate with one another
•
Hypertext Transport Protocols (HTTP)
(See networking section)
CSCI 1106, Fall 2008
net 36
Interactivity
• HTML is a presentation language – not a programming
language
• controls the appearance of the information on the client’s
screen but does not support processing or manipulating
information
• early web browsers were limited to displaying static
pages
• But … many business applications require interactivity
 Client-side & server-side processing
CSCI 1106, Fall 2008
net 37
TML (XML)
<thomas>
<lecture type=‘early’>
<opening>
Guten Morgen
</opening>
<message>
bla bla
</message>
<lecture>
<research>
<paper>
</paper>
</research>
</thomas>
CSCI 1106, Fall 2008
net 38
DTD
<!ELEMENT ele_name (list of child elements +*?)>
Leaf element:
<!ELEMENT name (#PCDATA)>
<!ATTLIST ele_name att_name att_type att_value>
<!ENTITY ent_name “ent_value”>
CSCI 1106, Fall 2008
net 39
DTD
XML
Document
XML
Parser
&
Syntax Validator
valid / not valid
DTD
Document
For example MSXML
CSCI 1106, Fall 2008
net 40
XSLT
XML
Document
XSLT
Processor
XML
Document
XSLT
Document
CSCI 1106, Fall 2008
net 41
XSLT
Include in XML document
<?xml-stylesheet type=“text/xsl” href=“URL” ?>
XSLT document:
<xsl:stylesheet version = “1.0” xmlns:xsl = “url of xslt” xmlns = “url of xhtml”>
<xsl:templates match = “root”>
<html> <head> </head> <body> <h1> …..
<xsl:for-each select = “tag”>
<span style =“ whatever”> message </span>
<xsl:value-of select = “subtag” />
<other html tags> ….
</xsl:for-each>
</html>
</xsl:template>
</xsl:stylesheet>
CSCI 1106, Fall 2008
net 42
Tim Berners-Lee
CSCI 1106, Fall 2008
net 43
• Web Hub
– Content Management Console
Google News
Admin
Modify
XML Content
Repository
Retrieve
Control
Panel
Modify
Front End Site
Member’s Section
Database
CSCI 1106, Fall 2008
General Public
P
u
b
l
i
c
Alumni
net 44
Web service architecture
http://www.w3.org/2002/ws/
CSCI 1106, Fall 2008
Adopted from Clabby, 2002
net 45
SOAP
• Simple Object Access Protocol
• XML-based protocol
• Exchange of information between applications
over HTTP
• Seems to become the widely accepted solution
to electronic data interchange (EDI) and remote
procedure call (RPC, CORBA, etc)
http://www.w3.org/TR/soap12-part0/
CSCI 1106, Fall 2008
net 46
Semantic Web stack
CSCI 1106, Fall 2008
net 47
From http://www.w3.org/2001/sw/
Semantic Web
The Semantic Web provides a common framework that allows data to be
shared and reused across application, enterprise, and community
boundaries. It is a collaborative effort led by W3C with participation from a
large number of researchers and industrial partners. It is based on the
Resource Description Framework (RDF), which integrates a variety of
applications using XML for syntax and URIs for naming.
"The Semantic Web is an extension of the current web in which information
is given well-defined meaning, better enabling computers and people to
work in cooperation." -- Tim Berners-Lee, James Hendler, Ora Lassila, The
Semantic Web, Scientific American, May 2001
CSCI 1106, Fall 2008
net 48
Create meaning for automated processing:
intelligent agents
RDF: (Web) Resource Description Framework
http://www.w3.org/TR/rdf-primer/
Web Ontology: OWL
http://www.w3.org/TR/owl-features/
Standardized Query Language: SPARQL
Simple example:
[Really Simple Syndication (RSS 2.0)]
RDF Site Summary (RSS 1.0 and RSS 0.90)
Rich Site Summary (RSS 0.91)
CSCI 1106, Fall 2008
net 49
Intro videos
Semantic Web:
http://www.youtube.com/watch?v=OGg8A2zfWKg
RDF:
http://www.youtube.com/watch?v=ldl0m-5zLz4
CSCI 1106, Fall 2008
net 50