Beruflich Dokumente
Kultur Dokumente
Outline
Network concepts OSI reference model TCP\IP Protocols Client server introduction
What is a Network?
... communication system for connecting end-systems End-systems a.k.a. hosts PCs, workstations dedicated computers network components
Proliferation of low cost computers made it possible to get past these 2 primary disadvantages (with a network).
Motivation
Sharing of resources is more efficient Price/Performance Use each piece of equipment for what it is best at Centralize administration Computers as communication tools
The Internet
6
circuit switched
telephone
system
packet switched:
The
Internet (TCP/IP)
Outline
Network concepts OSI reference model TCP\IP Protocols Client server introduction
Network Models
Using a formal model allows us to deal with various aspects of Networks abstractly. We will look at a popular model (OSI reference model). The OSI reference model is a layered model.
10
Layering
Divide a task into pieces and then solve each piece independently (or nearly so). Establishing a well defined interface between layers makes porting easier. Major Advantages:
Code
Reuse Extensibility
11
12
OSI Model
Although the OSI model is a just a model (not a specification), it is generally regarded as the most complete model (as well it should be - nearly all of the popular network protocol suites in use today were developed before the OSI model was defined).
13
Data Link
Data Link
15
Responsibility:
transmission
Issues:
mechanical
time
16
Responsibility:
provide
Issues:
framing
addressing
10110110101 01100010011 10110000001
17
Responsibilities:
path
selection between end-systems (routing). subnet flow control. fragmentation & reassembly translation between different network types.
Issues:
packet
Responsibilities:
provides
Issues:
headers error
19
Responsibilities:
anything
layers
Issues:
application
20
21
Headers
Process DATA Process
Transport
DATA
Transport
Network
H H
DATA
Network
Data Link
H H H
DATA
Data Link
22
Outline
Network concepts OSI reference model TCP\IP Protocols Client server introduction
23
In OSI reference model terminology the TCP/IP protocol suite covers the network and transport layers. TCP/IP can be used on many datalink layers (can support many network hardware implementations).
24
25
IP Datagrams
each datagram is independent of all others. Unreliable: there is no guarantee that datagrams are delivered correctly or even delivered at all.
26
TCP is only part of the TCP/IP transport layer - the other part is UDP (User Datagram Protocol).
27
Process
Process
Process Layer
TCP
ICMP, ARP & RARP
UDP
Transport Layer
IP
Network Layer
802.3
Data-Link Layer
28
Ports
TCP/IP uses an abstract destination point called a protocol port. Ports are identified by a positive integer. Operating systems provide some mechanism that processes use to specify a port.
29
between processes
UDP uses IP to deliver datagrams to the right host. UDP uses ports to provide communication services to individual processes.
30
UDP
Datagram Delivery Connectionless Unreliable Minimal
Data
31
32
Connection-Oriented
Connection oriented means that a virtual connection is established before any user data is transferred. If the connection cannot be established - the user program is notified (finds out). If the connection is ever interrupted - the user program(s) is finds out there is a problem.
33
Reliable
Reliable means that every transmission of data is acknowledged by the receiver. If the sender does not receive acknowledgement within a specified amount of time, the sender retransmits the data.
34
Byte Stream
Stream means that the connection is treated as a stream of bytes. The user application does not need to package data in individual datagrams (as with UDP).
35
Addressing in TCP/IP
36
37
TCP/IP Summary
hosts.
unreliable datagram delivery between processes. reliable, byte-stream delivery between processes.
38
Outline
Network concepts OSI reference model TCP\IP Protocols Client server introduction
39
Whats a Protocol?
40
Interface protocols describe the communication between layers on the same endpoint. Peer-to-peer protocols describe communication between peers at the same layer.
Process
Process
Interface Protocols
Transport Transport
Peer-to-peer Protocols
Network Network
Data Link
Data Link
41
SMTP
FTP
42
HTTP Usage
HTTP is the protocol that supports communication between web browsers and web servers. A Web Server is a HTTP server
The RFC states that the HTTP protocol generally takes place over a TCP connection, but the protocol itself is not dependent on a specific transport layer.
43
Request - Response
HTTP can support multiple request-reply exchanges over a single TCP connection.
44
HTTP Structure
Content...
45
Methods
GET: retrieve information identified by the URI. HEAD: retrieve meta-information about the URI. POST: send information to a URI and retrieve result.
46
Methods (cont.)
PUT: Store information in location named by URI. DELETE: remove entity identified by URI.
47
Class URL
The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL. Instances of this class can be used both to read from and to write to the resource referenced by the URL
HttpURLConnection
URLConnection
URL Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web. A resource can be something as simple as a file or a directory, or it can be a reference to a more complicated object, such as a query to a database or to a search engine HttpURLConnection A URLConnection with support for HTTP-specific features (extends URLConnection)
48
49
Outline
Network concepts OSI reference model TCP\IP Protocols Client server introduction
50
Client - Server
A server is a process - not a machine ! A server waits for a request from a client. A client is a process that sends a request to an existing server and (usually) waits for a reply.
51
Servers
Servers are generally more complex (more interesting). 2 Basic types of servers:
Iterative
- server handles one client at a time. Concurrent - server handles many clients at a time
53
Summary
What is the OSI model? Why use layers? What is the difference between interface protocol and peer-to-peer protocols in the OSI model? What is TCP\IP ? To which of the OSI layers does it address? What is UDP? What is the difference between TCP and UDP? What is a protocol? Why are they needed? What is the idea behind the client server model?
54
Questions?
55