You are on page 1of 27

QoS v MPLS

Tutor: Lu Thanh Tr
Email: luu@hcmut
luu@hcmut.edu.vn
edu vn

Internet
z

Internet: Group of zones wherein equipments


can directly exchange data
A equipment
i
t iis assigned
i
d one ((or more))
logical address which is globally unique
N t
Network
k layer:
l
enables
bl a packet
k t tto be
b routed
t d
through several zones before reaching its
desired destination

Simplified view of the Internet

Internet Protocol version 4


z
z

32bits address
Several services are provided including:
z
z
z
z
z
z

Routing
R
i
Loop avoidance
F
Fragmentation
t ti
Service priority
Ch k
Checksum
Extensions for future uses
4

I t
Internet
t Protocol
P t
l

Addressing in Internetworks
z
z
z
z

More than one physical network


Different Locations
Larger number of computers
Need structure in IP addresses
z

network part identifies which network in the


internetwork (e.g. the Internet)
host part identifies host on that network

Address Structure Revisited


z

Hierarchical Division in IP Address:


z
z

Network Part (Prefix)


Host Part (Host Address)
describes which physical network
z describes which host on that network
z

205

Network Number/Prefix

154

11001101 10011010 00001000

Network
z

Host Number

1
00000001

Host

Boundary can be anywhere


z

very often NOT at a multiple of 8 bits

Classful Addressing
Addressing
z

Divided into 5
classes
Class A 8 bits N/W id
and 24 bits host id
and so on B,C.
W t
Wastage
off IP
addresses by
assigning blocks of
addresses which fall
along octet
b
boundaries
d i
8

Old-style classes of IP addresses


z

Just look at the address to tell what class it is.


z

Class A
Cl
A: 0
0.0.0.0
0 0 0 tto 127
127.255.255.255
255 255 255
z binary 0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Class
C
ass B: 128.0.0.0
8 0 0 0 to 191.255.255.255
9 55 55 55
z binary 10xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Class C: 192.0.0.0 to 223.255.255.255
z binary 110xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Class D: (multicast) 224.0.0.0 to 239.255.255.255
z binary 1110xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Class E: (reserved) 240.0.0.0 to 255.255.255.255

Implied netmasks of classful


addresses
dd
z

A classful network has a natural


natural or implied
implied prefix
length or netmask:
z
z
z

z
z

Class A: prefix length /8 (netmask 255.0.0.0)


Class B: prefix length /16 (netmask 255.255.0.0)
Class C: prefix length /24 (netmask 255.255.255.0)

Old routing
ti systems
t
often
ft used
d iimplied
li d netmasks
t
k
Modern routing systems always use explicit prefix
lengths or netmasks

10

Traditional subnetting of
classful networks
z

Old routing systems allowed a classful


network to be divided into subnets
z

All subnets (of the same classful net) had to be


the same size and have the same netmask
Subnets could not be subdivided any further

None of these restrictions apply in modern


systems

11

Traditional supernetting
z

Some traditional routing systems allowed


supernets to be formed by combining
adjacent classful nets
nets.
z

e.g. combine two Class C networks (with


consecutive numbers) into a supernet with
netmask 255.255.254.0

Modern systems
y
use more g
general classless
mechanisms.
12

Classless addressing
z

Forget old Class A


A, Class B
B, Class C
terminology and restrictions
Internet routing and address management
today is classless
CIDR = Classless Inter
Inter-Domain
Domain Routing
z

routing does not assume that class A,B,C


implies prefix length /8,/16,/24
/8 /16 /24

VLSM = Variable-Length Subnet Masks


z

routing does not assume that all subnets are


the same size

13

Classless addressing example


z

A large ISP gets a large block of addresses


z

Allocate smaller blocks to customers


z

e.g., a /16 prefix, or 65536 separate addresses


e.g., a /22 prefix (1024 addresses) to one customer,
and a /28 prefix (16 addresses) to another customer

An organisation
A
i ti th
thatt gets
t a /22 prefix
fi ffrom th
their
i
ISP divides it into smaller blocks
z

e.g.
e
g a /26 prefix (64 addresses) for one department
department,
and a /27 prefix (32 addresses) for another department

14

Network Masks
z

Define which bits are used to describe the


Network Part
Different Representations:
z
z
z
z

decimal dot notation: 255.255.224.0


binary: 11111111 11111111 11100000 00000000
hexadecimal: 0xFFFFE000
number of network bits: /19

Binary AND of 32 bit IP address with 32 bit


netmask yields network part of address
15

Example Prefixes
z

137 158 128 0/17 (netmask 255.255.128.0)


137.158.128.0/17
255 255 128 0)
1111 1111 1111 1111
1000 1001 1001 1110

198.134.0.0/16

1 000
10000
000
0000

0000 0000
0000 0000

(netmask 255.255.0.0)

1111 1111 1111 1111 0000 0000 0000 0000


1100 0110 1000 0110 0000 0000 0000 0000

205.37.193.128/26 (netmask 255.255.255.192)


1111 1111 1111 1111 1111 1111
1100 1101 0010 0101 1100 0001

11 00 0000
10 00 0000
16

Special Addresses
z

All 0s
0 s in host part: Represents Network
z
z

All 1s in host part: Broadcast


z
z
z

z
z

e.g. 193.0.0.0/24
e g 138
e.g.
138.37.128.0/17
37 128 0/17
e.g.
e
g 137
137.156.255.255
156 255 255 (137
(137.156.0.0/16)
156 0 0/16)
e.g. 134.132.100.255 (134.132.100.0/24)
e g 190
e.g.
190.0.127.255
0 127 255 (190
(190.0.0.0/17)
0 0 0/17)

127.0.0.0/8: Loopback address (127.0.0.1)


0000 V
0.0.0.0:
Various
i
special
i l purposes
17

CIDR Table Entry


Entry
z

Extract the destination IP address.

Boolean AND the IP address with the subnet mask


for each entry in the routing table
table.

The answer you get after ANDing is checked with


th base
the
b
address
dd
entry
t corresponding
di tto th
the subnet
b t
mask entry with which the destination entry was
Boolean ANDed.

If a match is obtained the packet is forwarded to the


router with the corresponding
p
g base address
18

Network Address Translation

Each organizationsingle IP address

3 Reserved ranges

Within organization
each host with IP
unique to the orgn.,
from reserved set of IP
addresses

172 16 0 0 172.31.255.255/12
172.16.0.0
172 31 255 255/12 (1
(1,048,576
048 576 hosts)

10.0.0.0 10.255.255.255 (16,777,216 hosts)

192.168.0.0 192.168.255.255/16 (65,536 hosts)

19

NAT Example
10.0.0.4

B
10.0.0.1

Source
Computer

Source
Computer's
IP Address

Source
Computer's
Port

NAT Router's
IP Address

NAT Router's
Assigned
Port Number

10.0.0.1

400

24.2.249.4

10.0.0.2

50

24.2.249.4

10.0.0.3

3750

24.2.249.4

10.0.0.4

206

24.2.249.4

20

IP v4 problems
z
z
z

Need for more IP addresses


Difficult to support mobile IP
Fragmentation is no longer a requirement

21

Features of IPv6
z
z

z
z
z
z

Larger Address Space


Aggregation-based address hierarchy
Efficient backbone routing
Efficient and Extensible IP datagram
Stateless Address Autoconfiguration
Security (IPsec mandatory)
Mobility
22

128 bit IP
128-bit
IPv6
6 Add
Address
3FFE:085B:1F1F:0000:0000:0000:00A9:1234

8 ggroups
p of 16-bit hexadecimal numbers separated
p
byy :
Leading zeros can be removed
3FFE:85B:1F1F::A9:1234
:: = all zeros in one or more group of 16-bit hexadecimal numbers
23

Header comparison
15 16

0
vers

hlen

TOS

identification
20
bytes

TTL

31
total length

flags

protocol

flag
flag-offset
offset

header checksum

source address
destination
des
o address
dd ess

total length => payload


protocol => next header
TTL => hop limit

IPv4
traffic class

payload length
40
bytes

ID,
ID flags
flags, flag offset
TOS, hlen
header checksum

Ch
Changed
d (3)

options and padding

vers

Removed (6)

flow-label
next header

source address

destination address

Added (2)

hop limit

traffic class
flow label

Expanded
address
dd
32 to 128 bi
bits

IPv6

24

Major
j Improvements
p
of
IPv6 Header
z

No option field: Replaced by extension


header. Result in a fixed length, 40-byte
IP header.
No header checksum: Result in fast
processing.
No fragmentation at intermediate nodes:
Result in fast IP forwarding
forwarding.

25

Extension Headers
z
z
z
z
z
z

Routing Extended routing, like IPv4 loose list of


routers to visit
Fragmentation Fragmentation and reassembly
Authentication Integrity and authentication,
authentication
security
Encapsulation Confidentiality
H b H O
Hop-by-Hop
Option
ti Special
S
i l options
ti
th
thatt require
i
hop-by-hop processing
Destination Options Optional information to be
examined by the destination node

26

27