Vous êtes sur la page 1sur 43

IP Addressing

Nokia Siemens Networks

TG70113EN02GLA1

Properties of the Internet Protocol (IP)

IP is a connectionless protocol
Layer 3 protocol Network Layer
The IP protocol offers
no reliability
no flow control
no error recovery.

IP packets may arrive


out of order
may be lost

best-effort service

Nokia Siemens Networks

Further requirements:
 Integrity: Delivery to the correct destination


Quality of Service: Sometimes best effort is not enough

Transport Layer

TCP

UDP

Addressing of higher
layer protocols
Addressing of stations

IP

Network Layer
Frag

Data Link Layer

Nokia Siemens Networks

Ethernet

men

802.5

SIEME NS
NI XDORF

tation

X.25

SIEMENS
NI XDORF

IP Header

32 Bits
0

Version

8
LEN

16
Type of Service

Identification
IP
Header

Time to Live (TTL)

31
Total Length

D M
F F

Protocol

Fragment Offset
Header Checksum

Source IP Address
Destination IP Address
Padding

Options
Data

Nokia Siemens Networks

IP Trace Example

Nokia Siemens Networks

Problem: MAC addresses are distributed randomly all over


the network, there is no logical structure.

MAC

MAC

MAC
L2-Switch

MAC

L2-Switch

MAC

L2-Switch

L2-Switch

MAC
MAC

MAC

L2-Switch

MAC

Nokia Siemens Networks

MAC

MAC

Solution: Network addresses. They have a logical structure


and can be used for the delivery of data in big networks
Network address

Network address

MAC address

MAC address

Network address

Network address

Router

MAC address

Router

Network address

Router

Router

MAC address

Every station
has a MAC address and
a network address

Nokia Siemens Networks

MAC address

Router

Network address
MAC address

Structured addresses
Network:
Netz USA.x.x.x
usa.x.x.x

Network:
Netz Europe.x.x.x
europe.x.x.x

Router

Router

Router

Network:
Netz Europe.France.x.x
europe.france.x.x

Router

Network:
Netz USA.Texas.x.x
usa.texas.x.x

Router

Network:
Netz Europe.France.Paris.x
europe.france.paris.x
Network:
Netz USA.Texas.Houston.x
usa.texas.houston.x

Computer 1
Network address:
usa.texas.houston.host_1

Nokia Siemens Networks

Computer 2
Network address:
europe.france.paris.host_1

Decimal and binary notation of IP addresses

Byte

Byte

Byte

Dotted Decimal
Notation

85

11

117

Binary
Notation

01010101

00001011

01110101

Nokia Siemens Networks

Byte
4
00000100

32 Bit IP Address

Network
Network
The
Thenetwork
networkpart
partofofthe
theaddress
address
identifies
identifiesaacertain
certainnetwork
network

Router

10

Nokia Siemens Networks

Host
Host
The
Thehost
hostpart
partofofthe
theaddress
address
identifies
a
certain
identifies a certainhost
host
within
the
network
within the network

Router

Class based IP addressing


Class A

N H H H
0 7 Bits

24 Bits

Range: (1-126)

Class B

N N H H
10

14 Bits

16 Bits

Range: (128-191)

Class C

N N N H
110

21 Bits

Range: (192-223)

11

Nokia Siemens Networks

8 Bits

Class A
Bit#

7 8

0 1

31

0
NetworkPrefix

Host-Number

Class B
Bit#

15 16

31

10
Network-Prefix

Host-Number

Class C
Bit#

23 24

31

110
Network-Prefix

12

Nokia Siemens Networks

HostNumber

Reserved IP Addresses

host number all 0s

a certain network ID

host number all1s

broadcast, directed broadcast

Class A address:
127.x.x.x

loopback address

0.0.0.0

source address (this host in this network)


or
default route (in the routing table)

255.255.255.255

local broadcast address

13

Nokia Siemens Networks

Application
Destination
127.0.0.1
TCP
IP
Data Link Layer

SIE MENS
NIXD OR F

DA=201.3.3.255
DA=201.3.3.255

Directed
Directed Broadcast
Broadcast to
to
network
network 201.3.3.0
201.3.3.0 by
by default
default disabled
disabled

192.16.1.1
192.16.1.1
Router

Network
Network addr.
addr. 192.16.1.0
192.16.1.0
DA=255.255.255.255
DA=255.255.255.255

14

Nokia Siemens Networks

2 32 (4,294,967,296) IP addresses

126 (27 -2)


Class A
networks

.
10

15

Nokia Siemens Networks

0
.
0
0.

16,384 (214)
Class B
0
.
networks
0
.
6
1
.
.0
2
0
.
7
1 2.31
17
192
19 .16
2.1 8.0
.0 68
21)
2,097,152
(2
.25
5.0
Class C

Address Range

Networks

Address Class

10.0.0.0 10.255.255.255

172.16.0.0 172.31.255.255

16

192.168.0.0 192.168.255.255

256

These addresses will not be


forwarded by public routers!
16

Nokia Siemens Networks

Allocation of IP addresses

via
Dynamic
Host
Configuration
Protocol
(DHCP)

17

Nokia Siemens Networks

Class Based / Classless IP Addressing


Class

Start
Bits

NetID

HostID

Smallest
IP Address

Largest
IP Address

Purpose

7 bits

24 bits

0.0.0.0

127.255.255.255

Large Networks

10

14 bits

16 bits

128.0.0.0

191.255.255.255

Medium Networks

110

21 bits

8 bits

192.0.0.0

223.255.255.255

Small Networks

1110

NA

NA

224.0.0.0

239.255.255.255

Multicasting

1111

NA

NA

240.0.0.0

255.255.255.255

Reserved

32 bits

Network ID (Net ID)

n bits

18

Nokia Siemens Networks

Host ID

32-n bits

Class Based / Classless IP Addressing

Example: Class A address


0
0

8
Orignal
Network part

16

24
Host part

Subnetwork part

19

Nokia Siemens Networks

31

Host part

Subnet ID
Net ID

Host ID
Host Number

Subnet Number

IP Address

Subnet

Router
SIEME NS
NI XDORF

Subnet
Host
Routers are used to
connect subnet

Router
Router
Subnet

Each interface requires


a specific subnet address

20

Nokia Siemens Networks

The subnet structure


may only be visible
within the network.

Subnet Mask
Is used to:
discriminate the host number from the network number.
indicate the number of bits in the prefix.
Must have:
a contiguous string of ones at the more significant end,
a contiguous string of zeros at the less significant end, and
no intervening bits.

21

Nokia Siemens Networks

Subnet Mask

IP Address

132 76 250 55

10000100010011001111101000110111

Subnet Mask

255255192  0

11111111111111111100000000000000

Prefix Notation

/18

Network Part
of the Address 132

22

Nokia Siemens Networks

76 192  0

10000100010011001100000000000000

Router
Router
Therouter
routerisislinked
linkedtotoall
allsubnets
subnets
The
and,ininthis
thisinstance,
instance,also
alsoisisthe
the
and,
defaultgateway
gatewayfor
forboth
bothnetworks
networks
default

Subnet 132.76.192.0 /18

nextrouter
router
next
Router

132.76.192.1
85.128.0.3
132.76.192.1
Router
85.64.0.1
132.76.128.1

132.76.128.1

132.76.192.2

originalClass
ClassBB
original
network
network
132.76.0.0
132.76.0.0

132.76.250.55
Subnet 132.76.128.0 /18

132.76.128.2

23

Nokia Siemens Networks

132.76.128.3

24

Nokia Siemens Networks

Net ID
Net ID

Host ID
Subnet Number

Host Number

IP Address

? ?

how many subnets ?


...today?
...in the future?

Subnet

Router

SIEME NS
NI XDORF

Subnet
Host
Router
Router

how many hosts ?


...today?
...in the future?

25

Nokia Siemens Networks

Subnet

An organization has been assigned the network number 195.1.1.0 /24


and it needs to define six subnets.
The largest subnet is required to support 25 hosts.
1. Number of subnets

2. Establishing the
necessary bits

1 1 1 (3Bits) because 2 =8 possibilities

3. Set to most
significant digit

11111111 11111111 11111111 11100000


Convert into decimal format

4. Subnet mask

26

Nokia Siemens Networks

255

255

255

224

Subnet mask

255 .
255
. 255
. 224
1111 1111 1111 1111 1111 1111 1110 0000
Subnet 0
Subnet 1
Subnet 2
Subnet 3
Subnet 4
Subnet 5
Subnet 6
Subnet 7

00000000 =
00100000 =
01000000 =
01100000 =
10000000 =
10100000 =
11000000 =
11100000 =

0
32
64
96
128
160
192
224

Subnet address 195 . 1 . 1 . X / 27

27

Nokia Siemens Networks

OriginalNetwork
Network
Original
195.1.1.0
195.1.1.0

195.1.1.0

Internet

28

Nokia Siemens Networks

Router

195.1.1.0 /27
195.1.1.32 /27
195.1.1.64 /27
195.1.1.96 /27
195.1.1.128 /27
195.1.1.160 /27
195.1.1.192 /27
195.1.1.224 /27

Defining Host Addresses for Subnet #2


(195.1.1.0 is original class C )
Subnet
Subnet #2:
#2: 11000011.00000001.00000001.010
11000011.00000001.00000001.010 00000
00000 == 195.1.1.64
195.1.1.64 /27
/27
Host
Host #1:
#1: 11000011.00000001.00000001.010
11000011.00000001.00000001.010 00001
00001 == 195.1.1.65
195.1.1.65 /27
/27
Host
Host #2:
#2: 11000011.00000001.00000001.010
11000011.00000001.00000001.010 00010
00010 == 195.1.1.66
195.1.1.66 /27
/27
Host
Host #3:
#3: 11000011.00000001.00000001.010
11000011.00000001.00000001.010 00011
00011 == 195.1.1.67
195.1.1.67 /27
/27
..
..
Host
Host #28:
#28: 11000011.00000001.00000001.010
11000011.00000001.00000001.010 11100
11100 == 195.1.1.92
195.1.1.92 /27
/27
Host
Host #29:
#29: 11000011.00000001.00000001.010
11000011.00000001.00000001.010 11101
11101 == 195.1.1.93
195.1.1.93 /27
/27
Host
Host #30:
#30: 11000011.00000001.00000001.010
11000011.00000001.00000001.010 11110
11110 == 195.1.1.94
195.1.1.94 /27
/27
Broadcast
Broadcast #2:
#2: 11000011.00000001.00000001.010
11000011.00000001.00000001.010 11111
11111 == 195.1.1.95
195.1.1.95 /27
/27
Subnet
Subnet #3:
#3: 11000011.00000001.00000001.011
11000011.00000001.00000001.011 00000
00000 == 195.1.1.96
195.1.1.96 /27
/27
29

Nokia Siemens Networks

ISP example

1st Octet
ISP

2nd Octet

3rd Octet

Net ID allocated to ISP

4th Octet

ISPs Host IDs

Net ID 10.2.112.0

00000110

00000010

0111

0000

0000

0000

Mask 255.255.240.0

11111111

11111111

1111

0000

0000

0000

Net ID allocated by ISP to Client


ISPs Client

30

Net ID allocated to ISP

ISP Subnet

Host id

Net ID 10.2.116.16

00000110

00000010

0111

0100

0001

0000

Mask 255.255.255.240

11111111

11111111

1111

1111

1111

0000

Nokia Siemens Networks

Example: VLAN and Subnetting


1
11

11

2
12
13
11

13

12
13
12

13

VLAN is Layer 2 technology


For each VLAN a subnet is
required
Subnet is created by Router
configuration

Port with assigned VLAN

12
2

Port with several assigned VLANs


(Trunk Port)

1213
11
2

User in assigned Subnet (VLAN)

Ethernet Frame without tag


Ethernet Frame with tag

31

Nokia Siemens Networks

Example: Router configuration


IEEE 802.1q

VLAN ID

FE 0/0.11
encapsulation dot1q 11
ip address 192.168.11.254 /24
FE 0/0.12
encapsulation dot1q 12
ip address 192.168.12.254 /24
FE 0/0.13
encapsulation dot1q 13
ip address 192.168.13.254 /24

32

Nokia Siemens Networks

Default Gateway address


for Hosts in this subnet

VL

AN

VLA

ID

N ID

11
12

VLAN ID 13

virtual
interface

physical
interface

.11

FE 0/0

Fast-Ethernet 0/0
Tagged Interface
(Trunk)

33

Number of
Subnets

Required
Bits

Subnet
Mask

Number of Hosts
per Subnet

255.128.0.0

2(8+8+7)-2 = 8.388.606

255.192.0.0

2(8+8+6)-2 = 4.194.302

255.224.0.0

2(8+8+5)-2 = 2.097.150

16

255.240.0.0

2(8+8+4)-2 = 1.048.574

32

255.248.0.0

2(8+8+3)-2 = 524.286

64

255.252.0.0

2(8+8+2)-2 = 262.142

128

255.254.0.0

2(8+8+1)-2 = 131.070

256

255.255.0.0

2(8+8+0)-2 =

Nokia Siemens Networks

65.534

Variable Length Subnet Masks (VLSM)


Different prefix lengths are used in the network
IP address space is used more efficiently
VLSM requires classless routing protocols
VLSM results in a hierarchical address structure
/26
/30

/25

/30

/30
/26

34

Nokia Siemens Networks

/24

/30
/30

/26

VLSM Technique
10.0.0.0/8
/16
-0-

-1-

-2-

-3-



10.1.0.0/16

- 253 - - 254 - - 255 -

10.254.0.0/16
/19

/24
-0-0-

-1-



- 254 -

-1-



-6-

-7-

10.254.192.0/19

- 255 -

10.1.254.0/24
Remark:
/27
/x
-0-

-1-



10.1.254.32/27
35

Nokia Siemens Networks

-6-

-7-

application of a
= network prefix
with length x

Classless Inter-Domain Routing (CIDR)


CIDR eliminates the concept of Class A, B and C networks
and replaces these with a generalised prefix
CIDR allocates addresses a bit at a time
A CIDR format : Net ID address followed by a prefix
e.g. addresses 172.16.0.0 to 172.31.255.255
become 172.16.0.0 / 12 (172.16/12)
CIDR is a variation of Subnetting so it is interoperable with systems using
Class based addressing

36

Nokia Siemens Networks

Route Aggregation

37

Example: Service Provider requires 2000 IP addresses


Assigned the following contiguous Class C addresses:
192.128.192.0 = 11000000 10000000 11000 000 00000000
192.128.193.0 = 11000000 10000000 11000 001 00000000
192.128.194.0 = 11000000 10000000 11000 010 00000000
192.128.195.0 = 11000000 10000000 11000 011 00000000
192.128.196.0 = 11000000 10000000 11000 100 00000000
192.128.197.0 = 11000000 10000000 11000 101 00000000
192.128.198.0 = 11000000 10000000 11000 110 00000000
192.128.199.0 = 11000000 10000000 11000 111 00000000
Addresses can be summarised as 192.128.192 / 21
Network Address = 192.128.192.0
Network Mask = 255.255.248.0

Nokia Siemens Networks

Fragmentation

data

Router

Router

Fragment Offset

38

Nokia Siemens Networks

header

Fragmentation
# of the first byte in the data field
32 Bits
0

Version

8
LEN

16
Type of Service

Identification
IP
Header

Time to Live (TTL)

31
Total Length

D M
F F

Protocol

Fragment Offset
Header Checksum

Source IP Address
Destination IP Address
Padding

Options
Data

LEN...internal header length unit: 4 bytes


Total Length ........................unit: 1 bytes
Fragment Offset...................unit: 8 bytes
39

Nokia Siemens Networks

Original IP Packet
bit

Version
Version

8
LEN
LEN == 55

16
Total
Total Length=1300
Length=1300

TOS

Identification=1748
Identification=1748
IP
Header

Time
Time to
to Live
Live (TTL)
(TTL)

31

00 00 00

Protocol
Protocol

Fragment
Fragment Offset=0
Offset=0
Header
Header Checksum
Checksum

Source
Source IP
IP Address
Address
Destination
Destination IP
IP Address
Address
Data

Fragmentation Control

40

Nokia Siemens Networks

Total Packet Length

First Fragment
bit

Version
Version

8
LEN
LEN == 55

16
Total
Total Length=532
Length=532

TOS

Identification=1748
Identification=1748
IP
Header

Time
Time to
to Live
Live (TTL)
(TTL)

31

00 00 11

Protocol
Protocol

Fragment
Fragment Offset=0
Offset=0
Header
Header Checksum
Checksum

Source
Source IP
IP Address
Address
Destination
Destination IP
IP Address
Address
512 Octets of Data

Fragmentation Control

41

Nokia Siemens Networks

Total Packet Length

Second Fragment
bit

Version
Version

8
LEN
LEN == 55

16
Total
Total Length=532
Length=532

TOS

Identification=1748
Identification=1748
IP
Header

Time
Time to
to Live
Live (TTL)
(TTL)

31

00 00 11

Protocol
Protocol

Fragment
Fragment Offset=64
Offset=64
Header
Header Checksum
Checksum

Source
Source IP
IP Address
Address
Destination
Destination IP
IP Address
Address
512 Octets of Data

Fragmentation Control

42

Nokia Siemens Networks

Total Packet Length

Third Fragment
bit

Version
Version

8
LEN
LEN == 55

16
Total
Total Length=276
Length=276

TOS

Identification=1748
Identification=1748
IP
Header

Time
Time to
to Live
Live (TTL)
(TTL)

31

00 00 00

Protocol
Protocol

Fragment
Fragment Offset=128
Offset=128
Header
Header Checksum
Checksum

Source
Source IP
IP Address
Address
Destination
Destination
IP
Address
DestinationIP
IPAddress
Address
256 Octets of Data

Fragmentation Control

43

Nokia Siemens Networks

Total Packet Length

Vous aimerez peut-être aussi