Professional Documents
Culture Documents
Network must be designed so that it has the flexibility of supporting current and future services To achieve this flexibility, an overall network architecture (plan) is necessary The overall process of enabling machines to communicate is very complex Layering partitions related communication functions into manageable groups Each layer provides a service to the layer above Each layer operates according to a protocol A protocol is a set of rules that governs how two or more communicating entities in a layer are to interact Protocols: Building blocks of a network architecture
1
Why Layering?
Layering simplifies design, implementation, and testing by partitioning overall communications process into parts Layering aids modular design
Protocol in each layer can be designed separately from those in other layers Layering provides flexibility for modifying and evolving protocols and services without having to change layers below
An Example of Layering
WWW application A framework for accessing documents located in computers in the Internet
Documents (text, graphics, and other media) are interconnected by links which appear within the documents
An Example of Layering
1. User selects a document by clicking on a link with a URL: http://www.cnn.com/world/index.html 2. Client locates the server host and establishes a two-way TCP connection 3. Client uses HTTP to send a message requesting a document
GET/world/index.html HTTP/1.0
4. Server listening on TCP port 80 interprets the message 5. Server sends a results code and a description
HTTP/1.1 200 OK Server: Apache/1.2.5 Content-Length: 500 Content-Type: text/html
6. Server reads the file and sends it through the TCP port
<html><head><Title> CNN
7. Server disconnects the connection 8. Client receives the file and displays it (interprets the HTML code and displays the information)
4
HTTP assumes that message exchange between peer processes occurs directly
Transfer of messages between HTTP client and HTTP server is in fact virtual and occurs indirectly via the TCP connection
HTTP uses the services provided by TCP in an underlying layer TCP, in turn, uses the services provided by IP
The behavior of layer-n entities is governed by a set of rules called layer-n protocol
n-PDUs Layer-n
n Entity Peer-to-peer communication n Entity
10
n+1 entity
n-SAP
n-SDU
n entity
H n-SDU n-PDU
n entity
11
Layered services need not be of same type TCP operates over IP IP operates over ATM
12
Segmentation n-SDU
n-PDU
n-PDU
n-PDU
(b)
Reassembly
n-SDU
n-PDU
n-PDU
n-PDU
13
Multiplexing
Sharing of layer n service by multiple layer n+1 users Multiplexing tag or ID required in each PDU to determine which users an SDU belongs to
n+1 entity n+1 entity
n+1 entity
n+1 entity
n-SDU n-SDU H
n-SDU
n entity
H n-SDU n-PDU
n entity
14
Application
End Node
15
Layer 4 Layer 3
Layer 2 Layer 1
16
Application
Application Layer
An application layer protocol is distributed over multiple end systems Using the protocol, the application in one end system exchanges messages with another end system Some of the functionalities provided by lower layers can also be implemented at the Application layer. E.g. error control
17
Kurose & Ross, Computer Networking A Top Down Approach Featuring the Internet
Processes Communicating (a process at the application layer can be thought of as a program that is running within an end system)
Client and Server Processes The Interface between the process and the Network, Socket Communication Addressing Processes: Host Address and Port Number
Transport services
Potential Services that Applications may need from the Transport layer Services Provided by the Internet: TCP and UDP Services
Application-layer Protocols
What an applications-layer protocol defines Public domain and proprietary protocols Applications versus Application-layer protocols
20
Transport Layer
Transfers data end-to-end from a process in a machine to a process in another machine Transport layer protocol involves transfer of Transport layer PDUs: Segments Transport layer uses the services offered by the underlying network to provide services to the upper layer (application): transfer of messages that meets certain QoS Connection oriented service and connectionless service
Connection oriented service:
Reliable stream transfer (error control) Sequence control Flow control Quick-and-simple single-block transfer
Connectionless service:
Port numbers enable multiplexing Message segmentation and reassembly Connection setup, maintenance, and release Transport Layer Transport Layer Network Layer Network Layer
Network Layer
Network Layer
23
Communication Network
Network Layer
When transferring application messages, transport layer provides process-to-process communication service whereas network layer provides host-to-host communication service Transfers packets across multiple links and/or multiple networks Addressing must scale to large networks Nodes jointly execute routing algorithm to determine paths across the network Forwarding transfers packet across a node Internetworking Congestion control to deal with traffic surges Connection oriented (ATM) and connection less (IP) services Connection setup, maintenance, and teardown when connection-based
24
Network Layer
Internetworking is necessary to route packets across multiple possibly dissimilar networks Gateways (routers) direct packets across networks
H
H Net 1 Net 1
G G
Net 3 Net 3
G
G
Net Net 55
G
H G = gateway H = host
Net 2
Net 4
25
Network Layer
Ethernet LAN
ATM Network
ATM Switch H
H Net 1 Net 1
G G
Net 3 Net 3
G
G
Net Net 55
G
H G = gateway H = host
Net 2
Net 4
26
Framing Error control or reliable transmission, Flow control Medium access control for local area networks Activation, maintenance, & deactivation of data link connections
Data Link Layer Physical Layer frames bits Data Link Layer
Physical Layer
27
28
29
Physical Layer
Transfers bits across link Definition & specification of the physical aspects of a communications link
Mechanical: cable, plugs, pins... Electrical/optical: modulation, signal strength, voltage levels, bit times, functional/procedural: how to activate, maintain, and deactivate physical links
Key issues:
Digital transmission fundamentals Properties of media: copper, optical fiber, wireless media Line coding modulation
30
TCP/IP Architecture
Successor of ARPAnet (Defense Advanced Research Agency) Principles:
Robustness: survive failures in the network Flexibility: operate over diverse networks
TCP/IP Architecture
Application Application Layer
Transport Layer
Internet Layer Network Interface
31
TCP/IP Architecture
TCP/IP application layer incorporates the functions of the top three OSI layers Two services in the transport layer:
Transmission Control Protocol (TCP): reliable connection oriented transfer of byte stream User Datagram Protocol (UDP): unreliable connectionless service of individual messages
Internet layer:
Transfer of information (packets) across multiple networks through gateways or routers Best-effort connectionless IP packet transfer (robust) Defining globally unique addresses for machines
32
TCP/IP Architecture
Network Interface layer:
Related to network-specific aspects of the transfer of packets Deals with part of the OSI network layer and data link layer Various network interfaces related to networks such as Ethernet, ATM, token ring, frame relay, X.25 Concerned with the protocols that access the intermediate networks
The protocol encapsulates an IP packet into a frame (or packet) of the underlying network or link (e.g., Network 1) The IP packet is recovered at the exit gateway of the given network The exit gateway encapsulates the IP packet into a frame (or packet) of the next network or link (e.g., Network 2)
Provides a clear separation of the internet layer from the technologydependent network interface layer Internet layer provides a packet transfer service that is transparent to the underlying networks (i.e., not depending on the details of the underlying networks)
33
TCP
UDP
IP
(ICMP, ARP)
Network interface 1
Network interface 2
Diverse network technologies
Network interface 3
34
Services of TCP and UDP provide a network independent platform on which applications can be developed By allowing multiple network technologies to coexist, the Internet provides ubiquitous connectivity and achieves enormous economies of scale
35
Physical Addresses
On a physical network (e.g., LAN) attachment of a device to the network is identified by a physical address The physical network uses the physical address to transfer frames or packets to the appropriate destination IP address needs to be resolved to physical address at each IP network interface Example: Ethernet uses 48-bit addresses
Each Ethernet network interface card (NIC) has globally unique Medium Access Control (MAC) or physical address E.g., 00:90:27:96:68:07 (12 hex numbers)(24 bits NIC manufacturer+ 24 bits serial No.)
36
Encapsulation
HTTP Request
Application Data
TCP header
HTTP Request
TCP segment
IP header
TCP header
HTTP Request
IP Packet
Ethernet Header: source & destination MAC addresses; network protocol type
Ethernet header
IP header
TCP header
HTTP Request
FCS
Ethernet Frame
37
Example internet
Server (1,1) s Router (1,3) r w *PPP does not use addresses Workstation (1,2) netid server workstation 1 1 hostid 1 2 Physical address s w PC (2,1)
PPP Netid=2
(2,2)
Ethernet (netid=1)
router
router PC
1
2 2
3
1 2
r
38
Router (1,3) r
w, s
(1,2)
Workstation
1.
2. 3. 4.
IP packet has the IP address of the source (1,2) and the IP address of the destination (1,1) IP table at workstation indicates (1,1) connected to same network. Assume that the physical address of the server (s) is known. IP packet is encapsulated in Ethernet frame with addresses w and s Ethernet frame is broadcast by workstation NIC and captured by server NIC NIC examines protocol type field and then delivers packet to its IP layer
39
Router (1,3) r
s, r
1. 2. 3. 4. 5. 6. 7. 8.
(1,2) IP packet has (1,1) and (2,2) as IP source and destination addresses IP table at server indicates packet should be sent to router, so IP packet is encapsulated in Ethernet frame with addresses s and r Ethernet frame is broadcast by server NIC and captured by router NIC NIC examines protocol type field and then delivers packet to its IP layer IP layer examines IP packet destination address and determines IP packet should be routed to (2,2) Routers table indicates (2,2) is directly connected via PPP link IP packet is encapsulated in PPP frame and delivered to PC PPP at PC examines protocol type field and delivers packet to PC IP layer
40
(2,1)
PPP (2,2)
(b)
Server
HTTP
TCP uses node-to-node Unreliable packet transfer of IP Packet: Server IP address & PC IP address
PC HTTP TCP IP
Network interface
TCP
IP
Network interface
IP
Network interface
Ethernet
Router
PPP
41
(2,1)
PPP (2,2)
(b)
Server
HTTP
TCP uses node-to-node Unreliable packet transfer of IP Packet: Server IP address & PC IP address
PC HTTP TCP IP
Network interface
TCP
IP
Network interface
IP
Network interface
Internet
Ethernet
Router
PPP
42
Router (1,3) r
PC
(2,1)
PPP (2,2)
(b)
Server
HTTP
PC HTTP TCP IP
Network interface
TCP
IP
Network interface
IP
Network interface
Internet
Ethernet
Router
PPP
43