Está en la página 1de 31

Subnetting &

Routing
Computer
Networking: A
Top Down
Approach
6th edition
Jim Kurose, Keith
Ross
Addison-Wesley
March 2012

IP ADDRESSING (IPV4)

IP Addresses
A unique identifier for a node or host
connection on the network
32-bit binary number represented as 4
decimal values
Each decimal value representing 8 bit (known as
octet)
140

.179

.220

.200

100011
00

.
.
.11001000
1011001 1101110
1
0

Every IP address consists of two parts,


Network ID and Host ID
3

IP Addresses
IP Address
Unique device (host) address

Subnet Mask
Identifies which portion of IP Address is
the Network ID and which portion is the
Host ID

Default Gateway
IP Address of the Router on the same
152.107.102.7
IP Address
subnet255.255.255.0
Subnet Mask
152.107.102.1

Default Gateway

Network ID and Host ID


Network ID
Shared with all
computers on the
same subnet
Unique on the
entire network
Area Code

Host ID

Identifies a specific
device (Host) within
a subnet
Unique on the
subnet
Example:
Phone Number
xxxxxxx .
.
.
x
xxxxxxx xxxxxxx xxxxxxx
x
x ID
Network
ID x
Host
5

Network Address and Broadcast


Address
Network Address
The portion of Host
ID is set to all 0s

IP Address

Network
Address

140.179.220.20
0/16

140.179.0.0

Broadcast Address
The portion of Host
ID is set to all 1s
It specifies a
broadcast that is
sent
to all hosts on
Broadcast
the
network
Address
140.179.255.255

Address Classes: Network IDs and Host


IDs
Class A (1st Octet 1 127)
Network.Host.Host.Host

Class B (1st Octet 128 191)


Network.Network.Host.Host

Class C (1st Octet 192 223)


Network.Network.Network.Host

Address Class Summary


1st Octet

Network IDs

Hosts IDs

Class A

1 127

126

16,777,214

Class B

128 191

16,384

65,534

Class C

192 223

2,097,152

254

Private IP Address
There are three IP network addresses
reserved for private network (RFC
1918)
Address Classes
Private IP Address
Range
A

10.0.0.0 to
10.255.255.255

172.16.0.0 to
172.16.255.255

192.168.0.0 to
192.168.255.255

SUBNETTING

10

What is a Subnet?
A Broadcast Domain
The portion of the network that you can
retrieve information from by using a
broadcast packet
Routers dont forward broadcasts

IP Addressing Rules
All devices on the same subnet share a
common Network ID
Each subnet has a unique Network IDs
11

Subnetting
Goal:
to control network traffic

A router is used to connect IP


networks to minimize the amount of
traffic each subnet must receive

12

Subnet Masking
To identify the portion of Network ID
and Host ID
The network bits are represented by
1s in the mask, and host bits are
represented by 0s
100011
00

.
.
.
140.179.220.
1011001 1101110 1100100 200
1
0
0

IP Address

111111
11

.
.
.
255.255.224.
1111111 1110000 0000000 0
1
0
0

Subnet Mask

100011
00

.
.
.
140.179.192.
1011001 1100000 0000000 0

Network
Address

13

Subnetting
IP address space was depleting
rapidly
The Internet Engineering Task Force
(IETF) introduced Classless Inter-Domain
Routing (CIDR)
CIDR uses Variable Length Subnet Masking
(VLSM) to help conserve address space
VLSM is simply subnetting a subnet

14

Classful IP Addressing
The IPv4 Classful Addressing
Structure (RFC 790)
An IP address has 2 parts:
The network portion
The host portion

15

Classless IP Addressing
The classful system of allocating IP
address can be very wasteful
Solution: use a scheme called CIDR
(RFC 1517)
By accurately allocating only the amount of
address space that was actually needed

16

VLSM Variable Length Subnet


Masking
VLSM the process of
sub-netting a subnet to
fit your needs
Example:
Subnet 10.1.0.0/16, 8
more bits are borrowed
again, to create 256
subnets with a /24 mask.
Mask allows for 254 host
addresses per subnet
Subnets range from:
10.1.0.0 / 24 to
10.1.255.0 / 24

Same process for Subnet


10.2.0.0/16

17

VLSM
Subnet 10.3.0.0/16, 12
more bits are borrowed
again, to create 4,096
subnets with a /28 mask.
Mask allows for 14 host
addresses per subnet
Subnets range from: 10.3.0.0
/ 28 to 10.3.255.240 / 28

Subnet 10.4.0.0/16, 4
more bits are borrowed
again, to create 16 subnets
with a /20 mask.
Mask allows for 2,046 host
addresses per subnet
Subnets range from: 10.4.0.0
/ 20 to 10.4.240.0 / 20

18

Case Study: VLSM


Let's take our example above again and
see how we can make everything fit
using VLSM. We start with our Class C
network, 201.45.222.0/24. We then do
three subnettings as follows
The first of subnet S6 has 100 hosts
The second subnet S5 has 50 hosts
The second sub-subnet, each can have a
maximum of 14 hosts. These are used for
S1, S2, S3 and S4.
19

Solution to Case Study:


VLSM

20

Solution to Case Study:


VLSM

21

Solution to Case Study:


VLSM

22

CIDR Classless InterDomain


Routing
Advantages:
More efficient use of IPv4 address space
Route summarization
Reduce routing table size
Reduce routing update traffic

23

CIDR
Example:
If I needed about 1000 addresses, I
could supernet 4 Class C networks
together
192.168.128.
110000 .
.
.
Class C Net.
0

00

1010100 1000000 0000000 Address


0
0
0

192.168.129.
0

110000
00

.
.
.
Class C Net.
1010100 1000000 0000000 Address
0
1
0

192.168.130.
0

110000
00

.
.
.
Class C Net.
1010100 1000001 0000000 Address
0
0
0

192.168.131. 110000 .
.
.
Class C Net.
0
00
1010100 1000001 0000000 Address
Route summarization could be written simply as 192.168.128.0/22
24
0
1
0

CIDR
Route summarization done by CIDR
Routes are summarized with masks that are
less than that of the default classful mask
(supernetting)
Example:
172.16.0.0/13 is the summarized route for the
172.16.0.0/16 to 172.23.0.0/16 classful network

Although 172.22.0.0/16 and


172.23.0.0/16 are not shown in
the graphic, these are also
included in the summary route.

25

CIDR
Steps to calculate a
route summary:
1. List networks in binary
format
2. Count number of left
most matching bits to
determine summary
routes mask
3. Copy the matching
bits and zero bits to
determine the
summarized network
address
26

Case Study: CIDR


Aan ISP with a relatively large 71.94.0.0/15
address block (131,070 hosts) might choose
to hierarchically divide it.
In this case it is first divided in half into two /16
blocks.
One is reserved, while the other is divided into
four /18 blocks.
Each of those is divided into blocks of a different
size, to allow allocation to organizations requiring
up to 62, 126, 254 or 510 hosts respectively.

27

Solution to Case Study:


CIDR

28

Solution to Case Study:


CIDR

29

Calculate this network topology!

30

References
www.learntosubnet.com
www.ralphb.net
www.tcpipguide.com
Cisco Networking Academy

31

También podría gustarte