You are on page 1of 30

Computer Networks

Chapter 1:Introduction
Computer Networking: A Top Down Approach ,
4th edition. Jim Kurose, Keith Ross

Chapter 1: Introduction
Our goal:
get feel and

Overview:
whats the Internet? whats a protocol? network edge; hosts, access

terminology more depth, detail later in course approach: use Internet as example

net, physical media network core: packet/circuit switching, Internet structure performance: loss, delay, throughput Protocol layers, service models History of Internet

Throughput
The rate (bits/sec) at which bits are transferred

between sender/receiver Difference between Bandwidth and Throughput? ISPs sell bandwidth In computer networks, the throughput is less than the bandwidth for several reasons The channel may be shared by other users Packet loss due to congestion Packet loss due to bit errors Noise in the channel Transmission rates of the link over which the data flows.

Throughput
Rs

< Rc What is average end-end throughput?


Rs bits/sec Rc bits/sec

Rs

> Rc What is average end-end throughput?


Rs bits/sec Rc bits/sec

Throughput is min {Rs,Rc} Transmission Rate of the bottleneck link

How do loss and delay occur?


packets queue in router buffers packets queue, wait for turn queue (aka buffer) has finite capacity packet arriving to full queue dropped (aka lost) lost packet may be retransmitted

packet being transmitted (delay) A

B packets queueing (delay) free (available) buffers: arriving packets dropped (loss) if no free buffers

Four sources of packet delay


1. Processing Delay: Time required to examine packet header and determine output link check bit errors High Speed Routers Microseconds or less
A transmission
2. Queuing Delay:

Time waiting at output link for transmission depends on congestion level of router If queue empty no delay Microseconds to milliseconds

propagation
B processing

queueing

Delay in packet-switched networks


3. Transmission Delay: R=link bandwidth (bps) L=packet length (bits) time to push all of packets bits into the link = L/R Microseconds to milliseconds
A transmission

4. Propagation Delay: Time to propagate from the beginning of the link to the other router (node) propagation delay = d/s d = length of physical link s = propagation speed in medium (~3x108 m/sec)

propagation B

nodal processing

queueing

Queuing Delay
When is Queuing Delay large and

when it is insignificant?

Rate at which traffic arrives at the

queue Transmission rate of the link Nature of the arriving traffic


R=Transmission Rate (bps)

L=packet length(bits)

rate(packets/sec) Traffic Intensity = (Average rate at which bits arrive at the queue) =La Transmission Rate R La/R ~ 0: average queuing delay small La/R -> 1: delays become large (queue begins to get larger) La/R > 1: average rate at which bits arrive at the queue exceeds the rate at which the bits can be transmitted from the queue. more work arriving than can be serviced Packet Loss will occur

a=average packet arrival

Queuing Delay
Consider the case La/R1 Nature of arriving traffic impacts queuing delay in such a case

In reality the arrival process to a queue is random and arrivals do not follow any pattern.
(Find about Queuing Theory?)

Protocol Layers
Networks are complex! many pieces: hosts routers links of various media applications protocols hardware, software

Question:
Is there any way of organizing network architecture?
Answer:

Yes possible with a layered architecture

Why layering?
Dealing with complex systems: Discuss a well defined, specific part of a large and complex system Modularization eases maintenance, updating of system Change of implementation of layers service transparent to rest of system e.g. change in gate procedure doesnt affect rest of system

Internet Protocol Stack


To provide structure to design of network protocols, network designers organize protocols in layers Service says what a layer does Protocol says how the service is implemented Advantages Drawbacks When taken together the protocols of various layers are called the Protocol Stack. Internet Protocol Stack consists of Five layers Physical, Link, Network, Transport and Application layers . Organization of Book

Internet Protocol Stack


Application Layer:
Network applications and their application layer protocols reside. Provides user interfaces and support for services such as email, file transfer etc. Hyper Text Transfer Protocol (HTTP) File Transfer Protocol (FTP) Session Initiation Protocol (SIP) An application layer protocol is distributed over multiple end systems The packets of information at the application layer is called as a message.

Internet Protocol Stack


Transport Layer:
Transports application-layer messages between application end points. Transport layer packet is called as a segment Breaks long messages into shorter segments There are two Transport Layer Protocols Transmission Control Protocol (TCP)
Connection Oriented service Guaranteed delivery of application layer messages Flow control Congestion Control

User Datagram Protocol (UDP)


Connectionless service No reliability, flow control and congestion control

Internet Protocol Stack


Network Layer: Responsible for moving network layer packets known as datagrams from one host to another. Transport layer passes a transport layer segment and a destination address to the network layer. Network layer includes IP Protocol Defines the fields in the datagram as well as how end systems and routers act on these fields Different routing protocols. Determine the route that datagrams take between sources and destinations

Internet Protocol Stack


Link Layer: Moves a packet from one node (host or router) to the next node in the route. Divide the stream of bits received from the network layer into manageable data units called frames. Error Detection and Correction Transforms a raw transmission facility to a reliable link. Mechanism to detect and retransmit damaged or lost frames Example of link layer protocols include WiFi, Ethernet etc.

Internet Protocol Stack


Physical Layer:
The job of this layer is to move the individual bits with in frames from one node to next. Representation of bits Physical Layer data consists of a stream of bits (0 or 1) To be transmitted bits must be encoded into signals. The physical layer defines the type of encoding. The protocol in this layer depend on the actual transmission medium of the link.

Internet Protocol Stack


Application: Provides user interfaces and support for services such as e-mail, file transfer etc.

FTP, HTTP

Application Transport

Transport: Transports application-layer messages between application end points.


Segmentation and reassembly TCP, UDP

Network: Routing of Datagrams from source to destination

Network
Link Physical

IP, routing protocols

Link: Move a packet from one node (host or


router) to the next node in the route. Ethernet, WiFi frames from one node to next

Physical: Move the individual bits with in

OSI Reference Model


In 1970 International Organization for

Standardization proposed a seven layered model called Open Systems Interconnection (OSI) model. Presentation Layer: Provide services such as data encryption, compression. Session Layer: Synchronization points (checkpointing) and recovery of data exchange. Internet stack missing these layers! these services, if needed, must be implemented in the application by the application developer.

source
message segment
Ht M M M M

frame Hl Hn Ht

datagram Hn Ht

application transport network link physical

Encapsulation

link physical switch

destination
M

Ht
Hn Ht Hl Hn Ht

M M M

application transport network link physical

Hn Ht Hl Hn Ht

M
M

network link physical

Hn Ht

router

Chapter 2 Application Layer


Computer Networking: A Top Down Approach, 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Chapter 2: Application layer


2.1 Principles of

network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail

2.6 P2P applications

2.7 Socket programming

SMTP, POP3, IMAP

2.5 DNS

Chapter 2: Application Layer


Our goals: conceptual, implementation aspects of network application protocols client-server paradigm peer-to-peer paradigm
learn about protocols

by examining popular application-level protocols

HTTP FTP SMTP / POP3 / IMAP DNS

programming network

applications socket programming

Some Network Applications


E-mail

Web
Instant messaging Remote login P2P file sharing Multi-user network games Streaming stored video clips Voice over IP Real-time video conferencing Many more interesting applications

Creating a Network Application


write programs that run on (different) end systems communicate over network e.g., web server software communicates with browser software No need to write software for network-core devices Network-core devices do not run user applications Function at lower layers Basic design is to confine application software to the end systems Facilitate rapid network application development and deployment

application transport network data link physical

application transport network data link physical

application transport network data link physical

Application Architectures
Application Architecture is
Designed

by the application developer Dictates how the application is structured over various end systems
Two architectures used in modern day

Network Applications:
Client-Server

Architecture Peer-to-Peer (P2P) Architecture

Client-Server Architecture
Server: Always-on host permanent well defined IP address A single server is incapable of keeping up with all the requests of the clients. A cluster of hosts referred as server farm is often used. Clients: Communicate with server May have dynamic IP addresses Do not communicate directly with each other Client/Server architecture is infrastructure intensive Require service providers to install and maintain servers.

Client/Server

P2P Architecture
Direct communication

between pairs of intermittently connected hosts called peers Peers are not owned by any peer-peer service provider P2P

Peers communicate without passing through any dedicated server

e.g. Bit Torrent, eMule, Skype Security issues

Highly Distributive

Cost Effective Detailed study later on in the

chapter

What Transport Service does an Application need?


Data Loss Loss Tolerant Applications

Other apps (e.g., file transfer,

Some apps (e.g., audio, VoIP) can tolerate some loss 2% tolerable for VoIP

email) require 100% reliable data transfer Timing Application may require timing guarantee Tight timing constraints
multiplayer games, VoIP, teleconferencing. In Non-real time lower delays are preferred but no tight constraint on end-to-end delays.

Throughput Bandwidth sensitive applications (e.g., multimedia) require minimum amount of throughput Other apps (elastic apps) make use of whatever throughput they get e.g .Email, file transfer Security Encryption and decryption

Transport Service Requirements of Common Applications


Application file transfer e-mail Web documents real-time audio/video Data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant Throughput Time Sensitive no no no yes, 100s msec

stored audio/video interactive games

elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps -10kbps

yes, few secs yes, 100s msec

You might also like