+ All Categories
Home > Documents > Outline Lecture IP Based Networks and Applications

Outline Lecture IP Based Networks and Applications

Date post: 02-Feb-2022
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
264
© Joachim Charzinski http://www.jcho.de/ IPNA/ IP Based Networks and Applications Manuscript: Edition Summer 2004 Additional material and information on the course is available at http://www.jcho.de/jc/IPNA/ Dr.-Ing. Joachim Charzinski [email protected] This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lecture during summer term 2004. All other use req uires written permission b y Joachim Charzinski. Outline INFOTECH Lecture
Transcript

© Joachim Charzinskihttp://www.jcho.de/ IPNA/

IP Based Networks and ApplicationsManuscript: Edition Summer 2004

Additional material and information on the course is availableat http://www.jcho.de/jc/IPNA/

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

Outline INFOTECHLecture

IPNA – IP based Networks and Applications

Table of Contents 2004 Edition

1. Introduction 1-11.1 Overview of the lecture 1-61.2 Internet History 1-261.3 IP Standardisation 1-461.4 Networking Basics Refresher 1-551.4.1 Reference Model 1-561.4.2 Circuit Switching and Packet Switching 1-591.4.3 Local Area Networks 1-651.4.4 Network Elements 1-76

Questions 1-94

2. Network Layer et. al. 2-12.1 Internet Reference Model 2-32.2 IP 2-142.2.1 IP Packets 2-192.2.2 Addressing 2-322.2.3 Fragmentation 2-432.3 ICMP 2-502.4 ARP 2-622.5 Routing 2-682.5.1 Principle 2-692.5.2 Algorithms 2-812.5.3 Protocols 2-862.6 UDP 2-93

Questions 2-99

3. Transport Layer 3-13.1 TCP (Transmission Control Protocol) 3-53.1.1 Overview 3-63.1.2 Reliable Transport 3-83.1.3 TCP Header 3-133.1.4 Reliable Transport in TCP 3-223.1.5 Connection Concept 3-283.2 TCP Flow and Congestion Control 3-383.2.1 Principle 3-413.2.2 Congestion Control Algorithms: Tahoe, Reno, Vegas 3-473.2.3 TCP Performance 3-563.2.4 Extensions 3-613.3 Assigned Numbers 3-623.4 Other Transport Protocols 3-663.4.1 SCTP 3-673.4.2 RTP 3-71

Questions 3-76

IPNA – IP based Networks and ApplicationsTable of Contents (2) 2004 Edition4. Applications and Application Layer Protocols 4-14.1 Introduction 4-54.1.1 Design Principles 4-54.1.2 Contents Delineation 4-64.1.3 Client-Server Paradigm 4-94.1.4 Reply Codes 4-114.1.5 Socket Concept 4-154.2 DNS 4-204.3 E-Mail 4-284.3.1 SMTP 4-324.3.2 MIME 4-374.3.3 POP3 4-394.3.4 IMAP 4-424.4 HTTP 4-434.5 Telnet 4-554.6 FTP 4-624.7 VoIP 4-674.7.1 Packetized Voice 4-694.7.1 H.323 4-714.7.2 SIP 4-78

5. Network Architectures 5-15.1 The Internet 5-45.2 Local IP Networks 5-65.3 Intranets 5-135.3.1 Network Address Translation (NAT) 5-155.3.2 Virtual Private Networks (VPN) 5-165.3.3 Remote LAN Access (RLA) 5-175.4 Residential Access 5-185.5 Voice Carrier Networks 5-225.6 Mobile Networks 5-255.6.1 Mobility Support 5-265.6.2 GPRS 5-295.6.3 Header Compression 5-305.6.4 TCP and Packet Loss 5-325.7 Overlay Networks 5-345.7.1 General View 5-355.7.2 Building Overlays with P2P Mechanisms 5-37

Questions 5-39

6. Statistics and Performance 6-16.1 Introduction 6-46.1.1 Basic Statistics 6-46.1.2 Classical Models and Results 6-106.2 Web Statistics 6-136.2.1 TCP Effects 6-146.2.2 Heavy-Tailed Distributions 6-176.3 Long-Range Dependence and Self-Similarity 6-216.4 Issues with Simulations 6-27

Questions 6-32

IPNA – IP based Networks and ApplicationsTable of Contents (3) 2004 Edition7. Quality of Service 7-17.1 What is Quality of Service? 7-47.2 Best Effort Service 7-97.3 Differentiated Services 7-117.4 Integrated Services 7-147.5 MPLS 7-167.6 Service Level Agreements 7-22

Questions 7-24

8. Network Management 8-18.1 Introduction 8-48.2 Configuration Management 8-78.3 Performance Management 8-98.4 Fault Management 8-118.5 SNMP MIBs 8-148.6 SNMP Protocol 8-18

Questions 8-22

9. Security 9-19.1 Introduction 9-49.2 Methods for Improving Security 9-109.2.1 Methods for Confidentiality and Integrity 9-119.2.2 Methods for System Security 9-169.3 Internet Security Frameworks 9-179.3.1 Authentication Frameworks 9-189.3.2 Network Layer Security: IPsec 9-199.3.3 Transport Layer Security: SSL and TLS 9-219.3.4 Application Layer Security: PGP 9-229.4 Firewalls 9-239.5 Absolute Security? 9-30

Questions 9-31

10. IPv6 10-110.1 Introduction 10-410.2 Addressing 10-610.3 IP Packet Header 10-910.4 Automatic Configuration 10-1710.5 Security Support 10-1810.6 Changes to Other Protocols 10-1910.7 Migration Strategies 10-21

Questions 10-24

IPNA – IP based Networks and ApplicationsErrata 2004 Edition

Informationand CommunicationNetworks

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 1: Introduction

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Outline INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-2

Objectives

Learn about and explore IP technology

See the difference between The Internet and other IPnetworks

be able to design IP based applications

Not:how to use applicationslink recommendations for surfing

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-3

Prerequisites

Communications (will be refreshed)LANsOSI Reference model

basic C knowledgeto understand examplesto apply your new knowledge

how to use the Web and e-mailalso for accessing information about this lecture

some maths

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

LAN Local Area Network

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-4

Remarks

“homework”preparation for next lecturesimple tasks to give you a “hands-on” feeling for the coursematerialmixture of fun and workno “official” solutions

You can contact me by e-mail:[email protected] (at work)[email protected] (at home)

Additional information for this course is available athttp://www.jcho.de/jc/IPNA/

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-5

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-6

1.1 OutlineChapter 1: Introduction

1.1 Overview of the lecture

1.2 Internet Historyevolution and growth of the Internet

1.3 IP Standardisation

1.4 Networking Basics Refresher1.4.1 Reference Model1.4.2 Circuit Switching and Packet Switching1.4.3 Local Area Networks1.4.4 Network Elements

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-7

1.1 OutlineChapter 2: Network Layer (et al.)

2.1 Internet Reference Model2.2 IP

2.2.1 IP Packets2.2.2 Addressing2.2.3 Fragmentation

2.3 ICMP2.4 ARP2.5 Routing

2.5.1 Principle2.5.2 Algorithms2.5.3 Protocols

2.6 UDP

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-8

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-11

Major IP based Protocols

UDP

Application Programs

NFS

TCP

IP (+ICMP, IGMP)

ARP, ATMARP, SLIP, PPPHardware Device Drivers, Media Access Control Protocols

Hardware...

Users...

Source: [Comer 2000]

SMTP

HTTPMIME

BGP RPC rlogin& rsh

FTP

TELNET DNS

SNMPASN.1

TFTP BOOTP& DHCP

RIP RTP RPCXDR

1.1 OutlineChapter 2: Network Layer (et al.) – Preview

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-9

1.1 OutlineChapter 3: Transport Layer

3.1 TCP (Transmission Control Protocol)3.1.1 Overview3.1.2 Reliable Transport3.1.3 TCP Header3.1.4 Reliable Transport in TCP3.1.5 Connection Concept

3.2 TCP Flow and Congestion Control3.2.1 Principle3.2.2 Congestion Control Algorithms:

Tahoe, Reno, Vegas3.2.3 TCP Performance3.2.4 Extensions

3.3 Assigned Numbers

3.4 Other Transport Protocols3.4.1 SCTP3.4.2 RTP

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-10

1.1 OutlineChapter 3: Transport Layer – Preview

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2002 3-55

TCP Congestion ControlPrincipal Figure

TCP Reno trace

0

5

1 0

1 5

2 0

2 5

3 0

3 5

0 5 1 0 1 5 2 0 2 5 3 0

S e g m e n t N u m b e r

Co

nge

stio

nW

indo

wS

ize

Slow StartSS

SS

LL LLLL

LL

LL Packet Loss

SS

Timeout

TOTO

TOTO

CACA

FRFR

CACA

Congestion AvoidanceCACA

CACA

Time in units

FRFR

FRFR Fast Recovery

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-11

1.1 Outline – Chapter 4:Applications and Application Layer Protocols

4.1 Introduction4.1.1 Design Principles4.1.2 Client-Server Paradigm4.1.3 Reply Codes4.1.4 Socket Concept

4.2 DNS

4.3 E-Mail4.3.1 SMTP4.3.2 MIME4.3.3 POP34.3.4 IMAP

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

4.4 HTTP

4.5 Telnet

4.6 FTP

4.7 VoIP4.7.1 Packetized Voice4.7.1 H.3234.7.2 SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-12

1.1 Outline – Chapter 4:Applications and Application Layer Protocols

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2002

replace logo

4-31

SMTPConversation Example

Minimum conversation between client (C) and server (S)

S: 220 host-a.net readyC: HELO host-b.eduS: 250 host-a.netC: MAIL FROM:<[email protected]>S: 250 OKC: RCPT TO:<[email protected]>S: 250 OKC: DATAS: 354 Start mail input; end with <CR><LF>.<CR><LF>C: Hi, this is my test mail to you allC: which extends over a few linesC: ...C: <CR><LF>.<CR><LF>S: 250 OKC: QUITS: 221 mailserver.mynet closing connection. Thanks for your message.

S: 220 host-a.net readyC: HELO host-b.eduS: 250 host-a.netC: MAIL FROM:<[email protected]>S: 250 OKC: RCPT TO:<[email protected]>S: 250 OKC: DATAS: 354 Start mail input; end with <CR><LF>.<CR><LF>C: Hi, this is my test mail to you allC: which extends over a few linesC: ...C: <CR><LF>.<CR><LF>S: 250 OKC: QUITS: 221 mailserver.mynet closing connection. Thanks for your message.

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-13

1.1 OutlineChapter 5: Network Architectures

5.1 The Internet

5.2 Local IP Networks

5.3 Intranets5.3.1 Network Address Translation (NAT)5.3.2 Virtual Private Networks (VPN)5.3.3 Remote LAN Access (RLA)

5.4 Residential Access

5.5 Voice Carrier Networks

5.6 Mobile Networks5.6.1 Mobility Support5.6.2 GPRS5.6.3 Header Compression5.6.4 TCP and Packet Loss

5.7 Overlay Networks5.7.1 General View5.7.2 Building Overlays with P2P mechanisms

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-14

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-38

P2P search

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

“lookingfor file x”

“I’ve gotfile x”

“I’ve gotfile x”

“give me file x”

download

application layer multicast for searchingdirect peer-to-peer connection for download

real (IP) network topology is different from overlay topology

1.1 OutlineChapter 5: Network Architectures – Preview

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-15

1.1 OutlineChapter 6: Statistics and Performance

6.1 Introduction6.1.1 Basic Statistics6.1.2 Classical Models and Results

6.2 Web Statistics6.2.1 TCP Effects6.2.2 Heavy-Tailed Distributions

6.3 Long-Range Dependence and Self-Similarity

6.4 Issues with Simulations

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-16

1.1 OutlineChapter 6: Statistics and Performance – Preview

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

IPN

ACh

apte

r6/0

6.20

01/©

Joac

him

Char

zins

ki20

01

Information and Communication Networkshttp://www.ic.siemens.com/networks/ 6-23

Joachim Charzinskihttp://www.jcho.de/jc/IPNA/

Measured SMTP Traffic Poisson Traffic

10s Aggregatesover 10000s

1s Aggregatesover 1500s

0.1s Aggregatesover 150s

10ms Aggregatesover 15s

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-17

1.1 OutlineChapter 7: Quality of Service

7.1 What is Quality of Service?7.1.1 General View7.1.2 QoS Metrics7.1.3 Admission Control

7.2 Best Effort Service

7.3 Differentiated Services

7.4 Integrated Services

7.5 MPLS

7.6 Service Level Agreements

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-18

1.1 OutlineChapter 8: Network Management

8.1 Introduction8.2 Configuration Management

8.3 Performance Management

8.4 Fault Management

8.5 SNMP MIBs

8.6 SNMP Protocol

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-19

1.1 OutlineChapter 8: Network Management

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2002

replace logo

8-6

Management Architecture

Architecturemanagement station(s)network elements runningmanagement “agent” software

routersserversprinter, terminal,Web, remote access,. . .

Basic Mechanismsrequest information from an agentset configuration data (center to agent)notify center of new information (“trap”: agent to center)

MSother

Network

NE

NE

NE

NE

NE

NE

NENE

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-20

1.1 OutlineChapter 9: Security

9.1 Introduction9.2 Methods for Improving Security

9.2.1 Methods for Confidentiality and Integrity9.2.2 Methods for System Security

9.3 Internet Security Frameworks9.3.1 Authentication Frameworks9.3.2 Network Layer Security: IPSec9.3.3 Transport Layer Security: SSL and TLS9.3.4 Application Layer Security: PGP

9.4 Firewalls

9.5 Absolute Security?

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-21

1.1 OutlineChapter 9: Security

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2002

replace logo

9-23

9.4 Firewalls

Secure a whole enterprise networkCommon point of trust

reduces effort in securing many computersreduces risk of a misconfigured computer compromising others’securityonly one system to verify and observeonly few services need to go across

GlobalInternet

(insecure)

Intranet(protected)

FirewallFirewall

selected servicescan pass throughselected servicescan pass through

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-22

1.1 OutlineChapter 10: IP Version 6

10.1 Introduction10.2 Addressing10.3 IP Packet Header10.4 Automatic Configuration10.5 Security Support10.6 Changes to Other Protocols10.7 Migration Strategies

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-23

1.1 OutlineChapter 10: IP Version 6

Preliminary remarks

OverviewChapter 1Chapter 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9Chapter 10

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2002

replace logo

10-11

IPv6 Packet Header

Source Address

Destination Address

Concept

User data ...BaseHeader

ExtensionHeader #1 . . . Extension

Header #n

optional

Base Header FormatVersion Flow Label

Payload Length Next Header Hop Limit

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration StrategiesTraffic Class

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-24

Chapter 1: Introduction

1.1 Overview of the lecture

1.2 Internet Historyevolution and growth of the Internet

1.3 IP Standardisation

1.4 Networking Basics Refresher1.4.1 Reference Model1.4.2 Circuit Switching and Packet Switching1.4.3 Local Area Networks1.4.4 Network Elements

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-25

Arpanet

1960s: studies of packet switchingearly 1969: Arpanet contract to BBNDec. 1969: four node network between UCLA, UCSB andUtah4 IMPs (Interface Message Processor)funded by US ARPA (defense) advance research projectsagency (for academia and US military)early inclusion of wireless (ALOHA) and satellite links1973: first international connections1979: around 100 nodes

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-26

Evolution

1980-1983: Introduction of TCP and IPTCP/IP popular on Unix machines

communication protocols and utilities for remote work1984: Domain Name System1986: NSFNET (US national science foundation)1989: 100000 nodes1989: first Web proposal (Tim Berners-Lee, Robert Cailliau)1991: gopher1992: MBONE (multicast for audio and video)1993: NCSA Mosaic (first widely used Web browser)1994: Internet known in public (press, adverts, ISPs)1995: end of the NSFnet backboneNext Generation research networks

Internet2, Canarie (1993), ...Everything over IP, IP over everything

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-27

Network Evolution Maps

Early ARPANET maps (1969-1972)from L. Kleinrock, Queueing Systems Vol. 2, 1976

Internet Connectivity Mapsfrom ftp://ftp.cs.wisc.edu/connectivity_table/mid-of-year versions:

v2 9/1991v6 8/1992v9 8/1993v11 7/1994v14 6/1995v15 6/1996v16 6/1997

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-28

Arpanet Network Evolution

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-29

Example of an ISP backbone today

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-30

Components of Growth

Number of usersusers reached by technology(connectable, owners of access devices)take rate / acceptance

Traffic demand per applicationWeb item sizes(images, Java applets with menus, audio/video clips)

New applicationsaudio/video streaming, 3D chat, software update services(e.g. Windows® 98, ME, XP)e-business

Access line bit rateCore network bit rateNumber of serversPenetration into leisure / entertainment sector

time budget of 2–6 hours per day

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-31

Worldwide Internet Connectivity – 9/1991

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-32

Worldwide Internet Connectivity – 8/1992

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-33

Worldwide Internet Connectivity – 8/1993

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-34

Worldwide Internet Connectivity – 7/1994

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-35

Worldwide Internet Connectivity – 6/1995

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-36

Worldwide Internet Connectivity – 6/1996

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-37

Worldwide Internet Connectivity – 6/1997

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-38

Growth – Measures and Data Sources

Different measuressubnetworksdomainshost namespingable hosts (always on + ping configured)IP-capablebehind firewallreachable by e-mail

Data sources:www.nw.comwww.isc.orgwww.netsizer.com (no longer available?)www.ripe.net

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-39

100

1k

10k

100k

1M

10M

100M

1G

1980 1985 1990 1995 2000 2005

Num

bero

fHos

ts

Host TableOld Domain Survey

New Domain SurveyRIPE

Growth – Host Counts

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-40

Growth – Ranking

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

No. Most Hosts Most Largest Fastestper Capita Hosts Domains Growing

1 USA USA com Colombia2 Finland Japan net Ukraine3 Iceland Canada edu Czechia4 Canada UK jp Singapore5 Sweden Germany ca Sweden6 Norway Italy uk Belgium7 New Zealand Australia it South Africa8 Netherlands Netherlands de Argentina9 Hong Kong Taiwan us Spain10 Australia France mil Uruguay

Source:Telcordia Netsizer (http://www.netsizer.com/) on April 21, 2001

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-41

Number of Internet Users

(million users) 11/2000 2/2002 change 9/2002 changeWorld total 407.1 544.2 + 34% 605.6 + 11%Africa 3.1 4.1 + 34% 6.3 + 54%Asia/Pacific 104.9 157.5 + 50% 187.2 + 19%Europe 113.1 171.3 + 51% 190.9 + 11%Middle East 2.4 4.6 + 94% 5.1 + 11%USA+Canada 167.1 181.2 + 8% 182.7 + 1%Latin America 16.5 25.3 + 53% 33.4 + 32%

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Source: NUA “educated guess” April 2003 (http://www.nua.ie/)

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-42

Distribution of Internet Users

Core Internetfull IP reachability

Firewalledusers

Dial-up usersDial-Up viaPPP, SLIPAlways on

Firewalls

Online Srv. usersOnline ServicesE-Mail Gateways

E-Mail only users(X.400, FIDO)

Residentialaccess users

Always-onxDSL, Cable modem

WebGateways

(WAP, iMode)Mobile Internet users

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-43

THE Internet versus Internets or Intranets

There are other networks based on IP protocols, notnecessarily with a direct connection to the Internet:

Intranets, Extranets

experimental networks

Voice carrier networks

Mobile network backbones

See Chapter 5

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-44

Chapter 1: Introduction

1.1 Overview of the lecture

1.2 Internet Historyevolution and growth of the Internet

1.3 IP Standardisation

1.4 Networking Basics Refresher1.4.1 Reference Model1.4.2 Circuit Switching and Packet Switching1.4.3 Local Area Networks1.4.4 Network Elements

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-45

1.3 Internet StandardisationStructure

IRTF

IANA IAB ISOC

IAB Internet Architecture BoardIANA Internet Assigned Numbers AuthorityICANN Internet Corporation for

Assigned Names and NumbersIESG Internet Engineering Steering GroupIETF Internet Engineering Task ForceIRTF Internet Research Task ForceISOC Internet SocietyISTF Internet Societal Task Force

ICANN

IESG

IETF

Areas. . .

Working Groups

ISTF

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-46

IETF Working Groups

Basic PrinciplesSmall focused efforts preferred to larger comprehensive onesPreference for a limited number of options

CharterGroup created with a narrow focusPublished goals and milestonesMailing list and chairs' addresses

"Rough consensus (and running code!)"No formal votingDisputes resolved by discussion and demonstrationMailing list and face-to-face meetings

Decisions made via e-mail(no "final" decisions made at meetings)

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Source: http://www.ietf.org/structure.html

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-47

IETFAreas and Working Groups (4/2004: 135 in total)

Applications Area (22)e.g. EDI, FTP, Fax, LDAP, Web

General Area (5)Internet Area (21)

e.g. DNS, DHCP, IPnG, IP over x, mobilityOperations and Management Area (24)

e.g. AAA, SNMP, several MIBs, policy, mboneRouting Area (14)Security Area (21)Sub-IP Area (1)

(IP over optical, MPLS, VPN,) Traffic EngineeringTransport Area (27)

DiffServ, Telephony, SIP, Media Gateways, NAT, NFSv4,sigtran

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-48

IRTFResearch Groups

Active IRTF Research GroupsAnti-Spam*Authentication Authorisation Accounting ArchitectureCrypto Forum*Delay-Tolerant Networking*End-to-EndGroup Security*Internet Measurement*IP Mobility Optimizations*Network ManagementPeer-to-Peer*RoutingServices Management

"Historical" IRTF Research GroupsBuilding Differentiated ServicesInformation Infrastructure Arch.Digital Rights ManagementInternet Resource DiscoveryInterplanetary Internet

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

NameSpacePrivacy and SecurityReliable MulticastSecure MulticastSearchable Resource Names

* new

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-49

IETFInternet Documents

Internet DraftsWorking documents (works in progress)No status of any kind, not archived, deleted after 6 monthsAnnounced and disseminated by IETF Secretariat

RFCs (Requests for Comment), since 1969Archival document series of the IABNot all RFCs are standards-trackEdited, announced, and disseminated by RFC Editor

RFC CategoriesStandards Track

Proposed StandardDraft StandardStandard

InformationalExperimentalHistoric

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Source: http://www.ietf.org/structure.html

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-50

IETFStandard Levels

Proposed StandardComplete, credible specificationDemonstrated utilityAt least 6 months, no longer than 2 years, then either elevated,depreciated, or recycled

Draft StandardMultiple, independent, interoperable implementationsLimited operational experience - works wellAt least 4 months, no longer than 2 years, then either elevated,depreciated, recycled, or back to Proposed

StandardDemonstrated operational stability"The real thing"Can stay forever, or can be depreciated to Historic (newversions must start over from the beginning)

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Source: http://www.ietf.org/structure.html

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-51

IETFStandards

Open Standardsvendor independentsee also RFC2026IPR not welcome

free distributionvia Internet, see http://www.ietf.org/rfc.htmlno charges (compare this to ITU, ISO, ANSI, IEEE, ...)

multi-platform format → pure ASCII text!emphasis on readability and clarity

benefit from implementation (“running code”)availability at time of writing

Well-defined requirement levels (RFC2119)MUST / REQUIRED (absolute requirement)MUST NOT / SHALL NOT (prohibited)SHOULD / RECOMMENDED (required in full implementation)SHOULD NOT / NOT RECOMMENDED

(use only if absolutely needed)MAY / OPTIONAL (use if you like)

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-52

IETFUseful URLs

IETF Home Page http://www.ietf.org/RFCs http://www.ietf.org/rfc.htmlThe Tao of the IETF http://www.ietf.org/tao.htmlNovices‘ Guide http://www.imc.org/novice-ietf.htmlIESG Status Page http://www.ietf.org/IESG/status.htmlWorking Group

http://www.ietf.org/html.charters/wg-dir.htmlIETF Monthly Status Reports http://www.ietf.org/IMR/Additional Information http://www.ietf.org/intro.htmlApril Fools RFCs

http://www.2meta.com/april-fools/collections/rfc/

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-53

Chapter 1: Introduction

1.1 Overview of the lecture

1.2 Internet Historyevolution and growth of the Internet

1.3 IP Standardisation

1.4 Networking Basics Refresher1.4.1 Reference Model1.4.2 Circuit Switching and Packet Switching1.4.3 Local Area Networks1.4.4 Network Elements

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-54

1.4 Networking Basics Refresher

1.4.1 Reference Model

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-55

Reference ModelExample

EndSystem

TransportLayer

Internet-work Layer

Internet

NetworkNode

NetworkNode

EndSystem

SubnetworkLayer

OSI

TransportLayer

NetworkLayer

Link Layer+ PHY

ApplicationLayer

SessionRepresentationApplication

E-MailClient

(netscape)

PPP

TCP

IP

SMTP

ATM EthernetPPP Eth.ATM

IPRouting

TCP

IP

SMTP

Mail Server(sendmail)

IPRouting

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-56

Reference Model

Used to clarify functions in network nodes and protocolsoften gives “natural” protocol interfaces

vertical interface: adjacent layer protocolhorizontal interface: peer-to-peer protocol

classification of classical functions / network rangesPhysical Layer: bit and byte transmission technology, physicalconnectionLogical Link Layer, Subnetwork Layer:~packet transmission on one physical networkNetwork Layer, Internetwork Layer: Communication over multiplenetworksTransport Layer: end-to-end communicationHigher layers / Application Layer: application specific protocolsand services, e.g. HTTP for Web browser/server communication

Layers are relative to one networking paradigme.g. ISDN (L3) can be used as L1/2 for Internet accessIP (L3) can be tunneled over IP (L3)

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-57

Networking Basics Refresher

1.4.2 Circuit Switching and Packet Switching

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-58

Circuit Switching ExampleTelephone Connections

(explained during lecture)Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-59

Circuit Switching (CS)

A circuit can be ...a physical linea time slot in a frame in a TDM systema carrier frequency in an FDM systema wavelength in a WDM systema code in a CDMA system

A connection - during its existence - uses one circuit... or a selection of circuits in parallel (multichannel switching)

connection set-upfind path through network and through switches towardsdestinationestablish path

communiationsend fixed data rate into the connectionrelease connection after use

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-60

Packet Switching (PS)

Send packets of datainstead of a fixed bit or byte rateidle time between packets can be used by othercommunication relationsvariable data rate is possibleconnectionless (CL) or connection oriented (CO) modes

CircuitSwitching

PacketSwitching

ConnectionorientedConnectionless

Telephone,ISDN X.25, ATM

Internet

Examples:

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-61

Connection Oriented Packet Switching

Connection establishment before data transmissionrouting performed only for connection establishmentdata transmitted along established patdata packets only carry connection identifierfor packet switching: "virtual connection"

connection state (next hop address) stored in networkelements along the path

destination address given during connection set-up

"meta signalling" or default signalling connections needed

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-62

Connectionless Packet Switching

Data packets transmitted without connection on NetworkLayerrouting performed along with forwarding for each packet

but: route cachedestination address carried in each packetno network layer signalling neededno information stored in network nodes along the path

network nodes are less complexcheap high speed packet forwarding"KISS": keep it simple and stupid

higher layer connections can survive network path outages

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-63

1.4.3 Local Area Networks

Wide AreaNetwork

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-64

1.4.3 Local Area Networks

What is a LAN?Multiple systems attached to a shared medium“high” total bandwidth, shared by the stations“low” delay“low” error ratebroadcast/multicast capability

single message (frame) transmitted onceand received by multiple recipients

limited geography (max. some km)limited number of stations (max. few hundred)all stations are equivalent (no master/slave)privately operated, not governed by telecommunicationsregulations(i.e. “data communication” in contrast to “telecommunication”)

[Perlman 1999 p. 19f.]

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-65

LANIEEE 802 Standards

IEEE 802 committee standardises LANs:General Issues, Addressing, Management 802.1

MAC (Media Access Control) Layer802.3 CSMA/CD (similar to Ethernet)802.4 Token Bus802.5 Token Ring802.6 DQDB

LLC (Logical Link Control) 802.2Type 1: datagram (no functionality)Type 2: reliable, connection orientedHDLC (high-level data link control) on top of LAN frames

CSMA/CD Carrier Sense Multiple Access / Collision DetectionDQDB Distributed Queue Dual Bus

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-66

Addresses

In communication from a source to a destination:Name

identifies a resource (“identifier”)independent of location of both source and destination

Addresstells where something ismay depend on the location of the destination

Routetells how to get from a source to a destinationdepends on locations of source and destination(“go left, then take the third turn right”)

[Perlman 1999]

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-67

IEEE LAN Addresses

16 bit addresses (option in the IEEE standards)enough for any LAN if configured during network start-upnot used

48 bit addresses for Ethernet / 802.3 LAN interfacesinitialised by hardware manufacturers in a globally unique wayfirst 3 octets: vendor code (organizationally unique identifier,OUI)last 3 octets: unique hardware IDe.g. “00-60-8c-f9-cf-30”

see http://standards.ieee.org/regauth/oui/oui.txtBit and byte orders depend on LAN standard

Vendor:3com Interface ID

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-68

IEEE 802.3 Frame (not to scale)

Frame Formats

Ethernet Frame (not to scale)

Preamble DestinationAddress

SourceAddress

Proto-col Frame Data FCS

8 6 6 2 46–1500 4Octets:

CTL Control FieldDSAP Destination Service Access PointFCS Frame Check SequenceSNAP Subnetwork Access ProtocolSSAP Source Service Access Point

Preamble DestinationAddress

SourceAddress Le

ngth

Frame Data FCS

8 6 6 2 43–1497 4Octets:

DSA

P

SS

AP

CTL

1 1 1

Protocol > 1500 distinguishes Ethernet from 802.3DSAP=SSAP=170 (dec) -> SNAP

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-69

LAN Addresses

LAN Addresses must be unique on a LANensured e.g. by globally unique 48 bit IEEE addresses

hosts interface listens to all framesinterface card generates interrupt only for frames with

destination address = local addressordestination address = broadcast addressordestinatio address = supported multicast address

Sending point-to-point higher layer information in broadcastpackets generates excessive interrupt load on all machines!

Q: How do you find out the LAN address of a destinationhost?

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-70

CSMA/CD

Carrier Senselisten before transmission

Multiple Accessmedium is shared between multiple stations

Collision Detectmonitor while transmittingdetect multiple simultaneous transmissionsback off (random time, increased after collisions)

Minimum Frame length determined by collision detection!shorter data must be padded

CSMA Carrier Sense Multiple AccessCD Collision Detection

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-71

CSMA/CDif frames are too short

S1 S2

S1 S2

S1 S2

S1 S2

S1 starts sendinga very short frame

S2 starts sending

S2 detects collision

Collision invisibleoutside red areaS1 S2

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-72

Minimum Frame Length for Ethernet

Maximum Wire Length 2500mTransmission Speed 10 Mbit/sSpeed of Electricity on Wire at least 100000 m/s

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-73

Name Bit Rate Voice CircuitsB channel 64 kbit/s 1T1 1.544 Mbit/s 24T2 6.312 Mbit/s 96T3 44.736 Mbit/s 672E1 2.048 Mbit/s 30E2 8.448 Mbit/s 120E3 34.368 Mbit/s 480OC-1 51.840 Mbit/s 810OC-3 155.520 Mbit/s 2430OC-12 622.080 Mbit/s 9720OC-24 1244.160 Mbit/s 19440OC-48 2488.320 Mbit/s 38880

Wide Area Links

Point to point PHY layer connectionsfrom circuit switched PCM telephone network

Plus more details (e.g. concatenation)

US

Euro

peU

SO

ptic

al

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-74

1.4.4 Network Elements

RepeaterHub

BridgeSwitch

Router

Proxy

Gateway

These names are not always used consistently!

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-75

Traditional Ethernet Cabling

S1

TC

S2

S3

TC TC TCTM TM

Thick Ethernet (Yellow Cable, 10Base5)

AUI Attachment Unit InterfaceBNC Bayonet Neill-Concelman

British National ConnectorBayonet Nut Couplers

S4

AUI Cable< 48m expensive equipme

nt

hard to deployexpensive equipme

nt

hard to deploy

Length 500m max.2.5m min.

Thin Ethernet (Cheapernet, 10Base2)

S1

TM

BNC“T” plug

TCS2

S4

AUI Cable

TM0.5mmin.

S3

max. length185m

cheap equipment but:

many single pointsof failure!

cheap equipment but:

many single pointsof failure!

MAU Media Attachment UnitS StationTC TransceiverTM Termination (50Ω)

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-76

Repeater

S1

TC

S2

S3

TC TC TCTM TM

S4

Length 500m max.

TM TM

S5

TC TC

S6

AUI Attachment Unit InterfaceREP RepeaterS StationTC TransceiverTM Termination (50Ω)

TC

REP

TCTC

S7 S8 S9 S10

REP

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Repeater allowsextension ofnetwork segments

Repeater allowsextension ofnetwork segments

MultiportRepeaterMultiportRepeater

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-77

Repeater

Physical Layer interconnection element

overcomes signal quality based Ethernet length limitationsat most two repeaters between any two machines

operates on analog electrical signals

no configuration necessary

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-78

is just a multiport repeaterextensions

learning hub / switching hub- forwards packets

only to the right destination ports- pretends collision on other ports-> security featuremanaged hub

Hub

AUI Attachment Unit InterfaceTC TransceiverTP Twisted Pair

TC AUI Cable

S5

Twisted Pair Ethernet (10BaseT)

S1

S2

S4S3

Hub

TP Cable

Hub

S6

S7

S8

“Uplink”

Crossover Cable or

Uplink port needed

to couple Hubs

Crossover Cable or

Uplink port needed

to couple Hubs

SpokesSpokes

HubHub

A WheelPreliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-79

Bridge

Standardized in IEEE 802.1like a hub, but talks the Media Access Control protocol

can convert between different MACs

FunctionsStore & Forward LAN packets (“frames”)

keep collisions local to one network -> limit collision domains-> overcomes MAC related Ethernet length limitationsretry packet transmission after collision

Learn station addressesSpanning Tree algorithm

IEEE Institute of Electrical and Electronics EngineersLAN Local Area NetworkMAC Media Access Control

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-80

BridgeLearning

Listen promiscuously on every port, receive every packet

for each packet received, store the source address andcorresponding input interface in a Station Cache

for each packet received:look for the destination address in the Station Cacheif found: forward packet only to corresponding interface(if the packet is coming from this interface, drop it)if not found, forward packet to all interfacesexcept the one it was coming fromageing of Station Cache: remove entries after some idle timeto allow network reconfiguration

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-81

BridgeLearning (2)

1. Station cache is empty Addr PortAddr Port

A

Bridge

B C D

Port 1 Port 2

2. Packet from A to Creceived at port 1

Src=A, Dst=C; data...

3. Store A in station cache Addr PortA 1Addr PortA 1

4. Forward packet to port 2

5. Packet from C to Areceived at port 2

Src=C, Dst=A; data...

6. Store C in station cache Addr PortA 1C 2

Addr PortA 1C 2

7. Packet from D to Creceived at port 2

Src=D, Dst=C; data...

8. Store Din station cache

Addr PortA 1C 2D 2

Addr PortA 1C 2D 29. Do not forward

the packet

Addr AddressDst Destination AddressSrc Source Address

Traffic Capacitycan be increasedTraffic Capacitycan be increased

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-82

BridgeSpanning Tree

The described learning scheme also works formore than two portsmultiple hops

The simple scheme does not work for multiple paths!only for pure tree based topologies

Bridge 1

LAN 1A

Bridge 2

LAN 2

1. Station caches are empty2. A transmits a packet3. Bridge 1 forwards it to LAN 2

and stores “A is on LAN 1”4. Bridge 2 forwards it to LAN 1

and stores “A is on LAN 2”

5. Packet circulates infinitelyLAN Local Area Network

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-83

BridgeSpanning Tree (2)

Bridges use a “spanning tree” algorithm to convert anytopology into a loop-free subsetprotocol uses configuration messages (“configuration bridgeprotocol data units”)

steps at each bridge during configuration BPDU exchange:1. Elect one single bridge to be the Root Bridge (lowest ID)2. Calculate distance of shortest path

from this bridge to the root bridge3. For each LAN, elect a Designated Bridge

(closest to the root bridge)4. Choose a port (“root port”) that gives the

best path from this bridge to the Root Bridge5. Root port plus the ports on which this bridge has been elected

Designated Bridge will be included in the spanning tree

BPDU Bridge Protocol Data UnitID Identifier

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-84

BridgeSpanning Tree (3)

B

B

B

BB

B

B

Bridge

LAN

B

LoopsLoops

DeactivatedLinksDeactivatedLinks

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-85

Remote Bridge

Two or more bridges interconnectedby point-to-point linksby WAN interconnections

B

Bridge

LAN

B

BPoint-to-point link

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-86

BridgeIssues

Auto-configurationhigher total throughput if network is well layed outgenerally transparentbut

packets lost after being successfully transmitted by senderdelay increasesresidual error rate can increase(CRC may be recalculated at bridges)packet misordering possible (but unlikely)packet duplication possible (but unlikely)

problems with different frame sizesconversion from IEEE 802.3 to Ethernet can occurProblems

multiply-attached stations with the same link address on allinterfaces“pure traffic sink” stations: location will never be known→ broadcast

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-87

What is a Switch?

A) Term for a Bridge with many portse.g. Ethernet Switch

B) Term for a telecommunications devicee.g. Voice Switch, ATM Switch

C) Term for a combination of bridging and routing functionsfrom Multiport Ethernet bridge with IGMP snoopingto configurable setting of routed / bridged ports

D) Term for any fast and modernnetwork interconnection device

e.g. “Layer 4+ Switch”

...ATM Asynchronous Transfer ModeIGMP Internet Group Management Protocol

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-88

Router

Interconnection device working on the Network Layerbased on worldwide IP instead of LAN addresses

configuration of routes to destination networksmanual configurationself-configuration

routing protocols to discover network topology and optimiseroutes

huge routing tables with >10000 entries in backbone routerspotentially instable routessee Chapter 2

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-89

Proxy

A Transport or Application Layer interconnection device

AB

Network

In a communication between A and B, the proxy actsas B to A andas A to B

e.g. Proxy Server if A is a client and B is a server

A

Proxy

BNetwork

B‘ A‘

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Proxy

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-90

Gateway

A Transport or Application Layer interconnection device

works like a proxy but usually translates between differentprotocols, e.g.

SMTP ↔ X.400 Mail GatewaySMTP ↔ FTP Order FTP files via e-mailTelnet ↔ X.29 PAD access X.29 hosts via telnetFTP ↔ FTAM FTAM servers‘ last chance to survive

Also (in some RFCs): another name for “Router”

FTAM File Transfer, Access and ManagementFTP File Transfer ProtocolRFC Request for CommentSMTP Simple Mail Transfer Protocol

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-91

Network Interconnection ElementsSummary

TransportLayer

Internet-work Layer

SubnetworkLayer

ApplicationLayer

Bridge

Proxy

Router

Proxy

PHYsicalLayer

Switch

Gateway

Gateway

Repeater Hub

“Gateway”

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Reference ModelCS and PSLANsNetw. Elements

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 1 Edition Summer 2004 1-92

Questions

1.1 Who is the manufacturer of the LAN cardwith address 00-02-b9-2a-13-43?

1.2 How do you find out the LAN address of yourcommunication partner?

1.3 Look for the TCP standard on the Web.1.4 Look for the IEEE 802.3 standard on the Web.

1.5 What does the ping tool do?1.6 How does it work?1.7 What are the well-known port numbers for http, https,

telnet, ftp?

Preliminary remarks

Overview

Internet History

IP Standardisation

Networking BasicsRefresher

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 2: Network Layer (et al.)

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-3

Chapter 2: Network Layer (et al.)

2.1 Internet Reference Model2.2 IP

2.2.1 IP Packets2.2.2 Addressing2.2.3 Fragmentation

2.3 ICMP2.4 ARP2.5 Routing

2.5.1 Principle2.5.2 Algorithms2.5.3 Protocols

2.6 UDP

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-4

Internet Reference Model – Example

EndSystem

TransportLayer

Internet-work Layer

Internet

NetworkNode

NetworkNode

EndSystem

SubnetworkLayer

OSI

TransportLayer

NetworkLayer

Link Layer+ PHY

ApplicationLayer

Session,Representation,Application

Web Client(e.g.

netscape)

PPP

TCP

IP

HTTP

Eth. EthernetPPP Eth.Eth.

IPRouting

TCP

IP

HTTP

Web Server(e.g.

Apache)

IPRouting

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-5

Network Elements Summary (from Sec. 1.4)

TransportLayer

Internet-work Layer

SubnetworkLayer

ApplicationLayer

Bridge

Proxy

Router

Proxy

PHYsicalLayer

Switch

Gateway

Gateway

Repeater Hub

“Gateway”

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-6

Internet Architecture

Reference Model

IP

ICMP

ARP

Routing

UDP

Network 1 RouterNetwork 2

physical networks interconnected by a router

Interconnection via another network

R1

Network 3

Network 2R2

Network 1

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-7

InternetworkingPrinciple

Interconnection of Packet Switching networksuse the services that the PS networks provideadapt packet lengths to supported lengths (fragmentation)

“Best Effort” deliveryno prevention of packet lossindependent treatment of packets (no “flow” concept in normalIPv4)sequence integrity not guaranteed

Routers use destination network, not host addressneed only to know how to reach a networkno influence of source host on route (normal IPv4)

no knowledge of full path to destination necessarysend to “next hop”

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-8

Internet Protocols

global addressesport numbersprotocol numberIP addresses

subnetwork addresses

Introduction of new applications:advertise port numberinstant worldwide reachabilitysoftware distributedvia HTTP or FTP

HTTP

TCP(streams in connections)

Subnetwork(Ethernet, AAL5/ATM, Frame Relay, PPP/ISDN, etc.)

IP (Internet Protocol)

SMTP POP3 FTP NNTP Telnet NFS DNS SNMP

UDP(API for IP)

... ...

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-9

Reference Model

Used to clarify functions in network nodes and protocolsoften gives “natural” protocol interfaces

vertical interface: adjacent layer protocolhorizontal interface: peer-to-peer protocol

classification of classical functions / network rangesPhysical Layer: bit and byte transmission technology, physicalconnectionLogical Link Layer, Subnetwork Layer:~packet transmission on one physical networkNetwork Layer, Internetwork Layer: Communication overmultiple networksTransport Layer: end-to-end communicationHigher layers / Application Layer: application specific protocolsand services, e.g. HTTP for Web browser/server communication

Layers are relative to one networking paradigme.g. ISDN (L3) can be used as L1/2 for Internet accessIP (L3) can be tunneled over IP (L3)

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-10

Reference Model (2)

In reality:

Adjacent layers need not be independente.g. TCP/IP or UDP/IPno other Network Layer protocol defineduse tunneling if necessary, but mind the overhead

no “adjacent layer protocol”function calls (blocking), APIevent queuesmonolithic implementation

see the sections on Sockets

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-11

Major IP based Protocols

UDP

Application Programs

NFS

TCP

IP (+ICMP, IGMP)

ARP, ATMARP, SLIP, PPPHardware Device Drivers, Media Access Control Protocols

Hardware...

Users...

Source: [Comer 2000]

SMTP

HTTPMIME

BGP RPC rlogin& rsh

FTP

TELNET DNS

SNMPASN.1

TFTP BOOTP& DHCP

RIP RTP RPCXDR

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-12

“Hourglass” Model

IP

differentapplications

differentnetwork

technologies

Source: [Comer 2000]

All applications run over IP

IP runs over all networks

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-13

Protocol Stack

What is a protocol stack?A selection of protocols, one for each layer

describing an implementation / a systemknown to work in this combination

not all protocols are interchangeablelayers above IP are usually independent of layers below IPcontent format can be important as well

Examples:

HTTPTCPIP

RTPUDP

IP

G.723.1DNSUDP

IP

IPAAL5ATM

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-14

Chapter 2: Network Layer (et al.)

2.1 Internet Reference Model2.2 IP

2.2.1 IP Packets2.2.2 Addressing2.2.3 Fragmentation

2.3 ICMP2.4 ARP2.5 Routing

2.5.1 Principle2.5.2 Algorithms2.5.3 Protocols

2.6 UDP

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-15

2.2 IPThe Internet Protocol

Is IP a protocol at all? After all, there’s no interaction!

What is a protocol?a convention of data formatsa convention of what data units signifya convention of the interaction of state machines

IP is a protocol, even if there are no state machines involvedwait for TCP, if you desperately need some

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-16

Why not use a purely bridged network?

What do we need IP or the Network Layer for?

Consider a pure bridged networkeach end system has its Link Layer address built ineach bridge knows all end systemsbroadcasts reach all nodes

Hierarchy needed to reduce effortin computing routes / spanning treein storing end system addresses

Divide the worldwide network into several smaller bridgednetworks

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-17

Router Network

End systemshave a network (IP) address assigned to each network interfacehave neighbour router(s) configured (default route, configuredroutes)communicate within local network using Link Layer addresses

Routers (Intermediate Systems)either: have a next hop entry for all IP networks (not: nodes!)or (like above): know all IP networks on one sideand have a default router configured on the otherstatic routes configured (configuration / network managementtask)dynamic routes are discovered using routing protocols(communication with neighbour routers)for each packet received:look up next hop and forward packet to next hopusing the appropriate Link Layer method

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-18

IP Protocol Functions

Connectionless, unreliable best-effort delivery of data

Datagram addressing and forwardingIP header checkpayload delineationsegmentation and reassembly (“fragmentation”)error reporting (ICMP)

optional:route recordingsource routing

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-19

2.2.1 IP Packets

IP packet also called “datagram”IP packet header transmitted before user data

maximum total length: 65535 bytesminimum total length: 20 bytes(minimum header and no payload)

User data ...Header

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-20

IP PacketsHeader Format

User data ...

Version

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 10 1 2 3

IHL Type of Service Total Length

Identification Flags Fragment OffsetTime to Live Protocol Header Checksum

Source Address

Destination AddressOptions Padding

Bit positions:

Source: RFC791 (September 1981)

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-21

IP PacketHeader Fields

Version (4 bits)Version 4: RFC791 (described in the following)

IHL, Internet Header Length (4 bits)counts the number of 32bit words in the headerpoints to first data wordminimum = 5 (20 byte header)

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-22

IP PacketHeader Fields (2)

Type of Service (8 bits)

Precedence D T R 0 0bit: 0 3 4 5 6 71 2

1=

Low

Del

ay

1=

Hig

hTh

roug

hput

1=

Hig

hR

elia

bilit

y

rese

rved

rese

rved

Precedence Values111 Network Control

(inside a network)110 Internetwork Control101 CRITIC / ECP100 Flash Override011 Flash010 Immediate001 Priority000 Routine

(see

tabl

eto

the

right

)

influence on queueingmay have influence on routing decisioncan be coupled to lower layer service classes

policy framework needed for general use-> IETF “Differentiated Services” (DiffServ, DS) activitiessee Chapter 7

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-23

IP PacketHeader Fields (3)

Total Length (16 bits)length of the datagram (in octets), including IP header and dataat most 65535 octetsall hosts must be able to accept a datagram of 576 octets(512+64)only send datagrams longer than 576 octets if the receiver canhandle them

Identification (16 bits)identification of transmitted datagramunique for transmitter (for the next 65535 packets)used by receiver to reassemble fragmented datagrams

Control Flags (3 bits)Bit 0: must be zero (“MBZ”)Bit 1: DF 1 = don’t fragment 0 = may fragmentBit 2: MF 1 = more fragments 0 = last fragment

Fragment Offset (13 bits)counts 8 octet (64 bits) wordsindicates where the current fragment belongs in the datagram

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-24

IP PacketHeader Fields (4)

Time to Live (TTL) (8 bits)indicates the maximum residual time the datagram is allowed toremain in the networkRFC791: “measured in seconds“, but:each router must decrement the TTL value by 1

-> effectively implemented as “residual hop count”necessary to avoid infinitely circling packets in the case of arouting loop(special problem of connectionless packet switching!)

Protocol (8 bits)indicates the next layer protocol (usually transport layer)

Some Protocol Numbersfrom RFC 1700: “Assigned Numbers”1 ICMP 9 IGP2 IGMP 17 UDP4 IP 46 RSVP6 TCP 58 NHRP8 EGP 88 IGRP

EGP Exterior Gateway ProtocolICMP Internet Control Message ProtocolIGMP Internet Group Management ProtocolIGP Interior Gateway ProtocolIGRP Cisco Interior Gateway Routing ProtocolIP Internet ProtocolNHRP Next Hop Resolution ProtocolRSVP Resource Reservation ProtocolTCP Transmission Control ProtocolUDP User Datagram Protocol

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-25

IP PacketHeader Fields (5)

Header checksum (16 bits)checksum computed on the IP headerre-computed at every node that changes the header (e.g. theTTL field!)16 bit one’s complement of one’s complement sum of all 16 bitfields in the IP header (taking the checksum field to be zero forcomputation)

Source Address (32 bits)see section 2.2.2

Destination Address (32 bits)see section 2.2.2

Options (variable length)zero or more optionsCase 1: single octet optionCase 2: option type (1 oct.) +option length (1 oct.) +option-data

Paddingincreases the IP header length to the next integer multiple of4 octets

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-26

IP Packet HeaderOptions

Usage is optionalImplementation is mandatory

Option Lengthnumber of octets in (option-type + option-length + option-data)

Option Type

Copy Flag (CF): 1 = copy / 0 = do not copy(controls treatment of options under fragmentation)Option Class (OC):0 = control2 = debugging & measurement1,3 = reserved for future use

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

OCCF Option Numberbit: 0 3 4 5 6 71 2

CF Copied FlagOC Option Class

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-27

IP Packet HeaderOptions (2)

OptionClass

OptionNumber

0 0 – End of option list. Used for padding.No length octet.

0 1 – No operation. No length octet.0 2 11 Security and handling restrictions (US DoD)0 3 var. Loose source route. Request routing along

the specified routers.0 7 var. Record Route. Collect the addresses

of routers along the path.0 8 4 Strem identifier (SATNET, obsolete)0 9 var. Strict source route.0 11 4 MTU probe. Used for path MTU discovery.0 12 4 MTU probe reply.

Used for path MTU discovery.0 20 4 Router alert. Request router to process

end-to-end packet contents. (RFC2113)2 4 var. Record timestamps along a route.2 18 var. Traceroute. To find routers along a path.

Length Description

DoD Department of DefenseMTU Maximum Transmission Unit

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-28

Differentiated Services Field

Redefinition of the Type of Service (TOS) field in the IPheader6-bit codepoints (DSCP) instead of Precedence, D, T and Rfieldsno guarantee of service

local policyhint on how to handle packetsdependent on hardware / local network capabilities

see Chapter 7

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-29

Network Byte Order

Machines store data in different formats, even for integersLittle Endian:Lowest memory address contains lowest-order byte of aninteger.Big Endian:Lowest memory address contains highest-order byte of aninteger.plus: byte-swapping within 16 bit words

Standardized Network Byte OrderOnly a machine independent interpretation allows interworking!

IP, TCP and UDP: Transmit most significant byte first

extra issue for application protocols:transmission data formats must be defined individually

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-30

Example (1)

User data (8 bits)

Ver=4

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 10 1 2 3

IHL=5 TOS = 0 Total Length = 21Identification = 111 Flg=0 Fragment Offset = 0

Time to Live = 8 Protocol = 1 Header Checksum

Source Address = 192.168.3.2Destination Address = 192.168.34.65

Source: RFC791

IP datagram with only one octet of ICMP dataReference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-31

Example (2)

TCP packet with four IP options set

TCP data. . .

Ver=40 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 10 1 2 3

IHL=8 TOS = 0 Total Length = 576Identification = 111 Flg=0 Fragment Offset = 0

Time to Live = 8 Protocol = 6 Header ChecksumSource Address = 192.168.3.2

Destination Address = 192.168.34.65

Source: RFC791

Opt. Code = x Opt. Len. = 3 Option ValueOption Value

Opt. Code = xOpt. Len. = 4 Opt. Code = 1Opt. Code = y Opt. Len. = 3 Option Value Opt. Code = 0

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-32

2.2.2 IP Addressing

In communication from a source to a destination:

Nameidentifies a resource (“identifier”)independent of location of both source and destination

Addresstells where something ismay depend on the location of the destination

Routetells how to get from a source to a destinationdepends on locations of source and destination(“go left, then take the third turn right”)

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

[Perlman 1999]

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-33

IP Address Parts

32 bit IP address is divided into Network ID and Host IDNetwork ID

first part of the IP addressused for routing packets towards a networkmust be known by every Internet routerrouters ignore the host ID part of the addresswhen looking up the next hoprouting is the same for all hosts with the same network ID

Host IDidentifies a host within an IP networkall hosts on the same network have the same network IDcommunication within one network uses lower layermechanisms to deliver packets

e.g. Ethernet and ARP

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Network ID Host ID.

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-34

IP Addresses / Historical

Classful Internet Addresses (original scheme)

Class A:Network ID Host ID0

Class B:Network ID Host ID1

Class C:Network ID Host ID1

Class D:Multicast Address1

Class E:reserved (for future use)

0

8 16 24

1 0

1 1 0

1 1 1 1

0 311 2 3 4bitReference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-35

IP Addresses

32bit IP address specifiesa network (Network ID)a host on this network (Host ID)

optimized for fast extraction of Network ID parthosts attached to multiple networks (e.g. routers)must have separate IP addresses at each interface

network addressall Host ID bits = 0

Zero means “this”network 0.0.0.0 = “this network”useful during initialization phaseswhen actual Network ID is not known yet

One means “all”broadcast addresses

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-36

Special IP Addresses

0 means “this” and 1 means “all”

all 0

Network ID = all 0 Host ID

all 1

Network ID Host ID = all 1

127 any Host ID (mostly 0.0.1)

Host on this netstartup onlysource only

This hoststartup onlysource only

Limited (local net)broadcastdestination only

Directed broadcast to netdestination only

Loopbacknever on real network

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-37

Subnet Addressing

variable-length prefix interpreted in local networkshost part of wide-area address is further subdivideddetermined by subnetwork maskexample:

used in local network

wide area network routes according to classful address

“Class B”Network ID Host ID1 0

Subnet mask23x”1” 9x”0”

Network ID (21 bit) Host ID (9 bit)effective

Network ID not considered for routing1 0

Network ID Host ID

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-38

Classless Addressing“Supernetting”

basically like subnetting, butalso used in WANalso to reduce network mask

reasons:only 16384 class B networks-> “ROADS” (running out of address space) problemonly few of the ~2 million class C networks are really assigned

combine e.g. multiple class C networks into a larger networkonly one common routing entry in wide area network routersadditional prefix lengthto be stored and used for routing

“Classless Inter-Domain Routing” (CIDR)[RFC1518, RFC1519]specify prefix length along with network address(number of “1” bits in network mask)knowledge of prefix for each network address required by allWAN routerswork-around (historical, expensive!):insert many routes to classful network addresses

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-39

Classless Addressing (2)

CIDR notation (“slash notation”)network address /mask lengthe.g. 192.168.10.0 /28or: 192.168 /16

power of two number of addresses per address blockroute lookup is more complicated (see later)

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Prefix Length network mask (hex) network mask (dotted) number of hosts in network30 ff ff ff fc 255.255.255.252 229 ff ff ff f8 255.255.255.248 628 ff ff ff f0 255.255.255.240 1427 ff ff ff e0 255.255.255.224 3026 ff ff ff c0 255.255.255.192 6225 ff ff ff 80 255.255.255.128 12624 ff ff ff 00 255.255.255.0 25423 ff ff fe 00 255.255.254.0 51022 ff ff fc 00 255.255.252.0 102221 ff ff f8 00 255.255.248.0 204620 ff ff f0 00 255.255.240.0 409419 ff ff e0 00 255.255.224.0 819018 ff ff c0 00 255.255.192.0 1638217 ff ff 80 00 255.255.128.0 3276616 ff ff 00 00 255.255.0.0 65534... ... ... ...

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-40

IP Address versus Link Layer Address

Addressprovides a unique identification of an end systemcontains information how to reach the element

Link Layer Address (LAN Address, MAC Address)worldwide uniqueno topological structureno information as to where the element is locatedrather a name than an address

Network Layer Address (IP Address)worldwide unique (at least within the Internet)structured (network + host part)network address indicates location of end system

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-41

IP AddressesExamples

Classful addresseshost IP Addr. Class Network Addr. Broadcast Addr.203.24.8.3 C 203.24.8.0 203.24.8.25523.1.0.4 A 23.0.0.0 23.255.255.255129.69.170.1 B 129.69.0.0 129.69.255.255

Classless addresseshost IP Addr. Netmask Netw. Addr. Broadcast Addr.203.78.5.34 0xffffff00 203.78.5.0 203.78.5.255

(203.78.5.0 /24)203.78.5.34 0xfffffc00 203.78.4.0 203.78.7.255

(203.78.4.0 /22)203.78.5.34 0xffffffe0 203.78.5.32 203.78.5.63

(203.78.5.32 /27)

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-42

Special Networks

Local (Loop) Network interface127.0.0.0localhost is always at 127.0.0.1

Default (local) network0.0.0.0

Private network addresses [RFC 1918]reserved for private usewill not be routed in the wide area

Network Prefix Lowest HighestAddress Length Host Address Host Address10.0.0.0 8 10.0.0.1 10.255.255.254172.16.0.0 12 172.16.0.0 172.31.255.254192.168.0.0 16 192.168.0.1 192.168.255.254169.254.0.0 16 169.254.0.1 169.254.255.254(169.254.0.0/16 used for IP address autoconfiguration)

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

for host internal use only!for host internal use only!

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-43

2.2.3 Fragmentation

Physical network (e.g. Ethernet LAN) treats an IP datagramas “user data”Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

IP datagram user dataIP datagramheader

Frameheader FCS

IP datagram

LAN Frame

LAN user data

Maximum payload size in framedetermines maximum size of IP datagram“Maximum Transfer Unit”, MTUe.g. Ethernet: 1500 octetsIEEE 803.2 / SNAP: 1492 octetsFDDI: approx. 4470 octets...

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-44

Fragmentation (2)

MTU can change from hop to hop

Network 1MTU=1500

R1

Network 3MTU=1500

Network 2MTU=620

R2

R1 cannot forward 1500 octet IP datagrams into network 2

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-45

Fragmentation (3)

Choice of two alternatives:

a) introduce extra link-by-link segmentation and reassembly(SAR) protocol

IP would only run on links that provide SAR

b) make IP adapt to the next hop’s MTUIP fragmentation

reassembly at destinationdue to the connectionless nature of IPfragments are again valid IP packets

IP can run on any link layerminimum necessary MTU for an 8 octet transfer- with minimum IP header only: 28 octets- including minimum TCP header: 48 octetsreasonable minimum required MTU around 100 octets to limitoverhead

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-46

Fragmentation (4)

Original IP Datagram

IP User DataIP Header

FH

FH Frame Header

Fragments

Multiple fragmentation is possibleFragments can have different sizes

IP Header IP User Data

MTU

IP User DataIP HeaderFH

MTU

IP User DataIP HeaderFH

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-47

Fragmentation (5)

Each fragment includes an IP headerdatagram ID copiedoptions copied only if “copy” flag is set to 1

maximum size of data part in fragments:LFD= MTU - LIH

number of fragments

FDIHDF LLLn /)( −=

LD Datagram LengthLFD Data part Length in FragmentLIH IP Header LengthMTU Maximum Transfer UnitnF Number of Fragments

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-48

Fragmentation (6)

Fragment offsetgiven as 8 octet (64 bit) count in the IP headerindicates position of first octet of IP data field in the originaldatagram

MF (more fragments) flag indicates last fragment

IP User Data, 1400 octetsIP Header

FO Fragment OffsetMF More Fragments

IP User Data, 600 octetsIP Header

IP User Data, 600 octets

Data, 200 oct.

IP Header

IP Header

MF=1 FO=0 data offset=0

MF=1 FO=75 data offset=600

MF=0 FO=150 data offset=1200

Example: 1420 octets datagram, MTU=620

User data ...

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options Padding

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-49

Fragmentation (7)

Datagram ID used to collect fragments for reassembly

Total Length field in IP header gives length of fragment,not of the original datagram

original datagram length only known after reception of the lastfragment(MF flag = 0)receiver needs to reserve large reassembly buffer

Don’t Fragment flag in IP headerfragmentation not allowedrouter will send ICMP message back to sender (see sec. 2.3)can be used to test maximum possible datagram sizeused to avoid having the receiver reassemble a datagram

Reference Model

IPIP PacketsAddressingFragementation

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-50

Chapter 2: Network Layer (et al.)

2.1 Internet Reference Model2.2 IP

2.2.1 IP Packets2.2.2 Addressing2.2.3 Fragmentation

2.3 ICMP2.4 ARP2.5 Routing

2.5.1 Principle2.5.2 Algorithms2.5.3 Protocols

2.6 UDP

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-51

2.3 ICMP

Internet Control Message ProtocolCompanion protocol to IP

required in every IP implementation (“part of IP”)uses IP datagrams for transportprotocol number 1

Used to report problems with IP datagram deliveryError reporting only

message goes back to datagram’s source IP addressapplication in end system can make use of the notificationno error correction

No error reports generated for ICMP packetsavoid network congestion due to error message avalanches

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-52

ICMP Messages

general message format:4 octets common partfurther information depends on message type

same checksum algorithm as for IP datagramsonly covers the ICMP message

type field defines meaning and format of ICMP messageerror reports include first 64 bits of original datagram

allow end system to attribute message to application program

Type Code Checksum0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 10 1 2 3

further information. . .

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-53

ICMP Message Types

0 Echo Reply3 Destination Unreachable4 Source Quench5 Redirect (change a route)8 Echo Request9 Router Advertisement

10 Router Solicitation11 Time exceeded for a datagram12 Parameter problem on a datagram13 Timestamp Request14 Timestamp Reply15 Information Request (obsolete)16 Information Reply (obsolete)17 Address Mask Request18 Address Mask Reply

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-54

Reachability Test

uses ICMP echo request and echo replyreceiver of echo request returns echo reply messageoptional data copied from echo request

corresponding tool: “ping”transmit ICMP echo requestwait for corresponding echo reply with matchingidentifier and sequence number

Type (8 / 0) Code (0) ChecksumSequence Number

0 8 16 31

Optional data. . .

Identifier

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-55

Unreachable Destinations

Router cannot forward packetdestination host cannot accept packet

Type (3) Code (0–12) Checksum

Unused (must be zero)

0 8 16 31

IP header + first 64 bits of datagram. . .

Codes0 Network unreachable1 Host unreachable2 Protocol unreachable3 Port unreachable4 Fragmentation needed

and DF set5 Source route failed6 Destination network unknown7 Destination host unknown

8 Source host isolated9 Communication with destination

network administratively prohibited10 Communication with destination

host administratively prohibited11 Network unreachable

for Type of Service12 Host unreachable

for Type of Service

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-56

Route Change

Routers are assumed to know a correct route to thedestinationhosts have minimal routing information

can be started up knowing only one routermay learn additional information from routers

Type (5) Code (0–3) Checksum

Router Internet Address

0 8 16 31

IP header + first 64 bits of datagram. . .

0 Redirect datagrams for the Net (now obsolete)1 Redirect datagrams for the Host2 Redirect datagrams for the Type of Service and Net3 Redirect datagrams for the Type of Service and Host

Codes:

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-57

Loop Detection

Due to routing table inconsistencies, packets can take loopsin a connectionless network

loop detection neededUse IP header TTL (Time to Live) field

decrement TTL when forwarding a packetdiscard packet when TTL reaches zero

Type (11) Code (0–1) Checksum

Unused (must be zero)

0 8 16 31

IP header + first 64 bits of datagram. . .

0 TTL exceeded1 Reassembly time exceeded

Codes:

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-58

Parameter Problem

Problem with IP headere.g. wrong option parametersonly if datagram has to be discarded

Pointer to problematic header octet helps identify theproblem

Type (12) Code (0–1) ChecksumUnused (must be zero)

0 8 16 31

IP header + first 64 bits of datagram. . .

Codes:

Pointer

0 Parameter problem, pointed to by Pointer field1 Required IP header option is missing,

e.g. security in secure environment

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-59

Subnet Mask

Used to request the local address mask from a routerbroadcast if no router is known

router replies to the request

Type (17 / 18) Code (0) Checksum

Sequence Number

0 8 16 31

Address Mask (reply)

Identifier

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-60

Router Advertisement

Sent periodically by routerssoft state, i.e. state is only kept for a given lifetime

Num Addrs = number of entries in data partAddr Size = size of address entries in 32 bit words

(IPv4: 1; IPv6: 4)Lifetime = life time in seconds for this advertisement

default: 30 min (1800s),periodic transmission every 10 min (600s)

Type (9) Code (0) Checksum0 8 16 31

Router Address 1Num Addrs LifetimeAddr Size (1)

Preference Level 1Router Address 2

Preference Level 2 . . .

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-61

Router Solicitation

Ask available routers to send an advertisement immediatelyused by freshly booted hostssend to broadcast address (255.255.255.255)or to the “all routers” multicast address (224.0.0.2)

Type (10) Code (0) ChecksumReserved

0 8 16 31

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-62

Chapter 2: Network Layer (et al.)

2.1 Internet Reference Model2.2 IP

2.2.1 IP Packets2.2.2 Addressing2.2.3 Fragmentation

2.3 ICMP2.4 ARP2.5 Routing

2.5.1 Principle2.5.2 Algorithms2.5.3 Protocols

2.6 UDP

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-63

Physical Network Communication

Link Layer (local / hardware) addresses are used in all localcommunications

e.g. MAC addresses in Ethernet LANSource host wants to send a packet to destination

only receiver’s IP address is knownmechanism needed to find out hardware address

“Address Resolution Problem”

ARP (Address Resolution Protocol) used to discover local(“hardware”) address for a given IP address on the localnetwork

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-64

Address Resolution ProtocolExample

Example local network

A wants to transmit a datagramto host with IP addess IPB

A G D E

C F B

A transmits an ARP broadcastto all hosts on local network,including its own IP and hardwareaddresses

A G D E

C F B B updates its ARP cache withA’s dataB sends reply back to Ausing A’s hardware addressA updates its ARP cache withB’s data

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-65

ARP PacketsExample for Ethernet and IP

Local network packets, not belonging to the IP layer

Hardware Type Protocol TypeHLEN OperationPLEN

Sender HA (octets 0–3)

Sender HA (octets 4–5)Sender IP (octets 3–4)

Sender IP (octets 0–1)

0 8 16 31

Target HA (octets 0–1)Target HA (octets 2–5)

Target IP

Operation: 1 ARP Request2 ARP Response3 RARP Request4 RARP Response

Protocol Type: 080016 = IPv4

ARP Address Resolution ProtocolHA Hardware AddressHLEN HA LengthPLEN Protocol Address LengthRARP Reverse ARP

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-66

RARP

Reverse Address Resolution Protocol

Used at host startupe.g. for diskless hostsrequires RARP server(s)determine host IP from hardware address

request sent to broadcast hardware addressreply sent to sender’s hardware addressrather than “Target HA”

RARP Ethertype = 803516

ARP Ethertype = 080616

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-67

Reverse Address Resolution ProtocolExample

Example local network

A is booted

A G D E

C F BA transmits a RARP broadcastto all hosts on local network

A G D E

C F B RARP servers C and Erecognize HAA and send areply to A including IPA

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-68

Chapter 2: Network Layer (et al.)

2.1 Internet Reference Model2.2 IP

2.2.1 IP Packets2.2.2 Addressing2.2.3 Fragmentation

2.3 ICMP2.4 ARP2.5 Routing

2.5.1 Principle2.5.2 Algorithms2.5.3 Protocols

2.6 UDP

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-69

2.5.1 Routing Principle

How to deliver a datagram?To a destination on the local network:

send the datagram directlyuse e.g. ARP to obtain corresponding hardware address

To other destinations:send the datagram via routers

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP Host A directlyconnected toB, C, D, E, F, G, R1, R2to network N1

route via R1to network N2

route via R2A G D E

C F B

R2

R1

Example Network

N2

N1

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-70

Routing Table

Basic organisation of a routing table:per entry:

all “next hops” must be on the same physical network asthe router under considerationdefault route for all other destination networks

networks need not be listed separately in the routing tableuseful when most of the Internet is reached via one router

additional host routes to individual hosts are possible

“information hiding”list only as much information as necessary

for a real example, see slide 2-80

destination_network next_hop_addressdestination_network next_hop_addressReference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-71

Routing TableExample Network

A G D E

C F B

R2

R1

N2

N1Network201.8.25.0/24

Network133.54.0.0/16

Network213.5.6.0/24

201.8.25.254

213.5.6.253

213.5.6.254

Rest of the world

133.54.6.253

N3 Network207.1.221.0/24

Host routing tables for hosts A–Gdefault 213.5.6.254201.8.25.0/24 213.5.6.253207.1.221.0/24 213.5.6.253

Host routing tables for hosts A–Gdefault 213.5.6.254201.8.25.0/24 213.5.6.253207.1.221.0/24 213.5.6.253

default route

route to class C netw. 201.8.25.0route to class C netw. 207.1.221.0

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-72

Routing Algorithm

Extract destination IP address IPD from datagram andcompute network prefix N

if N matches any directly connected network addressdeliver datagram to destination IPD over that network(resolve IPD to a physical address, encapsulate datagram,send frame)

else if the table contains a host-specific route for IPDsend datagram to next hop specified in routing table

else if the table contains a route for network Nsend datagram to next hop specified in routing table

else if the table contains a default routesend datagram to the default routerspecified in the routing table

elsereport a routing error

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-73

Forwarding a datagram

get next hop from routing tableget hardware address for next hop (ARP / ARP cache)reduce Time To Live (usually by 1)recompute header checksumsend datagram on local networkto the next hop’s hardware address

address fields in IP header are not modified!(exception: source routing option fields)

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-74

Hosts and Routers

Routerreceives datagrams on all physical networkslooks up in routing table to

forward datagrams to their next hops orforward datagrams to their destination

should know about all locally available routerstalks to other routers (“routing protocol”)(and can be addressed itself)

Hostreceives datagramssends out datagrams according to routing table

to destination if localto next hop router if non-local

can live with knowing just one router“multi-homed” host can have multiple network addresses

be careful when forwarding packets (avoid routing loops!)

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-75

Subnet Routing

Include subnet mask in routing table

check if 32bit AND of destination address and network mask inrouting table entry is equal to network address in routing tableentrynext hop still needs to be accessible on the local network

Beware of ambiguities!Use consistent subnet masks across all networks within thesame subnetted IP network

otherwise subnet broadcasting is ambiguoususe contiguous bits to form subnet maskshosts can obtain local subnet maks from router via ICMP

Subnet Mask Network Address Next HopSubnet Mask Network Address Next Hop

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-76

Subnet RoutingAlgorithm

extract destination IP address IPD from datagram

if prefix of IPD matches any of the locally connected networksforward packet to destination host via corresponding local network

elsefor each routing table entry

N = bitwise AND of IPD and subnet maskif N = network address of entry

route datagram to corresponding next hopend of “for” loop

if no matches were foundif there is a default route

send datagram to corresponding next hopelse

report a routing error

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-77

Anonymous Networking

Used for point-to-point linksno prefix/suffix assignmentavoid numbering of leased lines

host interfaces at the ends do not have IP addressesno addressing on point-to-point link (see chapter 5)

arbitrary value can be used as next-hop address

Routing Table for R1 Network Next Hop Interface201.8.25.0 direct 1207.1.221.0 207.1.221.253 2

Network Next Hop Interface201.8.25.0 direct 1207.1.221.0 207.1.221.253 2

R2R1N1

Network201.8.25.0

201.8.25.254 207.1.221.253

N2Network207.1.221.0

Leased serial line

Example

no IP addresses1 2 1 2

Just for human readabilityJust for human readability

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-78

CIDR Routing

this is the standard todayInstead of one route per classful network address, routingtables contain network address and prefix length

CIDR notation, e.g. “129.211.168.0 / 21”

classless addresses are not self-identifyinglongest prefix match determines route

inefficient to search through all table entrieshashing does not work well

use e.g. Binary Trie structures to store and look up routeslevel compressed trierouting lookup realized in hardware on today’s routers

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-79

How does it work?

How is a routing table built?Use routing algorithms (2.5.2)communicate viarouting protocols (2.5.3)

Protocols and algorithmsare coupled

RoutingAlgorithm

Tableupdates

datagramsto be routed

ForwardingEngine

RoutingTable

Routingprotocol

send datagramto next hop(physical address)

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-80

Routing Table Example

#show ip rout

Protocol/Route type codes:

I1- ISIS level 1, I2- ISIS level2,

I- route type intra, IA- route type inter, E- route type external,

i- metric type internal, e- metric type external,

O- OSPF, E1- external type 1, E2- external type2,

N1- NSSA external type1, N2- NSSA external type2

Prefix/Length Type Next Hop Dist/Met Intf

------------------ ------- --------------- -------------- ---------------------

10.7.0.0/29 O-I 10.7.0.9 110/6 FastEthernet1/7

10.7.0.8/29 Connect 10.7.0.10 0/0 FastEthernet1/7

10.7.0.16/29 O-I 10.7.0.9 110/2 FastEthernet1/7

10.7.0.24/29 Connect 10.7.0.25 0/0 FastEthernet1/5

10.7.0.32/29 Connect 10.7.0.33 0/0 FastEthernet1/6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-81

2.5.2 Routing Algorithms

For a given topology, find out the shortest path to eachdestination.

Challengesavoid loopsreact to failuresreact to topology changesdiscover topology

Distance Vector AlgorithmsLink State Algorithms

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-82

Distance Vector Routing

Also known as Bellman-Ford algorithmPrinciple: keep a list of all known routes in a table

per entry: destination and distance (e.g. number of hops)

initialize table with directly connected networkssend routing table periodically to all other routers reacheddirectly

“distance vector”: pairs of (destination, distance) elementsreceiver updates its table

add new destinationsmodify next hop if necessary(add one hop to advertised distances!)

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-83

Distance Vector RoutingExample

InitialisationR1 N2N1Destination Distance Next Hop

N1 0 directN2 0 direct

Destination Distance Next HopN1 0 directN2 0 direct

some time later

Dest. Dist. Next HopN1 0 directN2 0 directN4 8 R2N7 5 R3N8 6 R4N10 2 R5N12 2 R4

Dest. Dist. Next HopN1 0 directN2 0 directN4 8 R2N7 5 R3N8 6 R4N10 2 R5N12 2 R4

Dest. Dist.N1 2N4 3N7 6N8 5N9 3N10 9N12 4

Dest. Dist.N1 2N4 3N7 6N8 5N9 3N10 9N12 4

Update from R4

New next hop

New destination

Update distance

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-84

Distance Vector RoutingProperties

easy to implementextra loop prevention mechanisms may be neededlarge message exchangedslow convergence after route changes

incorrect information can cause loss of connectivity or routingloops“count to infinity problem” -> low maximum allowed distanceneeded

Example

after loss of connection between R3 and N1

R1 N1R2 R3

R1 N1R2 R3

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-85

Link State Routing

Also known as “shortest path first” (SPF)

Each router has complete topology informationgraphnodes = routersedges = links (only if two routers can communicate directly)interface cost and link cost metrics

Router actionsactively test status of all direct links(with tolerance: k out of n HELLO packets must be received)distribute link status information to all other routers (broadcast)compute new shortest paths using Dijkstra’s Shortest Pathalgorithm on the graph

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-86

2.5.3 Routing Protocols

Routing protocols used todiscover routespropagate route informationvalidate routescheck route consistency

Autonomous System (AS)group of networks and routers controlled by a singleadministrative authorityhidden networks advertised to other AScentral assignment of AS numbers

each AS can choose a different routing protocol

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-87

Inter- and Intra-AS communication

Communication between different Autonomous Systemsexterior gateway protocols (EGP)propagation of reachability informationrouting metrics are not communicated or interpretedinternal structures are hidden

Communication within Autonomous Systemsinterior gateway protocols (IGP)propagation of reachability informationpropagation of routing metrics (distance, cost, etc)optimisation possible using internal structure information

AS2AS1 R1 R2

Exteriorgatewayprotocol

IGP 1used IGP 2

used

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-88

Protocol Overview

Exterior Gateway ProtocolsBorder Gateway Protocol (BGP), currently BGP-4

Interior Gateway ProtocolsOSPF (Open Shortest Path First)IS-IS (from OSI standards)IGRPRIP (Routing Information Protocol)

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

IS Intermediate System

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-89

BGP

an exterior gateway protocolcoordinates information released from different BGP routerswithin the same ASpropagates reachability informationsupplies next-hop informationmixture between distance-vector and link state protocolpolicy can hide selected parts of an ASruns over TCP (reliable transport!)communicates changes as incremental updatessupports CIDRsupports route aggregationsupports authentication (sender of messages can beverified)implemented in Unix gated

AS Autonomous SystemBGP Border Gateway ProtocolCIDR Classless Inter Domain RoutingTCP Transmission Control Protocol

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-90

BGP (2)

Message TypesOpen initialize communicationUpdate advertise or withdraw routesNotification response to an incorrect messageKeepalive actively test peer connectivity

Marker in message headerallows message delineation from octet stream delivered by TCP

additional configuration needed in case of multipleinterconnections

routing arbiter system: one route server running BGP

metric transformation allows interworking with IGPsroutes between hosts in the same AS should not leave the AS

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-91

RIP

an interior gateway protocol(implemented by Unix routed)distance-vector protocol

no explicit loop detectionlow value (16) for maximum possible distance“count to infinity” problem after loss of connectivity

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-92

OSPF

Link state protocoleach router computes next hops via shortest path routingalgorithm (Dijkstra)link state is supervised using HELLO messages(aggregated) link state updates are flooded through the networksupport for host specific, subnet specific and classless routesload balancing support (alternative routes) in ECMP mode(equal cost multi path)

further propertiesOpen specification without license fees (-> “open” SPF)one route per IP Type of Service possiblepartitioning of networks into “areas”authenticated information exchange possiblesupport for hardware broadcast capabilitysupport for abstract virtual network topology

Message typesHello (test reachability)Database description (topology)Link status requestLink status updateLink status acknowledgement

Reference Model

IP

ICMP

ARP

RoutingPrincipleAlgorithmsProtocols

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-93

Chapter 2: Network Layer (et al.)

2.1 Internet Reference Model2.2 IP

2.2.1 IP Packets2.2.2 Addressing2.2.3 Fragmentation

2.3 ICMP2.4 ARP2.5 Routing

2.5.1 Principle2.5.2 Algorithms2.5.3 Protocols

2.6 UDP

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-94

2.6 UDP

User Datagram ProtocolIP protocol number 17offers an interface to send IP packets

unreliable connectionless datagram serviceuses IPadditional address (“port number”) to distinguish betweendifferent communication relations

low additional complexity and overhead to IPhigher layer protocol needed to deal with

packet losspacket re-orderingpacket duplicationloss of connectivity

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-95

UDPFormat

UDP header and packet format

UDP Source Port UDP Destination PortUDP ChecksumUDP Message Length

Data. . .

0 8 16 31

source port, destination port: 16 bit numberssource port is optional (0 if unused)reference allowing to reply to a packet

length: number of octets in UDP header and data fields(minimum: 8)

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-96

UDPFormat (2)

Checksumoptional (0 if not used)also secures data field (in contrast to IP checksum)same algorithm as for IP header (one’s complement sum)use “11...1” representation of zero if result is zero(to distinguish from “not used” option)computation includes “pseudo header”

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-97

Reference Model

IP

ICMP

ARP

Routing

UDP

UDPPseudo Header

Additional values used to compute the UDP checksumsource and destination IP addressesprotocol numberUDP datagram length (without pseudo header)to check correct destination

not transmitted, but values obtained from IP module

UDP Source Port UDP Destination PortUDP ChecksumUDP Message Length

Data . . .

0 8 16 31Source IP Address

Destination IP AddressProtocol UDP LengthZero

Padding (zero) Padding to n x 16bit

UDP PDU (transmitted)

UDP Pseudo Header (obtained from IP layer)

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-98

Well known UDP port numbers

Port (dec.) keyword description0 – reserved7 echo echo what is received9 discard discard all received information13 daytime answer with date and time19 chargen character generator53 domain Domain Name Server (DNS)67 bootps bootp or DHCP server68 bootpc bootp or DHCP client69 tftp trivial file transfer protocol88 kerberos Kerberos security service111 Sun rpc Sun remote procedure call (portmapper)123 ntp Network Time Protocol161 snmp Simple Network Management Protocol162 snmp-trap SNMP trap (active notifications)

many services blocked due to security concernslonger list: see RFC1700

Reference Model

IP

ICMP

ARP

Routing

UDP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 2 Edition Summer 2004 2-99

Questions

2.1 What routes are configured in your end system?2.2 How many networks does University of Stuttgart use? How many

Class B networks?2.3 How many internet domains (third-level)?2.4 Why can reassembly only be done at the final destination?2.5 Examine the routing tables of hosts you have access to

(Hint: Use the “route“ or “netstat” tools)2.6 How does the “traceroute” program work?2.7 Modify the routing algorithm (2-71) to include source routing2.8 Which ICMP messages does a router generate?

2.9 Devise a simple protocol to recover from packet loss.2.10 What would you describe as fairness?2.11 Test the throughput on your local network with n parallel TCP

connections (n=1,2,3,4)2.12 Test the throughput on the Internet with n parallel TCP

connections.

Reference Model

IP

ICMP

ARP

Routing

UDP

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 3: Transport Layer

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-3

3. Transport Layer

Transport Layer information is only evaluated by endsystems

connection state is only present in end systemsexceptions: Layer 4 switching, etc

IP routers just forward packetsconnectionless packet switching“best effort” delivery

Transport protocols can provide reliable service

Internet Speciality:Transport Layer instead of Network Layer is responsible forcongestion control / overload controlcompliance problem!

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-4

Chapter 3: Transport Layer

3.1 TCP (Transmission Control Protocol)3.1.1 Overview3.1.2 Reliable Transport3.1.3 TCP Header3.1.4 Reliable Transport in TCP3.1.5 Connection Concept

3.2 TCP Flow and Congestion Control3.2.1 Principle3.2.2 Congestion Control Algorithms: Tahoe, Reno, Vegas3.2.3 TCP Performance3.2.4 Extensions

3.3 Assigned Numbers

3.4 Other Transport Protocols3.4.1 SCTP3.4.2 RTP

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-5

3.1 TCP

Transmission Control Protocol

specified in RFC793 (Sep. 1981)clarified in RFC 1122 (Oct. 1989)

Some additions:Extensions for long delay [RFC 1072]Big Windows [RFC1106, RFC1110]Selective Acknowledgement [RFC 2018]Increasing TCP’s Initial Window [RFC 2414]NewReno Fast Recovery [RFC 2582]

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-6

3.1.1 Overview

Stream oriented transport protocoluser data taken as octet (byte) streamdelivered in the same octet sequence

Virtual Circuit Connectionbuilds connection oriented service above connectionless layer(IP)

Buffered TransferTCP can collect user data from multiple user calls into onepacketincreased efficiency (less TCP/IP overhead per user data octet)“push”: deliver the data now (not necessarily as a singlepacket!)

Unstructured Streamapplication programs must define and parse stream formats

Full Duplex Connectionno need for opening a separate reverse connectionpiggy-backing of protocol control information

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-7

User Interface

Openactive: open a connection to a communication partnerpassive: be ready to accept connections from a communicationpartner

Closetransmit remaining data, then close the connection

Sendsubmit data to transmitunstructured octet stream“push” if no more data are to come(e.g. when waiting for partner’s application layer protocol toanswer)

Receiveaccept received data from network

Statuscheck connection status

Abort

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-8

3.1.2 Reliable Transport

Basis: unreliable connectionless Network Layerprotect against

lost packetsduplicated packetsout-of-order delivery of packets

Positive Acknowledgementsreceiver sends ACK in backward directionrequires duplex connection

Retransmissionssender starts timer after transmissionrepeat packet if no ACK received after timeout

[remember: negative ACKs are not generally possible]

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-9

Reliable TransportPositive Acknowledgments, Retransmission Timer

Choice of Timer valuelong enough to allow for network and host delaysshort enough to ensure fast reaction to packet loss

Sender

Tim

e

Receiver

Data Packet #1

ACK #1Set Timer

Data Packet #2

ACK #2

Data Packet #3

ACK #3

Reset Timer

Set TimerReset Timer

Set TimerReset Timer

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-10

Reliable TransportPacket Loss

SenderTi

me

Receiver

Data Packet #2

ACK #2

Set Timer

Timer expires

Data Packet #3

ACK #3

ACK #3

Data Packet #3Set Timer

Timer expires

Set TimerReset Timer

Set TimerReset Timer

Data and ACKpackets can be lost

!Data and ACKpackets can be lost

!

PacketLoss

Data Packet #2

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-11

Transmission Window

One data packet per round-trip timeone-bit sequence numbers are sufficient“alternating bit protocol”

Tim

e

Data Packet #1

ACK #1

Data Packet #2

ACK #2

Data Packet #1Data Packet #2

Data Packet #3ACK #1ACK #2

Idea: Allow more packets per RTTdecrease idle time

Tim

e

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-12

Transmission Window (2)

Larger transmission windowtransmit more packets untilacknowledgement is needed“sliding window”line speed can be reachedlonger sequence numbersneeded to avoid ambiguity

more packets to repeat after loss

Tim

e

Data Packet #1Data Packet #2Data Packet #3Data Packet #4

ACK#1

Data Packet #5ACK#2ACK#3

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-13

3.1.3 TCP Header

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

User data ...

Source Port

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 10 1 2 3

Destination Port

Sequence NumberAcknowledgement Number*

Window*

ChecksumOptions Padding

Bit positions:

Source: RFC793 (September 1981)

Urgent Pointer

HLEN reserved FIN

SYN

RST

PSH

AC

KU

RG

* Field refers to data transmissionin reverse direction (piggy-backed)

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-14

TCP HeaderFields

Source Port (16 bits)Destination Port (16 bits)

TCP layer “addresses”0 reserved1–1023: privilegedused to be equivalent to “trusted” in times whenroot access to machines was supposed to be well controlledClient-Server communication:

client program allocates a port (usually above 1023)server contacted at well-known port (see Section 3.3)

connection identification by 5-tupletwo IP addresses, protocol number, two port numbers

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-15

TCP HeaderFields (2)

Sequence Number (32 bits)initialized (“synchronized”) at connection set-upassociated with transmitted octet, not packet

allows different packetization for retransmissionnumber of the first data octet transmitted in the segment

exception: connection set-up (SYN) gives Initial Sequence Number(ISN),first data packet has number ISN+1

32-bit numberunique during lifetime of corresponding packetsufficient for 4GBe.g. 32s at 1Gbit/s

Acknowledgement Number (32 bits)gives number of next octet expectedrefers to reverse direction data flow (“piggy-backing”)RFC 793: “Acknowledgment”

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-16

TCP HeaderFields (3)

HLEN (4 bits)length of the TCP header (without IP) in 32bit wordsindicates position of first data octet in 32bit wordsRFC793: “data offset”TCP header length is always an integer of 32 bit

Reserved (6 bits)reserved for future usemust be zero

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-17

TCP HeaderFields (4)

Control Bits (6 bits)bit = 1 meansURG “Urgent Pointer” field is validACK “Acknowledgement Number” field is significantPSH user process requested a “push”RST Reset (abort) the connectionSYN Synchronize sequence numbers (set-up connection)FIN No more data from sender (close connection)

Window (16 bits)number of octets the sender of this segment is willing to acceptstarting at octet number “Acknowledgment Number”field refers to reverse direction data flow (“piggy-backing”)

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-18

TCP HeaderFields (5)

Checksum (16 bits)one’s complement of 16bit one’s complement sum of

TCP headeruser dataTCP pseudo header prepended“zero” octet appended if needed to make the whole segment havean integer number of 16bit words

Pseudo header:

created from information received in the IP headersecures important information to identify a connectionTCP Length = number of octets in TCP header plus data withoutpseudo header (computed)

0 8 16 31

Source IP AddressDestination IP Address

Protocol TCP LengthZero

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-19

TCP HeaderFields (6)

Urgent Pointer (16 bits)only meaningful if the URG control bit is setused to indicate urgent data in the data fieldpositive offset from the sequence number of the segmentpoints to the sequence number of the first octet after the urgentdata(= number of “urgent” octets in the data field)used to send “out of band” data to applications ignoring normalinpute.g. to send a software interrupt to a program in a Telnetsession

Options (variable length)zero or more TCP optionsCase 1: single octet optionCase 2: option type (1 oct.), option length (1 oct.), option data

Padding (variable length)makes the TCP header length an integer multiple of 32 bits

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-20

TCP Options

Usage is optionalOption Length in multi-octet options (8 bits)

gives number of octets in (option type + option length + optiondata)

OptionsEnd of Option List

Type = 0; one octet onlyNo Operation

Type = 1; one octet onlyMaximum Segment Size

Type = 2; Length = 4 octetsused in SYN segments to indicate the maximum segment sizeto be receivede.g. MSS = MTU-40 or result of path MTU discovery

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-21

TCP Segment Size

Maximum given by “Maximum Segment Size” (MSS)per directiondefault: 536 octetsi.e. 576 octets IP datagram including standard IP and TCPheaders

segment size too smalllarge overhead due to sending one IP and TCP header persegment

segment size too largerisk of fragmentationIf one fragment of a segment is lost, the whole segment mustbe retransmitted (no reliable transport on the IP Layer).

Path MTU discovery [RFC 1191]send large segment with IP “don’t fragment” bit setreduce packet size and retryuntil no ICMP “fragmentation needed” message comes back

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-22

3.1.4 Reliable Transport in TCP

Send Segmentsegmentize send buffersend segment with piggybacked current acknowledgementput segment into retransmission buffer and set retransmissiontimer

Receive Segmentput data into receive bufferevaluate piggy-backed acknowledgement

take segment(s) from retransmission bufferreset timer

send acknowledgement (piggy-backed if possible)inform user process about Push or Urgent data

Retransmission Timeoutsend first segment in retransmission queue againre-initialize retransmission timerwait for acknowledgement(different implementations!)

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-23

Reliable Transport in TCP (2)

32 bit Sequence and Acknowledgement Numberscumulative acknowledgements

ACK gives “next octet expected”i.e. acknowledgement of all contiguously received octetssegments received after lost packet cannot be acknowledged[NACK would be possible here!]

Retransmission if acknowledgement is missing after timeoutadaptive timeout trying to follow network delay (route and loadchange)avoid unnecessary timeoutsallow fastest possible reaction to loss

Retransmission can include more data than the originalsegment!

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-24

Retransmission Timer

Adaptive timeout valueadapt to a wide variety of network delays

Estimate round trip time (RTT)record time between sending a segment and receiving itsacknowledgement

Exponential average (old specification)

smoothing factor α∈ (0,1) determines reaction speedα→0 : fast response; α→1 : stable value but slow response

Retransmission Timeout = β⋅RTTavgβ=1 : no delay tolerance, fast detection of packet lossβ>1 : fewer unnecessary retransmission, slower loss detection

ProblemHigh variance of network delay (high load) leads tounnecessary retransmissions -> include observed variance

newSampleoldavg RTTRTTRTT ⋅α−+⋅α= )1(

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-25

Retransmission Timer (2)

New (1989) specification [RFC1122]RTT samples xi

Efficient computationchoose inverse powers of 2 for δ and ρperform integer arithmetic by scaling correspondinglye.g. δ=1/8, ρ=1/4, η=2 or 4,scale results by factor of 8

i

iii

i

ii

xTOx

xxxxxx

σησρσσ

δ

⋅+=−∆⋅+=

∆⋅+=−=∆

−−

~)(

~

11

1

1

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

... average RTT

... RTT variance

... timeout heuristic

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-26

TCP Retransmission TimerExample Trace

0

20

40

60

80

100

120

140

160

1100 1150 1200 1250 1300

RTT

inm

s

Sample Number

RTTTCP Timeout

This example:Floating PointCalculation

This example:Floating PointCalculation

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-27

RTT Measurement and Timer Backoff

Acknowledgement AmbiguityIn the case of a retransmission, does the ACK correspond toa) the original orb) the retransmitted segment?a) leads to unbounded growth due to increased timeoutsb) can lead to a steady state of retransmission time < RTT

(all segments are transmitted multiple timeseven without any loss)

Consequence: No RTT update with retransmitted segments!Karn’s Algorithm:update RTT estimates with unambiguous ACKs only

in addition: Timer backoffincrease timer value for retransmission when timer expires

new timeout = γ * computed timeout

γ = 2 (increase retransmission stability)with upper boundreset to normal estimate for next unambiguous ACK

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-28

3.1.5 Connection Concept

Connections only exist in end systemsNetwork Layer is connectionless

No explicit connection identifier

Connection is identified by 5-tupleIP protocol number (6 = TCP)source IP addresssource portdestination IP addressdestination port

stored in “TCP Control Block” (TCB)plus internal information such as sequence numbers, timervalues etc

“Socket”“Socket”

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-29

Process Descriptions

Message Sequence Chart (MSC)Description of communication between processesexample cases only

Finite State Machine (FSM)Symbolic description of process and its communication

Process 1

Tim

e

Message 2

Process 2Message 1 Timer

State_1 State, waiting for next input

A State transitiontriggered by input Xproducing ouput Y

BX/Y

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-30

TCP Connection State MachineSummary

CLOSED

SYN_SENTSYN_RCVD

FIN WAIT_1

FIN WAIT_2 CLOSING

CLOSE WAIT

LAST-ACK

CLOSEDTIME WAITSource: [RFC793]

Passive Open /create TCB

Close /delete TCB

active Open /create TCBSYN

Close /delete TCB

LISTEN SEND / SYNSYN / SYN+ACK

SYN / ACKACK of SYN / . SYN+ACK / ACKCLOSE / FINCLOSE / FIN FIN / ACK

ACK of FIN / . CLOSE / FIN

ESTAB

FIN / ACK

FIN / ACKACK of FIN / . Timeout or ACK of FIN /

delete TCB

Timeout = 2MSL /delete TCB

abc receive / execute local actionFIN receive / send packet

MSL Maximum Segment Lifetime(RFC793: 2 minutes)

Start

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-31

TCP Connection State MachineTransmissions

All packet transmissions implicitly supervised by timerretransmission if not acknowledged

reception of an RST segment causes connection to go intoCLOSED statereceiving anything in CLOSED state keeps CLOSED state

In ESTAB state, all segments must carry currentacknowledgement information

Timer in connection closing procedure helps distinguish oldconnections (last ACK lost) from new ones

2 MSL = 2 maximum segment lifetimes, i.e. around 4 minutes

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-32

TCP Connection State MachinePassive Open

CLOSED

SYN_RCVD

Passive Open /create TCB

LISTENSYN / SYN+ACK

ACK of SYN / . ESTAB

abc receive / execute local actionFIN receive / send packet

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-33

TCP Connection State MachineActive Open

CLOSED

SYN_SENT

active Open /create TCBSYN

SYN+ACK / ACKESTAB

abc receive / execute local actionFIN receive / send packet

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-34

TCP Connection State MachineOther Side closes Connection

Timeout or ACK of FIN /delete TCB

CLOSE WAIT

LAST-ACK

CLOSED

FIN / ACK

CLOSE / FIN

ESTAB

abc receive / execute local actionFIN receive / send packet

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-35

TCP Connection State MachineActive Close

FIN WAIT_1

FIN WAIT_2 CLOSING

CLOSEDTIME WAIT

CLOSE / FIN

ACK of FIN / .

ESTAB

FIN / ACK

FIN / ACKACK of FIN / .

Timeout = 2MSL /delete TCB

abc receive / execute local actionFIN receive / send packet

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-36

Connection Set-up

Message SequenceExample: Active Open at Host 1 after Passive Open at Host 2

Host 1 Port ATi

me

SEQ=y, ACK=x+1, CTL=SYN+ACK

Host 2 Port B

SEQ=x, CTL=SYN

SEQ=x+1, ACK=y+1, CTL=ACK

“Three-Way Handshake”Synchronisation of sequence numbers

Passive Open

Active Open

CLOSED LISTEN

SYN RECEIVED

ESTABLISHED

SYN SENT

ESTABLISHED

CLOSED

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-37

Connection Release

Message SequenceExample: Host 1 closes connection

Host 1 Port A

Tim

e

SEQ=y, ACK=x+1, CTL=ACK

Host 2 Port B

SEQ=x, ACK=y, CTL=FIN+ACK

SEQ=x+1, ACK=y+1, CTL=ACK

CLOSE

ESTABLISHED ESTABLISHED

LAST ACK

CLOSED

FIN WAIT_1

TIME WAIT

inform application

FIN WAIT_2 SEQ=y, ACK=x+1, CTL=FIN+ACK CLOSE

CLOSE WAIT

TIMEOUT = 2 MSLCLOSED

TCPOverviewReliable Transp.TCP HeaderReliable Transp.

in TCPConnections

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-38

Chapter 3: Transport Layer

3.1 TCP (Transmission Control Protocol)3.1.1 Overview3.1.2 Reliable Transport3.1.3 TCP Header3.1.4 Reliable Transport in TCP3.1.5 Connection Concept

3.2 TCP Flow and Congestion Control3.2.1 Principle3.2.2 Congestion Control Algorithms: Tahoe, Reno, Vegas3.2.3 TCP Performance3.2.4 Extensions

3.3 Assigned Numbers

3.4 Other Transport Protocols3.4.1 SCTP3.4.2 RTP

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-39

3.2 TCP Flow and Congestion Control

TCP Flow Control serves two purposes:

Receiver Flow Controladapt sender data rate to receiver speedprevent buffer overflow at receiverreceiver advertises available buffer space

Network Congestion Controlavoid network overloadprevent packet loss at router buffers in the network“fair sharing” of rates between all TCP connectionson a bottleneck link“elastic traffic”: connection bit rate variesaccording to available capacityTCP traffic cannot adequately be described by a rate profile

In the OSI model, this would

be a Network Layertask!In the OSI model, t

his would

be a Network Layer task!

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-40

Window based flow control

Rate is determined by transmission window sizenumber of unacknowledged packets / octetsa sender is allowed to transmit

Tim

e

Transmission Window = 1

Tim

e

Transmission Window = 2Ti

me

Transmission Window = 4

...

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-41

3.2.1 Principle

Transmission Window determined from minimum ofadvertised receiver windowcongestion window

Flow Control Issueszero window probingSilly Window Syndrome avoidance

Congestion Control Problems and Tasksstabilityfairness

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-42

Zero Window Probing

Receiver advertises windowreceiver buffer gets filled upwindow size = 0 given in ACKsender stops transmitting

maybe except for URGent datareceiver application empties bufferreceiver transmits second ACK with positive window sizesender transmits data

ACKs are not protectedif ACK with window>0 gets lost, connection could hang forever

sender probes zero windowsstart after one retransmission timeoutincrease probing interval exponentially (exponential backoff)

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-43

Silly Window Syndrome

ScenarioReceiver buffer completely filledapplication empties buffer by accepting small blocks (e.g. 1octet)receiving TCP sends ACK with small advertised window (1octet)sender transmits small amount of data (1 octet)

Consequencemany small packets transmittedhigh overhead due to packet headers

Countermeasuresreceiver side: delayed acknowledgementssender side: delayed transmission (Nagle’s Algorithm)

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-44

Delayed Window Update

Idea: avoid sending insignificant window size updateseither: send ACK segment but do not change window sizeor: delay sending ACK segment

After advertising a window size of zero:Update window size only if it is at leasthalf the available buffer or one MSS

Delay sending ACK segments (recommended)after changes in the receive bufferafter receiving a data segment

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-45

Delayed Acknowledgements

Send an ACK packet only ifreceive window has significantly changed (see 3-44) or500ms have passed since a segment to be acknowledged hasarrived oranother segment has arrived beforeand has not been acknowledged yet

→ Increase chance of piggybacking ACK on answer packetcharacter echo in telnet etc.protocol response in ftp-control, http etc.

→ Increase chance of ACK updating the window size→ Decrease network traffic due to ACK packets

cumulative ACK

Disadvantagesincreased chance of timeoutsaccuracy of RTT estimates reduced due to fewer samples

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

at least every 2nd segment

will be acknowledgedat least every 2

nd segment

will be acknowledged

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-46

Nagle’s Algorithm

TCP collects data before transmitting a segmentwait long enough to limit overheadtransmit fast enough to ensure deliveryif higher level protocol is waiting

Nagle’s Algorithmput data into output bufferIf still waiting for an ACK, wait until

MSS can be filled orACK arrives

Do this even if PUSH was requested

This algorithm is self-clockingsimple operationno need for extra timer

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-47

3.2.2 TCP Congestion Control Algorithms

see also RFC2001:W. Stevens, “TCP Slow Start, Congestion Avoidance, Fast

Retransmit and Fast Recovery Algorithms”, Jan. 1997

Congestion control controls the bit rates of TCP connectionsachieve “fair share” for each connectionreduce unnecessary retransmissions due to packet loss inroutersavoid “congestion collapse”

Principleincrease rate until

congestion is observed (packet loss) ormaximum sender transmission rate is reached ormaximum receiver advertised window size is reached

decrease rate if packet is lost

Rate is controlled via the transmission window size“congestion window” (CWND)

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-48

Multiplicative Decrease

When a packet is lostassume the reason isnetwork congestionreduce congestion windowby halfdouble the retransmissiontimer for the remainingpackets (backoff)

Packet loss detectedretransmission timeoutduplicate ACK(can be regarded as NACK)

200–299

...

0–99100–199

300–399400–499500–599

ACKNo.

100200

200200200

200–299

600600–699

Tim

e

Example for dupACK detectionand Fast Retransmit

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-49

Additive Increase

Also called “Slow Start”start with CWND ofone segmentincrease by onefor each ACK received

...Start slow, but not

slowly!Start slow, but notslowly! Ti

me

CWND/MSS1

2

34

56789

CWND growthlinear increaseover segment numberexponential increaseover time

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-50

Congestion Avoidance

Limit exponential growth of congestion window“Threshold” = half the window size before previous lossSSTHRESH = CWND/2When threshold is reached:increase window by 1 segment only when all segments in thewindow have been acknowledgedlinear increase of the window over time

Window size computed in octets, not packetsincrease by MSS in slow start phaseincrease by MSS * MSS / windowSizein congestion avoidance phase

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-51

Congestion Control Algorithms (1)

TahoeSlow Start

start at CWND = MSSCongestion Avoidance after CWND reaching threshold valueSSTHRESHFast Retransmit

after number of duplicate ACKs (e.g. 3),retransmit segments without waiting for timeoutset SSTHRESH = CWND / 2perform slow start: set CWND = MSS

Renolike Tahoeplus Fast Recovery

after receiving dup ACKs (usually 3)Fast Retransmit (reduce CWND by half)schedule transmissions according to incoming ACKswindow size = min(AWIN, CWND+nDUP)

ACK AcknowledgementAWIN Advertised WindowCWND Congestion WindownDUP number of duplicate ACKs

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-52

Congestion Control Algorithms (2)

New Renochange in “partial ACK” handling during Fast Recoveryretain Fast Recovery status even if a second packet was lostreduce CWND by half only once

SACKTCP Option (header extension) to allow selectiveacknowledgementsonly retransmit the lost segmentsallows retransmitting more than one segment per RTT

Problem without SACK:either retransmit segments already successfully receivedor retransmit at most one segment per RTT

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-53

Congestion Control Algorithms (3)

Tahoe, Reno, SACKuse additive increase and multiplicative decreasesense congestion only through packet loss (timeout or dupACK)

Vegasreact to variation in delay as a measure of network loadtry to keep highest possible rate without loss“tolerance” range to keep CWND constant without change

needs sufficient buffer space to operate well

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-54

Congestion Control Algorithms (4)Vegas

Compute rate difference measure

increase CWND by MSS if

keep CWND constant if

decrease CWND by MSS if

Parameters: α and β (e.g. buffer space occupied in routers)

RTTCWND

RTTCWND

base

−=∆

baseRTTα<∆

basebase RTTRTTβα <∆<

baseRTTβ>∆

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-55

TCP Congestion ControlPrincipal Figure

TCP Reno trace

0

5

10

15

20

25

30

35

0 5 10 15 20 25 30

Segment Number

Cong

estio

nW

indo

wSi

ze

Slow StartSS

SS

LL LLLL

LL

LL Packet Loss

SS

Timeout

TOTO

TOTO

CACA

FRFR

CACA

Congestion AvoidanceCACA

CACA

Time in units

FRFR

FRFR Fast Recovery

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

loss process is random

(different window sizes)loss process is random

(different window sizes)

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-56

3.2.3 Performance

Steady State performance of TCP determined bypacket lossRound Trip Time (RTT)acknowledgement behaviour

Assumptions:independent packet losses with probability pconstant round trip time RTTreceiver generates b ACKs per received packet (b≤1)

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-57

Throughput Formula

Formula derived by Mathis, Semke, Mahdavi, OttM. Mathis, J. Semke, J. Mahdavi, T. Ott,

“The Macroscopic Behavior of the TCP Congestion AvoidanceAlgorithm”, ACM Computer Communication Review 27 (3) Jul.1997, available athttp://www.psc.edu/networking/papers/model_ccr97.ps(last checked April 2003)

Mean Congestion Window size

Mean Steady State Throughput (in packets per time)

bpWE

38][ max ≈

bpRTTMSSB

23=

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-58

Startup Behaviour

How long does it take until TCP can utilize the full linkbandwidth B?

No packet lossUnlimited windowsOne ACK per segmentOverhead neglectedACK size neglectedAll data segments have the same size

Parameters:Link speed (line rate) rRound trip time 2τ

including all processing delaysSegment size s

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-59

Startup Behaviour (2)

Cycles of duration RTT’

Channel steady statewhen CWND

in RTTs:

LrRTTwtw ⋅=≥ ')( 0

L

ACK

L rs

rsRTT ++= τ2'

sRTTnw n ⋅=⋅ 2)'(

⋅=

srRTTldn L'

0 Tim

e

...

CWND/MSS1

2

34

56789

RTT

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-60

Startup Behaviour (3)

time to reach steady state

data transmitted during slow start

Extensionsdelayed acknowledgementsincreased initial windows

'00 RTTnt ⋅=

snnS2

)1( 000

+⋅=

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-61

3.2.4 Extensions

Explicit Congestion Notification (ECN)set an “ECN” bit instead of dropping packets

set ECN bit if buffer levels are above a threshold,so additional packets can still be stored

control TCP congestion window without requiringretransmissionreverse transmission neededneeds support in routers and end systems

Random Early Detection (RED)avoid source synchronisation by introducing queue thresholdto randomly drop packetsindependent implementation in routers (“IP gateways”)performance improvement depends on scenario (questionable)

TCP

Congestion ControlPrincipleAlgorithmsPerformanceExtensions

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-62

Chapter 3: Transport Layer

3.1 TCP (Transmission Control Protocol)3.1.1 Overview3.1.2 Reliable Transport3.1.3 TCP Header3.1.4 Reliable Transport in TCP3.1.5 Connection Concept

3.2 TCP Flow and Congestion Control3.2.1 Principle3.2.2 Congestion Control Algorithms: Tahoe, Reno, Vegas3.2.3 TCP Performance3.2.4 Extensions

3.3 Assigned Numbers

3.4 Other Transport Protocols3.4.1 SCTP3.4.2 RTP

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-63

3.3 Assigned NumbersWell known TCP port numbers

Port (dec.) keyword description0 – reserved7 echo echo what is received9 discard discard all received information13 daytime answer with date and time19 chargen character generator20 ftp data File Transfer Protocol data connections21 ftp FTP control connections23 telnet telnet server25 smtp Simple Mail Transfer Protocol: Mail server53 domain Domain Name Server (DNS)67 bootps bootp or DHCP server68 bootpc bootp or DHCP client69 tftp trivial file transfer protocol70 gopher gopher (text based predecessor of the Web)80 http Hypertext Transport Protocol server88 kerberos Kerberos security service

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-64

3.3 Assigned NumbersWell known TCP port numbers

Port (dec.) keyword description110 pop3 Post Office Protocol version 3119 nntp Network News Transfer Protocol123 ntp Network Time Protocol137, 138, 139 netbios Netbios Name, Datagram and Session Services177 xdmcp X Display Manager Control Protocol443 https Secure Socket Layer HTTP6000 X11 X Window

longer list: see RFC1700

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-65

Chapter 3: Transport Layer

3.1 TCP (Transmission Control Protocol)3.1.1 Overview3.1.2 Reliable Transport3.1.3 TCP Header3.1.4 Reliable Transport in TCP3.1.5 Connection Concept

3.2 TCP Flow and Congestion Control3.2.1 Principle3.2.2 Congestion Control Algorithms: Tahoe, Reno, Vegas3.2.3 TCP Performance3.2.4 Extensions

3.3 Assigned Numbers

3.4 Other Transport Protocols3.4.1 SCTP3.4.2 RTP

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-66

3.4 Other Transport Protocols

Two Examples

SCTPStream Control Transport ProtocolMessage oriented reliable transport

RTPReal Time Transport Protocolunreliable transport of media stream datae.g. for voice or video streams

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-67

3.4.1 SCTP

Stream Control Transmission ProtocolGeneral Purpose transport protocolSpecified in RFC 2719 (architecture), RFC 2960 (protocol)

Datagram (message) transportFlexible out-of-order delivery

can be specified per message streamcompatible with TCP’s congestion control

tends to take same fair share of bandwidth as a TCPconnection

support of multi-homed nodesnetwork / path redundancy can increase reliability

protection against blind attacks

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-68

SCTPDatagram (Message) Transport

In contrast to TCP wherean application layer protocol has to separatemessages in a stream

Connection (“association”) oriented protocolbased on IP

could also run over UDPReliable message transport

acknowledged deliveryerror-free deliveryno duplicates delivered

Message basedfragmentation of large messages into multiple datagramsbundling (multiplexing) of small messages in one datagram

No timing guarantees

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-69

SCTPApplication

Original application: Transport of telephone signalling dataover IP

e.g. #7 (SS7) messagesSS7 MTP-2 User AdaptationSS7 MTP-3 User AdaptationIUA: ISDN Q.921 User AdaptationSUA: SS7 SCCP User Adaptation

no need for extra protocol to delineate messagesin a TCP streamcompatibility with TCP flow control allowsuse in any IP network

could be used with any application that needs reliablemessage transport

SIP control over SCTPe.g. HTTP over SCTP

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-70

SCTPConnection Set-Up

Packets are called “chunks”separation of data and control chunks

Four-way startup handshakesigned cookies prevent blind spoofingverification tags prevent insertion of extraneous packets

Cookie ACK

Host A Host BINIT(Initiate Tag A; list of IP Addresses: A1, A2, ...; Port A)

INIT ACK(Cookie; Initiate Tag B;list of IP Addresses: B1, B2, ...; Port B)

Cookie Echo (Cookie)

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-71

3.4.2 RTP

Real-Time Transport Protocoldescribed in RFC 1889uses UDP

to access IPto provide multiplexing (concurrency)multiple RTP messages can be combined into one UDPdatagram

RTCP (RTP Control Protocol)out of band communicationadapt to bandwidthcommunication about ports usedmessage types:

200 Sender Report201 Receiver Report202 Source Description Message203 Bye Message204 Application Specific Message

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-72

RTPFeatures

Port allocation etcprovides time stamps

help applications to synchronize playbackprovides sequence number

help applications to detect loss or out-of-order delivery ofpackets

different profiles defineddescribe interpretation of packet contentsuse standard codecs

Translation Supportto change contents encoding at designated nodes(media gateway)

Mixing Supportto mix e.g. several audio signals for an audio/video conference

Bandwidth allocation and scheduling not includedto be supported by IP network if needed

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-73

RTPPacket Header (fixed part)

Contributing Source ID...

Ver

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 10 1 2 3

CC Sequence NumberTimestamp

PTYPE

Synchronization Source Identifier

Bit positions:

P X M

Minimum of 12 bytes

overhead per packet!Minimum of 12 bytes

overhead per packet!

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-74

RTPHeader Fields

Version (2 bits)currently 2

P bit (1 bit)1 if zero padding follows the payload

X bit (1 bit)1 if optional header extension is presentdepends on application type

CC: source count (4 bits)maximum of 15 contributing sources is supported

M: Marker bit (1 bit)application dependentmark events in data streame.g. frame start in video streams

PTYPE: Payload Type (7 bits)determines detailed interpretation of header and contents

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-75

RTPHeader Fields (2)

Sequence Number (16 bits)identifies RTP packetsinitial sequence number chosen randomly for each session

Timestamp (32 bits)time at which the first octet of digitized data was sampled(relative)random choice of initial time stampcontinuously incrementedclock granularity depends on application

Synchronization Source Identifier (32 bits)identifies the source of a streamreal source, mixer or translatoridentification collisions resolved by protocol

Contributing Source ID (variable size, CC x 32 bits)list of source identifiers that contributed the samples mixedtogether by a mixer

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

SCTP

RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/

replace logo

IPNA Chapter 3 Edition Summer 2004 3-76

Questions

3.1 Can two TCP applications establish a connection if they bothissue an “active” open call? (Hint: Check the TCP connectionstate diagram)

3.2 Can an application open two parallel TCP connections to thesame server at the same server port?

3.3 Collect all the well-known port numbers for the protocolsshown on slide 2-11.Does each protocol have an assigned number?What would happen if a server offered a protocolon another than the well-known port?

3.4 How is message delineation done in SMTP? in HTTP?3.5 What is a “persistent connection” in HTTP?3.6 How can a computer learn its configuration using DHCP?

TCP

Congestion Control

Assigned Numbers

Other T. Protocols

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 4: Applications and Application Layer Protocols

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-3

4. Applications and Application Layer Protocols

Highest Layer of the communication reference model

Application Layer protocols are used by applicationsoffer an APIdefine data structuresdefine interaction between communication partners

Use TCP or UDP to transport data over IP

Offers API to applications or is built into applications

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-4

Chapter 4:Applications and Application Layer Protocols

4.1 Introduction4.1.1 Design Principles4.1.2 Contents Delineation4.1.3 Client-Server Paradigm4.1.4 Reply Codes4.1.5 Socket Concept

4.2 DNS

4.3 E-Mail4.3.1 SMTP4.3.2 MIME4.3.3 POP34.3.4 IMAP

4.4 HTTP

4.5 Telnet

4.6 FTP

4.7 VoIP4.7.1 Packetized Voice4.7.1 H.3234.7.2 SIP

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-5

4.1 Introduction4.1.1 Design Principle

End-to-end principlecommunication does not rely on functions in the networkend-to-end check is necessary anyway

even if Layer 3 was perfect, end systems could fail[J.H. Saltzer, D.P. Reed, D.D. Clark: “End-To-End Arguments in

System Design”,ACM Trans. Comp. Systems, Vol. 2 No. 4 Nov. 1984 pp. 277–288]

Many ASCII ProtocolsMost protocols use text based commands and replieseasier to debug (and implement) than binary coded protocols

AbstractionsNetwork Virtual Terminal (NVT)virtual file system

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

see SMTP and HTTPsee SMTP and HTTP

see telnet and FTPsee telnet and FTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-6

4.1.2 Contents Delineation

Operation of an application layer protocolexchange control messages between endpointsexchange (user) data between endpoints

control messages and user data can be larger than onepacket size→ no simple extension of the “header” concept

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

PLH

CM UD

PLH PLH PLH PLH PLH PLH

...

...

UD CM

Application Layer:

App.L.

Tr.L.

Application Layer:CM control messageUD user data

IP and TCP Layer:H TCP and IP headersPL payload

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-7

Control Message Delineation

TCP transfers an octet streammapping of protocol messages into packets is not reliable

PUSH mechanism may still deliver multiple messages perpacket (see Nagle’s algorithm in Sec. 3.2.1)messages may be longer than MSS and split across packets→ multiple packets’ payloads must be concatenated

→ messages must be delineated within the octet stream“end-of-line” codes

mostly for ASCII text message based protocolsone message per “line”“end-of-line” must be defined, e.g. as the [CR][LF] sequenceexamples: HTTP, SMTP, POP, IMAP

“type-length-value” (TLV) encodingalso used in the IP and TCP options header fieldsexample: SNMP (doing it with ASN.1, see Sec. 8.6)

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-8

Separation of Control Messages and User Data

use separate connections for control and user dataconnection endpoints must communicate aboutuser data connections to open and closeaddresses and port numbers exchanged between endpoints

→ problems with NAT, firewalls and IPv4/v6 transitionexamples: FTP, H.323, SIP (voice over IP)

special character sequences separate control and user datacharacter sequence must be escaped if it occurs in user dataexample: SMTP using “a period on a single line by itself”

content length encodingspecify content length of user data in control messagescontent length must be known in advanceeasy to get desynchronized

non-transparent networks (should not be a problem anymore)lazy programmers might mis-calculate lengths

example: HTTPIf the content length was unknown before transmission (e.g. indynamically created pages), the HTTP server closes theconnection to mark the end of a transferred element.

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

“out-of-band”“out-of-band”

“in-band”“in-band”

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-9

4.1.3 Client-Server Paradigm

Servercan be reached via an IP networkoffers a servicedenotes a software process, not a piece of hardwareaccepts connections / requests on a (well-known) portruns “forever”must be protected against incorrectly communicating clients

protocol implementation errorsnetwork and/or run-time errors (especially for UDP servers)attacks (e.g. denial of service attacks)

Clientconnects to server over an IP networkprocess runs only as long as neededcan use any port

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-10

Server Principle

Use multiple processes or threads to be able to servemultiple clients at the same timeMaster Server

open a (well-known) portwait for a new clientif necessary, choose a new local port and inform the clientstart slave process

handle one request or connection and then terminatecontinue waiting

authorization and protectionmeasures for stable / continuous operation

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-11

4.1.4 Reply Codes

ASCII based protocols use a system of reply codes toindicate success or failure status

SMTP: RFC 821FTP: RFC959HTTP V1.1: RFC 2616

3-digit codes of form xyz1st digit gives general success class indication

success / failure / action requied2nd digit can specify sub-cases within class (specified byfirst digit)3rd digit used to further specify sub-cases

communication partners (clients) need not knowall combinations

from unknown code xyz, fall back to xy0 or x00e.g. From “203 non-authoritative information” to “200 OK”

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-12

Reply CodesFirst Digit

1yz: Positive Preliminary Replyinformationale.g. Request received, continuing process

2yz: Positive Completion Reply, Success

3yz: Positive Intermediate Reply,further action required to complete the requeste.g. Redirection

4yz: Transient Negative Completion Reply, Client ErrorRequest/command contained bad syntax and cannot be fulfilled

5yz: Permanent Negative Completion Reply, Server ErrorRequest may have been valid but cannot be fulfilled by server

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-13

Reply CodesSecond Digit (in SMTP and FTP)

x0z: Syntax

x1z: Information

x2z: Connections

x3z: Authentication and Accountingreplies for login processes and accounting procedures

x4z: unspecified

x5z: File System / Mail System

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-14

Reply CodesExamples from RFC2616 (HTTP 1.1)

100 Continue101 Switching Protocols200 OK201 Created202 Accepted203 Non-Authoritative

Information204 No Content205 Reset Content206 Partial Content300 Multiple Choices301 Moved Permanently302 Found303 See Other304 Not Modified305 Use Proxy307 Temporary Redirect400 Bad Request401 Unauthorized402 Payment Required403 Forbidden

404 Not Found405 Method Not Allowed406 Not Acceptable407 Proxy Authentication

Required408 Request Time-out409 Conflict410 Gone411 Length Required412 Precondition Failed413 Request Entity Too Large414 Request-URI Too Large415 Unsupported Media Type416 Requested range

not satisfiable417 Expectation Failed500 Internal Server Error501 Not Implemented502 Bad Gateway503 Service Unavailable504 Gateway Time-out505 HTTP Version not supported

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-15

4.1.5 Socket Concept

Applications can use different levels of network abstractionuse TCP, UDP or raw IP interfaceuse higher layer abstractions (RPC, Xlib, Corba)

Socket Concept provides interface to TCP and UDP (andraw IP)

TCP/IP connects two socketssimilar to Unix file descriptor

positive integer valuebut without seek, open, permissions

“stream” communication: TCP socket“datagram” communication: UDP socket

process

Socket

Host BHost AprocessIP

NetworkSocket

TCP Connection

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-16

SocketsSystem Calls

int socket()create a socketselect protocol (TCP, UDP, Raw IP)

int bind()select a port number, maybe an IP addresssystem can choose random local port

set port number to 0for client processes

int connect()“active open”

int listen()“passive open”: wait for incoming connections

int accept()accept an incoming connectionreturns a new socket

int close()close a socket

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-17

SocketsAddress Conversion

routines provided by library

conversion between network and host byte ordernetwork to host: ntohl()host to network: htonl()16bit integer versions: ntohs(), htons()

conversion from host name to numeric address:gethostbyname()

dotted quad to integer: inet_addr()integer to dotted quad: inet_ntoa()

remember the issueabout

little/big endian systemsremember the issueabout

little/big endian systems

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-18

SocketsClient / Server Interaction

s=socket(...)

bind(s, ...)

a=accept(s, ...)

listen(s, ...)

read(a, ...)

close(a, ...)

write(a, ...)

Server

c=socket(...)

connect(c, ...)

write(c, ...)

close(c, ...)

read(c, ...)

Client

(blocking)

(blocking)

(blocking)

TCPConnectionSet-Up

request

reply

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-19

SocketsExample Web Server

Code is available fromhttp://www.jcho.de/jc/IPNA/myWebServer.cc

create socket sbind to given portlistenaccept connection

print connection source IP addressprint received datamenue to select data to send (different standard HTTP replies)close connection

Introduction

Design Principle

Delineation

Client-Server

Reply Codes

Socket Concept

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-20

Chapter 4:Applications and Application Layer Protocols

4.1 Introduction4.1.1 Design Principles4.1.2 Client-Server Paradigm4.1.3 Reply Codes4.1.4 Socket Concept

4.2 DNS

4.3 E-Mail4.3.1 SMTP4.3.2 MIME4.3.3 POP34.3.4 IMAP

4.4 HTTP

4.5 Telnet

4.6 FTP

4.7 VoIP4.7.1 Packetized Voice4.7.1 H.3234.7.2 SIP

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-21

4.2 DNS

Domain Name SystemRFCs 1034/1035, 1101, 2535server port: 53 (UDP and TCP)

Distributed Directory System for Internet Namesmap names to IP addresseslocal name servers and root name serversuse caching (-> non-authoritative answers)

Hierarchical Name Spacelabels separated by periodshypothetical example: host1.netlab.ind.ei.uni-stuttgart.de

Delegation of Authority for parts of the name spaceReverse Lookup

get name for an IP addresse.g. ask for 76.1.69.129.in-addr.arpato look up name for 129.69.1.76

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-22

DNS

Domain hierarchysubdomainshost names (same syntax as domain names)

Domain name extensionsallows resolution of partly specified domain names

e.g. “www” or “www.ei”not part of the domain name system specification (introducedby resolvers)final period suppresses extension

server hierarchyask local server firstroot name servers need to know all top level domain (TLD)servers

different hierarchies fornaming (DNS)connectivity (networks)IP address allocation

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-23

DNSResource Record TypesA Host Address 32 bit IP addressCNAME Canonical Name canonical name for an aliasHINFO CPU and OS type of CPU

and operating systemMINFO Mailbox Information information about mailbox

or mail listMX Mail Exchanger 16 bit preference value and

name of host that handlese-mail for the requested domain

NS Name Server name of an authoritativename server for therequested domain

PTR Pointer domain name(for reverse lookup)

SOA Start of Authority multiple fields giving the parts ofthe hierarchy the server isresponsible for

TXT Arbitrary Text uninterpreted string of ASCII text

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-24

DNSProtocol

Based on UDPsingle packet request (from any port x to port 53)single packet response (from port 53, mostly back to port x)

Message Format:

Question Section ...

0Identification Parameter

Number of Questions Number of AnswersNumber of Authority Records Number of Additional Records

Answer Section ...

Authority Section ...

Additional Information Section ...

16 31

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-25

DNSParameters

Bit Meaning

0 Operation 0 = Query, 1 = Response1–4 Query Type 0 = Standard, 1 = Inverse,

2,3: obsolete5 Answer is authoritative 1 = authoritative6 Message is truncated 1 = truncated7 Recursion requested 1 = recursion requested8 Recursion available 1 = recursion was available9–11 reserved12–15 Response Type 0 = No error,

1 = Format error in query2 = Server failure,3 = Name does not exist

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-26

DNSSection Formats

Question Sectionwritten by clientserver returns question along with answerto maintain context in connectionless communication

Query Domain Name ...*0 16 31

Query Type Query Class

Answer, Authority, Additional Information Sectionswritten by server

Resource Data ...*

Resource Domain Name ...*Type Class

Time to LiveResource Data Length

* arbitrary length fields,

not padded* arbitrary length f

ields,

not padded

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-27

DNSName Format

Domain names stored as sequence of “labels”succession of 1 octet length n and n octets label (ASCII)length = 0: end of namelabels restricted to 63 characters (top 2 bits of length value arezeroes)

Label00 Length 00 Length Label 00000000

11 Pointer

Repetition of domain names in packets avoided by pointersif top 2 bits of length value are set to one,interpret the following 14 bits as a pointer(offset from start of message; 0 = first octet of ID field)

e.g. a . edu

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-28

Chapter 4:Applications and Application Layer Protocols

4.1 Introduction4.1.1 Design Principles4.1.2 Client-Server Paradigm4.1.3 Reply Codes4.1.4 Socket Concept

4.2 DNS

4.3 E-Mail4.3.1 SMTP4.3.2 MIME4.3.3 POP34.3.4 IMAP

4.4 HTTP

4.5 Telnet

4.6 FTP

4.7 VoIP4.7.1 Packetized Voice4.7.1 H.3234.7.2 SIP

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-29

4.3 E-MailConcept

Message delivery to addressAsynchronous deliveryAddresses: identification@mailhost

mailhost:host name or mail exchanger (MX) entry in DNSidentification:user name, redirected mailbox or mailing list (“mail exploder”)

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Mailboxes(incoming mail)

MailServerU

serI

nter

face

MailClient

TCP/IP datatransport: SMTP

sendmail

readmail

Mail server shouldbe

online all the timeMail server should

be

online all the time

Alias Expansionand Forwarding

AliasDatabase

Spool Area(outgoing mail)

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-30

E-Mail ConceptMail Relays

E-Mail can be delivered indirectly for different reasons

Offline Mailboxesaccess e.g. via POP, IMAP

Back-Up serversuse lower priority “mail exchanger” when primary mail host isdown

Explicit (source) routingidentification%mailhost@relay

Multi-hop deliveryto build address hierarchy, hide local addresses in privatenetworksto have central mail gateway e.g. for an organisationto perform central filtering functions, e.g. Virus removal

Protocol conversion

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-31

DNS and Mail Routing

Mail client checks DNS “MX” (mail exchanger) entryoften multiple entries with different priority valuesclient tries to open an SMTP/TCP connection to the highestpriority (lowest value) mail exchangerif connection fails, try the next priority mail exchanger

Mail servers can have symbolic names for e-mail (DNS MXrecords) that are invalid host names (no A record)

often: MX record with the domain name

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-32

4.3.1 SMTP

Simple Mail Transfer ProtocolProtocol for Mail exchange between machinesspecified in RFC 821 (SMTP) and RFC 822 (message format)server port: 25 (TCP)

simple protocoltext basedcommands separated by CRLF (carriage return, line feed)sequencefew commands

several extensionsService Extensions (RFC 1869)Service Extension for Message Size (RFC 1870)8-bit MIME transport (RFC 1652)MIME (RFC 2045)

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-33

SMTPFunctions

Reply CodesHELO give client nameMAIL FROM give sender e-mail addressRCPT TO give recipients’ e-mail addressesDATA transmit a message

ended by a period (“.”) on a single lineQUIT end of conversation, close TCPconnectionAdditional Commands

TURN exchange roles of client and serverEXPN expand an aliasVRFY verify existence (correctness) of an addressRSET reset all buffers and state informationHELP send helpful informationNOOP do not do anything, just send an OKSEND, SOML, SAML: “send” function in addition to “mail”

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-34

SMTPConversation Example

Minimum conversation between client (C) and server (S)

S: 220 host-a.net readyC: HELO host-b.eduS: 250 host-a.netC: MAIL FROM:<[email protected]>S: 250 OKC: RCPT TO:<[email protected]>S: 250 OKC: DATAS: 354 Start mail input; end with <CR><LF>.<CR><LF>C: Hi, this is my test mail to you allC: which extends over a few linesC: ...C: <CR><LF>.<CR><LF>S: 250 OKC: QUITS: 221 mailserver.mynet closing connection. Thanks for your message.

S: 220 host-a.net readyC: HELO host-b.eduS: 250 host-a.netC: MAIL FROM:<[email protected]>S: 250 OKC: RCPT TO:<[email protected]>S: 250 OKC: DATAS: 354 Start mail input; end with <CR><LF>.<CR><LF>C: Hi, this is my test mail to you allC: which extends over a few linesC: ...C: <CR><LF>.<CR><LF>S: 250 OKC: QUITS: 221 mailserver.mynet closing connection. Thanks for your message.

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-35

SMTPMessage Format

Message “Envelope” given in SMTP protocolMessage Headers for addresses and functions

for SMTP, headers are part of the mail “data”Syntax: Field-name: field-body <cr><lf>

only printable ASCII characters (33–126, except colon) allowedUsual header fields

“From:” specifies the sender“To:” specifies a list of recipients“Cc:” “carbon copy” (more recipients)“Bcc:” “blind carbon copy”, recipients not to be shown“Return-Receipt-To:”

to request a mail back after delivery / reading“Subject:” the subject of the mail

extendible concepteven private (proprietary headers) can be used

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-36

SMTPExample with headers

After HELO sequence...

C: MAIL FROM:<[email protected]>S: 250 OKC: RCPT TO:<[email protected]>S: 250 OKC: DATAS: 354 Start mail input; end with <CR><LF>.<CR><LF>C: From: [email protected]: To: [email protected]: Return-Receipt-To: [email protected]: Subject: Question on SMTPC: Hi user2, do you like the SMTP protocol?C: Cheers, user3.C: <CR><LF>.<CR><LF>S: 250 OKC: QUITS: 221 mailserver.mynet closing connection. Thanks for your message.

C: MAIL FROM:<[email protected]>S: 250 OKC: RCPT TO:<[email protected]>S: 250 OKC: DATAS: 354 Start mail input; end with <CR><LF>.<CR><LF>C: From: [email protected]: To: [email protected]: Return-Receipt-To: [email protected]: Subject: Question on SMTPC: Hi user2, do you like the SMTP protocol?C: Cheers, user3.C: <CR><LF>.<CR><LF>S: 250 OKC: QUITS: 221 mailserver.mynet closing connection. Thanks for your message.

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-37

4.3.2 MIME

Multimedia Internet Mail Extensionsspecified in RFCs 2045–2049

used to encapsulate files in e-mails keeping plain text formatcontent type descriptionbase64 encoding

MIME headers“MIME-Version:”“Content-Type:”“Content-Transfer-Encoding:”

multipart messages with specification of boundary text

Unfortunately, MIME does

not specify file compression...Unfortunately, MIME does

not specify file compression...

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-38

MIMETypes

Specified in the “Content-Type:” header

text for textual documentsimage for still (at most: animated) imagesaudio for sound recordingsvideo for video recordingsapplication raw data for another programmultipart multiple parts

each part has its own content type and encoding specificationfurther specification of viewing sequence (parallel, alternative)

message a complete e-mail message orreference to a file

format can be further specifiede.g. “Content-Type: image/gif”

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-39

4.3.3 POP3

Post Office ProtocolRFC 1939server port: 110 (TCP)

protocol to access mailboxes (“maildrops”) on remotecomputers

mailbox is on a computer with permanent Internet connectivityread mail on a computer that only has a dial-up connectionsend mail via SMTP

Functionslogin (mailbox selection)authentification (password)read, delete mails

Message transfer format according to RFC822

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-40

POP3 (2)

Client commands3 or four characters ASCII, case insensitivearguments separated by a single space characterup to 40 characters per argumenttermination by CRLF

Server responsesstatus indicator (“+OK” or “-ERR”)additional information (max. 512 characters total)multi-line response terminated by CRLF.CRLF

Authorization Statecommands: USER+PASS or APOP or QUIT

Transaction Statecommands: STAT, LIST, RETR, DELE, NOOP, RSET, (TOP,UIDL)

Update Statecommands: QUIT

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-41

POP3 (3)

Example conversation between client (C) and server (S)

S: +OK POP3 server ready <[email protected]>C: APOP mrose c4c9334bac560ecc979e58001b3e22fbS: +OK mrose’s maildrop has 2 messages (320 octets)C: STATS: +OK 2 320C: LISTS: +OK 2 messages (320 octets)S: 1 120S: 2 200S: .C: RETR 1S: +OK 120 octetsS: (sends message 1)S: .C: DELE 1S: +OK message 1 deletedC: QUITS: +OK dewey POP3 server signing off

S: +OK POP3 server ready <[email protected]>C: APOP mrose c4c9334bac560ecc979e58001b3e22fbS: +OK mrose’s maildrop has 2 messages (320 octets)C: STATS: +OK 2 320C: LISTS: +OK 2 messages (320 octets)S: 1 120S: 2 200S: .C: RETR 1S: +OK 120 octetsS: (sends message 1)S: .C: DELE 1S: +OK message 1 deletedC: QUITS: +OK dewey POP3 server signing off

Source: RFC1939

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-42

4.3.4 IMAP

Internet Message Access ProtocolRFC2060server port: 143 (TCP)

protocol for remote mailbox accessreceive mailmanipulate mailboxessend mails via SMTP

in addition to POP3: mailbox managementdynamic creation, deletion, modificationof accounts / mailboxesassociation of flags to messagessearching of messagesserver can notify client of new messages during session

Introduction

DNS

E-Mail

SMTP

MIME

POP3

IMAP

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-43

Chapter 4:Applications and Application Layer Protocols

4.1 Introduction4.1.1 Design Principles4.1.2 Client-Server Paradigm4.1.3 Reply Codes4.1.4 Socket Concept

4.2 DNS

4.3 E-Mail4.3.1 SMTP4.3.2 MIME4.3.3 POP34.3.4 IMAP

4.4 HTTP

4.5 Telnet

4.6 FTP

4.7 VoIP4.7.1 Packetized Voice4.7.1 H.3234.7.2 SIP

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-44

4.4 HTTP

Hypertext Transfer Protocol (RFCs 1768, 1945, 2616, 2617)TCP used for reliable transport

server port: 80 (TCP) but others can be specified in URLbi-directional transport for request/response

Request/response operationStateless

self-contained requestsno state kept in serveraugmented by the “cookies” concept (store state in clients)

Capability selectionclient lists e.g. supported character sets, server selects one

Caching supportHTTP allows to retrieve file properties only (“HEAD” method)

Support for proxies

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-45

HTTPProperties, Addresses and Commands

Simple protocol to retrieve (and submit) filesmuch simpler than ftp

methods to retrieve (and send) filesGET, HEAD, POST, PUT, OPTIONS, DELETE, TRACE,CONNECT

headers (like E-Mail) to transport additional informationUniform resource locator (URL) for addressing

“http://” hostname [ “:”port ] [ abs_path [ “?”query ] ]relative URL: without the “http:// hostname” [“:”port] part

Markup language HTML describes structured contentsMIME notation to inform receiver about file types

in addition, receivers judge file types from file name endingsHTTP proxies as gateways for

SMTP, NNTP, FTP,Gopher, WAIS

Byte-range requestsallow completion ofinterrupted transfers

FTP File Transfer ProtocolHTML Hypertext Markup LanguageMIME Multipurpose Internet Mail ExtensionsNNTP Network News Transfer ProtocolSMTP Simple Mail Transfer ProtocolURL Uniform Resource LocatorWAIS Wide Area Information Service

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-46

HTTPHTML

Hypertext Markup Languagefirst versions defined in RFCs 1866, 1867, 1942nowadays developed in W3C (World Wide Web Consortium,w3c.org)

Tags<x> to start environment x</x> to end environment x

Page contentstextimageshyperlinks

Page layout informationstructuringframes

Page meta informationauthor, tools, keywords

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-47

HTMLExample

<HTML><HEAD><TITLE>Example Page</TITLE></HEAD><BODY BGCOLOR=“#FFFFC0”><H1>Example Heading</H1> This is just a test page.Lecture material is available in <AHREF=“http://www.jcho.de/jc/IPNA/”>this place</A>.</BODY></HTML>

<HTML><HEAD><TITLE>Example Page</TITLE></HEAD><BODY BGCOLOR=“#FFFFC0”><H1>Example Heading</H1> This is just a test page.Lecture material is available in <AHREF=“http://www.jcho.de/jc/IPNA/”>this place</A>.</BODY></HTML>

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-48

HTTPError Messages

Sent in HTMLPage title (<TITLE></TITLE>) contains 3-digit reply code

reply messages are often configurablereply codes see page 4-14

Example:<HTML><HEAD><TITLE>400 Bad Request</TITLE></HEAD><BODY><H1>Bad Request</H1> Your browser sent arequest that this server could not understand.</BODY></HTML>

<HTML><HEAD><TITLE>400 Bad Request</TITLE></HEAD><BODY><H1>Bad Request</H1> Your browser sent arequest that this server could not understand.</BODY></HTML>

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-49

HTTPPersistent Connections

More than one item transfered in one connectionHTTP/1.0: requested by “Connection: Keep-alive” headerdefault in HTTP/1.1

require indication of content length (“Content-Length”header)for dynamic pages, the length is not known beforetransmission

server notifies the clientsends “Connection: close” header instead of “Content-Length”

closes the connection after transmission (see p. 4-8)

Pipelining (HTTP/1.1)send multiple GET requests without waiting for responseincrease TCP efficiency for transfers of small elementsproblem with servers closing connections

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-50

HTTP Requests and Persistent Connections

DataTransfer

GET...

Data

ACK

TCPConn.Release

FIN

FIN+ACK

ACK

TCPConn.Setup SYN+ACK

ACK

SYN

Client ServerMinimum connection

Clie

nt

Ser

ver

SYNSYN+ACK

ACKKeep-alive + GET

Data

FIN

GET

Data

ACK

GET+ACKData

ACK

Tim

eout

(e.g

.15s

ec)

Tim

eout

(e.g

.15s

ec)

Persistent connection

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-51

HTTPCaching and Proxies

Cachingstore file locallyuse local copy when same file is requested againreduce network trafficageing mechanism

retrieve again only if local copy is “old”conditional requests

retrieve again only if file has changede.g. “If-Modified-Since: Sun, 03 Jun 2001 16:12:25 GMT”server can respond with “304 Not Modified”

browser can force revalidation of pageProxy Support

used to separate networksoften combined with cachingexplicitly supported in HTTP/1.1

e.g. “Max-Forwards:” header

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-52

HTTPFormat Negotiation

Browser can tell server what formats, encodings, etc usersprefer

“Accept:” headere.g.Accept: text/html, text/plain; q=0.5, text/x-dvi; q=0.8gives format and preference (“quality”) value

q=0: not acceptableq=1: full willingness to accept this type (default)

Other headers“Accept-Encoding:”“Accept-Charset:”“Accept-Language:”

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-53

HTTPExample Conversation

C opens TCP connection to port 80 on serverC: GET / HTTP/1.0C: Connection: Keep-AliveC: User-Agent: Mozilla/4.61 [en] (X11; I; Linux 2.2.10 i686)C: Host: localhost:80C: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*C: Accept-Encoding: gzipC: Accept-Language: enC: Accept-Charset: iso-8859-1,*,utf-8C:S: HTTP/1.1 200 OKS: Date: Sun, 03 Jun 2001 16:56:44 GMTS: Server: Apache/1.3.6 (Unix) (SuSE/Linux)S: Last-Modified: Mon, 06 Sep 1999 13:37:02 GMTS: ETag: "1f042-717-37d3c37e"S: Accept-Ranges: bytesS: Content-Length: 138S: Keep-Alive: timeout=15, max=100S: Connection: Keep-AliveS: Content-Type: text/htmlS:S: <HTML>

C opens TCP connection to port 80 on serverC: GET / HTTP/1.0C: Connection: Keep-AliveC: User-Agent: Mozilla/4.61 [en] (X11; I; Linux 2.2.10 i686)C: Host: localhost:80C: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*C: Accept-Encoding: gzipC: Accept-Language: enC: Accept-Charset: iso-8859-1,*,utf-8C:S: HTTP/1.1 200 OKS: Date: Sun, 03 Jun 2001 16:56:44 GMTS: Server: Apache/1.3.6 (Unix) (SuSE/Linux)S: Last-Modified: Mon, 06 Sep 1999 13:37:02 GMTS: ETag: "1f042-717-37d3c37e"S: Accept-Ranges: bytesS: Content-Length: 138S: Keep-Alive: timeout=15, max=100S: Connection: Keep-AliveS: Content-Type: text/htmlS:S: <HTML>

S: <HEAD>S: <TITLE>Test Page</TITLE>S: </HEAD>S: <BODY bgcolor=#ffffff>S: <H1>Test Page</H1><BR>S: This is a test page.S: </BODY>S: </HTML>

S: <HEAD>S: <TITLE>Test Page</TITLE>S: </HEAD>S: <BODY bgcolor=#ffffff>S: <H1>Test Page</H1><BR>S: This is a test page.S: </BODY>S: </HTML>

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-54

HTTPState Information

HTTP is a “stateless” protocolserver does not maintain any request related informationbeyond request completion

“Cookies” can be used to store request related informationin browser

described in RFC 2109“Set-cookie:” header

set cookie in browser“Cookie:” header

browser sends cookie along with requestspecial cache control requiredCookie contains

name, valueoptional: comment, domain, max. age, path, security info,version number

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-55

Chapter 4:Applications and Application Layer Protocols

4.1 Introduction4.1.1 Design Principles4.1.2 Client-Server Paradigm4.1.3 Reply Codes4.1.4 Socket Concept

4.2 DNS

4.3 E-Mail4.3.1 SMTP4.3.2 MIME4.3.3 POP34.3.4 IMAP

4.4 HTTP

4.5 Telnet

4.6 FTP

4.7 VoIP4.7.1 Packetized Voice4.7.1 H.3234.7.2 SIP

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-56

4.5 Telnet

RFCs 854 (Telnet), 855 (Options concept)options in RFCs 856–861, 884, 885, 1041, 1091, 1096,1097, 1184, 1372, 1416, 1572server port: 23 (TCP)

Provides a local login service remotelyNetwork Virtual Terminal (NVT) specification

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

CommandShell

Operating SystemUser

Terminal

Direct Connection

Host

UserTerminal

TelnetServer

CommandShell

Operating System

PseudoTerminal

TelnetClient

Operating System

Telnet Connection Host

IPNetwork

Telnet also allows talking to many ASCII protocol servers on TCPHTTP, SMTP, (FTP), daytime, echo, chargen ...

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-57

TelnetNetwork Virtual Terminal

Terminal and process control are usually vendor specifice.g. end of line by CR (carriage return), LF (line feed) or bothe.g. program interrupt by Control-C, Escape, Stop...

Network Virtual Terminal defines transmission across theInternet

specific formats are used on client and server sideconverted into NVT format and back

UserTerminal

TelnetServer

CommandShell

Operating System

PseudoTerminal

TelnetClient

Operating SystemIP

Network

NVT formatClient side format Server side format

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-58

TelnetNetwork Virtual Terminal

ASCII Dec. Name OperationNUL 0 no operationBEL 7 bell audible/visible signalBS 8 backspace move left one character positionHT 9 hor. Tab move right to next horizontal tabulator positionLF 10 line feed move vertically down to the next lineVT 11 vert. Tab move down to next vertical tabulator positionFF 12 form feed move to top of next pageCR 13 carriage return move to left margin of current lineother ignored

Signal OperationIP Interrupt Process: terminate running programAO Abort Output: discard any buffered outputAYT Are You There: request response from serverEC Erase Character: delete the previous characterEL Erase Line: entirely delete the current lineSYNCH Synchronize: clear data until TCP urgent point

but interpret commands (concept)BRK Break: break key or attention signal

ASCII control characters

NVT signals

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-59

TelnetCommands

IAC (interpret as control) character reserved as escapesequence

indicate that a control octet followsCommand Dec. FunctionIAC 255 interpret next octet as commandEOR 239 end of recordSE 240 end of option subnegotiationNOP 241 no operationDMARK 242 data stream portion of a SYNCH signal

(with TCP Urgent notification)BRK 243 NVT Break signalIP 244 NVT Interrupt Process signalAO 245 NVT Abort Output signalAYT 246 NVT Are You There signalEC 247 NVT Erase Character signalEL 248 NVT Erase Line signalGA 249 Go AheadSB 250 start of option subnegotiationWILL 251 agree to perform specified optionWON’T 252 refuse to perform specified optionDO 253 allow specified optionDON’T 254 deny to perform specified option requested

Send IAC twice if needed

in 8-bit octet dataSend IAC twice if n

eeded

in 8-bit octet data

Send IAC IP IAC DMARK in

TCP urgent mode to interrupt

a process “out of band”

Send IAC IP IAC DMARK in

TCP urgent mode to interrupt

a process “out of band”

TCP Urgent + DMARK

= “synch”TCP Urgent + DM

ARK

= “synch”

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-60

TelnetOptions

Telnet options are negotiated between client and serversymmetric negotiation (client or server can make a request)extendible (anyone can refuse to use or let use unknownoptions)

Negotiation: WILL/WONT, DO/DONTtwo-way negotiationdo not acknowledge options already in use

A->B: WILL xA wants to use option xB->A: DO x (ok) or DONT x (not ok)

A->B: DO xA wants B to use option xB->A: WILL x (ok) or WONT x (not ok)

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-61

TelnetCommonly used options

Option Code RFC ExplanationTransmit Binary 0 856 Change transmission to 8-bit binaryEcho 1 857 process echoes the data it receivesSuppress-GA 3 858 do not send Go-Ahead signal after dataStatus 5 859 request the status of a Telnet OptionTiming-Mark 6 860 request timing mark to be inserted

in return streamTerminal-Type 24 884 terminal type information to allow

programs to use advanced terminalfeatures(cursor positioning, optimisation, colors)

End-of-Record 25 885 terminate data with EOR codeLinemode 34 1116 send complete line after local editing

(instead of sending single characters)

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-62

Chapter 4:Applications and Application Layer Protocols

4.1 Introduction4.1.1 Design Principles4.1.2 Client-Server Paradigm4.1.3 Reply Codes4.1.4 Socket Concept

4.2 DNS

4.3 E-Mail4.3.1 SMTP4.3.2 MIME4.3.3 POP34.3.4 IMAP

4.4 HTTP

4.5 Telnet

4.6 FTP

4.7 VoIP4.7.1 Packetized Voice4.7.1 H.3234.7.2 SIP

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-63

4.6 FTP

File Transfer ProtocolRFCs 959, 2228, 2577, 2585server ports: 20 for data and 21 for control (TCP)

gives access to files on remote computersfile transfer: interactive accessget, put, list, modify attributesno direct on-line file sharing

authenticationdata format specification

representation type: binary, ASCII, EBCDIC, localfile structure: file, record structure, page structuretransfer mode: stream, block, compressed

virtual file systembasic operation modes and file name supporttranslation of commands on client and server machines

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-64

FTPConcept

Separate connections for control and dataControl Connection

defines “ftp session”coordinates data connections and their port numbersuses Telnet NVT abstraction

Data Connectionscreated dynamically to transfer data / fileson-the-fly format conversion (binary “image”, ASCII, EBCDIC,“local”)

Many systems offer a very simple user interface

User UserAgent

File System

FTP ServerFTP Client

File TransferAgent File SystemFile Transfer

Agent

ServerControlIP

Network

Port

21

20

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-65

FTPControl Commands and Data Connection

Access Control commandsUSER, PASS, ACCT, CWD, CDUP, SMNT, REIN, QUIT

Transfer Parameter commandsPORT, PASV, TYPE, STRU, MODE

FTP Service commandsRETR, STOR, STOU, APPE, ALLO, REST, RNFR, RNTO,ABOR, DELE, RMD, MKD, PWD, LIST, NLST, SITE, SYST,STAT, HELP, NOOPReply codes indicate success status

Default data portclient side: same as control connectionserver side: port 20

non-default data ports can be negotiatedPORT command: client side specifies different portPASV command: client makes server specify different port andlisten there

Closing data connection implies end of file

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-66

FTPExample Conversation

C establishes control connection to S, port 21; client side: port US: 220 ftp server readyC: USER joachimS: 331 User ok, need passwordC: PASS topsecretS: 230 User joachim logged inC: RETR index.htmlS: 150 file status ok, opening data connectionS opens connection from port 20 to client port U, sends file,

closes connectionS: 226 successfully transfered 2307 bytes, closing data connectionC: TYPE IS: 200 Command OKC: STOR IPNA-4-bw-4.pdfS: 550 Access DeniedC: QUITS closes all connections

C establishes control connection to S, port 21; client side: port US: 220 ftp server readyC: USER joachimS: 331 User ok, need passwordC: PASS topsecretS: 230 User joachim logged inC: RETR index.htmlS: 150 file status ok, opening data connectionS opens connection from port 20 to client port U, sends file,

closes connectionS: 226 successfully transfered 2307 bytes, closing data connectionC: TYPE IS: 200 Command OKC: STOR IPNA-4-bw-4.pdfS: 550 Access DeniedC: QUITS closes all connections

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-67

Chapter 4:Applications and Application Layer Protocols

4.1 Introduction4.1.1 Design Principles4.1.2 Client-Server Paradigm4.1.3 Reply Codes4.1.4 Socket Concept

4.2 DNS

4.3 E-Mail4.3.1 SMTP4.3.2 MIME4.3.3 POP34.3.4 IMAP

4.4 HTTP

4.5 Telnet

4.6 FTP

4.7 VoIP4.7.1 Packetized Voice4.7.1 H.3234.7.2 SIP

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-68

4.7 Voice over IP / IP Telephony

Two main sets of standards:ITU-T and IETF defined H.323

multimedia transport in generalseveral protocols for different functions

Session Initiation Protocol SIPsimpler protocolASCII messagesdefined by IETF

Terminal Terminal

Gate-keeper

IP Phone

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-69

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

4.7.1 Packetized Voice

Put resulting data into data packetsadd RTP, UDP, IP headers

the original signal is analog

Digitize analog signal (PCM)e.g. 8 bit per sample, 8ksamples/s

encode to remove redundancy /irrelevance

ADPCM, FFT/DCT quantization, ...

transmit packets through IP network

collect blocks of data

FFT Fast Fourier TransformPCM Pulse Code Modulation

ADPCM Adaptive Differential PCMDCT Discrete Cosine Transformation

Reverse process at receiver side

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-70

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Packetized VoiceData Rates

Net Framing Quality CodecStandard Method Rate* +Lookahead Complexity

(kbit/s) (ms) (MOS) (MIPS)

G.711a PCM 64 0+0 4.4 0.2G.726 ADPCM 32 0.125+0 4.1 2G.729A CS-ACELP 8 10+5 4.0 20G.729E CS-ACELP 11.8 >4.4 >20G.723.1 MP-MLQ 6.3 30+7.5 3.6 16G.723.1 ACELP 5.3 30+7.5 3.4 16

ACELP Algebraic CELPADPCM Adaptive Differential PCMCELP Code Excited Linear PredictionCS-CELP Conjugate Structure CELPDCT Discrete Cosine

TransformationFFT Fast Fourier TransformMIPS Million Instructions per SecondMLQ Maximum Likelihood

QuantizationMOS Mean Opinion ScoreMP-MLQ Multi Pulse MLQPCM Pulse Code Modulation

IP level rates depend

on aggregation block

size

IP level rates depend

on aggregation block

size

Data Rates, without silence suppression

Tradeoff between efficiencyand delay

large blocks cause large delaylarge blocks have lower overhead(RTP, UDP, IP headers)large blocks allow bettercompression

*above RTP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-71

4.7.2 H.323Protocol Overview

RASControl

H.225

CallControl

H.225Q.931

MediaChannelControl

H.245

Audio/VideoStreamControl

H.225RTCP

Audio/VideoCodec

G.711...H.261...

H.225/RTP

Audio/VideoStreamControl

H.225RTCP

Transport Unreliable(e.g. UDP)

Reliable(e.g. TCP)

System Control Media TransportAudio/Video Data

H.323

RAS Registration, Admission and StatusRTCP Real Time Transport Control ProtocolTCP Transmission Control ProtocolUDP User Datagram Protocol

Reliable(e.g. TCP)

Reliable(e.g. TCP)

Unreliable(e.g. UDP)

Unreliable(e.g. UDP)

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-72

H.323Additional Standards

H.450: additional featuresH.450.1: common protocol for service / features supportH.450.2ff: description of features,e.g. call transfer, holdlike private branch exchange (PBX) features

H.235: security

H.246: interworking with circuit switched networks

H.248: Media Gateway Control (Megaco)

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-73

H.323Signalling Overview

Phases of a connection

0. Initialization1. Gatekeeper admission2. Call Control Signalling3. Negotiation and Configuration4. Media data exchange5. Re-negotiation and administration6. End

This is the main

purpose of telephony!This is the main

purpose of telephony!

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-74

H.323Connection Set-up

SetupCall Proceeding

ARQACF

Connect

TerminalCapabilitySetTerminalCapabilitySetAck

OpenLogicalChannelOpenLogicalChannelAck

ARQACF

SetupCall Proceeding

ConnectTerminalCapabilitySet

TerminalCapabilitySetAckOpenLogicalChannel

OpenLogicalChannelAck

RTP/RTCP

H.323 Terminal A H.323 Terminal BH.323 GatekeeperRASH.225

CallControlH.225/Q.931

MediaChannelControlH.245

ARQ Admission RequestACF Admission ConfirmRAS Registration, Admission and Status

RTCP Real Time TransportControl Protocol

RTP Real Time Protocol

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-75

H.323Connection Release initiated by Gatekeeper

EndSessionCommandEndSessionCommand

DRQ

DCF

ReleaseComplete

DRQ

EndSessionCommand

EndSessionCommand

ReleaseComplete

DCF

H.323 Terminal A H.323 Terminal BH.323 GatekeeperRASH.225CallControlH.225/Q.931MediaChannelControlH.245

DRQ Disengage RequestDCF Disengage ConfirmRAS Registration, Admission and Status

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-76

H.323 Additional Message SequencesInitialization (Phase 0)

RRQ Registration RequestRCF Registration ConfirmRAS Registration, Admission and Status

GRQGCF

GRQGCF

H.323 Gatekeeper(s)RASH.225

RRQRCF

RRQRCF

RASH.225

FindGatekeeper

Register withGatekeeper

H.323 Terminal A H.323 Terminal B

GRQ Gatekeeper RequestGCF Gatekeeper Confirm

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-77

BRQ Bandwidth Change RequestBCF Bandwidth Change ConfirmRAS Registration, Admission and Status

H.323 Additional Message SequencesBandwidth re-negotiation initiated by user

CloseLogicalChannel

BRQBCF

OpenLogicalChannel

OpenLogicalChannelAck

BRQBCF

CloseLogicalChannelOpenLogicalChannel

OpenLogicalChannelAck

H.323 GatekeeperRASH.225

MediaChannelControlH.245

H.323 Terminal A H.323 Terminal BIntroduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-78

4.7.3 SIPComplete Call

INVITE

OK

INVITE

OKACK

RTP

UAC UACProxy

SIP

UAC User Agent ClientACK AcknowledgeSIP Session Initiation

ProtocolRTP Real Time Protocol

OK

BYE

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-79

SIPCanceled Invite

INVITE

OK

INVITE

OK

ACK

UAC UACProxy

SIP

UAC User Agent ClientACK AcknowledgeSIP Session Initiation

Protocol

CANCELCANCEL

Request TerminatedRequest Terminated

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIPPacket VoiceH.323SIP

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 4 Edition Summer 2004

replace logo

4-80

Questions

4.1 Determine the name and address of the authoritative nameserverfor “ei.uni-stuttgart.de” using “nslookup” or “dig”.

4.2 Use nslookup to determine the host name for IP address129.69.1.76 .

4.3 What hosts are mail exchangers for “jcho.de”?4.4 Write a simple SMTP client and test if it can deliver a mail

message.(Handle only the “good” case.)

4.5 Telnet to a Web server (port 80) and retrieve a Web page.Can you make the server not close the connection immediately?How long does it take until the server closes the connection?

4.6 Play with the Web server from Section 4.1.4.

4.7 What is Network Address Translation (NAT)?4.8 What is the Hurst Parameter?4.9 How would you measure Internet quality?4.10 What is the difference between the IntServ and DiffServ

concepts?

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 5: Network Architectures

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-3

Chapter 5:Network Architectures

5.1 The Internet5.2 Local IP Networks5.3 Intranets

5.3.1 Network Address Translation (NAT)5.3.2 Virtual Private Networks (VPN)5.3.3 Remote LAN Access (RLA)

5.4 Residential Access5.5 Voice Carrier Networks5.6 Mobile Networks

5.6.1 Mobility Support5.6.2 GPRS5.6.3 Header Compression5.6.4 TCP and Packet Loss

5.7 Overlay Networks5.7.1 General View5.7.2 Building Overlays with P2P mechanisms

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-4

5.1 The Internet

Worldwide connectivityISPs connect private and business usersprivate: mostly dial-up connectionsbusiness: mostly always-on connectionsplus: academic networks (part of the Internet)

Structurelarge ISPs have their own world-wide backbone networks(leased lines interconnecting routers)smaller ISPs have peering agreements with large ISPs totransport wide area trafficmost traffic to or from outside networks

efforts (e.g. portals) to keep more traffic within own network

see Chapter 1

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-5

Other IP Networks

IP is used outside the Internetother “IP Networks”

Reasonsubiquitous availability of IP in end systemsIP network components (routers) offer high throughput per $simple configuration and cheap subnetwork components(hubs, switches)

Integration of servicese.g. voice and databandwidth sharing between traffic typessave on operating personnel by unified network technology

→ IP is being introduced into “classical” telecommunicationnetworks

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-6

Chapter 5:Network Architectures

5.1 The Internet5.2 Local IP Networks5.3 Intranets

5.3.1 Network Address Translation (NAT)5.3.2 Virtual Private Networks (VPN)5.3.3 Remote LAN Access (RLA)

5.4 Residential Access5.5 Voice Carrier Networks5.6 Mobile Networks

5.6.1 Mobility Support5.6.2 GPRS5.6.3 Header Compression5.6.4 TCP and Packet Loss

5.7 Overlay Networks5.7.1 General View5.7.2 Building Overlays with P2P mechanisms

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-7

5.2 Local IP Networks

There are additional applications in local networksnot routed into The Internet

Host configuration servicesDHCP, TFTP, bootp

File servicesaccess to remote file systems on local computer

NFS, Windows(r) file sharingbackup services

Print servicesGraphical remote terminal access (X11)Specific additional applications

SAP, peoplesoft, groupware (Lotus notes, MS exchange...)directories, databasesauthentication services

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-8

bootp

Bootstrap Protocol [RFCs 951, 2132]replacement for RARPuses UDP/IP for communication

ports 67 (server) and 68 (client)uses limited IP broadcast (255.255.255.255)before IP address, network and network mask are known

returns IP address plus further informationIP address, boot file name and serveroptionally:

server addresses for time, DNS, lpr servershost nameboot file size

ARP Address Resolution ProtocolDNS Domain Name SystemNFS Network File SystemRARP Reverse ARPTFTP Trivial File Transfer Protocol

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-9

bootpMessage Format

Client Hardware Address . . . (16 oct)

OP0 8 16 24 31

HTYPE HLEN

seconds unusedTransaction ID

Client IP Address

Server IP Address

hops

your IP Address

Router IP Address

Server Host Name . . . (64 oct)

Boot File Name . . . (128 oct)

Vendor Specific Area (64 oct)

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-10

bootp Message Fields

same format for client and server messagesclient specifies field values as far as possibleother fields set to zero

OP (1=request, 2=reply)HTYPE, HLEN: Hardware type and address length

e.g. Ethernet: HTYPE=1, HLEN=6HOPS=0 (unless forwarded by server)seconds = number of seconds since client started to boot...your IP Address:client IP address from server if client IP address was set to 0boot file name

name of boot file to be loaded later, e.g. using tftp or NFS

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-11

DHCP

Dynamic Host Configuration Protocol [RFC 2131]extension of bootp

more information in returned messagee.g. subnet mask

optional automatic or dynamic IP address assignmentserver selects IP address from a pool of free addressesmulti-step procedure

limited-time lease of an IP address to a clientclient wishes and server grants lease durationclient requests renewal after 50% of lease durationearly lease termination is possible

static address assignment with DHCPserver knows client’s hardware address (configured by networkmanager)grants very long (or infinite) lease of address

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-12

Others

non-IP based protocols in LANs

netbios / netbeuiMicrosoft® Windows® networksmay be based on IP (attention: sometimes using multicast /broadcast!)

Appletalk

Bridging protocols

ISO OSI CLNPDECnet, LAT

remember Chapter1!remember Chapter1!

a few sites still useita few sites still useit

CLNP Connectionless Network ProtocolISO International Organisation

for StandardisationLAT Local Access Terminal /

Local Area TransportOSI Open Systems Interconnection

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-13

Chapter 5:Network Architectures

5.1 The Internet5.2 Local IP Networks5.3 Intranets

5.3.1 Network Address Translation (NAT)5.3.2 Virtual Private Networks (VPN)5.3.3 Remote LAN Access (RLA)

5.4 Residential Access5.5 Voice Carrier Networks5.6 Mobile Networks

5.6.1 Mobility Support5.6.2 GPRS5.6.3 Header Compression5.6.4 TCP and Packet Loss

5.7 Overlay Networks5.7.1 General View5.7.2 Building Overlays with P2P mechanisms

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-14

5.3 Intranets

Internal IP networks (e.g. of a company)full internal IP connectivityoften with internal DNS name space, DNS servers etcoften interconnecting multiple sites in the worldexternal connectivity to Internet

via NAT, application proxies, firewalls, gateways

often with private address range (e.g. 10.0.0.0 network)or duplicate of a valid Internet address range (connectivityproblems!)problems with company mergers!

Internal servicesusually not exported to external worldexported services with access limitation → “Extranets”

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-15

5.3.1 Network Address Translation (NAT)

whole private address space “hides” behind one public IPaddress

translation of port numbers allows multiple internal hosts tocommunicatesavings in global IP addresses

issues with application layer protocolsif they talk about IP addresses or port numberse.g. FTP, H.323resolved by proxy servers or application awareness

PrivateIP Addr.

10.1.0.310.20.3.210.1.0.310.67.23.1

PrivatePort

10301030103125

NATIP Addr.

193.5.7.17193.5.7.17193.5.7.17193.5.7.17

NATPort

18001180021800719213

InternetIntranet NAT

InternetIP Addr.

129.69.1.78129.69.1.78203.53.153.24131.58.243.3

InternetPort

80802325

recompute the IPheader checksum!recompute the IPheader checksum!

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-16

5.3.2 Virtual Private Networks (VPN)

provide a private network using public IP networkinfrastructure

IP tunnelingencryption

VPN applicationsbetween different sites of an enterprise

site-to-site VPNprivate network addresses can be tunneled over a publicnetworktunnel works just like a leased line

for remote accessallows remote access to the Intranet

for providing an “Extranet”allows outside access to a part of an Intranet

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-17

5.3.3 Remote LAN Access (RLA)

Dial-up access to an Intranetfor teleworking

Private modem pool and access server within Intranetlong-distance dial-up connectionsinformation security relies on telephone network

VPN based accessuse IP tunnel over the Internet or from a VPN providerencryption of data in tunnel ensures information securityworld-wide ISP presence allows local calls for dial-upconnections

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-18

Chapter 5:Network Architectures

5.1 The Internet5.2 Local IP Networks5.3 Intranets

5.3.1 Network Address Translation (NAT)5.3.2 Virtual Private Networks (VPN)5.3.3 Remote LAN Access (RLA)

5.4 Residential Access5.5 Voice Carrier Networks5.6 Mobile Networks

5.6.1 Mobility Support5.6.2 GPRS5.6.3 Header Compression5.6.4 TCP and Packet Loss

5.7 Overlay Networks5.7.1 General View5.7.2 Building Overlays with P2P mechanisms

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-19

5.4 Residential Access

ISPs offer dial-up or “always-on” access to the InternetDial-up access: Remote Access Service (RAS)

circuit switched connection between customer and Point ofPresence (PoP)via telephone / ISDN networksome ISPs provide dial-up access over xDSL lines

IssuesUser / account authentification, authorizationaccountingdynamic host configurationtransport of IP packets

M ModemMP Modem PoolNAS Network Access ServerxDSL Digital Subscriber Line

VoiceNetwork

M

HC

InternetMP

NAS AAAS

Link Layer Protocol

AAAProtocol

AAA Authentication, Authorization, AccountingAAAS AAA ServerHC Home ComputerISP Internet Service Provider

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-20

RASLink Layer Protocols

Serial Line IP Protocol (SLIP) [RFC 1055] orPoint to Point Protocol (PPP)

RFC 1661, one additional RFC per lower layer technologyTransmission of IP packets over serial point to point links

packet framing / delineation (HDLC-like)adds 8 octets overhead per packetoptional: header compression (see 5.6.3)

Link Control Protocol (LCP) in PPPlink establishment, configuration and management

Network Control Protocols (NCP) in PPPIP address assignment

data ...Flag Address ChecksumControl Protocol Flag1 1 1 1 n 2 1

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-21

RASAAA Protocol

RADIUS [RFC2138]

AuthenticationWho is calling?

AuthorizationWhat is this user allowed to do?What Link Layer protocol can they use?Configuration of Link Layer parameters

Accountingcollect data on usage time, bytes transfered, etc

new development: DIAMETER

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-22

Chapter 5:Network Architectures

5.1 The Internet5.2 Local IP Networks5.3 Intranets

5.3.1 Network Address Translation (NAT)5.3.2 Virtual Private Networks (VPN)5.3.3 Remote LAN Access (RLA)

5.4 Residential Access5.5 Voice Carrier Networks5.6 Mobile Networks

5.6.1 Mobility Support5.6.2 GPRS5.6.3 Header Compression5.6.4 TCP and Packet Loss

5.7 Overlay Networks5.7.1 General View5.7.2 Building Overlays with P2P mechanisms

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-23

5.5 Voice Over IP NetworksExample Network Architecture

currently more attractive in enterprise than in public networksubiquitous high-performance data networksbandwidth sharing between voice and data

DiffServ can be introduced in an enterprise networkvoice lines and separate voice switching equipment can besavedhigh share of local traffic

fewer media gateways needed than in public network scenarios

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Terminal MediaGateway

Gate-keeper

IP NetworkIP Phone Circuit

SwitchedNetwork

classicaltelephone

POTS/ISDNSwitch

Media Gateway Controller+ Signalling Gateway

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-24

Gateways

Media Gatewayconversion between voice formatsusing DSPs

traditional networkPCM voiceISDN

IP networkG.711, G.723, etc for voice codingsee Sec. 4.5.1

Media Gateway Controller (MGC)conversion between IP and POTS/ISDNsignallingIP side: H.323, SIPPOTS side: SS7, PBX protocolscontrol of media gateway (e.g. MEGACO)

PBX Private Branch ExchangePCM Pulse Code ModulationPOTS Plain Old Telephony ServiceSIP Session Initiation ProtocolSS7 Signalling System #7

DSP Digital Signal ProcessorISDN Integrated Services Digital NetworkMEGACO Media Gateway Control ProtocolMGC Media Gateway Controller

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-25

Chapter 5:Network Architectures

5.1 The Internet5.2 Local IP Networks5.3 Intranets

5.3.1 Network Address Translation (NAT)5.3.2 Virtual Private Networks (VPN)5.3.3 Remote LAN Access (RLA)

5.4 Residential Access5.5 Voice Carrier Networks5.6 Mobile Networks

5.6.1 Mobility Support5.6.2 GPRS5.6.3 Header Compression5.6.4 TCP and Packet Loss

5.7 Overlay Networks5.7.1 General View5.7.2 Building Overlays with P2P mechanisms

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-26

5.6 Mobile Networks5.6.1 Mobility Support

Mobile IPRFCs 2002, 2005, 2006

Difference between wireless technology and mobility!wireless technology: communicate while movingwire bound technology: plug into a new network and continueworking

Mobile IP specifies mobility support(more or less) independent of access technologytransparent support (independent of communication partners)for IPv4mobility across the Internet (scalable in terms of distance)

advertisement / broadcast based forwarding managementfor infrequent changes of location

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-27

Mobile IP

mobility of mobile node MN supportedno need for communication partner (Correspondent Node,CN) to know about thisCN still sends packets to home address of MNminimum requirement: Home Agent (HA)MN can act as Foreign Agent (FA)

MN HA R FA

HomeNetwork

ForeignNetwork

CN Correspondent NodeFA Foreign AgentHA Home AgentMN Mobile NodeR Router

R

Internet

R CN

MN

MN

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks1

2

3

4

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-28

Mobile IP (2)

Mobile node connects to foreign networkMN obtains IP address in foreign network (e.g. via dhcp)MN locates foreign agentIPsec tunnel established from Home Agent (HA)to Foreign Agent (FA)IP address of FA is called “care-of” address

packets to the mobile nodereach the home network via standard IP routingare intercepted by the home agenthome agent forwards packet to care-of address within tunnelforeign agent forwards packet to mobile node (no tunnel)

packets from the mobile nodeare sent via standard IP routing to the corresponding node(“triangular routing”)orare sent to the foreign agentforwarded within reverse tunnel to home agentsent to correspondent node by home agent

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

1

23

4

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-29

5.6.2 GPRSIP transport and IP usage

General Packet Radio Serviceprovide a packet service extension to GSM mobile networks

Protocol Stack:

BSSGP

NetworkServiceL1bis

LLCSNDCP GTP

Relay

L1

L2

IP

UDP /TCP*

GTP

L1

L2

IP

UDP /TCP*

IP/X.25

SGSN GGSN* TCP for X.25, UDP for IP

LLC Logical Link ControlMAC Media Access ControlRLC Radio Link ControlSGSN Serving GPRS Support NodeSNDCP Subnetwork Dependent Convergence Prot.

RLC

MAC

GSM RF

BSSGPNetworkServiceL1bis

Relay

Base Station

ApplicationIP/X.25

SNDCP

LLC

RLC

MAC

GSM RF

Mobile Station

BSSGP Base Station System GPRS ProtocolGGSN Gateway GPRS Support NodeGPRS General Packet Radio ServiceGSM Global System for Mobile CommunicationGTP GPRS Tunnelling Protocol

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-30

5.6.3 Header Compression

IETF Working Group on “Robust Header Compression”(rohc)

http://www.ietf.org/html.charters/rohc-charter.html“old” header compression schemes (RFCs 1144, 2508)

remove redundancy from IP, UDP, TCP headersnew header compression schemes (rohc working group)

especially for wireless linkscompress RTP and frequently used TCP options (SACK,timestamps)robust to high error rates / packet (frame) lossrobust to long round-trip timesunidirectional links (?)

requirementssemantic identity of header after compression anddecompressionperform well even when the end-to-end path involves multiplewireless linkssupport IPv4 and IPv6

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-31

Header Compression (2)

some TCP/IP header fields do not change during aconnection

IP version, header length, TOS, fragmentation, TTL, protocol,source address, destination addressTCP source and destination ports, data offset, reserved bits,flags: ACK, RST, SYN, FIN

spend capacity according to information contents in fieldsTCP FIN flag (95% “0”, 5% “1”)small set of frequent payload sizesquite fixed size of acknowledgements

headers can be compressed down to a few bits

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-32

5.6.4 TCP and Packet Loss

TCP congestion controlassumes packet loss (missing ACK) is a sign of congestionreduces sending rate through congestion window

Problems in wireless networks:Additional packet loss due to

transmission errors on wireless linksphases of bad transmission -> multiple packets lost -> slowstartcommunication pause (or delay variation) due to handoffs /handovers

losses are independent of congestion state“wireless TCP” should not necessarily reduce its rate in thosecasesat least not fall back to slow start after packets lost due totransmission errors

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-33

TCP and Packet Loss (2)

reduce wireless transmission errorsuse fast ARQ on wireless linksalternative: intercept transport protocol, create artificial ACKsetc

loss of end-to-end semantics of TCP

reduce handoff latencyoverlapping cellsadditional fast retransmission techniques immediately after anew cell is reached

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-34

Chapter 5:Network Architectures

5.1 The Internet5.2 Local IP Networks5.3 Intranets

5.3.1 Network Address Translation (NAT)5.3.2 Virtual Private Networks (VPN)5.3.3 Remote LAN Access (RLA)

5.4 Residential Access5.5 Voice Carrier Networks5.6 Mobile Networks

5.6.1 Mobility Support5.6.2 GPRS5.6.3 Header Compression5.6.4 TCP and Packet Loss

5.7 Overlay Networks5.7.1 General View5.7.2 Building Overlays with P2P mechanisms

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-35

5.7 Overlay Networks5.7.1 General View

overlay networksuse an IP network (the Internet) transparentlyenable their own routing by sending packets from one nodeto anotheruse tunneling or application layer mechanisms to directpacketsset-up of overlay: automatic or configured

often used to work around shortcomings of the Internetmulticasthierarchical structuretemporal connectivity

some hosts and networks are not permanently connectedanonymitybandwidth provisioning

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-36

Overlay NetworksExamples

Virtual Private Network (VPN)virtual lines created by tunnelingsecurity offered by tunnel encryption (see Chapter 9)

DNS and e-mailvirtual naming hierarchy created on top of the InternetDNS hierarchy does not follow Internet topology nor IP addresshierarchye-mail servers can store e-mails while parts of the network areunavailable

multicastduplication of packets / information on application layergroup management on application layer

“peer-to-peer” servicesgroup managementvirtual topologysupport for distributed searching

QoS overlaysmeasure available bandwidth between hosts send traffic from host to host on best bandwidth path

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-37

5.7.2 Building overlays with P2P mechanisms

Different aspects of Peer-to-Peer (P2P) mechanismspeer-to-peer overlay control

locate the IP address of communication partners within thesame p2p communitysearch for contents through the databases of these partnerslimited search -> everyone asks n (e.g. 5) of their neighborsgood scaling for replicated contentsself-management of overlay structures

nodes come and gonodes can change their IP addresses

little manual management effort, but a lot of control traffic

peer-to-peer communicationthis is the default mode of communication on the Internet everyone can act as a server on an IP networkthe difficulty is in finding the right server -> see overlay control

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-38

P2P search

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Overlay Networks

“lookingfor file x”

“I’ve gotfile x”

“I’ve gotfile x”

“give me file x”

download

application layer multicast for searchingdirect peer-to-peer connection for download

real (IP) network topology is different from overlay topology

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 5 Edition Summer 2004

replace logo

5-39

Questions

5.1 Which ISP networks does a packet pass on the way fromUniversity of Stuttgart to www.jcho.de?

5.2 Read about NFS. Why is it not suitable for wide areaapplications?

5.3 Use ping to find out the distribution of packet delays to atransatlantic destination. Are these delays suitable for real-timeapplications?

5.4 What is the difference in structure and location protocols for theNapster, Gnutella and Kazaa systems?

Introduction

DNS

E-Mail

HTTP

Telnet

FTP

VoIP

Questions

The Internet

Local IP Networks

Intranets

Residential Access

Voice Carriers

Mobile Networks

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 6: Statistics and Performance

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-3

Chapter 6:Statistics and Performance

6.1 Introduction6.1.1 Basic Statistics6.1.2 Classical Models and Results

6.2 Web Statistics6.2.1 TCP Effects6.2.2 Heavy-Tailed Distributions

6.3 Long-Range Dependence and Self-Similarity

6.4 Issues with Simulations

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-4

6.1 Introduction6.1.1 Basic Statistics

Measurement takes n samples Xie.g. service times, interarrival times

Samples are described by characteristic values

Mean Value

empirical Variance

Coefficient of Variation

Confidence Intervaldescribes trustworthiness of characteristic valuederived from batch evaluationsoften just taken as proportional to variance

∑= in XX 1][E

∑ −= −2

11 ])[E(][VAR XXX in

][E/][VAR XXcX =

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-5

Random Variable

mathematical concept instead of real samplesdescribed by statistical characteristics

distributioncorrelation

Characteristics of distributionsExpectationVariance

Stochastic Process

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-6

Distributions

describe probability for certain values

discrete random variablesX = xexamples:

number of downloads per sessionnumber of active users

continuous random variablesX ∈ [x,x+dx]examples:

session durationpacket interarrival time

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-7

Discrete Distributions

0

0.2

0.4

0.6

0.8

1

0 1 2 3 4 5x

DFCDF

(Cumulative)Distribution Function

Complementary (Cumulative)Distribution Function

)( xXPxFX ≤=

)(1)( xFxXPxC XX −=>=

x

0

0.2

0.4

0.6

0.8

1

0 1 2 3 4 5

)( xXPxpX ==

Probability Distribution,Probability Mass Function

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-8

Continuous Distributions

(Cumulative) DistributionFunction

Complementary (Cumulative)Distribution Function

)( xXPxFX ≤=

)(1)( xFxXPxC XX −=>=0

0.2

0.4

0.6

0.8

1

0 2 4 6 8 10x

DFCDF

)( xXPdxdxfX ≤=

Probability Density Function

0

0.2

0.4

0.6

0.8

1

0 2 4 6 8 10x

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-9

Selected Distributions

Exponential (negative exponential)

Hyperexponential

Lognormal

Pareto

Weibull

Gamma

xxf λ−λ= e)( xxC λ−= e)(

xx ppxf 21 ee)( 2211λ−λ− λ+λ= xx ppxC 21 ee)( 21

λ−λ− +=

−−= 2

2

2 2))(ln(exp1

21)(

σµ

πσx

xxf

10)( −−= ααα xxxf α)/()( 0 xxxC =

αβ−−αα−βα= )/(1e)( xxxfαβ−= )/(e)( xxC

β−−αα−βαΓ= /1e))(/1()( xxxf

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-10

6.1.2 Classical Models and Results

performance characteristics of stochastic models differsignificantly from deterministic serviceincreased variation (generally) decreases performance

increased queue lengthslonger waiting timehigher loss probability

simple “classical” modelsM/G/1 waiting systemM/G/n-0 loss system

Poisson ArrivalsGeneral Service Time Distribution (but independent)n Serversno buffer space

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-11

M/G/1 Waiting System

PoissonArrivals

G

FIFOBuffer Server

Mλ h

Arrival Rate λMean Service Time h

coefficient of variation cS

Relative Offered Load ρ = λ h

proportional to ρ/(1-ρ)proportional to )1( 2

Sc+01

23

456

78

910

0 0.2 0.4 0.6 0.8 1

cs=0cs=1cs=2

E[W

]/h

ρ

FIFO First In First Out

Varianceincreaseswaiting timeVarianceincreaseswaiting time

Expected Waiting Time(Pollaczek-Khintchine)

)1(2)1(][2

ρ−+ρ= SchWE

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-12

M/G/n-0 Loss System

Arrival Rate λMean Service Time hOffered Load A = λ h

Pseudo unit “Erlang”Relative Offered Load ρ = λ h / n

Loss Probability

∑=

!

!

iA

nA

i

n

B

B→1 for A→∞ (ρ→∞)independent ofservice time distribution

0.0001

0.001

0.01

0.1

1

0.01 0.1 1 10

n=1n=10n=100

B

ρ

PoissonArrivals

G

n Servers

h

G

...

G

Economy of ScaleEconomy of Scale

Chapter 6

IntroductionBasic StatisticsClassical Results

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-13

Chapter 6:Statistics and Performance

6.1 Introduction6.1.1 Basic Statistics6.1.2 Classical Models and Results

6.2 Web Statistics6.2.1 TCP Effects6.2.2 Heavy-Tailed Distributions

6.3 Long-Range Dependence and Self-Similarity

6.4 Issues with Simulations

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-14

6.2 Web Statistics6.2.1 TCP Effects: Packet Sizes

Chapter 6

Introduction

Web StatisticsTCP EffectsHeavy Tails

Self-Similarity

Simulations

0

0.2

0.4

0.6

0.8

1

0 200 400 600 800 1000 1200 1400 1600Packet Size

downup

Data: ADSL Münster,incl. Ethernet overhead

MTU/MSS LimitsMTU/MSS Limits

Ethernet MTUEthernet MTU

SYNFINACK

SYNFINACK

typical for HTTPGET requeststypical for HTTPGET requests

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-15

Bit Rate Symmetry for Web Access

„Small“ Connections

are more symmetric„Small“ Connectio

ns

are more symmetric

Result is independent

of network speedResult is independe

nt

of network speed

Data: ADSL Münster

Chapter 6

Introduction

Web StatisticsTCP EffectsHeavy Tails

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-16

Bit Rate Symmetry (2)

Data: ADSL Münster

TCP CharacteristicsTCP Characteristics

BB

vB

vv

dd

u

150060580 ⋅+≈ α

Connection overhead+ mean GET request

Acks

Data packets

Ratio of Acks to data packets

Chapter 6

Introduction

Web StatisticsTCP EffectsHeavy Tails

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-17

6.2.2 Heavy Tailed Distributions

1e-5

1e-4

1e-3

1e-2

1e-1

1e+0

100 1 k 10 k 100 k 1 M 10 MItem Size in Bytes

infinite expectationinfinite varianceinfinite expectationinfinite variance

1=α

α−> xxXP ~][

finite expectationinfinite variancefinite expectationinfinite variance

2=α

finite expectationfinite variancefinite expectationfinite variance

„Heavy Tail“„Heavy Tail“Chapter 6

Introduction

Web StatisticsTCP EffectsHeavy Tails

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-18

Number of GET Requests per Flow

1e-005

0.0001

0.001

0.01

0.1

1

0.1 1 10 100 1000 10000 100000

Com

plem

enta

ryD

istri

butio

nFu

nctio

n

Number of GET Requests

Clt. Sess.H2H FlowOne ClickP2P Flow

P2P Port to PortH2H Host to HostClt. ClientTimeout 10minData: ADSL Münster

30% of all connections serve

more than one request30% of all connections serve

more than one request

10% of all flows get

more than 40 elements

from the same server

10% of all flows get

more than 40 elements

from the same server

Chapter 6

Introduction

Web StatisticsTCP EffectsHeavy Tails

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-19

Flow Volumes

1e-005

0.0001

0.001

0.01

0.1

1

10 100 1k 10k 100k 1M 10M 100M 1G 10G

Com

plem

enta

ryD

istri

butio

nFu

nctio

n

Size in Bytes

Single Req.One ClickP2P FlowH2H Flow

Client Sess.

P2P Port to PortH2H Host to HostTimeout 10minData: ADSL Münster

Chapter 6

Introduction

Web StatisticsTCP EffectsHeavy Tails

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-20

Flow Durations

1e-005

0.0001

0.001

0.01

0.1

1

0.1m 1m 10m 100m 1 10 100 1h 1d

Com

plem

enta

ryD

istri

butio

nFu

nctio

n

Duration in s

Single Req.One Click

HTTP Conn.H2H FlowClient Act.

Measurement: ADSL Münster

10% of all Web sessions

are longer than 3 hrs10% of all Web sessions

are longer than 3 hrs

Only 40% of all connections

are longer than 10 secOnly 40% of all connections

are longer than 10 sec

“Power Laws” for nearly

four orders of magnitude“Power Laws” for nearly

four orders of magnitude

α<1 ⇒ infinite expectation

if continued until ∞α<1 ⇒ infinite expectation

if continued until ∞ P2P Port to PortH2H Host to HostTimeout 10min

Chapter 6

Introduction

Web StatisticsTCP EffectsHeavy Tails

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-21

Chapter 6:Statistics and Performance

6.1 Introduction6.1.1 Basic Statistics6.1.2 Classical Models and Results

6.2 Web Statistics6.2.1 TCP Effects6.2.2 Heavy-Tailed Distributions

6.3 Long-Range Dependence and Self-Similarity

6.4 Issues with Simulations

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-22

6.3 Long-Range Dependence and Self-Similarity

Relative variance does not decrease as fast as expectedon time scale aggregationstill usual reduction on ensemble aggregation (multiple sources)

“fractal” or “self-similar” characteristicsmean bit rates over timemean packet rates over time

due to heavy-tailed distributions of ON phasescausing long-range dependence

Limitspacket level time resolutioninstationarity

-> check time dependence of traffic parameters

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Large File SizeVariance

Long-RangeDependence

Self-Similarity

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-23

Measured SMTP Traffic Poisson Traffic

10s Aggregatesover 10000s

1s Aggregatesover 1500s

0.1s Aggregatesover 150s

10ms Aggregatesover 15s

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-24

Self-SimilarityDifferent Views

Dependence of variance on aggregation timeHurst Parameter H

Long-Range Dependenceautocorrelation function decays with k2(H-1)Hyperbolic instead of exponential decay of autocorrelation

Spectral Densitypole at zero

∑+−=

=mt

tmss

mt X

mY

1)1(

1 )1(2)( ~)( Hmt mYVAR −−

∞→= −+ kkXXCovk Hktt

)1(2~),()(ρ

],[;0~e)(2

)( 212

ππ−∈λ→λλρπ

σ=λ −λ∞

−∞=∑ Hik

kkf

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-25

Variance-Time PlotExample

Aggregation Time in Seconds

Coe

ffici

ento

fVar

iatio

n

1

10

100

1000

0.01 0.1 1 10 100 1000 10000

Short-RangeDependence

1

10

100

1000

0.01 0.1 1 10 100 1000 10000

HTTP CLHTTP H2H

FTP CLPOP3 CL

proportional to m-(1-H)

proportional to m-(1-H)

Mean Bit Rate in Aggregation Time Intervals m

large m→ limits of stationarit

ylarge m→ limits of stationarit

y

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-26

Self-SimilarityEstimating the Hurst Parameter

Variance-Time Analysisplot variance of aggregate versus aggregation timesimple, easy to understandalso gives second (variance) parameterslightly unreliable

R/S Analysisclassical approach for unknown mean and varianceplot rescaled adjusted range versus interval length

Periodogram Analysisshows increase of spectral density around zero

Abry-Veitch Estimatorusing wavelet theoryindependent of stationaritydetermines H and variance parameter from regression ofWavelet coefficients

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-27

Chapter 6:Statistics and Performance

6.1 Introduction6.1.1 Basic Statistics6.1.2 Classical Models and Results

6.2 Web Statistics6.2.1 TCP Effects6.2.2 Heavy-Tailed Distributions

6.3 Long-Range Dependence and Self-Similarity

6.4 Issues with Simulations

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-28

6.4 Issues with SimulationsSteady State and Confidence

Effects of long-range dependent traffic

steady state reached slowlystochastic generators (input processes!)observed system state (e.g. queue length)

High variability at steady statehigh probability of “swamping” sample

Standard deviation of batch means decreases slowlyTo reduce batch means standard deviation by a factor of 10:simulate factor of 101/(1-H) longerH=0.5: factor 100 longerH=0.9: factor 10 000 000 000 longer!

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-29

Infinite Expectations

... can never be simulated M/G/1 has infinite expected waiting time if the “G“ has infinitevariance

Mean Waiting Time

Residual Lifetime

model carefullyconsider packets instead of bursts orfor TCP, use M/G/r-PS or M/D/1-PS instead of M/G/1

limit distributionscheck validity of assumption(e.g. do simulation results change with limit?)introduce corresponding mechanisms into networks(e.g. limit on e-mail sizes)

]E[21]E[

2

XcR x +=

)1(2)1(]E[]E[2

ρ−+ρ= ScSW

Don‘t try tosimulate infinity!Don‘t try tosimulate infinity!

infinite variance⇒ infinite confidence

intervalsinfinite variance⇒ infinite confidence

intervals

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-30

Input Parameters

Do not use the Normal distributionFinite probability for X<0

Use input parameters that have a meaningand make sure the corresponding random variables have finitemean

TCP traces are generally invalidif simulation includes TCP model -> use file sizesif simulation does not include TCP -> only binary result possible

YES: the simulated network does not disturb TCPNO: the simulated network disturbs TCP and results will befundamentally different

The “mean packet size” is generally uninterestingPacket sizes have multimodal distributions

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-31

Deterministic Scenarios

Be careful not to simulate trivial scenarios ad infinitumEnsemble statistics vs. single source statistics

Applications:Voice over IP on packet levelother constant rate sources

Solutionsin simple models: identify period and change phase cyclicallyuse phase changing generatorsuse frequency shifted generators

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 6 Edition Summer 2004

replace logo

6-32

Questions

6.1 How can you guarantee a limited queueing delay in a router?At what cost?

6.2 Find out the expectation and variance of the distributionsgiven on slide 6-9

6.3 Assume you did a simulation of traffic with Hurst parameterH=0.8 that took 10 seconds. How long does a simulation withconfidence intervals reduced to one tenth take?

Chapter 6

Introduction

Web Statistics

Self-Similarity

Simulations

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 7: Quality of Service

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-3

Chapter 7: Quality of Service

7.1 What is Quality of Service?

7.2 Best Effort Service

7.3 Differentiated Services

7.4 Integrated Services

7.5 MPLS

7.6 Service Level Agreements

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-4

What is Quality of Service?General View

quality as perceived by users depends ondata manipulation (coding)network performanceend-system performanceprotocol characteristics

ITU distinguishes 3 aspectsQuality of Service (QoS)

performance of a communication networkfrom the point of view of the user of a service

Grade of Service (GoS)the part of QoS that depends onnetwork dimensioning(for TDM networks)

Network Performancethe ability of a network todeliver a requested oragreed service

IETF community does not distinguisheverything is called “QoS”

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAshow good is sound

or video quality?how good is sound

or video quality?

how often do you get a busy

tone from the network?how often do you get a busy

tone from the network?

how much bandwidth do you get?

how many packetsare dropped?how much bandwidth do you get?

how many packetsare dropped?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-5

What is Quality of Service?The Basic Problem

no problem if there is alwaysless traffic than can beforwarded on the egress link

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

ingresslinks egress

linkRouter. . .

buffer can moderate effects ofshort-term overload

in the milliseconds rangepackets delayed by some time

Router

. . .

longer-term overload leads to congestion effectspackets delayed by a long timepackets dropped due to finite buffer space

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-6

QoS MetricsPacket Level Metrics

bit error rate

packet loss probabilitycorrelated lossmultiple loss

availability of packet transport servicetwo-way IP connectivity to destination

probability of out-of-order deliveryduplication probability

delaydelay variation

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-7

Application Level Metrics

Availabilityreliability (Can I reach the server?)blocking probability (Am I allowed to use the service now?)in-service failures (Does the service break down after I gotstarted?)

achievable bit ratereaction time to user input

e.g. telephony connection set-up or Web page retrievalcan consist of many packet transfer times + repetitions in caseof losses

audio / video qualityachievable quality for a certain codec (time and spaceresolution, noise)impact of packet level effects on quality

lost packetsdelayed packets (often equivalent to loss but impact onsynchronization)

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-8

Admission Control

Aim:Once a user has been admitted to a service, they should havea chance to finish their task.

Avoid:interruption of audio/video communicationsinterruption of long file transfers(repeated transfer wastes resources)

Mechanism:Admit only the amount of traffic a network can handle.Block the rest of the traffic.

Problems:blocking also reduces perceived quality→ AC does not help on insufficiently dimensioned networksresource requirements are hard to describe (e.g. for elastictraffic)all concerned network links need to take part in the admissiondecision

processing and communication overheadcomplexity of network nodes

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-9

7.2 Best Effort ServiceProblems

In the current Internet (and most IP networks) all traffic flowssuffer under overload

no protection of “old” connectionsno protection against overload where individual throughputdrops to zero

time-out of connections, very large retransmission timer valuesrepetition of file transfers wastes bandwidth

Number of TCP Connections

Thro

ughp

utpe

rCon

nect

ion

traffic bursts cause delay variationproblem for “real-time” services

late packets are equivalent tolost packets for audio and video

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

...but it is simple...but it is simple

...and it works...and it works...and you can reac

h a

high network utilization...and you can reach a

high network utilization

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-10

Overdimensioning

Simple approach to deal with the QoS problem“throw bandwidth at the problem”

Keep network utilization below 10%high cost per bandwidth!engineers don’t like wasted resources

Capacity upgrade planning requiredtraffic tends to grow and increase utilization

No protection against sudden changes of traffic profilese.g. sudden focus of interest on one Web site

No protection against delay variation due to short-termtraffic bursts

so why don‘t you introduce priorities?so why don‘t you introduce priorities?

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-11

7.3 Differentiated Services

Differentiated Services (DS) described in RFCs 2474and 2475Forwarding Classes

per-packet action in routersclass encoded in IP packet header (using the IPv4 TOS field)resources are allocated to aggregated traffic, not individualflowstraffic policing at the edge (conditioned, e.g. shaped, trafficaccepted)class-based forwarding in the coreAssured Forwarding (AF)

certain rate is allowedExpedited Forwarding (EF)

priority service to offer low delay or low loss, shaped bit ratedefault (Best Effort, BE)

Class of Serviceinstead of service guarantees

“forwarding behavior”(Per Hop Behavior, PHB)

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

AF Assured ForwardingBE Best EffortDS Differentiated ServicesEF Expedited ForwardingPHB Per Hop BehaviorTOS Type of Service

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-12

Differentiated Services (2)

desired PHB specified in DS (TOS) fieldDS code points (DSCP) defined locally or by standardsorganizationrouters read DS field to decide which queue to put a packet in

setting the DS fieldpacket classifier (boundary node at network edge) sets DSvalues (“marking”)check packet origin (+destination, protocol etc)long-term contract between user and ISP (SLA) allows user(IP address, MAC address) to use premium service DSCPs

Conditioning / usage controlmeter observes usage

Conditioning Actionsremarkingshapingdropping

Network BN Boundary NodeDS Differentiated ServicesDSCP DS Code PointH Host or Customer NetworkISP Internet Service ProviderPHB Per Hop BehaviorSLA Service Level AgreementTOS Type of Service

HBN

BNH

Network

BN

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-13

7.4 Integrated Services

Explicitly set up a connection before sending trafficresource reservation in network nodes along the pathensure that there is enough bandwidth

block set-up request if traffic cannot be carriedor if specified delay/loss targets could not be met

IntServ framework wants to guarantee upper delay bounds

change of all IP routers requiredparticipation in resource reservation signallinglocal resource reservationper-flow queueing

routers need to combineaddress, port and protocol numbers to identify flows

applications need to know traffic specificatione.g. for leaky bucket or Generic Cell Rate Algorithmpolicer / shaper

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

statistical bounds (quantiles)

are more efficientstatistical bounds (

quantiles)

are more efficient

There is no flow label in IPv4!There is no flow label in IPv4!

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-14

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Integrated ServicesRSVP

Resource reservation protocol (RSVP) described inRFC2205

IP protocol ID 46 (raw IP packets), optional transmission onUDProuter alert option [RFC 2113] set

PATH message from origin to destinationeach router stores a “path state” per flow,including the previous hop

RESV message from dest. to originuses recorded previous hopto follow the path back

Soft State principleperiodic repetition of PATH and RESV messages

unidirectional operationcompliant with existing IP routingreverse data can take another path in the networkseparate signalling required for reverse data path

H1

R R

R

R

RH2

H HostID IdentifierR RouterRSVP Resource

ReservationProtocol

PATH

RESV

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-15

Integrated ServicesCOPS

Common Open Policy Services (COPS)

Policy Decision Points (PDP) in the networkrequired for globally (at least network-wide) coordinated policiesknow who is allowed to do whateach router can ask a PDP if the global policy allows a specificclient request to be granted

COPS data format is compatible to RSVPsimplifys routers’ actions

Problem:Protocol is well specifieddata structure semantics are not

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-16

7.5 MPLS

Multi Protocol Label Switchingoriginally designed to simplify IP forwardingIdea:

attach (prepend) a label to each IP datagramrouters can store specific handling instructions for each flow

next hop / traffic class / mapping onto Link Layer pipes

Label Switchingmultiple “label switched paths” (LSP) per linklike ATM: translation table from incoming to outgoing LSP

instead of flow identification plus next-hop lookup per packet

Forwarding Equivalence Class (FEC)general concept for “what the forwarding decision is based on”

e.g. destination IP prefix / egress router / application flow

Advantage over pure switchinglabel switching can be limited to a part of the traffic

here comesthe flow labelhere comesthe flow label

ATM Asynchronous Transfer ModeFEC Forwarding Equivalence ClassLSP Label Switched PathMPLS Multiprotocol Label Switching

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-17

MPLSLabel Distribution

Label Switched Paths need to be managed

Label distribution protocolsRSVP-TE extension of RSVP

label distribution, explicit routing, bandwidth reservation for LSPrerouting of LSP after failure, etc

LDPspecially designed label distribution protocolhard statelabel switched router discovery

CR-LDPconstraint-based route LDPexplicit routing, resource reservation, route pinning

LDP Label Distribution ProtocolLSP Label Switched PathRSVP Resource Reservation ProtocolTE Traffic Engineering

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-18

MPLSTraffic Engineering

LSPs can have allocated bandwidthflexible way to optimize or reroute traffic flows in a network

Label switching can overcome standard IP routing limitationsclassical IP routing cannot fully distribute trafficRSVP allows full optimization of routing for a given traffic matrixon a network topology

R4 N3

R2

R3

R1

N1

N2

classically, all traffic from N1 and N2

to N3 would have to take the same

route between R1 and R4

classically, all traffic from N1 and N2

to N3 would have to take the same

route between R1 and R4

Different routes can be allocated for different QoS classes

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-19

Traffic Engineering without MPLS

IP shortest path routing is determined bylink / interface cost metricsby changing those metrics, routing can be changedlink loads can be reduced by appropriate routing

Example (simplified):

R2R1

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAsR5R4R3

N1 N2

N3

hop count basedrouting metrics

flows from N1 to N2 and N1 to N3 all go via the link R1-R2

1

1 1

11

changed metricsflows from N1 to N2 and N1 to N3 take different paths

R2R1

R5R4R3

N1 N2

N3

1

1 1

13

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-20

Traffic Engineering without MPLSOptimization of Routing Metrics

link loads can be reduced by appropriate routinghighly non-linear influence of metrics on link loads

hard to find out metrics for optimum load distributionnot every target routing can be realized with metricslinear solution mechanisms not applicable

metrics can be optimized using heuristic approachesgreedy search

always increase metric value of the link with highest loadgenetic algorithms

vector contains all link cost metrics of the networkpopulation of several such vectors is a generationsubsequent generation created through copy, crossover, mutationcontrolled by “fitness” indicated by e.g. highest link load

simulated annealingrandom movement in 2n-dimensional discrete parameter space(for a network with n links)

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-21

Traffic Engineering without MPLSOptimization in the “COST 239” Example Network

ECMP (Equal Cost Multi-Path) option enabled in both cases

hop count based routingmean link load = 24.38%max. link load = 71.35%

optimized routing metricsmean link load = 24.69%max. link load = 38.75%

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-22

7.6 Service Level Agreements

Service Level Agreement (SLA)contract between ISPs orcontract between ISP and end user / company

Service Level Agreement (SLA) consists ofService Level Specifications (SLS)prices and measures to be taken if SLS are violated

Examples for SLSSLS1:packet delay bound between nodes A and B in the network

3 samples every 5 minutes90% of samples are less than 50ms

SLS2:destination network NB is unreachable for at most5 minutes per month

10 consecutive packets (one every second) do not reach thedestination

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-23

Service Level Agreements (2)

Example for measuresget 10GB free data transmissionif SLS1 or SLS2 is violated in at least 3 consecutive months

Control of SLAsoffer monitoring services for SLS related quantities to users(via Web)active or passive measurement by users

Different objectives!wide area ISP

wants to have high network utilizationoffers SLA within its network

end userwants to have end-to-end performancemultiple ISPs involved

bandwidth related SLS are

hard (impossible) to monitorbandwidth relatedSLS are

hard (impossible) to monitor

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 7 Edition Summer 2004

replace logo

7-24

Questions

7.1 Find out the availability of your favourite Web server. How often(out of 50 experiments) do you get the entry page withinreasonable time? How often do you get no answer at all?

7.2 Have a look at some major ISPs’ Web sites and check the SLAsthey offer their customers.

7.3 Can different QoS classes be introduced with “flat rate” pricing?

7.4 What is the difference between in-band and out-of-band networkmanagement? What are the advantages / disadvantages?

7.5 What is the difference between authentification andauthorization?

7.6 Are there other ways than encryption to achieve confidentialcommunication?

7.7 What is the format of an IPv6 packet header? What fields havebeen added / left out / moved to options compared to an IPv4header?

Chapter 7

What is QoS?

Best Effort Service

DiffServ

IntServ

MPLS

SLAs

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 8: Network Management

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-3

Chapter 8: Network Management

8.1 Introduction8.2 Configuration Management

8.3 Performance Management

8.4 Fault Management

8.5 SNMP MIBs

8.6 SNMP Protocol

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-4

8.1 Network ManagementIntroduction

Ideamanage all relevant network elements from a small number ofmanagement centerskeep the network running

detect (and possibly repair) faultsdetect possible problems before faults (especially on PHY layer)

ensure that contractual requirements are metkeep up with necessary configuration changes

new users, new connections to other networks, new tariffs

Management TasksConfiguration ManagementPerformance ManagementFault ManagementAccounting ManagementSecurity Management

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-5

Internet Network Management

“Simple” Network Management Protocol (SNMP)specification of data structures (MIB Management InformationBase)specification of transfer encodingspecification of a communication protocol

“information model”“information model”

physical defects orrouting

errors affect managementphysical defects orrouting

errors affect management

In-band network managementuses the IP network for communication

can be introduced with little effortno special management network requiredno separate technology required

depends on working IP networkmanagement impossible if network elements are unreachable

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-6

Management Architecture

Architecturemanagement station(s)network elements runningmanagement “agent” software

routersserversprinter, terminal,Web, remote access,. . .

Basic Mechanismsrequest information from an agentset configuration data (center to agent)notify center of new information (“trap”: agent to center)

MSother

Network

NE

NE

NE

NE

NE

NE

NENE

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-7

8.2 Configuration Management

Objective:be able to automatically generate current network graph

detect configuration rather than have operators document itnecessary for detecting mismatchesbetween target and actual configurations

topology discoveryconnectivity discoverydiscovery of element configuration

routing tablesprotocol and port parameters

configuration tracking servicecollection of “history” data to allow going back to the lastworking set-upbackup of configuration information

automatic distribution of changesnew policies, routing tables, software versions, ...

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-8

Configuration Management (2)

... is easy in static configurations

... has problems in dynamic (chaotic) environmentsas found in many small to medium size enterprise networks

... should help tracking down errorserrors can be introduced by configuration changeshave the current configuration available when locating othererrors

Configuration tracking needs to be done continuouslyarchive results

When an error hasalready occured,

it may be too late for configuration disc

overy!When an error hasalready occured,

it may be too late for configuration disc

overy!

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-9

8.3 Performance Management

Objective:Prevent load or configuration related performance problems

Performance problems may be perceived as “failures” by users!“hard” problems (equipment failure) may manifest themselvesas performance problems due to automatic reconfiguration

Approach: Monitoring of network performanceperiodic evaluation of resultsnetwork-wide observationsautomatic baselining

Also useful for end-user interfacenetwork manager knows problems before phone calls come inusers can get (good) performance statistics fromInternet/Intranet server

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-10

Performance ManagementExamples

Examples for performance / problem measureslink utilizationCPU load in routerspacket loss ratespacket delaylink failures

dela

ylo

ss

Long-Termtraffic growth

dela

ylo

ss

misconfiguration

dela

ylo

ss

link bandwidthupgrade

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-11

8.4 Fault Management

Error Detectiondetect that an error has occured

Fault Isolationfind the error that caused the symptoms

Service Restorationtake actions

remote reconfigurationrepair/exchange hardwarerequest restoration of service from underlying service provider /carrier

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-12

Event Correlation

Problem: deduce the true failure cause from (indirect)indications

indications are observed (e.g.: highly variable delay)

condensation of raw data into informationeach single data item has little informationcombinatorial or temporal correlation of data

prevent event stormssingle fault can cause many measures to trigger alarmsde-duplication of multiple events by network managementsoftwareDo not overload human operators by too much (identical)information!

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-13

Routing Stability

routing instability has significant impact on networkperformancemetrics for route stability

availability (time)mean time between failure or fail-overtime to repairfailure durationfrequency of routing table updates

inter-domain route instability detectionfrom BGP routing table events (route failure, repair, ...)

intra-domain route instability detectionfailure logscertain routing protocol messages

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-14

8.5 SNMP MIBs

see RFC 1213, RFC 1907 and many othersHierarchical structure of informationunique identification of information fields (for all vendors andnations)standard SNMP MIBs defined for many network elementtypes

allow retrieving information without knowledge of machinedetailsget-next mechanism for retrieving “all information”without prior knowledge of what will be available

element values encoded in ASN.1Abstract Syntax Notationdefines content transfer encodingreceiver can detect data type and encoding

No object oriented structure

Who would read the

handbook anyway?Who would read the

handbook anyway?

ASN.1 Abstract Syntax Notation #1MIB Management Information BaseSNMP Simple Network Management Protocol

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-15

SNMP MIBsStructure

itu2

iso1

joint-iso-itu

3

org3

dod6

un-named

inter-net1

mgmt2

directory1

experi-mental

3private

4

1.3.6

mib1

ip4

addr.trans.

3icmp

5tcp6

udp7

inter-faces

2system

1

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-16

SNMP MIBsVariables

Numeric representations defined in standards (or privatelyallocated)

numeric representatione.g. 1.3.6.1.2.1.4.20

MIB variable namee.g. iso.org.dod.internet.mgmt.mib.ip.ipAddrTable

hierarchically substructurede.g. consisting of

ipAdEntAddr,ipAdEntIfIndex,ipAdEntNetMask,ipAdEntBcastAddr,ipAdEntReasmMaxSize

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-17

SNMP MIBsASN.1

Abstract Syntax Notation 1 (ASN.1)used to describe entriese.g.

ipAddrEntry ::= SEQUENCE ipAdEntAddr IpAddress,ipAdEntIfIndex INTEGER,ipAdEntNetMask IpAddress,ipAdEntBcastAddr IpAddress,ipAdEntReasmMaxSize INTEGER (0..65535)

also specifies binary transfer encoding

similar to TLV (Type, Length, Value) principleType specifies a data typelength gives total length of fieldSEQUENCE type allows hierarchical specification

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-18

8.6 SNMP Protocol

“Simple” Network Management Protocol[RFCs 2570, 2575, 2572]

uses UDP (port 161; port 162 for traps)SNMP Version 3 features

message authentication (who sent the message?)privacy (avoid unauthorized reading)authorization and view-based access control(who can change what?)remote configuration of security system

Communication beweenManagement Application andNetwork Element

read configurationread counters / statisticsmodify configurationnotify management station of eventconfigure security

Major problemsof SNMPv2!Major problemsof SNMPv2!

ManagementApplication

SNMPEngine

IP Network

SNMPAgent

NetworkElement

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Management Station

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-19

SNMP Protocol Message Types

GetRequestget the value of a list of specified variable(s)

GetNextRequestget the value and ID of the variable following the given oneallows to browse unknown MIBs

GetBulkRequest (SNMPv3)Response

send the requested value backSetRequest

change the value of a variable (e.g. for configuration changes)InformRequest (SNMPv3)SNMPv2Trap

unsolicited mesage, see next slideReport (SNMPv3)

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-20

SNMP Traps

Trapsused for spontaneous communication from agent to serverserver address is pre-configured in agentserver is prepared to receive Trap messages from (many)agents

Trap TypescoldStartwarmStartlinkDownlinkUpauthenticationFailureegpNeighborLossenterpriseSpecific

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-21

SNMP Message Format

Messages consist completely of ASN.1 transfer encodedfieldsmessage formats specified in ASN.1

example:GetRequest PDUexample:GetRequest PDU

SNMPv3Messagemessage versionheader data

message IDmaximum reply sizeflags and security model

security parametersscoped PDU data

scoped PDUcontext engine ID and namePDU

0 (GetRequest)request IDerror status and error indexlist of object identifiers

encrypted PDU (octet string)

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 8 Edition Summer 2004

replace logo

8-22

Questions

8.1 Compared to SMTP and HTTP, do you really consider SMTPa “simple” protocol? What is simple about it? What is not?

8.2 What is the default community string for reading an SNMPvariable?

8.3 Find the “snmpget” public domain SNMP client, start snmpd(e.g. on a Linux machine) and request some values.

8.4 Do you have to read the MIB specifications to understand thedata returned by the “snmpwalk” tool?

Chapter 8

Introduction

Configuration Mgt.

Performance Mgt.

Fault Mgt.

SNMP MIBs

SNMP Protocol

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 9: Security

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-3

Chapter 9: Security

9.1 Introduction

9.2 Methods for Improving Security9.2.1 Methods for Confidentiality and Integrity9.2.2 Methods for System Security

9.3 Internet Security Frameworks9.3.1 Authentication Frameworks9.3.2 Network Layer Security: IPSec9.3.3 Transport Layer Security: SSL and TLS9.3.4 Application Layer Security: PGP

9.4 Firewalls

9.5 Absolute Security?

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-4

9.1 Introduction: Areas ofSecurity Problems in Communication Networks

M

A

CommunicationNetwork

B

Security of Communicationsdata transporte.g. risk of eavesdropping

Security of End Systemsdata storage and manipulatione.g. risk of unauthorized userisk introduced/increasedby network connectivity

Security of the Communication Networkdata transporte.g. risk of unauthorized use

People havedifferent focusPeople havedifferent focus

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-5

Security of Communications

Confidentialityno “eavesdropping”no unauthorized access to information → Encryption→ Encryption

→ digital signature→ digital signature

no simple solutionavailable

→ use other communications channel

→ use private sequence numbers

no simple solutionavailable

→ use other communications channel

→ use private sequence numbers

Data Integrityno unauthorized manipulation of informationrecipient receives data identical to what the originator sent

Data authenticityoriginator cannot claim fake identity

Guaranteed delivery of messagesintruder cannot remove messages completely

all of the above: with or without detection by originator or recipient

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-6

Security of End Systems

Access to confidential datae.g. leaking of credit card account information

Manipulation of datachange or delete information

Change of systemmanipulation of configuration

e.g. authorization or account informationunauthorized running of programsimport of foreign (malicious) programs

Denial of Service (DoS) attackscause system overloadcause system to hang or crash

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-7

Security of Communication Networks

Unauthorized network usageuse network without paying

Modification of network configurationchange of DNS entrieschange of routing information

Denial of Service (DoS) attackslike “end system” attacks, directed to network elements

DNS servers, routers, network management stationsimpact availability of network service

access servicepacket delivery to selected destinations

Typical formulationfrom RFCs:

“Security issues are not

discussed in this memo.”

Typical formulationfrom RFCs:

“Security issues are not

discussed in this memo.”

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-8

“10 most crucial Internet Security Threats”

1. BIND weaknesses2. Vulnerable CGI programs and application extensions on

Web servers3. RPC weaknesses4. Remote Data Services in Microsoft Internet Information

Server5. Sendmail and MIME buffer overflows6. Solaris system administration and mount daemons7. improper configuration of file sharing (Windows, Unix,

Apple)8. weak (or no) passwords for user or root accounts9. IMAP and POP buffer overflows or incorrect configuration

10. default SNMP community strings (“public” and “private”)

Source: www.sans.org, 2001Focus on End Syste

ms and NetworkFocus on End Systems and Network

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-9

Attacks

Eavesdroppingdatauser identitytraffic flows

Denial of ServiceSpoofing

gain network access by taking on a trusted machine’s addressPhysical compromise

access to hard diskaccess to computer in “stand-alone” stateaccess to communication line

some switches and most operating systems allow capturing packet contents and copying to remote destinations

Replay attackrecord communication and replay at a later timetime stamps can limit reusable time

Trojan horses / virus programs

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-10

9.2 Methods for Improving Security

Data manipulation methodsencryptiondigital signaturessignature checking on configuration files and programspacket filtering, protocol filtering

Physical methodsphysical access controlbackup strategyseparation of networks, hosts without network connectivity

Logistic methodsauditing and log evaluationdouble passwordsselection of operating personnel

Good security requires a

multi-level securityprocessGood security requires a

multi-level securityprocess

Chapter 9

Introduction

Improving SecurityConfidentiality

and IntegritySystem Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-11

9.2.1 Methods for Confidentiality and Integrity

Authenticationuse encrypted communication for authentication also

Encryptionsymmetric keyasymmetric keyhybridtrust center

Digital Signaturecheck integrity of datacheck identification of originator

Steganography

Chapter 9

Introduction

Improving SecurityConfidentiality

and IntegritySystem Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-12

Encryption

use keys to encrypt and decrypt a plain text message P

Symmetric key methods (“Private Key” methods)fast operation, suitable for mass data encryptionone key needed for any pair of communication partnersrisk of key being revealed

BPP

EncryptionEngine

secret key

GlobalInternet

DecryptionEngine

secret keyA

encrypted file

Chapter 9

Introduction

Improving SecurityConfidentiality

and IntegritySystem Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-13

Public Key Encryption

Asymmetric key methods (“Public Key” methods)generate pairs of keys where one cannot (easily)be computed from the otheruse public key and secret keyTrust Center gives access to all public keys

Hybrid methodgenerate random key for symmetric encryptionuse public key method to transfer symmetric keyfollowing communication encrypted using symmetric key (moreefficient)

BPP

EncryptionEngine

GlobalInternet

DecryptionEngine

A

encrypted file

B’s publickey fromTrust Center

B’s secret key

Chapter 9

Introduction

Improving SecurityConfidentiality

and IntegritySystem Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-14

Digital SignaturePublic Key Method

A can generate a signature from P using A’s secret keyanyone can check the signature using A’s public key

for encryption + signature, sign with secret key (A)and encrypt with public key (B)

only B can read the message

BPP

EncryptionEngine

GlobalInternet

DecryptionEngine

A

plaintext + signature

A’ssecret key A’s public key

check signature

Chapter 9

Introduction

Improving SecurityConfidentiality

and IntegritySystem Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-15

Steganography

Information hiding instead of encryption

hide texts e.g. in large inconspicious audio or video filesset the least significant bits of some pixels or audio samplesaccording to the information to be hiddennot as efficient as encryption

not as obvious as encryptionhard to find in a data streamhard to track even where encryption is illegal

also used for digital signatures for copyrightdigital “watermark”

Is there any secret

information in thisimage?Is there any secret

information in thisimage?

Chapter 9

Introduction

Improving SecurityConfidentiality

and IntegritySystem Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-16

9.2.2 Methods for System Security

Protect systems by firewalls (see Section 9.4)Intrusion Detection

logging, auditing plus checking of logsalarm generation and notificationautomatic effect recognition, pattern recognition

Authenticationplus Authorization concept

Restrict system administrator accessensure trackability of actionsdo not allow anonymous administrator access

e.g. force use of tools like “su” or “sudo”

Install security patchese.g. against buffer overflows

State-of-the-Art System Scanningagainst worms, viruses, trojan horses

Chapter 9

Introduction

Improving SecurityConfidentiality

and IntegritySystem Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-17

9.3 Internet Security Frameworks

Definition of key formatsSelection of algorithmsDefinition of protocols

key exchangekey management

Different frameworks forAuthentication security (login)Network Layer securityTransport Layer securityApplication Layer security

Chapter 9

Introduction

Improving Security

FrameworksAuthenticationIPsecSSLPGP

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-18

9.3.1 Authentication Frameworks

plain passwords can be interceptedencrypted passwords can also be intercepted

→ use challenge / response methods and mutual authentification→ include timestamps

C ClientKDC Key Distribution CentreS Server

C S

KDC0

1 2

kerberos [RFC1510]authentication mediated throughkey distribution centre (KDC)

1. KDC sends to clientsession key encrypted with client keysession key + client ID encrypted with server key = ticket

2. user forwards ticket to server3. user decrypts session key, server decrypts ticket

(→client ID and session key)→ communication can use session key

other methods used in RADIUS (see Section 5.4)chap/pap authentification

alternative: code generation cardse.g. securID

Chapter 9

Introduction

Improving Security

FrameworksAuthenticationIPsecSSLPGP

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-19

9.3.2 Network Layer Security: IPsec

latest version specified in RFCs 2401–2410provides security for any transport layer data over IP

extension service for IPv4 (protocol #50)IPv6: part of the standard

Functionskey exchange / management (IKMP)symmetric encryption (IPSP)authentification lower layer Prot.

App. Layer Prot.

IPsecTCP or UDP

ESP Encapsulated Security PayloadIKMP Internet Key Management ProtocolIPSP IP Security Protocol

TCPData

IPv4Header

TCPHeader

ESPHeader

ESPTrailer

ESPAuth

encryptedauthenticated

Encapsulated Security Payload (ESP) HeaderTransport Mode: encryption of IP packet payload

user data encrypted, but addresses readable

Tunnel Mode: encryption and encapsulationof complete IP packet

original addresses ofIP packet are concealed

Chapter 9

Introduction

Improving Security

FrameworksAuthenticationIPsecSSLPGP

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-20

Ipsec (2)

AH Authentication HeaderTCPData

IPv4Header

TCPHeaderAH

Authentication Header (AH)to detect manipulation“signature” of header and payload (hash function)

Internet Key Exchange (IKE) [RFC2409]ISAKMP: Internet Security Association and Key ManagementProtocol [RFC2408]

AuthenticationKey ManagementSecurity Associations

“Oakley” for key exchange, using the Diffie-Hellman principle:

f(x) = ax (mod p) “one-way” function (logarithm is hard to compute)parameters a and p are known by all usersuser i has private key Xipublic key is Yi = aXi (mod p)for communication between i and j use Zij = Zji = (Yj)Xi = aXiXj mod puse Zij for encryption and decryption (symmetric key)

Chapter 9

Introduction

Improving Security

FrameworksAuthenticationIPsecSSLPGP

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-21

9.3.3 Transport Layer Security: SSL / TLS

Transparent layer between TCP and applicationNetscape: “Secure Socket Layer”IETF: “Transport Layer Security”

negotiation ofencryption algorithm (e.g. RC2, RC4, DES, Triple-DES, IDEA)cryptographic hash function (e.g. SHA, MD5)key exchange protocol (e.g. RSA, Diffie-Hellman)signature method (e.g. RSA, DSA; only for authentication)

HandshakeProtocol

TCP

IP

TCP based Applications (HTTP, FTP, SMTP, ...)Change CipherSpec Protocol

AlertProtocol

Application DataProtocol

SSL Record Protocol

main application:

httpsmain application:

https

Chapter 9

Introduction

Improving Security

FrameworksAuthenticationIPsecSSLPGP

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-22

9.3.4 Application Layer Security: PGP

Encryption and signature for e-mailshybrid method:

symmetric session keytransmitted by public key encryption

special problem: offline communicationpublic keys mostly from “Web of trust”

Web pages“finger” informationbusiness cardscertify a key yourself or trust somebody to certify keys

newer standard: S/MIMEnewer standard: S/MIME

BPP

EncryptionEngine

GlobalInternet

DecryptionEngine

A

encrypted message

B’s publickey fromA’s keyring

B’s secret key

Chapter 9

Introduction

Improving Security

FrameworksAuthenticationIPsecSSLPGP

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-23

9.4 Firewalls

Secure a whole enterprise networkCommon point of trust

reduces effort in securing many computersreduces risk of a misconfigured computer compromising others’securityonly one system to verify and observeonly few services need to go across

GlobalInternet

(insecure)

Intranet(protected)

FirewallFirewall

selected servicescan pass throughselected servicescan pass through

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-24

Firewall Functions

Network Layer Access Controlwhich hosts are allowed to communicate (inside + outside)

User Level Access Controluser authentification

Access Control ManagementApplication Level Access Control

limit applications and their functionality to a basic necessarylevel

Isolation of internal servicesimplementation errors in servers are less critical

Logging, auditing and alarmingHide internal network structure

Firewalls must resist attacksprefered targets

Apply patches regularly:

Firewalls need maintenance!Apply patches regularly:

Firewalls need maintenance!

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-25

Firewall Design Rules

as simple as possibleeasy to implementeasy to understand implementation

as little functionality as possible (per module)as little trust as possible (between modules)

no trust in unprotected modulesno trust in any WAN userconsider attacks from both sidesonly provide minimum servicesblock the restprotect firewall configuration

restrict configuration accessaudit changes

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-26

Network and Application Layer Functions

Packet Filteringrules specify what to do with a packeton the basis of IP addresses (local and remote) and / or portnumbersblock access to unwanted servers and services

locally compiled lists or lists from service providersactions: pass through / translate network address / translateport / drop

Application Gatewayrestriction to basic functionality of application level protocolsproxy server

for http, ftprelay service

for smtp, nntp

Combination of both can increase security

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-27

Firewall ConceptsSimple Packet Filter

GlobalInternet

Intranet

Routerwith

packet filter

Outside world (insecure)

Inside (protected)

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-28

Firewall ConceptsBastion Host

GlobalInternet

Intranet

“Stub Network”“Stub Network”

BastionHost

OutsideRouter

InsideRouter

Outside world (insecure)

Inside (protected)

route packets onlyto and from Bastion Host

proxy serverand relay host

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-29

Firewall ConceptsMulti-Level Configuration

block packetsGlobalInternet

Intranet

Public ServicesHost

Access Router+ Packet Filter

Screening Router+ Packet Filter

for external mailcommunication

offer e.g.Web serviceto outside

preventIP spoofing

Mail Host BastionHost

e.g. forFTP and Webaccess

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-30

9.5 Absolute Security?

Most, if not all methods have a residual error probabilitycan be made arbitrarily small, but never zero

Simple Exampleschance of guessing a parity bit right is 0.5good chance of manipulating an original text to fit a given 10 bitdigital signature

“brute force” attacks are always possibleattacks that use little or no knowledge of the securitymechanismssimply rely on probabilitye.g. (parallel and distributed) cracking of encryption keys

try every possible keyuntil you can decrypt the messagetry every possible password until you findone that matches the encrypted text Perfect security in

one area will move

threats to another area

Perfect security in

one area will move

threats to another area

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 9 Edition Summer 2004

replace logo

9-31

Questions

9.1 Can plain text based protocols ever provide confidentiality?9.2 Are protocols using binary information safer than text

based protocols?9.3 Can you use challenge/response methods for e-mail

communication?9.4 What do you need to know about a target system in order

to exploit a buffer overflow?

Chapter 9

Introduction

Improving Security

Frameworks

Firewalls

Absolute Security?

Questions

Informationand CommunicationNetworks

replace logo

© Joachim Charzinskihttp://www.jcho.de/IPNA/

IP Based Networks and ApplicationsChapter 10: IPv6

Dr.-Ing. Joachim [email protected]

This slide set is distributed to support students of the University of Stuttgart who attend the IPNA lectureduring summer term 2004. All other use requires written permission by Joachim Charzinski.

INFOTECHLecture

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-2

Outline

1. Introduction2. Network Layer (et al.)3. Transport Layer4. Applications and Application Layer Protocols5. Network Architectures6. Statistics and Performance7. Quality of Service8. Network Management9. Security

10. Ipv6

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-3

Chapter 10: IP Version 6

10.1 Introduction10.2 Addressing10.3 IP Packet Header10.4 Automatic Configuration10.5 Security Support10.6 Changes to Other Protocols10.7 Migration Strategies

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-4

10.1 Introduction

IP version 6 is the designated successor of IPv4(see Chapter 2)

also known as IPnG (next Generation)version 5 was assigned for the (experimental)Stream Protocol (ST)described in RFCs 1883, 2460, 2462–2464, 2373–2375, 2526

Motivation for IPv6increased address space to allow maintainingend to end transparencyIntroduction of Quality of Service mechanismson Network LayerImprovement of Network Layer Security (end to end)

completely new header formatlarger addressesnew options and option handling32bit alignment for faster processing

can also bedone with IPv4can also bedone with IPv4

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-5

Introduction (2)

Reasons for introducing IPv6address space problem solved

especially interesting for mobile networks and large growthcountries (China)

support of flow labelsfull support for tunnelling and interworking

v6 over v4 networksv4 over v6 network not defined yet (not yet needed)

MPLS Multiprotocol Label Switching

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Reasons for not introducing IPv6changes required to all routers and end systemschanges required to some applicationsIPv4 works wellenormous overhead due to long addresses(especially for short packets)addressing problem not as urgent as believed 5 years agolabel stacking not supported→ flow label field not useful for MPLS

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-6

10.2 Addressing

128 bit (16 octets) addresses [RFC1887]more than 1024 addresses per m2 of earth surfaceenough freedom for structured addressing

Address Typesunicast addresses [RFC2374]

global aggregatable / link local / site localanycast addresses

deliver packet to one of a set of addresses that has the shortestpath

multicast addressestextual representation

8x16bit integers, represented by 4 hex digitse.g. 1080:0000:0000:0000:00AB:0801:200E:3AB2short form: 1080:0:0:0:AB:0801:200E:3AB2“::” used to denote as many “0” fields as necessary (once perstring), e.g.1080::AB:0801:200E:3AB2prefix indication in decimal,e.g. 1090:2ADC:3300:: /40 for a 40 bit prefix

lesson learned fromIPv4 address short

agelesson learned fromIPv4 address shorta

ge

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-7

Division of IPv6 Address SpaceHigh-Level Address Types

First bits Type of Address0000 0000 reserved for IPv4 compatibility0000 001 ISO NSAP Addresses0000 010 IPX Addresses001 Aggregatable Global Unicast1111 1110 10 Link-Local Unicast1111 1110 11 Site-Local Unicast1111 1111 Multicastunassigned: 0000 0001, 0000 011, 0000 1, 0001, 010, 011, 100, 101,

110, 1110, 1111 0, 1111 10, 1111 110, 1111 1110 0

0000...0000 0000...0000 IPv4 address0000...0000 FFFF...FFFF IPv4 address

80 bits (all zero) 16 bits 32 bitsIPv4 compatibility addresses IPv6 address

also available:yes

no

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-8

AddressingAggregatable Global Unicast Addresses

Three-level hierarchy

P TLA ID Interface IDres. NLA ID SLA ID

Number of bits in each field:3 13 8 24 16 64

P (format prefix 001 for aggregatable global unicast addresses)TLA ID: Top Level Aggregation

Transport Provider, e.g. an ISP with global networkres.: reserved for future use (all zeroes)NLA ID: Next Level Aggregation (e.g. an ISP)SLA ID: Site Level Aggregation (e.g. like an IPv4 subnetwork)Interface Identifier

e.g. random number (privacy extension [RFC3041]e.g. encoding of lower layer hardware address(with some bits in between) or EUI64 addressesARP replaced by Neighbor Discovery for IPv6

ARP Address Resolution ProtocolEUI End User InterfaceICMP Internet Control Message ProtocolID IdentifierISP Internet Service Provider

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-9

10.3 IPv6 Packet HeaderChanges

Precedence / TOS

changes to the IPv4 header

User data ...

Version IHL Total LengthIdentification Flags Fragment Offset

Time to Live Protocol Header ChecksumSource Address

Destination AddressOptions Padding

field still presentfield removedfield replaced (new meaning)field moved into extension header

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-10

IPv6 Packet HeaderChanges (2)

IPv4 fields removed from IPv6 headersHeader lengthIdentificationHeader Checksum

IPv4 fields changed for IPv6 headersPrecedence and Type of Service → Traffic Class(DiffServ Code Point)Total length → Payload LengthTime to live → Hop LimitProtocol → Next Header

Extension Headerse.g. for Fragmentation(replaces Flags & Fragment Offset fields)use “next header” field

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-11

IPv6 Packet Header

Source Address

Destination Address

Concept

User data ...BaseHeader

ExtensionHeader #1 . . . Extension

Header #n

optional

Base Header FormatVersion Flow Label

Payload Length Next Header Hop Limit

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration StrategiesTraffic Class

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-12

Extension Headers

TLV (Type, Length, Value) encoding for options

Option(s)Header LengthNext Header

Extension Header format

Type Value ...Length

Header SequenceIPv6 Base Header (40 Octets)Hop-by-Hop options (variable)Destination options (variable)Routing Header (variable)Fragment Header (8 Octets)

Authentication Header(variable)Encapsulation SecurityPayload (variable)Destination Options (variable)

first 2 bits of Type determine handling of unknown options:00=skip, 01=discard packet,10=discard packet and send ICMP message,11=like 10 but only if destination address was not multicast

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-13

Extension HeadersExamples

IPv6 Packet with TCP payload, no extension headers

TCP segmentBase HeaderNext=TCP

Frag. HeaderNext=TCP

TCP segmentRouting HeaderNext=TCP

IPv6 Packet with routing header and TCP payloadBase HeaderNext=Routing

Part of TCP segmentRouting HeaderNext=Fragment

IPv6 Packet with routing header and TCP payloadBase HeaderNext=Routing

Unified treatment of extension

headers and next layer protocolsUnified treatment of extension

headers and next layer protocols

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-14

Jumbo Payload Option

“Jumbogram”

option field contains extra 4 Bytes length indicatormaximum length of packet increased to 4GB

not to be used in conjunction with fragmentation

Changes necessary to TCP and UDP [RFC2147]UDP length=0 indicates “use IPv6 length value”TCP MSS=65535 indicates infinite MSSTCP URG pointer can only address data up to octet 65535

especially interesting for high-speed reliable local networksreduce processor interrupt load at end systems

MSS Maximum Segment SizeURG Urgent

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-15

Fragmentation

IPv6 routers do not fragment packetsPath MTU discovery is mandatory

if path MTU discovery is not possible, send packets for smallMTU sizeif absolutely necessary, fragment at source (“end-to-endfragmentation”)re-discovery may be necessary after path change

source and destination nodes can do fragmentation andreassembly

to transmit larger size payloadsfragment offset / identification principle similar to IPv4

use Fragment Header to indicatenext headerfragment offset“more fragments” (1 bit)identification MTU Maximum Transmission Unit

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-16

QoS Support

Traffic Class / DiffServ Code Pointnot counted in check sum or authentification information

routers can change the Traffic Class value without recomputingchecksums

Flow Labelsimplifies special treatment for flowsflow identified by source IPv6 address and flow labelrandom uniform choice of flow labels optimizes hashing inroutersexact function still to be defined

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Too short to accomodate

an MPLS label stack!Too short to accomodate

an MPLS label stack!

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-17

10.4 Automatic Configuration

Neighbor Discovery (ND) [RFCs 1970, 2461]find directly connected nodesusing ICMPv6 packets for communication and lower layermulticast

FunctionsRouter DiscoveryPrefix DiscoveryParameter DiscoveryStateless AutoconfigurationAddress ResolutionNext Hop LookupUnreachability Testaddress duplicate detectionRedirect

Router Renumbering [RFC 2072]centrally change all address prefixes within a subnetworke.g. for changing to a new ISP or campus address restructuring

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-18

10.5 Security Support

Extension of IPSec [RFC2401]Security Association

defined by destination address and Security Parameter Index(SPI)Key for authentification / encryptionAlgorithms for authentification / encryptionKey lifetimeSecurity association lifetimeSource addressSecurity level (confidential, unclassified, etc)

Key ManagementInternet Key Exchange (IKE) [RFC2409]Internet Security Association and Key Management Protocol(ISAKMP) [RFC2408]

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-19

10.6 Changes to Other Protocols

Routing protocolsneed to handle new address format

DNSnew “A6” resource record for “A” type requestsDNS update message [RFC2136] for dynamic DNS

TCP and UDPSocket Interface (Addresses)UDP now requires checksumreduced maximum payload length

Plus any other protocol that handles IP address informatione.g. FTP, H.323

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-20

ICMPv6

New functional structure compared to ICMPv4

Error Reports

Echo Request / Reply

Group Managementreplacement for IGMPgroup membership query, report, termination

Neighbor Discoveryrouter solicitation / advertisementneighbor solicitation / advertisementredirect

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-21

10.7 Migration Strategies

Described e.g. in RFCs 1933, 2767IPv6 applicationsv6 and v4 IP layersselection via v6 address

observation of IPv4 mapped IPv6 address→ communicate via IPv4

IPv6 SocketsTCP for IPv6

IPv6

IPv6 Application

Subnetwork Layer

TCP for IPv4IPv4

Dual Protocol StacksIPv6

NetworkIPv6

NetworkIPv4

NetworkTunnel

Tunnels

Trans-lator

IPv4Network

IPv6Network

Translators

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-22

Migration StrategiesTunnelling of IPv6 over IPv4 networks

encapsulation of IPv6 packet in IPv4 packettransmission over IPv4 network as far as neededingress router of IPv6 network strips off IPv4 header (end oftunnel)configured tunnels [RFC1933]

use next IPv4/IPv6 router as end of tunnelautomatic tunnels [RFC1933]

using IPv4 compatible addressesIPv4 address can be deduced from IPv6 addressnewer developments: “6over4” [RFC2529], “6to4” [Internetdrafts]

exchange of routing and reachability information betweenIPv6 islandsensure consistency between IPv4 and IPv6 routing

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-23

Migration StrategiesAddress Translation

Header Translation (SIIT) [RFC2765]translation between IPv4 and IPv6 headerstranslation between ICMPv4 and ICMPv6 packetstranslation of fragment extension header into IPv4 fragment infotemporary allocation of IPv4 address for IPv6 host(e.g. via DHCP)no multicast support

NAT-PT: Protocol Translation [RFC2766]NNAT or DSTM

temporary allocation of IPv4 address for an IPv6 host(e.g. via DHCP)NNAT server causes reconfiguration of IPv6 hostafter IPv4 DNS query

Application Level GatewaysFirewalls, Proxiesstatically configured addresses on IPv4 / IPv6 sidesallow an institution to run IPv6 internally and communicateexternally via IPv4 (or vice versa)

DSTM Dual Stack Transition MechanismNAT Network Address TranslationNNAT No Network Address TranslationSIIT Stateless IP/ICMP Translation

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Information and Communication Networks© Joachim Charzinskihttp://www.jcho.de/IPNA/ IPNA Chapter 10 Edition Summer 2004

replace logo

10-24

Questions

10.1 What is the IPv6 IPv4 compatibility address for 129.69.1.72?10.2 How many IP addresses do you really need? Consider the case

of 100 addresses per person for 1011 persons on the earth (befuture proof!) and 5 hierarchy levels that only use 10% of theircapacity.

10.3 Argue why the Priority and Flow Label fields need to be part ofthe IPv6 header.

10.4 Argue why the Priority and Flow Label fields should not be partof the IPv6 header.

10.5 Think about questions you would ask your students in an exam.

Chapter 10

Introduction

Addressing

IP Packet Header

Autoconfiguration

Security Support

Changes to others

Migration Strategies

Questions


Recommended