chapter 4: network layercs456/s08/week6.pdf · 1 chapter 4: network layer 4. 1 introduction 4.2...

69
1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing

Upload: others

Post on 20-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

1

Chapter 4: Network Layer

❒ 4. 1 Introduction

❒ 4.2 Virtual circuit and datagram networks

❒ 4.3 What’s inside a router

❒ 4.4 IP: Internet Protocol❍ Datagram format

❍ IPv4 addressing

❍ ICMP

❍ IPv6

❒ 4.5 Routing algorithms❍ Link state

❍ Distance Vector

❍ Hierarchical routing

❒ 4.6 Routing in the Internet

❍ RIP

❍ OSPF

❍ BGP

❒ 4.7 Broadcast and multicast routing

Page 2: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

2

Router Architecture Overview

Two key router functions:

❒ run routing algorithms/protocol (RIP, OSPF, BGP)

❒ forwarding datagrams from incoming to outgoing link

Page 3: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

3

Input Port Functions

Decentralized switching:❒ given datagram dest., lookup output port

using forwarding table in input port memory

❒ goal: complete input port processing at ‘line speed’

❒ queuing: if datagrams arrive faster than forwarding rate into switch fabric

Physical layer:bit-level reception

Data link layer:e.g., Ethernetsee chapter 5

Page 4: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

4

Three types of switching fabrics

Page 5: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

5

Switching Via Memory

First generation routers:

❒ traditional computers with switching under direct control of CPU

❒packet copied to system’s memory

❒ speed limited by memory bandwidth (2 bus crossings per datagram)

InputPort

OutputPort

Memory

System Bus

Page 6: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

6

Switching Via a Bus

❒ datagram from input port memory

to output port memory via a shared bus

❒ bus contention: switching speed limited by bus bandwidth

❒ 32 Gbps bus, Cisco 5600: sufficient speed for access and enterprise routers

Page 7: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

7

Switching Via An Interconnection Network

❒ overcome bus bandwidth limitations

❒ Banyan networks, other interconnection nets initially developed to connect processors in multiprocessor

❒ advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric.

❒ Cisco 12000: switches 60 Gbps through the interconnection network

Page 8: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

8

Output Ports

❒ Buffering required when datagrams arrive from fabric faster than the transmission rate

❒ Scheduling discipline chooses among queued datagrams for transmission

Page 9: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

9

Output port queueing

❒ buffering when arrival rate via switch exceeds output line speed

❒ queueing (delay) and loss due to output port buffer overflow!

Page 10: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

10

How much buffering?

❒ RFC 3439 rule of thumb: average buffering equal to “typical” RTT (say 250 msec) times link capacity C

❍ e.g., C = 10 Gps link: 2.5 Gbit buffer

❒ Recent recommendation: with N flows, buffering equal to RTT C.

N

Page 11: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

11

Input Port Queuing

❒ Fabric slower than input ports combined -> queueing may occur at input queues

❒ Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward

❒ queueing delay and loss due to input buffer overflow!

Page 12: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

12

Link Layer

❒ 5.1 Introduction and services

❒ 5.2 Error detection and correction

❒ 5.3Multiple access protocols

❒ 5.4 Link-Layer Addressing

❒ 5.5 Ethernet

❒ 5.6 Hubs and switches

❒ 5.7 PPP

❒ 5.8 Link Virtualization: ATM and MPLS

Page 13: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

13

Virtualization of networks

Virtualization of resources: powerful abstraction in systems engineering:

❒ computing examples: virtual memory, virtual devices

❍ Virtual machines: e.g., java

❍ IBM VM os from 1960’s/70’s

❒ layering of abstractions: don’t sweat the details of the lower layer, only deal with lower layers abstractly

Page 14: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

14

The Internet: virtualizing networks

ARPAnet satellite net

gateway

Internetwork layer (IP): ❒ addressing: internetwork appears

as single, uniform entity, despite underlying local network heterogeneity

❒ network of networks

Gateway: ❒ “embed internetwork packets in

local packet format or extract them”

❒ route (at internetwork level) to next gateway

Page 15: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

15

Cerf & Kahn’s Internetwork Architecture

What is virtualized?

❒ two layers of addressing: internetwork and local network

❒ new layer (IP) makes everything homogeneous at internetwork layer

❒ underlying local network technology

❍ cable

❍ satellite

❍ 56K telephone modem

❍ today: ATM, MPLS

… “invisible” at internetwork layer. Looks like a link layer technology to IP!

Page 16: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

16

ATM and MPLS

❒ ATM, MPLS separate networks in their own right

❍ different service models, addressing, routing from Internet

❒ viewed by Internet as logical link connecting IP routers

❍ just like dialup link is really part of separate network (telephone network)

❒ ATM, MPLS: of technical interest in their own right

Page 17: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

17

Asynchronous Transfer Mode: ATM

❒ 1990’s/00 standard for high-speed (155Mbps to 622 Mbps and higher) Broadband Integrated Service Digital Network architecture

❒ Goal: integrated, end-end transport of carry voice, video, data

❍ meeting timing/QoS requirements of voice, video (versus Internet best-effort model)

❍ “next generation” telephony: technical roots in telephone world

❍ packet-switching (fixed length packets, called “cells”) using virtual circuits

Page 18: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

18

ATM: network or link layer?Vision: end-to-end

transport: “ATM from desktop to desktop”

❍ ATM is a network technology

Reality: used to connect IP backbone routers

❍ “IP over ATM”

❍ ATM as switched link layer, connecting IP routers

ATMnetwork

IPnetwork

Page 19: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

19

Multiprotocol label switching (MPLS)

❒ initial goal: speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding

❍ borrowing ideas from Virtual Circuit (VC) approach

❍ but IP datagram still keeps IP address!

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Page 20: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

20

MPLS capable routers

❒ a.k.a. label-switched router

❒ forwards packets to outgoing interface based only on label value (don’t inspect IP address)❍ MPLS forwarding table distinct from IP forwarding tables

❒ signaling protocol needed to set up forwarding❍ RSVP-TE

❍ forwarding possible along paths that IP alone would not allow (e.g., source-specific routing) !!

❍ use MPLS for traffic engineering

❒ must co-exist with IP-only routers

Page 21: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

21

R1R2

D

R3R4R5

0

1

00

A

R6

in out outlabel label dest interface

6 - A 0

in out outlabel label dest interface

10 6 A 1

12 9 D 0

in out outlabel label dest interface

10 A 0

12 D 0

1

in out outlabel label dest interface

8 6 A 0

0

8 A 1

MPLS forwarding tables

Page 22: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

22

Chapter 6 outline

6.1 Introduction

Wireless

❒ 6.2 Wireless links, characteristics

❍ CDMA

❒ 6.3 IEEE 802.11 wireless LANs (“wi-fi”)

❒ 6.4 Cellular Internet Access

❍ architecture

❍ standards (e.g., GSM)

Mobility

❒ 6.5 Principles: addressing and routing to mobile users

❒ 6.6 Mobile IP

❒ 6.7 Handling mobility in cellular networks

❒ 6.8 Mobility and higher-layer protocols

6.9 Summary

Page 23: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

23

What is mobility?

❒ spectrum of mobility, from the network perspective:

no mobility high mobility

mobile wireless user, using same access point

mobile user, passing through multiple access point while maintaining ongoing connections (like cell phone)

mobile user, connecting/ disconnecting from network using DHCP.

Page 24: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

24

Mobility: Vocabulary

home network: permanent “home” of mobile(e.g., 128.119.40/24)

Permanent address:address in home network, can always be used to reach mobilee.g., 128.119.40.186

home agent: entity that will perform mobility functions on behalf of mobile, when mobile is remote

wide area network

correspondent

Page 25: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

25

Mobility: more vocabulary

Care-of-address: address in visited network.(e.g., 79,129.13.2)

wide area network

visited network: network in which mobile currently resides (e.g., 79.129.13/24)

Permanent address: remains constant (e.g., 128.119.40.186)

foreign agent: entity in visited network that performs mobility functions on behalf of mobile.

correspondent: wants to communicate with mobile

Page 26: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

26

How do you contact a mobile friend:

❒ search all phone books?

❒ call her parents?

❒ expect her to let you know where he/she is?

I wonder where Alice moved to?

Consider friend frequently changing addresses, how do you find her?

Page 27: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

27

Mobility: approaches

❒ Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange.

❍ routing tables indicate where each mobile located

❍ no changes to end-systems

❒ Let end-systems handle it:

❍ indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote

❍ direct routing: correspondent gets foreign address of mobile, sends directly to mobile

Page 28: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

28

Mobility: approaches

❒ Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange.

❍ routing tables indicate where each mobile located

❍ no changes to end-systems

❒ let end-systems handle it:

❍ indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote

❍ direct routing: correspondent gets foreign address of mobile, sends directly to mobile

not scalable

to millions ofmobiles

Page 29: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

29

Mobility: registration

End result:

❒ Foreign agent knows about mobile

❒ Home agent knows location of mobile

wide area network

home networkvisited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home: “this mobile is resident in my network”

Page 30: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

30

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

2

41

correspondent addresses packets using home address of mobile

home agent intercepts packets, forwards to foreign agent

foreign agent receives packets, forwards to mobile

mobile replies directly to correspondent

Page 31: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

31

Indirect Routing: comments

❒ Mobile uses two addresses:

❍ permanent address: used by correspondent (hence mobile location is transparent to correspondent)

❍ care-of-address: used by home agent to forward datagrams to mobile

❒ foreign agent functions may be done by mobile itself

❒ triangle routing: correspondent-home-network-mobile

❍ inefficient when

correspondent, mobile

are in same network

Page 32: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

32

Indirect Routing: moving between networks

❒ suppose mobile user moves to another network

❍ registers with new foreign agent

❍ new foreign agent registers with home agent

❍ home agent update care-of-address for mobile

❍ packets continue to be forwarded to mobile (but with new care-of-address)

❒ mobility, changing foreign networks transparent: on going connections can be maintained!

Page 33: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

33

Mobility via Direct Routing

wide area network

homenetwork

visitednetwork

4

2

41correspondent requests, receives foreign address of mobile

correspondent forwards to foreign agent

foreign agent receives packets, forwards to mobile

mobile replies directly to correspondent

3

Page 34: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

34

Mobility via Direct Routing: comments

❒ overcome triangle routing problem

❒ non-transparent to correspondent:correspondent must get care-of-address from home agent

❍ what if mobile changes visited network?

Page 35: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

35

wide area network

1

foreign net visited at session start

anchorforeignagent

2

4

new foreignagent

35

correspondentagent

correspondent

new foreignnetwork

Accommodating mobility with direct routing

❒ anchor foreign agent: FA in first visited network

❒ data always routed first to anchor FA

❒ when mobile moves: new FA arranges to have data forwarded from old FA (chaining)

Page 36: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

36

Chapter 6 outline

6.1 Introduction

Wireless

❒ 6.2 Wireless links, characteristics

❍ CDMA

❒ 6.3 IEEE 802.11 wireless LANs (“wi-fi”)

❒ 6.4 Cellular Internet Access

❍ architecture

❍ standards (e.g., GSM)

Mobility

❒ 6.5 Principles: addressing and routing to mobile users

❒ 6.6 Mobile IP

❒ 6.7 Handling mobility in cellular networks

❒ 6.8 Mobility and higher-layer protocols

6.9 Summary

Page 37: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

37

Mobile IP

❒ RFC 3344

❒ has many features we’ve seen:

❍ home agents, foreign agents, foreign-agent registration, care-of-addresses, encapsulation (packet-within-a-packet)

❒ three components to standard:

❍ indirect routing of datagrams

❍ agent discovery

❍ registration with home agent

Page 38: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

38

Mobile IP: indirect routing

Permanent address: 128.119.40.186

Care-of address: 79.129.13.2

dest: 128.119.40.186

packet sent by correspondent

dest: 79.129.13.2 dest: 128.119.40.186

packet sent by home agent to foreign agent: a packet within a packet

dest: 128.119.40.186

foreign-agent-to-mobile packet

Page 39: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

39

Mobile IP: agent discovery

❒ agent advertisement: foreign/home agents advertise service by broadcasting ICMP messages (typefield = 9)

RBHFMGV bits reserved

type = 16

type = 9 code = 0 = 9

checksum

router address

standard ICMP fields

mobility agent advertisement

extension

length sequence #

registration lifetime

0 or more care-of-addresses

0 8 16 24

R bit: registration required

H,F bits: home and/or foreign agent

Page 40: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

40

Mobile IP: registration example

visited network: 79.129.13/24 home agent

HA: 128.119.40.7 foreign agent

COA: 79.129.13.2

COA: 79.129.13.2 ….

ICMP agent adv. Mobile agent

MA: 128.119.40.186

registration req.

COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification:714 ….

registration req.

COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification: 714 encapsulation format ….

registration reply

HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 encapsulation format ….

registration reply

HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 ….

time

Page 41: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

41

Chapter 6 outline

6.1 Introduction

Wireless

❒ 6.2 Wireless links, characteristics

❍ CDMA

❒ 6.3 IEEE 802.11 wireless LANs (“wi-fi”)

❒ 6.4 Cellular Internet Access

❍ architecture

❍ standards (e.g., GSM)

Mobility

❒ 6.5 Principles: addressing and routing to mobile users

❒ 6.6 Mobile IP

❒ 6.7 Handling mobility in cellular networks

❒ 6.8 Mobility and higher-layer protocols

6.9 Summary

Page 42: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

42

Mobile Switching

Center

Public telephonenetwork, andInternet

Mobile Switching

Center

Components of cellular network architecture

� connects cells to wide area net� manages call setup (more later!)� handles mobility (more later!)

MSC

� covers geographical region� base station (BS) analogous to 802.11 AP� mobile users attach to network through BS� air-interface:physical and link layer protocol between mobile and BS

cell

wired network

Page 43: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

43

Components of cellular network architecture

correspondent

MSC

MSC

MSC MSC

MSC

wired public telephonenetwork

different cellular networks,operated by different providers

Page 44: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

44

Handling mobility in cellular networks

❒ home network: network of cellular provider you subscribe to (e.g., Sprint PCS, Verizon)

❍ home location register (HLR): database in home network containing permanent cell phone #, profile information (services, preferences, billing), information about current location (could be in another network)

❒ visited network: network in which mobile currently resides

❍ visitor location register (VLR): database with entry for each user currently in network

❍ could be home network

Page 45: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

45

Public switched telephonenetwork

mobileuser

homeMobile

Switching Center

HLR home network

visitednetwork

correspondent

Mobile Switching

Center

VLR

GSM: indirect routing to mobile

1 call routed to home network

2

home MSC consults HLR,gets roaming number ofmobile in visited network

3

home MSC sets up 2nd leg of callto MSC in visited network

4

MSC in visited network completescall through base station to mobile

Page 46: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

46

Mobile Switching

Center

VLR

old BSSnew BSS

old routing

newrouting

GSM: handoff with common MSC

❒ Handoff goal: route call via new base station (without interruption)

❒ reasons for handoff:

❍ stronger signal to/from new BSS (continuing connectivity, less battery drain)

❍ load balance: free up channel in current BSS

❍ GSM doesn’t mandate why to perform handoff (policy), only how (mechanism)

❒ handoff initiated by old BSS

Page 47: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

47

Mobile Switching

Center

VLR

old BSS

1

3

24

5 6

78

GSM: handoff with common MSC

new BSS

1. old BSS informs MSC of impending handoff, provides list of 1+ new BSSs

2. MSC sets up path (allocates resources) to new BSS

3. new BSS allocates radio channel for use by mobile

4. new BSS signals MSC, old BSS: ready 5. old BSS tells mobile: perform handoff to

new BSS6. mobile, new BSS signal to activate new

channel7. mobile signals via new BSS to MSC:

handoff complete. MSC reroutes call8 MSC-old-BSS resources released

Page 48: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

48

home network

Home MSC

PSTN

correspondent

MSC

anchor MSC

MSCMSC

(a) before handoff

GSM: handoff between MSCs

❒ anchor MSC: first MSC visited during cal

❍ call remains routed through anchor MSC

❒ new MSCs add on to end of MSC chain as mobile moves to new MSC

❒ IS-41 allows optional path minimization step to shorten multi-MSC chain

Page 49: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

49

home network

Home MSC

PSTN

correspondent

MSC

anchor MSC

MSCMSC

(b) after handoff

GSM: handoff between MSCs

❒ anchor MSC: first MSC visited during cal

❍ call remains routed through anchor MSC

❒ new MSCs add on to end of MSC chain as mobile moves to new MSC

❒ IS-41 allows optional path minimization step to shorten multi-MSC chain

Page 50: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

50

Mobility: GSM versus Mobile IP

Care-of-address

Routable address for telephone call segment between home MSC and visited MSC, visible to neither the mobile nor the correspondent.

Mobile Station Roaming Number (MSRN), or “roaming number”

Foreign agentVisited MSC: responsible for setting up calls to/from mobile nodes in cells associated with MSC. VLR: temporary database entry in visited system, containing subscription information for each visiting mobile user

Visited Mobile services Switching Center.Visitor Location Record (VLR)

Visited network

Network other than home system where mobile user is currently residing

Visited System

Home agentHome MSC: point of contact to obtain routable address of mobile user. HLR: database in home system containing permanent phone number, profile information, current location of mobile user, subscription information

Gateway Mobile Switching Center, or “home MSC”. Home Location Register (HLR)

Home network

Network to which mobile user’s permanent phone number belongs

Home system

Mobile IP elementComment on GSM element GSM element

Page 51: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

51

Wireless, mobility: impact on higher layer protocols

❒ logically, impact should be minimal …

❍ best effort service model remains unchanged

❍ TCP and UDP can (and do) run over wireless, mobile

❒ … but performance-wise:

❍ packet loss/delay due to bit-errors (discarded packets, delays for link-layer retransmissions), and handoff

❍ TCP interprets loss as congestion, will decrease congestion window un-necessarily

❍ delay impairments for real-time traffic

❍ limited bandwidth of wireless links

Page 52: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

52

Chapter 3Transport Layer

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

A note on the use of these ppt slides:We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:� If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!)� If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material.

Thanks and enjoy! JFK/KWR

All material copyright 1996-2007J.F Kurose and K.W. Ross, All Rights Reserved

Page 53: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

53

Chapter 3: Transport Layer

Our goals:

❒ understand principles behind transport layer services:

❍ multiplexing/demultiplexing

❍ reliable data transfer

❍ flow control

❍ congestion control

❒ learn about transport layer protocols in the Internet:

❍ UDP: connectionless transport

❍ TCP: connection-oriented transport

❍ TCP congestion control

Page 54: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

54

Chapter 3 outline

❒ 3.1 Transport-layer services

❒ 3.2 Multiplexing and demultiplexing

❒ 3.3 Connectionless transport: UDP

❒ 3.4 Principles of reliable data transfer

❒ 3.5 Connection-oriented transport: TCP

❍ segment structure

❍ reliable data transfer

❍ flow control

❍ connection management

❒ 3.6 Principles of congestion control

❒ 3.7 TCP congestion control

Page 55: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

55

Transport services and protocols

❒ provide logical communicationbetween app processes running on different hosts

❒ transport protocols run in end systems

❍ send side: breaks app messages into segments, passes to network layer

❍ rcv side: reassembles segments into messages, passes to app layer

❒ more than one transport protocol available to apps

❍ Internet: TCP and UDP

applicationtransportnetworkdata linkphysical

applicationtransportnetworkdata linkphysical

logical end-end transport

Page 56: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

56

Transport vs. network layer

❒ network layer: logical communication between hosts

❒ transport layer: logical communication between processes

❍ relies on, enhances, network layer services

Household analogy:

12 kids sending letters to 12 kids

❒ processes = kids

❒ app messages = letters in envelopes

❒ hosts = houses

❒ transport protocol = Ann and Bill

❒ network-layer protocol = postal service

Page 57: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

57

Internet transport-layer protocols

❒ reliable, in-order delivery (TCP)

❍ congestion control

❍ flow control

❍ connection setup

❒ unreliable, unordered delivery: UDP

❍ no-frills extension of “best-effort” IP

❒ services not available: ❍ delay guarantees

❍ bandwidth guarantees

applicationtransportnetworkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

applicationtransportnetworkdata linkphysical

logical end-end transport

Page 58: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

58

Chapter 3 outline

❒ 3.1 Transport-layer services

❒ 3.2 Multiplexing and demultiplexing

❒ 3.3 Connectionless transport: UDP

❒ 3.4 Principles of reliable data transfer

❒ 3.5 Connection-oriented transport: TCP

❍ segment structure

❍ reliable data transfer

❍ flow control

❍ connection management

❒ 3.6 Principles of congestion control

❒ 3.7 TCP congestion control

Page 59: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

59

Multiplexing/demultiplexing

application

transport

network

link

physical

P1 application

transport

network

link

physical

application

transport

network

link

physical

P2P3 P4P1

host 1 host 2 host 3

= process= socket

delivering received segmentsto correct socket

Demultiplexing at rcv host:gathering data from multiplesockets, enveloping data with header (later used for demultiplexing)

Multiplexing at send host:

Page 60: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

60

How demultiplexing works❒ host receives IP datagrams

❍ each datagram has source IP address, destination IP address

❍ each datagram carries 1 transport-layer segment

❍ each segment has source, destination port number

❒ host uses IP addresses & port numbers to direct segment to appropriate socket

source port # dest port #

32 bits

applicationdata

(message)

other header fields

TCP/UDP segment format

Page 61: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

61

Connectionless demultiplexing

❒ Create sockets with port numbers:

DatagramSocket mySocket1 = new DatagramSocket(12534);

DatagramSocket mySocket2 = new DatagramSocket(12535);

❒ UDP socket identified by two-tuple:

(dest IP address, dest port number)

❒ When host receives UDP segment:

❍ checks destination port number in segment

❍ directs UDP segment to socket with that port number

❒ IP datagrams with different source IP addresses and/or source port numbers directed to same socket

Page 62: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

62

Connectionless demux (cont)

DatagramSocket serverSocket = new DatagramSocket(6428);

ClientIP:B

P2

clientIP: A

P1P1P3

serverIP: C

SP: 6428

DP: 9157

SP: 9157

DP: 6428

SP: 6428

DP: 5775

SP: 5775

DP: 6428

SP provides “return address”

Page 63: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

63

Connection-oriented demux

❒ TCP socket identified by 4-tuple:

❍ source IP address

❍ source port number

❍ dest IP address

❍ dest port number

❒ recv host uses all four values to direct segment to appropriate socket

❒ Server host may support many simultaneous TCP sockets:

❍ each socket identified by its own 4-tuple

❒ Web servers have different sockets for each connecting client

❍ non-persistent HTTP will have different socket for each request

Page 64: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

64

Connection-oriented demux(cont)

ClientIP:B

P1

clientIP: A

P1P2P4

serverIP: C

SP: 9157

DP: 80

SP: 9157

DP: 80

P5 P6 P3

D-IP:C

S-IP: A

D-IP:C

S-IP: B

SP: 5775

DP: 80

D-IP:C

S-IP: B

Page 65: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

65

Connection-oriented demux: Threaded Web Server

ClientIP:B

P1

clientIP: A

P1P2

serverIP: C

SP: 9157

DP: 80

SP: 9157

DP: 80

P4 P3

D-IP:C

S-IP: A

D-IP:C

S-IP: B

SP: 5775

DP: 80

D-IP:C

S-IP: B

Page 66: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

66

Chapter 3 outline

❒ 3.1 Transport-layer services

❒ 3.2 Multiplexing and demultiplexing

❒ 3.3 Connectionless transport: UDP

❒ 3.4 Principles of reliable data transfer

❒ 3.5 Connection-oriented transport: TCP

❍ segment structure

❍ reliable data transfer

❍ flow control

❍ connection management

❒ 3.6 Principles of congestion control

❒ 3.7 TCP congestion control

Page 67: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

67

UDP: User Datagram Protocol [RFC 768]

❒ “no frills,” “bare bones”Internet transport protocol

❒ “best effort” service, UDP segments may be:

❍ lost

❍ delivered out of order to app

❒ connectionless:

❍ no handshaking between UDP sender, receiver

❍ each UDP segment handled independently of others

Why is there a UDP?❒ no connection establishment

(which can add delay)

❒ simple: no connection state at sender, receiver

❒ small segment header

❒ no congestion control: UDP can blast away as fast as desired

Page 68: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

68

UDP: more

❒ often used for streaming multimedia apps

❍ loss tolerant

❍ rate sensitive

❒ other UDP uses❍ DNS

❍ SNMP

❒ reliable transfer over UDP: add reliability at application layer

❍ application-specific error recovery!

source port # dest port #

32 bits

Applicationdata

(message)

UDP segment format

length checksumLength, in

bytes of UDPsegment,includingheader

Page 69: Chapter 4: Network Layercs456/S08/Week6.pdf · 1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet

69

UDP checksum

Sender:❒ treat segment contents as

sequence of 16-bit integers

❒ checksum: addition (1’s complement sum) of segment contents

❒ sender puts checksum value into UDP checksum field

Receiver:❒ compute checksum of received

segment

❒ check if computed checksum equals checksum field value:

❍ NO - error detected

❍ YES - no error detected. But maybe errors nonetheless?

Goal: detect “errors” (e.g., flipped bits) in transmitted segment