Planning the Addressing Structure

cursefarmΔίκτυα και Επικοινωνίες

24 Οκτ 2013 (πριν από 4 χρόνια και 15 μέρες)

119 εμφανίσεις

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

1

Version 4.1

Planning the
Addressing Structure

Working at a Small
-
to
-
Medium Business or ISP


Chapter 4


2

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

Objectives


Describe how IP Addressing is implemented in the
LAN.


Subnet a given network to allow for efficient use of IP
address space.


Explain how Network Address Translation (NAT) and
Port Address Translation (PAT) are used in a network.

3

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.1 IP Addressing in the LAN


IP addressing identifies hosts and network devices


IP address format: dotted
-
decimal notation


Hierarchical structure: network and host octets

4

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.1 IP Addressing in the LAN


Hierarchical structure: like a family tree


Part

of the 32 bit
identifies

the
network

(
parent
)


Rest identifies the
host (child)


In the beginning, only the first 8 bits were used for the
network (creating 256 separate networks)


Leaving 24 bits for the local hosts (each containing over
16 million hosts)


Shortly more unique network numbers were required


Five classes were created


Creating 2 million networks


5

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.1 IP Addressing in the LAN


Address classes A, B and C: used to identify hosts or networks

Depending on which class it is, you will use portions of each of the octets
for the “Parent” and portions of the octets for the “Children”


Address classes D and E: multicast and experimental uses


It was decided to use the first octet to determine the class


Determined by the “High
-
order bits”


6

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.1 IP Addressing in the LAN

First

octet bit patterns and classes:


Class A: 1st bit is always 0 (range is 1
-
127)


Class B: 1st two bits are always 1 and 0 (Range is 128
-
191)


Class C: 1st three bits are always 1, 1 and 0 (Range is 192
-
223)

7

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.1 IP Addressing in the LAN


Reserved address space for private networks

Only used on your own network in your company

Which means every private company could use the same ip structure
within their own company


Private IPs are not routable on the Internet (WWW)


Consumer networking devices give out private IPs through
DHCP servers or routers

8

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.2 IP Addressing in the LAN


RFC 917, Internet Subnets

defines the subnet
mask as the method routers use to isolate the
network portion from the IP address


Separates network bits from host bits by using the
destination IP address and the Subnet Mask


Routers read
subnet masks

left to right, bit for bit


Bits set to 1 are part of the network ID


Bits set to 0 are part of the host ID

9

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.2 IP Addressing in the LAN


Each Class has a “Default” Subnet mask


Class A 255.0.0.0


Class B 255.255.0.0


Class C 255.255.255.0

10

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.2 IP Addressing in the LAN

Classful subnetting:


Networks began growing rapidly through 1980’s and
1990s


Organizations were adding hundreds, even thousands of
hosts


They needed a way to divide these larger networks into
smaller mini
-
networks (or subnets)


This became a process called subnetting


Portions of the host bits are “borrowed” to create
subnetworks


11

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.2 Classful Subnetting

Use bits from the host space to designate a subnet ID


All resulting subnets use the same subnet ID


Called “fixed
-
length” subnetting


This was because routers didn’t pass the subnet mask


Whatever subnet mask was applied to one interface
was applied to all the rest of the interfaces

Notice all
the
waste!!!

12

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.2 Classful Subnetting


Number of network bits is fixed


Class A has 8 for network 24 for hosts


Class B has 16 for network and 16 for hosts


Class C has 24 for networking and 8 for hosts

13

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.2 Deciding how many host bits to use??


Consider two things when planning subnets


The
number of hosts on each network


The
number of individual local networks needed


Basic class c network 192.168.1.0 mask 255.255.255.0


Gives you
254

possible combinations


Remember you can’t used the network address and the
broadcast address


Network for this example is 192.168.1.0


Broadcast for this example is 192.168.1.255


Available hosts are 192.168.1.1
----
192.168.1.254

14

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

Subnetting a Class C 192.168.1.0 network


Number of
Subnet ID bits

Number of
Host ID bits

Number of
subnets

Number of
hosts per subnet

Bit pattern

CIDR Notation

Decimal Subnet Mask

0

8

1

254 (2
8
-
2)

HHHHHHH

/24

255.255.255.0

1

7

2

126 (2
7
-
2)

SHHHHHHH

/25

255.255.255.128

2

6

4

62 (2
6
-
2)

SSHHHHHH

/26

255.255.255.192

3

5

8

30 (2
5
-
2)

SSSHHHHH

/27

255.255.255.224

4

4

16

14 (2
4
-
2)

SSSSHHHH

/28

255.255.255.240

5

3

32

6 (2
3
-
2)

SSSSSHHH

/29

255.255.255.248

6

2

64

2 (2
2
-
2)

SSSSSSHH

/30

255.255.255.252

7*

1

128

0 (2
1
-
2)

SSSSSSSH

/31

255.255.255.254

* 7 BITS CANNOT BE BORROWED, BECAUSE THIS WOULD LEAVE NO HOST ADDRESSES

15

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.3 Custom Subnet Masks


In classful subnetting, all subnets must be the same size


What if an organization needs different size networks?

One department needs 30

One department needs 14

One department needs only 4


You would have to make them all the same!!


You need a 30 hosts for the largest network so you would borrow 3 bits

2^3 = 8 or 2 x 2 x 2 (creates 8 subnetworks)

2^5 = 32 or 2 x 2 x 2 x 2 x 2 (32 hosts)

Remember that 2 are not usable so the formula is
2^n
-

2


16

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public


Start with the address 192.168.1.0


If you didn’t subnet, you would have 2^8 = 256 addresses, but only 254 would
actually be available for computers


This is because 192.168.1.0 is the NETWORK ADDRESS and 192.168.1.255 is
the BROADCAST ADDRESS for the entire network


Divide it into networks with enough space for your largest subnetwork


2^3 = 8 subnetworks with 2^5 = 32 created addresses (32
-
2=30 actual hosts,
which will meet our needs)


You lose 2 addresses in each subnet just like you do if you don’t divide into
subnetworks


For the same reason as above the first will be the SUBNETWORK ADDRESS
and the last will be the BROADCAST ADDRESS for the subnetwork

17

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

The subnet mast would now be 255.255.255.
224

WHY??? Because we borrowed 3 bits in the last octet to be used for the
SUBNETWORK. 11111111.11111111.11111111.111
00000








255 255 255 224

SUBNETWORK

FIRST HOST

LAST HOST

BROADCAST

192.168.1.0

192.168.1.1

192.168.1.30

192.168.1.31

192.168.1.32

192.168.1.33

192.168.1.62

192.168.1.63

192.168.1.64

192.168.1.65

192.168.1.94

192.168.1.95

192.168.1.96

192.168.1.97

192.168.1.126

192.168.1.127

192.168.1.128

192.168.1.129

192.168.1.158

192.168.1.159

192.168.1.160

192.168.1.161

192.168.1.190

192.168.1.191

192.168.1.192

192.168.1.193

192.168.1.222

192.168.1.223

192.168.1.224

192.168.1.225

192.168.1.254

192.168.1.255

18

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.3 Custom Subnet Masks


Subnetting solves problems, because it helps to break a
network into smaller local subnets


This can be helpful for security reasons


Can keep different departments separated


Can make routing tables smaller



Let’s practice with the example in the curriculum 4.1.3 pg. 4


Let’s do the packet tracer

19

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

41.4 VLSM & Classless Inter
-
Domain Routing (CIDR)


CIDR (Classless Inter
-
domain Routing)

No more network classes, ignores class and just looks at the subnet
mask


CIDR: identify networks based on the number of bits in the
network prefix


VLSM: divide address space into networks of various sizes by
subnetting subnets

Look at diagram 4.1.4 pg. 1
for example

20

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.4 IP Addressing in the LAN

Classless subnetting features:


With CIDR, there are no more network classes


Companies could request a “block” of addresses that
they needed


Written with a slash / to show which bits are used


For instance 192.168.64.0/18 indicates an 18
-
bit subnet
mask


255.255.192.0


11111111.11111111.11
000000.000000

21

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

CIDR Subnet Mask Values and Decimal Equivalents

/8

255.0.0.0

/9

255.128.0.0

/10

255.192.0.0

/11

255.224.0.0

/12

255.240.0.0

/13

255.248.0.0

22

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.1.5 IP Addressing in the LAN

Communicating between subnets:


Each subnet is a separate network


Router is needed to communicate between them


Each router interface is the default gateway for its subnet

23

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

IPv6



First proposed in 1998 to correct the problem of IP
address depletion


Some improvements of IPv6 will be:


More address space


Better address space management


Easier TCP/IP administration


Modernized routing capabilities


Improved support for multicasting, security, and mobility

24

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.1 NAT and PAT


Network address translation (NAT) and Port Address
Translation (PAT) allows private users to access the Internet by
sharing one or more public IP addresses


Similar to how a company has one phone number with
extensions for each person

25

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.1 NAT


NAT operation is transparent to users (they don’t even
realize it)


Benefits include
improved security and scalability


Hides private IP addresses

from public networks

26

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public


Inside local network

private IP address configured on a host
on an inside network


Outside global network

actual public IP address of an
external host

4.2.2 NAT

See 4.2.2 pg. 1

Remember:


INSIDE:
LOCAL/

PRIVATE

OUTSIDE

GLOBAL/

PUBLIC

27

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.2 NAT

28

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public


29

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public


30

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public


31

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public


32

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.2 NAT


Dynamic NAT assigns outside global addresses from a pre
-
defined pool


Static NAT

assigns a
permanent registered global IP

to an
individual private host IP


allows hosts on the public network to access selected hosts on a private
network


servers

33

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.4 PAT

Port
-
based Network Address Translation


PAT translates multiple local addresses to a single global IP
address


It does this by adding a PORT number to the end of the ip

34

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.4 PAT


PAT conversations use a unique temporary IP address and
port number combination above 1024


Each of these port numbers keeps the conversation unique


Maximizes use of addresses and security


There are over 64,000 ports available


Translation in only in place for the duration of the connection


Changes next time the computer is communicating

35

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.5 IP NAT issues

Additional workload to support IP addresses and port
translations


Careful network design and equipment selection


Accurate configuration of equipment


36

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.5 NAT and PAT


Temporary solutions to address depletion: subnetting,
private IP addressing, and NAT


Improvements proposed by using IPv6:


More address space and better space management


Easier TCP/IP administration


Support for advanced network routing capabilities


Improved support for multicasting, security, and mobility


37

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

4.2.5 IPv6 address notation

128 bits numbers


Which are represented as 32 hexadecimal digits


Further subdivided into eight groups of four hexadecimal digits
using colons as delimiters


Three
-
part hierarchy

First three blocks is the global prefix (assigned to an organization

Fourth block is the subnet

Fifth and Six blocks are the
Interface ID controlled by Network
administrator

38

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public

Summary


IP addressing can be tailored to the needs of the
network design through the use of custom subnet
masks.


Classless subnetting gives classful IP addressing
schemes more flexibility through the use of variable
length subnet masks.


Network Address Translation (NAT) is a way to shield
private addresses from outside users.


Port Address Translation (PAT) translates multiple local
addresses to a single global IP address, maximizing the
use of both private and public IP addresses.

39

© 2007 Cisco Sy stems, Inc. All rights reserv ed.

Cisco Public