Chapter 8 Network Security Chapter 8: Network Security

Chapter 8
Network Security
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-2004
J.F Kurose and K.W. Ross, All Rights Reserved
Computer Networking:
A Top Down Approach
Featuring the Internet,
3rd edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2004.
8: Network Security 8-481
Chapter 8: Network Security
Chapter goals:
understand principles of network security:
and its many uses beyond
“confidentiality”
authentication
message integrity
key distribution
cryptography
security in practice:
firewalls
security in application, transport, network, link
layers
8: Network Security 8-482
1
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Authentication
8.4 Integrity
8.5 Key Distribution and certification
8.6 Access control: firewalls
8.7 Attacks and counter measures
8.8 Security in many layers
8: Network Security 8-483
What is network security?
Confidentiality: only sender, intended receiver
should “understand” message contents
sender encrypts message
receiver decrypts message
Authentication: sender, receiver want to confirm
identity of each other
Message Integrity: sender, receiver want to ensure
message not altered (in transit, or afterwards)
without detection
Access and Availability: services must be accessible
and available to users
8: Network Security 8-484
2
Friends and enemies: Alice, Bob, Trudy
well-known in network security world
Bob, Alice (lovers!) want to communicate “securely”
Trudy (intruder) may intercept, delete, add messages
Alice
data
channel
Bob
data, control
messages
secure
sender
secure
receiver
data
Trudy
8: Network Security 8-485
Who might Bob, Alice be?
real-life Bobs and Alices!
Web browser/server for electronic
transactions (e.g., on-line purchases)
on-line banking client/server
DNS servers
routers exchanging routing table updates
other examples?
… well,
8: Network Security 8-486
3
There are bad guys (and girls) out there!
Q: What can a “bad guy” do?
A: a lot!
eavesdrop:
intercept messages
actively insert messages into connection
impersonation: can fake (spoof) source address
in packet (or any field in packet)
hijacking: “take over” ongoing connection by
removing sender or receiver, inserting himself
in place
denial of service: prevent service from being
used by others (e.g., by overloading resources)
more on this later ……
8: Network Security 8-487
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Authentication
8.4 Integrity
8.5 Key Distribution and certification
8.6 Access control: firewalls
8.7 Attacks and counter measures
8.8 Security in many layers
8: Network Security 8-488
4
The language of cryptography
Alice’s
Bob’s
K encryption
A
K decryption
B key
key
plaintext
encryption
algorithm
ciphertext
decryption plaintext
algorithm
symmetric key crypto: sender, receiver keys identical
public-key crypto: encryption key public, decryption key
secret (private)
8: Network Security 8-489
Symmetric key cryptography
substitution cipher: substituting one thing for another
monoalphabetic cipher: substitute one letter for another
plaintext:
abcdefghijklmnopqrstuvwxyz
ciphertext:
mnbvcxzasdfghjklpoiuytrewq
E.g.:
Plaintext: bob. i love you. alice
ciphertext: nkn. s gktc wky. mgsbc
Q: How hard to break this simple cipher?:
brute force (how hard?)
other?
8: Network Security 8-490
5
Symmetric key cryptography
KA-B
KA-B
plaintext
message, m
encryption ciphertext
algorithm
K (m)
A-B
decryption plaintext
algorithm
m=K
A-B
( KA-B(m) )
symmetric key crypto: Bob and Alice share know same
(symmetric) key: K
A-B
e.g., key is knowing substitution pattern in mono
alphabetic substitution cipher
Q: how do Bob and Alice agree on key value?
8: Network Security 8-491
Symmetric key crypto: DES
DES: Data Encryption Standard
US encryption standard [NIST 1993]
56-bit symmetric key, 64-bit plaintext input
How secure is DES?
DES
Challenge: 56-bit-key-encrypted phrase
(“Strong cryptography makes the world a safer
place”) decrypted (brute force) in 4 months
no known “backdoor” decryption approach
making DES more secure:
use three keys sequentially (3-DES) on each datum
use cipher-block chaining
8: Network Security 8-492
6
Symmetric key
crypto: DES
DES operation
initial permutation
16 identical “rounds” of
function application,
each using different
48 bits of key
final permutation
8: Network Security 8-493
AES: Advanced Encryption Standard
new (Nov. 2001) symmetric-key NIST
standard, replacing DES
processes data in 128 bit blocks
128, 192, or 256 bit keys
brute force decryption (try each key)
taking 1 sec on DES, takes 149 trillion
years for AES
8: Network Security 8-494
7
Public Key Cryptography
symmetric key crypto
requires sender,
receiver know shared
secret key
Q: how to agree on key
in first place
(particularly if never
“met”)?
public key cryptography
radically different
approach [DiffieHellman76, RSA78]
sender, receiver do
not share secret key
public encryption key
known to all
private decryption
key known only to
receiver
8: Network Security 8-495
Public key cryptography
+ Bob’s public
B key
K
K
plaintext
message, m
encryption ciphertext
algorithm
+
K (m)
B
- Bob’s private
B key
decryption plaintext
algorithm message
+
m = K B(K (m))
B
8: Network Security 8-496
8
Public key encryption algorithms
Requirements:
+
.
1 need K B( ) and K - ( ) such that
B
- +
K (K (m)) = m
B
.
B
+
2 given public key KB , it should be
impossible to compute private
key K
B
RSA: Rivest, Shamir, Adelson algorithm
8: Network Security 8-497
RSA: Choosing keys
1. Choose two large prime numbers p, q.
(e.g., 1024 bits each)
2. Compute n = pq, z = (p-1)(q-1)
3. Choose e (with e<n) that has no common factors
with z. (e, z are “relatively prime”).
4. Choose d such that ed-1 is exactly divisible by z.
(in other words: ed mod z = 1 ).
5. Public key is (n,e). Private key is (n,d).
+
KB
-
KB
8: Network Security 8-498
9
RSA: Encryption, decryption
0. Given (n,e) and (n,d) as computed above
1. To encrypt bit pattern, m, compute
e
c = m emod n (i.e., remainder when m is divided by n)
2. To decrypt received bit pattern, c, compute
d
m = c dmod n (i.e., remainder when c is divided by n)
Magic
d
m = (m e mod n) mod n
happens!
c
8: Network Security 8-499
RSA example:
Bob chooses p=5, q=7. Then n=35, z=24.
e=5 (so e, z relatively prime).
d=29 (so ed-1 exactly divisible by z.
encrypt:
decrypt:
letter
m
me
l
12
1524832
c
17
d
c
481968572106750915091411825223071697
c = me mod n
17
m = cd mod n letter
12
l
8: Network Security 8-500
10
RSA:
m = (m e mod n)
Why is that
d
mod n
Useful number theory result: If p,q prime and
n = pq, then:
y
y mod (p-1)(q-1)
x mod n = x
mod n
e
(m mod n) d mod n = med mod n
= m
ed mod (p-1)(q-1)
mod n
(using number theory result above)
1
= m mod n
(since we chose ed to be divisible by
(p-1)(q-1) with remainder 1 )
= m
8: Network Security 8-501
RSA: another important property
The following property will be very useful later:
-
+
+
B
B
K (K (m)) = m = K (K (m))
B
B
use public key
first, followed
by private key
use private key
first, followed
by public key
Result is the same!
8: Network Security 8-502
11
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Authentication
8.4 Integrity
8.5 Key Distribution and certification
8.6 Access control: firewalls
8.7 Attacks and counter measures
8.8 Security in many layers
8: Network Security 8-503
Authentication
Goal: Bob wants Alice to “prove” her identity
to him
Protocol ap1.0: Alice says “I am Alice”
“I am Alice”
Failure scenario??
8: Network Security 8-504
12
Authentication
Goal: Bob wants Alice to “prove” her identity
to him
Protocol ap1.0: Alice says “I am Alice”
“I am Alice”
in a network,
Bob can not “see”
Alice, so Trudy simply
declares
herself to be Alice
8: Network Security 8-505
Authentication: another try
Protocol ap2.0: Alice says “I am Alice” in an IP packet
containing her source IP address
Alice’s
“I am Alice”
IP address
Failure scenario??
8: Network Security 8-506
13
Authentication: another try
Protocol ap2.0: Alice says “I am Alice” in an IP packet
containing her source IP address
Alice’s
IP address
Trudy can create
a packet
“spoofing”
“I am Alice” Alice’s address
8: Network Security 8-507
Authentication: another try
Protocol ap3.0: Alice says “I am Alice” and sends her
secret password to “prove” it.
Alice’s Alice’s
“I’m Alice”
IP addr password
Alice’s
IP addr
OK
Failure scenario??
8: Network Security 8-508
14
Authentication: another try
Protocol ap3.0: Alice says “I am Alice” and sends her
secret password to “prove” it.
Alice’s Alice’s
“I’m Alice”
IP addr password
Alice’s
IP addr
OK
playback attack: Trudy
records Alice’s packet
and later
plays it back to Bob
Alice’s Alice’s
“I’m Alice”
IP addr password
8: Network Security 8-509
Authentication: yet another try
Protocol ap3.1: Alice says “I am Alice” and sends her
encrypted secret password to “prove” it.
Alice’s encrypted
“I’m Alice”
IP addr password
Alice’s
IP addr
OK
Failure scenario??
8: Network Security 8-510
15
Authentication: another try
Protocol ap3.1: Alice says “I am Alice” and sends her
encrypted secret password to “prove” it.
Alice’s encrypted
“I’m Alice”
IP addr password
Alice’s
IP addr
record
and
playback
still works!
OK
Alice’s encrypted
“I’m Alice”
IP addr password
8: Network Security
8-511
Authentication: yet another try
Goal: avoid playback attack
Nonce: number (R) used only once –in-a-lifetime
ap4.0: to prove Alice “live”, Bob sends Alice nonce, R. Alice
must return R, encrypted with shared secret key
“I am Alice”
R
KA-B(R)
Failures, drawbacks?
Alice is live, and
only Alice knows
key to encrypt
nonce, so it must
be Alice!
8: Network Security 8-512
16
Authentication: ap5.0
ap4.0 requires shared symmetric key
can we authenticate using public key techniques?
ap5.0: use nonce, public key cryptography
“I am Alice”
R
Bob computes
+ -
KA(KA (R)) = R
-
K A (R)
and knows only Alice
could have the private
key, that encrypted R
such that
+ K (K (R)) = R
A A
“send me your public key”
+
KA
8: Network Security 8-513
ap5.0: security hole
Man (woman) in the middle attack: Trudy poses as
Alice (to Bob) and as Bob (to Alice)
I am Alice
R
I am Alice
R
K (R)
T
K (R)
A
Send me your public key
K
Send me your public key
K
- +
m = K (K (m))
A A
+
K (m)
A
+
A
Trudy gets
- +
m = K (K (m))
T
sends m toTAlice
+
T
+
K (m)
T
encrypted with
Alice’s public key
8: Network Security 8-514
17
ap5.0: security hole
Man (woman) in the middle attack: Trudy poses as
Alice (to Bob) and as Bob (to Alice)
Difficult to detect:
Bob receives everything that Alice sends, and vice
versa. (e.g., so Bob, Alice can meet one week later and
recall conversation)
problem is that Trudy receives all messages as well!
8: Network Security 8-515
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Authentication
8.4 Message integrity
8.5 Key Distribution and certification
8.6 Access control: firewalls
8.7 Attacks and counter measures
8.8 Security in many layers
8: Network Security 8-516
18
Digital Signatures
Cryptographic technique analogous to handwritten signatures.
sender (Bob) digitally signs document,
establishing he is document owner/creator.
verifiable, nonforgeable: recipient (Alice) can
prove to someone that Bob, and no one else
(including Alice), must have signed document
8: Network Security 8-517
Digital Signatures
Simple digital signature for message m:
Bob signs m by encrypting with his private key
-
KB, creating “signed” message, KB(m)
Bob’s message, m
!
!
#
K B Bob’s private
key
Public key
encryption
algorithm
-
K B(m)
"
! !
8: Network Security 8-518
19
Digital Signatures (more)
Suppose Alice receives msg m, digital signature KB(m)
Alice verifies m signed by Bob by applying Bob’s
public key KB to KB(m) then checks KB(KB(m) ) = m.
If KB(KB(m) ) = m, whoever signed m must have used
Bob’s private key.
Alice thus verifies that:
Bob signed m.
No one else signed m.
Bob signed m and not m’.
Non-repudiation:
Alice can take m, and signature KB(m) to
court and prove that Bob signed m.
8: Network Security 8-519
Message Digests
Computationally expensive
to public-key-encrypt
long messages
Goal: fixed-length, easyto-compute digital
“fingerprint”
apply hash function H
to m, get fixed size
message digest, H(m).
large
message
m
H: Hash
Function
H(m)
Hash function properties:
many-to-1
produces fixed-size msg
digest (fingerprint)
given message digest x,
computationally
infeasible to find m such
that x = H(m)
8: Network Security 8-520
20
Internet checksum: poor crypto hash
function
Internet checksum has some properties of hash function:
produces fixed length digest (16-bit sum) of message
is many-to-one
But given message with given hash value, it is easy to find
another message with same hash value:
message
I O U 1
0 0 . 9
9 B O B
ASCII format
49 4F 55 31
30 30 2E 39
39 42 D2 42
message
I O U 9
0 0 . 1
9 B O B
ASCII format
49 4F 55 39
30 30 2E 31
39 42 D2 42
B2 C1 D2 AC
B2 C1 D2 AC different messages
but identical checksums!
8: Network Security 8-521
Digital signature = signed message digest
Alice verifies signature and
integrity of digitally signed
message:
Bob sends digitally signed
message:
large
message
m
H: Hash
function
Bob’s
private
key
+
-
KB
encrypted
msg digest
H(m)
digital
signature
(encrypt)
encrypted
msg digest
KB(H(m))
large
message
m
H: Hash
function
KB(H(m))
Bob’s
public
key
+
KB
digital
signature
(decrypt)
H(m)
H(m)
equal
?
8: Network Security 8-522
21
Hash Function Algorithms
MD5 hash function widely used (RFC 1321)
computes
128-bit message digest in 4-step
process.
arbitrary 128-bit string x, appears difficult to
construct msg m whose MD5 hash is equal to x.
SHA-1 is also used.
US standard [NIST, FIPS PUB 180-1]
160-bit message digest
8: Network Security 8-523
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Authentication
8.4 Integrity
8.5 Key distribution and certification
8.6 Access control: firewalls
8.7 Attacks and counter measures
8.8 Security in many layers
8: Network Security 8-524
22
Trusted Intermediaries
Symmetric key problem:
Public key problem:
How do two entities
When Alice obtains
establish shared secret
key over network?
Solution:
trusted key distribution
center (KDC) acting as
intermediary between
entities
Bob’s public key (from
web site, e-mail,
diskette), how does she
know it is Bob’s public
key, not Trudy’s?
Solution:
trusted certification
authority (CA)
8: Network Security 8-525
Key Distribution Center (KDC)
Alice, Bob need shared symmetric key.
KDC: server shares different secret key with
each
registered user (many users)
Alice, Bob know own symmetric keys, KA-KDC KB-KDC , for
communicating with KDC.
KDC
KA-KDCKP-KDC
KP-KDC
KB-KDC
KA-KDC
KX-KDC
KY-KDC
KB-KDC
KZ-KDC
8: Network Security 8-526
23
Key Distribution Center (KDC)
Q: How does KDC allow Bob, Alice to determine shared
symmetric secret key to communicate with each other?
KDC
generates
R1
Alice
knows
R1
Bob knows to
use R1 to
communicate
with Alice
Alice and Bob communicate: using R1 as
session key for shared symmetric encryption
8: Network Security 8-527
Certification Authorities
Certification authority (CA): binds public key to
particular entity, E.
E (person, router) registers its public key with CA.
E provides “proof of identity” to CA.
CA creates certificate binding E to its public key.
certificate containing E’s public key digitally signed by CA
– CA says “this is E’s public key”
Bob’s
public
key
Bob’s
identifying
information
+
KB
digital
signature
(encrypt)
CA
private
key
K CA
+
KB
certificate for
Bob’s public key,
signed by CA
8: Network Security 8-528
24
Certification Authorities
When Alice wants Bob’s public key:
gets
Bob’s certificate (Bob or elsewhere).
apply CA’s public key to Bob’s certificate, get
Bob’s public key
+
KB
digital
signature
(decrypt)
CA
public
key
+
KB
Bob’s
public
key
+
K CA
8: Network Security 8-529
A certificate contains:
Serial number (unique to issuer)
info about certificate owner, including algorithm
and key value itself (not shown)
info about
certificate
issuer
valid dates
digital
signature by
issuer
8: Network Security 8-530
25
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Authentication
8.4 Integrity
8.5 Key Distribution and certification
8.6 Access control: firewalls
8.7 Attacks and counter measures
8.8 Security in many layers
8: Network Security 8-531
Firewalls
firewall
isolates organization’s internal net from larger
Internet, allowing some packets to pass,
blocking others.
public
Internet
administered
network
firewall
8: Network Security 8-532
26
Firewalls: Why
prevent denial of service attacks:
SYN flooding: attacker establishes many bogus
TCP connections, no resources left for “real”
connections.
prevent illegal modification/access of internal data.
e.g., attacker replaces CIA’s homepage with
something else
allow only authorized access to inside network (set of
authenticated users/hosts)
two types of firewalls:
application-level
packet-filtering
8: Network Security 8-533
Packet Filtering
Should arriving packet be
allowed in? Departing
packet let out?
internal network connected to Internet via
router firewall
router filters packet-by-packet, decision to
forward/drop packet based on:
source IP address, destination IP address
TCP/UDP source and destination port numbers
ICMP message type
TCP SYN and ACK bits
8: Network Security 8-534
27
Packet Filtering
Example 1: block incoming and outgoing
datagrams with IP protocol field = 17 and with
either source or dest port = 23.
All incoming and outgoing UDP flows and telnet
connections are blocked.
Example 2: Block inbound TCP segments with
ACK=0.
Prevents external clients from making TCP
connections with internal clients, but allows
internal clients to connect to outside.
8: Network Security 8-535
Application gateways
Filters packets on
application data as well
as on IP/TCP/UDP fields.
Example: allow select
internal users to telnet
outside.
host-to-gateway
telnet session
application
gateway
gateway-to-remote
host telnet session
router and filter
1. Require all telnet users to telnet through gateway.
2. For authorized users, gateway sets up telnet connection to
dest host. Gateway relays data between 2 connections
3. Router filter blocks all telnet connections not originating
from gateway.
8: Network Security 8-536
28
Limitations of firewalls and gateways
IP spoofing: router
can’t know if data
“really” comes from
claimed source
if multiple app’s. need
special treatment, each
has own app. gateway.
client software must
know how to contact
gateway.
filters often use all or
nothing policy for UDP.
tradeoff: degree of
communication with
outside world, level of
security
many highly protected
sites still suffer from
attacks.
e.g., must set IP address
of proxy in Web
browser
8: Network Security 8-537
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Authentication
8.4 Integrity
8.5 Key Distribution and certification
8.6 Access control: firewalls
8.7 Attacks and counter measures
8.8 Security in many layers
8: Network Security 8-538
29
Internet security threats
Mapping:
before
attacking: “case the joint” – find out
what services are implemented on network
Use ping to determine what hosts have
addresses on network
Port-scanning: try to establish TCP connection
to each port in sequence (see what happens)
nmap (http://www.insecure.org/nmap/) mapper:
“network exploration and security auditing”
Countermeasures?
8: Network Security 8-539
Internet security threats
Mapping: countermeasures
record
traffic entering network
look for suspicious activity (IP addresses, pots
being scanned sequentially)
8: Network Security 8-540
30
Internet security threats
Packet sniffing:
broadcast
media
promiscuous NIC reads all packets passing by
can read all unencrypted data (e.g. passwords)
e.g.: C sniffs B’s packets
C
A
src:B dest:A
payload
B
Countermeasures?
8: Network Security 8-541
Internet security threats
Packet sniffing: countermeasures
all
hosts in organization run software that
checks periodically if host interface in
promiscuous mode.
one host per segment of broadcast media
(switched Ethernet at hub)
C
A
src:B dest:A
payload
B
8: Network Security 8-542
31
Internet security threats
IP Spoofing:
can
generate “raw” IP packets directly from
application, putting any value into IP source
address field
receiver can’t tell if source is spoofed
e.g.: C pretends to be B
C
A
src:B dest:A
payload
B
Countermeasures?
8: Network Security 8-543
Internet security threats
IP Spoofing: ingress filtering
routers
should not forward outgoing packets
with invalid source addresses (e.g., datagram
source address not in router’s network)
great, but ingress filtering can not be mandated
for all networks
C
A
src:B dest:A
payload
B
8: Network Security 8-544
32
Internet security threats
Denial of service (DOS):
flood
of maliciously generated packets “swamp”
receiver
Distributed DOS (DDOS): multiple coordinated
sources swamp receiver
e.g., C and remote host SYN-attack A
C
A
SYN
SYN
SYN
SYN
SYN
B
Countermeasures?
SYN
SYN
8: Network Security 8-545
Internet security threats
Denial of service (DOS): countermeasures
filter
out flooded packets (e.g., SYN) before
reaching host: throw out good with bad
traceback to source of floods (most likely an
innocent, compromised machine)
C
A
SYN
SYN
SYN
SYN
SYN
B
SYN
SYN
8: Network Security 8-546
33
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Authentication
8.4 Integrity
8.5 Key Distribution and certification
8.6 Access control: firewalls
8.7 Attacks and counter measures
8.8 Security in many layers
8.8.1. Secure email
8.8.2. Secure sockets
8.8.3. IPsec
8.8.4. Security in 802.11
8: Network Security 8-547
Secure e-mail
Alice
wants to send confidential e-mail, m, to Bob.
KS
m
.
KS( )
+
KS
+
.
KB( )
K+
B
KS(m )
KS(m )
+
KB(KS )
Internet
.
KS( )
-
KS
+
KB( )
KB(KS )
-
m
.
KB
Alice:
generates random symmetric private key, KS.
encrypts message with KS (for efficiency)
also encrypts KS with Bob’s public key.
sends both KS(m) and KB(KS) to Bob.
8: Network Security 8-548
34
Secure e-mail
Alice
wants to send confidential e-mail, m, to Bob.
KS
m
+
KS
+
KS(m )
KS(m )
.
KS( )
.
KB( )
Internet
+
K+
B
-
KS
+
KB( )
-
KB(KS )
KB(KS )
.
m
KS( )
.
KB
Bob:
uses his private key to decrypt and recover KS
uses KS to decrypt KS(m) to recover m
8: Network Security 8-549
Secure e-mail (continued)
• Alice wants to provide sender authentication
message integrity.
KA
m
.
H( )
-
+
m
KA(H(m))
KA(H(m))
.
KA( )
+
KA
-
-
Internet
-
+
.
KA( )
H(m )
compare
m
.
H( )
H(m )
Alice digitally signs message.
• sends both message (in the clear) and digital signature.
•
8: Network Security 8-550
35
Secure e-mail (continued)
• Alice
wants to provide secrecy, sender authentication,
message integrity.
KA
m
.
H( )
-
-
KA(H(m))
.
KA( )
+
KS
.
KS( )
+
m
KS
+
.
KB( )
K+
B
Internet
+
KB(KS )
Alice uses three keys: her private key, Bob’s public
key, newly created symmetric key
8: Network Security 8-551
Pretty good privacy (PGP)
Internet e-mail encryption
scheme, de-facto standard.
uses symmetric key
cryptography, public key
cryptography, hash
function, and digital
signature as described.
provides secrecy, sender
authentication, integrity.
inventor, Phil Zimmerman,
was target of 3-year
federal investigation.
A PGP signed message:
---BEGIN PGP SIGNED MESSAGE--Hash: SHA1
Bob:My husband is out of town
tonight.Passionately yours,
Alice
---BEGIN PGP SIGNATURE--Version: PGP 5.0
Charset: noconv
yhHJRHhGJGhgg/12EpJ
+lo8gE4vB3mqJhFEvZP9t6n7G6m5Gw
2
---END PGP SIGNATURE---
8: Network Security 8-552
36
Secure sockets layer (SSL)
transport layer
security to any TCPbased app using SSL
services.
used between Web
browsers, servers for
e-commerce (shttp).
security services:
server authentication
data encryption
client authentication
(optional)
server authentication:
SSL-enabled browser
includes public keys for
trusted CAs.
Browser requests
server certificate,
issued by trusted CA.
Browser uses CA’s
public key to extract
server’s public key from
certificate.
check your browser’s
security menu to see
its trusted CAs.
8: Network Security 8-553
SSL (continued)
Encrypted SSL session:
Browser generates
symmetric session key,
encrypts it with server’s
public key, sends
encrypted key to server.
Using private key, server
decrypts session key.
Browser, server know
session key
SSL: basis of IETF
Transport Layer
Security (TLS).
SSL can be used for
non-Web applications,
e.g., IMAP.
Client authentication
can be done with client
certificates.
All data sent into TCP
socket (by client or server)
encrypted with session key.
8: Network Security 8-554
37
IPsec: Network Layer Security
Network-layer secrecy:
sending host encrypts the
data in IP datagram
TCP and UDP segments;
ICMP and SNMP
messages.
Network-layer authentication
destination host can
authenticate source IP
address
Two principle protocols:
authentication header
(AH) protocol
encapsulation security
payload (ESP) protocol
For both AH and ESP, source,
destination handshake:
create network-layer
logical channel called a
security association (SA)
Each SA unidirectional.
Uniquely determined by:
security protocol (AH or
ESP)
source IP address
32-bit connection ID
8: Network Security 8-555
Authentication Header (AH) Protocol
provides source
authentication, data
integrity, no
confidentiality
AH header inserted
between IP header,
data field.
protocol field: 51
intermediate routers
process datagrams as
usual
IP header
AH header
AH header includes:
connection identifier
authentication data:
source- signed message
digest calculated over
original IP datagram.
next header field:
specifies type of data
(e.g., TCP, UDP, ICMP)
data (e.g., TCP, UDP segment)
8: Network Security 8-556
38
ESP Protocol
provides secrecy, host
authentication, data
integrity.
data, ESP trailer
encrypted.
next header field is in ESP
trailer.
ESP authentication
field is similar to AH
authentication field.
Protocol = 50.
authenticated
encrypted
IP header
ESP
ESP
ESP
TCP/UDP segment
header
trailer authent.
8: Network Security 8-557
IEEE 802.11 security
War-driving: drive around Bay area, see what 802.11
networks available?
More than 9000 accessible from public roadways
85% use no encryption/authentication
packet-sniffing and various attacks easy!
Securing 802.11
encryption, authentication
first attempt at 802.11 security: Wired Equivalent
Privacy (WEP): a failure
current attempt: 802.11i
8: Network Security 8-558
39
Wired Equivalent Privacy (WEP):
ap4.0
host requests authentication from access point
access point sends 128 bit nonce
host encrypts nonce using shared symmetric key
access point decrypts nonce, authenticates host
no key distribution mechanism
authentication: knowing the shared key is enough
authentication as in protocol
8: Network Security 8-559
WEP data encryption
Host/AP share 40 bit symmetric key (semi
permanent)
Host appends 24-bit initialization vector (IV) to
create 64-bit key
64 bit key used to generate stream of keys, kiIV
kiIV used to encrypt ith byte, di, in frame:
ci = di XOR kiIV
IV and encrypted bytes, ci sent in frame
8: Network Security 8-560
40
802.11 WEP encryption
Sender-side WEP encryption
8: Network Security 8-561
Breaking 802.11 WEP encryption
Security hole:
24-bit IV, one IV per frame, -> IV’s eventually reused
IV transmitted in plaintext -> IV reuse detected
Attack:
Trudy causes Alice to encrypt known plaintext d1 d2
d 3 d4 …
IV
Trudy sees: ci = di XOR ki
knows ci di, so can compute kiIV
IV
IV
IV
Trudy knows encrypting key sequence k1 k2 k3 …
Next time IV is used, Trudy can decrypt!
Trudy
8: Network Security 8-562
41
802.11i: improved security
numerous (stronger) forms of encryption
possible
provides key distribution
uses authentication server separate from
access point
8: Network Security 8-563
802.11i: four phases of operation
STA:
client station
1
AP: access point
AS:
Authentication
server
wired
network
Discovery of
security capabilities
2 STA and AS mutually authenticate, together
generate Master Key (MK). AP servers as “pass through”
3
STA derives
Pairwise Master
Key (PMK)
4
STA, AP use PMK to derive
Temporal Key (TK) used for message
encryption, integrity
3 AS derives
same PMK,
sends to AP
8: Network Security 8-564
42
EAP: extensible authentication protocol
EAP: end-end client (mobile) to authentication
server protocol
EAP sent over separate “links”
mobile-to-AP
(EAP over LAN)
AP to authentication server (RADIUS over UDP)
wired
network
EAP TLS
EAP
EAP over LAN (EAPoL)
IEEE 802.11
RADIUS
UDP/IP
8: Network Security 8-565
Network Security (summary)
Basic techniques…...
cryptography
(symmetric and public)
authentication
message integrity
key distribution
…. used in many different security scenarios
secure
email
secure transport (SSL)
IP sec
802.11
8: Network Security 8-566
43
Chapter 6
Wireless and Mobile
Networks
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-2004
J.F Kurose and K.W. Ross, All Rights Reserved
Computer
Networking: A Top
Down Approach
Featuring the
Internet,
3rd edition.
Jim Kurose, Keith
Ross
Addison-Wesley,
July 2004.
6: Wireless and Mobile Networks 6-567
Chapter 6: Wireless and Mobile Networks
Background:
# wireless (mobile) phone subscribers now
exceeds # wired phone subscribers!
computer nets: laptops, palmtops, PDAs,
Internet-enabled phone promise anytime
untethered Internet access
two important (but different) challenges
communication over wireless link
handling mobile user who changes point of
attachment to network
6: Wireless and Mobile Networks 6-568
44
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 higherlayer protocols
6.9 Summary
6: Wireless and Mobile Networks 6-569
Elements of a wireless network
wireless hosts
laptop, PDA, IP phone
run applications
may be stationary (nonmobile) or mobile
network
infrastructure
wireless
does not
always mean
mobility
6: Wireless and Mobile Networks 6-570
45
Elements of a wireless network
network
infrastructure
base station
typically connected to
wired network
relay - responsible for
sending packets between
wired network and
wireless host(s) in its
“area”
e.g., cell towers
802.11 access points
6: Wireless and Mobile Networks 6-571
Elements of a wireless network
wireless link
typically used to connect
mobile(s) to base station
also used as backbone
link
multiple access protocol
network
infrastructure
coordinates link access
various data rates,
transmission distance
6: Wireless and Mobile Networks 6-572
46
Characteristics of selected wireless link
standards
54 Mbps
5-11 Mbps
802.11{a,g}
802.11b
.11 p-to-p link
1 Mbps
802.15
3G
UMTS/WCDMA, CDMA2000
384 Kbps
2G
IS-95 CDMA, GSM
56 Kbps
Indoor
Outdoor
Mid range
outdoor
Long range
outdoor
10 – 30m
50 – 200m
200m – 4Km
5Km – 20Km
6: Wireless and Mobile Networks 6-573
Elements of a wireless network
infrastructure mode
base station connects
network
infrastructure
mobiles into wired
network
handoff: mobile changes
base station providing
connection into wired
network
6: Wireless and Mobile Networks 6-574
47
Elements of a wireless network
Ad hoc mode
no base stations
nodes can only transmit
to other nodes within link
coverage
nodes organize
themselves into a
network: route among
themselves
6: Wireless and Mobile Networks 6-575
Wireless Link Characteristics
Differences from wired link ….
decreased
signal strength: radio signal
attenuates as it propagates through matter
(path loss)
interference from other sources: standardized
wireless network frequencies (e.g., 2.4 GHz)
shared by other devices (e.g., phone); devices
(motors) interfere as well
multipath propagation: radio signal reflects off
objects ground, arriving ad destination at
slightly different times
…. make communication across (even a point to point)
wireless link much more “difficult”
6: Wireless and Mobile Networks 6-576
48
Wireless network characteristics
Multiple wireless senders and receivers create
additional problems (beyond multiple access):
B
A
C
C
A
B
Hidden terminal problem
C’s signal
strength
A’s signal
strength
space
B, A hear each other
Signal fading:
B, C hear each other
B, A hear each other
A, C can not hear each other
B, C hear each other
means A, C unaware of their
interference at B
A, C can not hear each other
interferring at B
6: Wireless and Mobile Networks 6-577
Code Division Multiple Access (CDMA)
used in several wireless broadcast channels
(cellular, satellite, etc) standards
unique “code” assigned to each user; i.e., code set
partitioning
all users share same frequency, but each user has
own “chipping” sequence (i.e., code) to encode data
encoded signal = (original data) X (chipping
sequence)
decoding: inner-product of encoded signal and
chipping sequence
allows multiple users to “coexist” and transmit
simultaneously with minimal interference (if codes
are “orthogonal”)
6: Wireless and Mobile Networks 6-578
49
CDMA Encode/Decode
channel output Zi,m
d =1
data d = -1
bits
1 1 1
1
1 1 1
1
code -1 -1 -1 -1 -1 -1 -1 -1
0
Zi,m= di.cm
sender
slot 1
1 1 1 1 1 1
1
1
-1 -1 -1
slot 1
channel
output
slot 0
1
-1
-1
-1 -1 -1
slot 0
channel
output
M
Di =m=1 Zi,m.cm
received -1 -1 -1 1 -1 1 1 1 1 1 1 -1 1 -1 -1 -1
input
1 1 1
1
1 1 1
1
code -1 -1 -1 -1
-1 -1 -1 -1
receiver
slot 1
slot 0
M
d0 = 1
d1 = -1
slot 1
channel
output
slot 0
channel
output
6: Wireless and Mobile Networks 6-579
CDMA: two-sender interference
6: Wireless and Mobile Networks 6-580
50
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 higherlayer protocols
6.9 Summary
6: Wireless and Mobile Networks 6-581
IEEE 802.11 Wireless LAN
802.11b
2.4-5 GHz unlicensed
radio spectrum
up to 11 Mbps
direct sequence spread
spectrum (DSSS) in
physical layer
• all hosts use same
chipping code
widely deployed, using
base stations
802.11a
5-6 GHz range
up to 54 Mbps
802.11g
2.4-5 GHz range
up to 54 Mbps
All use CSMA/CA for
multiple access
All have base-station
and ad-hoc network
versions
6: Wireless and Mobile Networks 6-582
51
802.11 LAN architecture
wireless host communicates
Internet
AP
BSS
1
hub, switch
or router
AP
BSS 2
with base station
base station = access point
(AP)
Basic Service Set (BSS) (aka
“cell”) in infrastructure mode
contains:
wireless hosts
access point (AP): base
station
ad hoc mode: hosts only
6: Wireless and Mobile Networks 6-583
802.11: Channels, association
802.11b: 2.4GHz-2.485GHz spectrum divided into 11
channels at different frequencies; 3 non-overlapping
AP admin chooses frequency for AP
interference possible: channel can be same as that
chosen by neighboring AP!
host: must associate with an AP
scans channels, listening for beacon frames containing
AP’s name (SSID) and MAC address
selects AP to associate with; initiates association
protocol
may perform authentication
will typically run DHCP to get IP address in AP’s subnet
6: Wireless and Mobile Networks 6-584
52
IEEE 802.11: multiple access
Like Ethernet, uses CSMA:
random access
carrier sense: don’t collide with ongoing transmission
Unlike Ethernet:
no collision detection – transmit all frames to completion
acknowledgment – because without collision detection, you
don’t know if your transmission collided or not
Why no collision detection?
difficult to receive (sense collisions) when transmitting due
to weak received signals (fading)
can’t sense all collisions in any case: hidden terminal, fading
Goal:
avoid collisions: CSMA/C(ollision)A(voidance)
6: Wireless and Mobile Networks 6-585
IEEE 802.11 MAC Protocol: CSMA/CA
802.11 sender
1 if sense channel idle for DIFS then
- transmit entire frame (no CD)
2 if sense channel busy then
- start random backoff time
- timer counts down while channel idle
- transmit when timer expires
- if no ACK, increase random backoff
interval, repeat 2
sender
receiver
DIFS
data
SIFS
802.11 receiver
ACK
if frame received OK
- return ACK after SIFS (ACK needed due
to hidden terminal problem)
6: Wireless and Mobile Networks 6-586
53
RTS/CTS
idea: allow sender to “reserve” channel rather than random
access of data frames: avoid collisions of long data frames
optional; not typically used
small request-to-send (RTS) packets
to AP using CSMA
RTSs may still collide with each other (but they’re short)
AP broadcasts clear-to-send CTS in response to RTS
CTS heard by all nodes
sender transmits data frame
other stations defer transmissions
sender first transmits
Avoid data frame collisions completely
using small reservation packets!
6: Wireless and Mobile Networks 6-587
Collision Avoidance: RTS-CTS exchange
A
B
AP
RTS(B)
RTS(A)
RTS(A)
CTS(A)
reservation
collision
CTS(A)
DATA (A)
time
ACK(A)
defer
ACK(A)
6: Wireless and Mobile Networks 6-588
54
802.11 frame: addressing
2
2
6
6
6
frame
address address address
duration
control
1
2
3
2
6
4
0 - 2312
seq address
4
control
payload
CRC
Address 3: used
only in ad hoc
Address 1: MAC address
Address 3: MAC mode
of wireless host or AP
address
to receive this frame
of router interface to
Address 2: MAC address
of wireless host or AP which AP is attached
transmitting this frame
6: Wireless and Mobile Networks 6-589
802.11 frame: addressing
Internet
R1 router
H1
AP
R1 MAC addr AP MAC addr
dest. address
source address
802.3 frame
AP MAC addr H1 MAC addr R1 MAC addr
address 1
address 2
address 3
802.11 frame
6: Wireless and Mobile Networks 6-590
55
802.11 frame: more
frame seq #
duration of reserved
transmission time (RTS/CTS) (for reliable ARQ)
2
2
6
6
6
frame
address address address
duration
control
1
2
3
2
Protocol
version
2
Type
4
Subtype
1
To
AP
6
2
1
1
1
From
AP
More
frag
Retry
4
0 - 2312
seq address
4
control
payload
1
CRC
1
Power More
mgt
data
1
1
WEP
Rsvd
frame type
(RTS, CTS, ACK, data)
6: Wireless and Mobile Networks 6-591
802.11: mobility within same subnet
H1 remains in same IP
subnet: IP address
can remain same
switch: which AP is
associated with H1?
self-learning:
switch
will see frame from H1
and “remember” which
switch port can be
used to reach H1
router
hub or
switch
BBS 1
AP 1
AP 2
H1
BBS 2
6: Wireless and Mobile Networks 6-592
56
802.15: personal area network
less than 10 m diameter
replacement for cables
(mouse, keyboard,
headphones)
ad hoc: no infrastructure
master/slaves:
P
slaves request permission to
send (to master)
master grants requests
S
M
Bluetooth specification
radius of
coverage
M
802.15: evolved from
P
S
S
2.4-2.5 GHz radio band
up to 721 kbps
P
P
S
P
Master device
Slave device
Parked device (inactive
6: Wireless and Mobile Networks 6-593
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 higherlayer protocols
6.9 Summary
6: Wireless and Mobile Networks 6-594
57
Components of cellular network architecture
MSC
connects cells to wide area net
manages call setup (more later!)
handles mobility (more later!)
cell
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
Mobile
Switching
Center
Public telephone
network, and
Internet
Mobile
Switching
Center
wired network
6: Wireless and Mobile Networks 6-595
Cellular networks: the first hop
Two techniques for sharing
mobile-to-BS radio
spectrum
combined FDMA/TDMA:
divide spectrum in
frequency channels, divide
each channel into time
slots
frequency
bands
CDMA: code division
multiple access
time slots
6: Wireless and Mobile Networks 6-596
58
Cellular standards: brief survey
2G systems: voice channels
IS-136 TDMA: combined FDMA/TDMA (north
america)
GSM (global system for mobile communications):
combined FDMA/TDMA
most widely deployed
IS-95 CDMA: code division multiple access
TDMA/FDMA
CDMA-2000
GPRS EDGE UMT
S
IS-136
GSM IS-95
Don’t drown in a bowl
of alphabet soup: use this
oor reference only
6: Wireless and Mobile Networks 6-597
Cellular standards: brief survey
2.5 G systems: voice and data channels
for those who can’t wait for 3G service: 2G extensions
general packet radio service (GPRS)
evolved from GSM
data sent on multiple channels (if available)
enhanced data rates for global evolution (EDGE)
also evolved from GSM, using enhanced modulation
Date rates up to 384K
CDMA-2000 (phase 1)
data rates up to 144K
evolved from IS-95
6: Wireless and Mobile Networks 6-598
59
Cellular standards: brief survey
3G systems: voice/data
Universal Mobile Telecommunications Service (UMTS)
GSM
next step, but using CDMA
CDMA-2000
….. more (and more interesting) cellular topics due to
mobility (stay tuned for details)
6: Wireless and Mobile Networks 6-599
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 higherlayer protocols
6.9 Summary
6: Wireless and Mobile Networks 6-600
60
What is mobility?
spectrum of mobility, from the
network perspective:
no mobility
mobile wireless user,
using same access
point
high mobility
mobile user,
connecting/
disconnecting from
network using DHCP.
mobile user, passing
through multiple access
point while maintaining
ongoing connections
(like cell phone)
6: Wireless and Mobile Networks 6-601
Mobility: Vocabulary
home network: permanent
“home” of mobile
(e.g., 128.119.40/24)
home agent: entity that will perform
mobility functions on behalf of
mobile, when mobile is remote
wide area
network
Permanent address:
address in home network,
can always be used to
reach mobile
e.g., 128.119.40.186
correspondent
6: Wireless and Mobile Networks 6-602
61
Mobility: more vocabulary
Permanent address: remains
constant (e.g., 128.119.40.186)
visited network: network in
which mobile currently resides
(e.g., 79.129.13/24)
Care-of-address: address in
visited network.
(e.g., 79,129.13.2)
wide area
network
correspondent: wants to
communicate with
mobile
home agent: entity in
visited network that
performs mobility
functions on behalf of
mobile.
6: Wireless and Mobile Networks 6-603
How do you contact a mobile friend:
Consider friend frequently changing
addresses, how do you find her?
I wonder where
Alice moved to?
search all phone
books?
call her parents?
expect her to let you
know where he/she is?
6: Wireless and Mobile Networks 6-604
62
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
6: Wireless and Mobile Networks 6-605
Mobility: approaches
Let routing handle it: routers advertise permanent
not
address of mobile-nodes-in-residence
via usual
scalable
routing table exchange.
to millions of
routing tables indicate
mobiles 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
6: Wireless and Mobile Networks 6-606
63
Mobility: registration
visited network
home network
1
wide2area
network
mobile contacts
foreign agent on
entering visited
network
foreign agent contacts home agent
home: “this mobile is resident in my
network”
End result:
Foreign agent knows about mobile
Home agent knows location of mobile
6: Wireless and Mobile Networks 6-607
Mobility via Indirect Routing
home
network
foreign agent
receives packets,
forwards to
mobile
home agent
intercepts packets,
forwards to foreign
agent
visited
network
3
wide area
network
1
correspondent
addresses packets
using home
address of mobile
2
4
mobile replies
directly to
correspondent
6: Wireless and Mobile Networks 6-608
64
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-networkmobile
inefficient when
correspondent, mobile
are in same network
6: Wireless and Mobile Networks 6-609
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!
6: Wireless and Mobile Networks 6-610
65
Mobility via Direct Routing
home
network
correspondent
forwards to foreign
agent
foreign agent
receives packets,
forwards to
mobile
visited
network
4
wide area
network
2
correspondent
requests, receives
foreign address of
mobile
3
1
4
mobile replies
directly to
correspondent
6: Wireless and Mobile Networks 6-611
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?
6: Wireless and Mobile Networks 6-612
66
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)
foreign net visited
at session start
anchor
foreign
agent
wide area
network
2
1
4
5
correspondent
agent
3
new foreign
agent
correspondent
new
foreign
network
6: Wireless and Mobile Networks 6-613
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 higherlayer protocols
6.9 Summary
6: Wireless and Mobile Networks 6-614
67
Mobile IP
RFC 3220
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
6: Wireless and Mobile Networks 6-615
Mobile IP: indirect routing
foreign-agent-to-mobile packet
packet sent by home agent to foreign
agent: a packet within a packet
dest: 79.129.13.2
dest: 128.119.40.186
dest: 128.119.40.186
Permanent address:
128.119.40.186
dest: 128.119.40.186
Care-of address:
79.129.13.2
packet sent by
correspondent
6: Wireless and Mobile Networks 6-616
68
Mobile IP: agent discovery
agent advertisement: foreign/home agents advertise
service by broadcasting ICMP messages (typefield = 9)
H,F bits: home and/or
foreign agent
R bit: registration
required
6: Wireless and Mobile Networks 6-617
Mobile IP: registration example
6: Wireless and Mobile Networks 6-618
69
Components of cellular network architecture
recall:
correspondent
wired public
telephone
network
MSC
MSC
MSC
MSC
MSC
different cellular networks,
operated by different providers
6: Wireless and Mobile Networks 6-619
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
6: Wireless and Mobile Networks 6-620
70
GSM: indirect routing to mobile
home
network
HLR
2
home MSC consults HLR,
gets roaming number of
mobile in visited network
correspondent
home
Mobile
Switching
Center
1
VLR
3
Mobile
Switching
Center
4
Public
switched
telephone
network
call routed
to home network
home MSC sets up 2nd leg of call
to MSC in visited network
mobile
user
visited
network
MSC in visited network completes
call through base station to mobile
6: Wireless and Mobile Networks 6-621
GSM: handoff with common MSC
Handoff goal: route call via
VLR
Mobile
Switching
Center
old
routing
old BSS
new base station (without
interruption)
reasons for handoff:
new
routing
new BSS
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
6: Wireless and Mobile Networks 6-622
71
GSM: handoff with common MSC
VLR
Mobile
Switching
Center 2
4
1
7
8
old BSS
3
5
6
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 BSS
6. mobile, new BSS signal to activate new
channel
7. mobile signals via new BSS to MSC:
handoff complete. MSC reroutes call
8 MSC-old-BSS resources released
6: Wireless and Mobile Networks 6-623
GSM: handoff between MSCs
home network
correspondent
Home
MSC
anchor MSC: first MSC
visited during cal
call remains routed
through anchor MSC
new MSCs add on to end
anchor MSC
PSTN
MSC
MSC
MSC
(a) before handoff
of MSC chain as mobile
moves to new MSC
IS-41 allows optional
path minimization step
to shorten multi-MSC
chain
6: Wireless and Mobile Networks 6-624
72
GSM: handoff between MSCs
anchor MSC: first MSC
visited during cal
home network
correspondent
Home
MSC
call remains routed through
anchor MSC
new MSCs add on to end of
anchor MSC
MSC chain as mobile moves
to new MSC
IS-41 allows optional path
minimization step to shorten
multi-MSC chain
PSTN
MSC
MSC
MSC
(b) after handoff
6: Wireless and Mobile Networks 6-625
Mobility: GSM versus Mobile IP
GSM element
Comment on GSM element
Mobile IP element
Home system
Network to which the mobile user’s permanent
phone number belongs
Home network
Gateway Mobile
Switching Center, or
“home MSC”. Home
Location Register
(HLR)
Home 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
Home agent
Visited System
Network other than home system where
mobile user is currently residing
Visited network
Visited Mobile
services Switching
Center.
Visitor Location
Record (VLR)
Visited 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
Foreign agent
Mobile Station
Roaming Number
(MSRN), or “roaming
number”
Routable address for telephone call segment
between home MSC and visited MSC, visible
to neither the mobile nor the correspondent.
Care-ofaddress
6: Wireless and Mobile Networks 6-626
73
Wireless, mobility: impact on higher layer protocols
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
logically, impact
6: Wireless and Mobile Networks 6-627
Chapter 6 Summary
Wireless
wireless links:
capacity, distance
channel impairments
CDMA
IEEE 802.11 (“wi-fi”)
CSMA/CA reflects
wireless channel
characteristics
cellular access
architecture
standards (e.g., GSM,
CDMA-2000, UMTS)
Mobility
principles: addressing,
routing to mobile users
home, visited networks
direct, indirect routing
care-of-addresses
case studies
mobile IP
mobility in GSM
impact on higher-layer
protocols
6: Wireless and Mobile Networks 6-628
74