chapter 6 - addressing the network ipv4

52
1  Addressing the Netw ork IPv4 CCNA Exploration Semester 1 Chapter 6

Upload: joshua-fonseca

Post on 14-Apr-2018

297 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 1/52

1

 Addressing the Network

IPv4CCNA Exploration Semester 1

Chapter 6

Page 2: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 2/52

2

IP addressing – works at

OSI model layer 3

TCP/IP model Internet layer 

M Rajab - 2008

 Application

Presentation

Session

Transport

Network

Data link

Physical

 Application

Transport

Internet

Network Access

TCP, UDP

IP

Ethernet,

WAN

technologies

HTTP, FTP,

TFTP, SMTP

etc

Segment

Packet

Frame

Bits

Data

stream

Page 3: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 3/52

3

 Addressing topics Binary and decimal

Types of IP addresses

 Assigning addresses

Network part and subnet masks

Calculating addresses

Ping and Traceroute Utilities

M Rajab - 2008

Page 4: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 4/52

4

Binary and decimal Convert to 8-bit binary

248

187

89

Convert to decimal

00110100

01010101

11001111

M Rajab - 2008

Page 5: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 5/52

5

248 to binary

128 64 32 16 8 4 2 1

1 1 1 1 1 0 0 0

M Rajab - 2008

248

-128120

24

-168

56

-3224

120

-6456

Page 6: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 6/52

6

187 to binary

128 64 32 16 8 4 2 1

1 0 1 1 1 0 1 1

M Rajab - 2008

187

-12859

27

-1611

11

-83

59

-3227

3

-21

Page 7: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 7/52

7

89 to binary

128 64 32 16 8 4 2 1

0 1 0 1 1 0 0 1

M Rajab - 2008

89

-6425

25

-169

9

-81

Page 8: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 8/52

8

00110100 to decimal

128 64 32 16 8 4 2 1

0 0 1 1 0 1 0 0

32 16 4

M Rajab - 2008

32

+16+ 4

5252

Page 9: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 9/52

9

01010101 to decimal

128 64 32 16 8 4 2 1

0 1 0 1 0 1 0 1

64 16 4 1

M Rajab - 2008

64

+16+ 4

+ 1

85

85

Page 10: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 10/52

10

11001111 to decimal

128 64 32 16 8 4 2 1

1 1 0 0 1 1 1 1

128 64 8 4 2 1

M Rajab - 2008

128

+ 64

+ 8+ 4

+ 2

+ 1

207

207

Page 11: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 11/52

11

Binary and decimal Convert to 8-bit binary

248 11111000

187 10111011

89 01011001

Convert to decimal

00110100 52

01010101 85

11001111 207

M Rajab - 2008

Page 12: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 12/52

12

IPv4 address

192. 168. 21. 17

11000000 10101000 00010101 00010001

M Rajab - 2008

octetoctet octet octet

network part host part

255. 255. 255. 0

11111111 11111111 11111111 00000000

Prefix /24 Subnet mask:

Page 13: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 13/52

13

Find the network address

192. 168. 21. 17

11000000 10101000 00010101 00010001

M Rajab - 2008

In a network address, all the host bits are 0.

192. 168. 21. 0

11000000 10101000 00010101 00000000

The router needs to do this for every packet.

Page 14: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 14/52

14

Logical AND

192. 168. 21. 17

11000000 10101000 00010101 00010001

M Rajab - 2008

255. 255. 255. 0

11111111 11111111 11111111 00000000

Do a logical AND at each position

192. 168. 21. 0

11000000 10101000 00010101 00000000

Page 15: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 15/52

15

Find the broadcast address

192. 168. 21. 17

11000000 10101000 00010101 00010001

M Rajab - 2008

In a broadcast address, all the host bits are 1.

192. 168. 21. 255

11000000 10101000 00010101 11111111

The broadcast is the last address in the network.

Page 16: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 16/52

16

3 types of address Every network has:

Network address – the first one

Broadcast address –

the last one Host addresses – everything in between

M Rajab - 2008

Page 17: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 17/52

17

Classful addressing

M Rajab - 2008

10. 17. 53. 60

network part host part

A

172. 16. 38. 201

network part host part

B

192. 168. 21. 17

network part host part

C

Page 18: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 18/52

18

Classful addressing Easy to work out but very wasteful.

Routers and hosts still assume class subnet masks by

default

Class A /8 255.0.0.0

Class B /16 255.255.0.0

Class C /24 255.255.255.0

M Rajab - 2008

Page 19: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 19/52

19

Classless addressing  Any suitable prefix can be used

We (and devices) need to know what the prefix is.

More flexible, less wasteful.

M Rajab - 2008

Page 20: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 20/52

20

Classless addressing /16 172.16.0.0/16 mask 255.255.0.0

Broadcast address 172.16.255.255

Hosts 172.16.0.1 to 172.16.255.254

65534 host addresses

M Rajab - 2008

172. 16. 0. 0

10101100 00010000 00000000 00000000

Page 21: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 21/52

21

Classless addressing /24 172.16.0.0/24 mask 255.255.255.0

Broadcast address 172.16.0.255

Hosts 172.16.0.1 to 172.16.0.254

254 host addresses

M Rajab - 2008

172. 16. 0. 0

10101100 00010000 00000000 00000000

Page 22: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 22/52

22

Classless addressing /22 172.16.0.0/22 mask 255.255.252.0

Broadcast address 172.16.3.255

Hosts 172.16.0.1 to 172.16.3.254

1022 host addresses

M Rajab - 2008

172. 16. 0. 0

10101100 00010000 00000000 00000000

Page 23: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 23/52

23

Classless addressing /26

172.16.0.0/22 mask 255.255.255.192

Broadcast address 172.16.0.63

Hosts 172.16.0.1 to 172.16.0.62

62 host addresses

M Rajab - 2008

172. 16. 0. 010101100 00010000 00000000 00000000

Page 24: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 24/52

24

Classless addressing /28

172.16.0.0/28 mask 255.255.255.240

Broadcast address 172.16.0.15

Hosts 172.16.0.1 to 172.16.0.14

14 host addresses

M Rajab - 2008

172. 16. 0. 010101100 00010000 00000000 00000000

Page 25: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 25/52

25

Calculating addresses  A host has IP address 192.168.1.70/24

What is the subnet mask?

What is the network address?

What is the broadcast address?

What is the range of host addresses in the network?

M Rajab - 2008

192 168 1 70/24 fill i th

Page 26: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 26/52

26

192.168.1.70/24 – fill in the

table

Last octet

binary

Last octet

decimal

Full

Host

Subnet mask

Network

BroadcastFirst host

Last host

M Rajab - 2008

Page 27: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 27/52

27

192.168.1.70/24

Last octet

binary

Last octet

decimal

Full

Host 01000110 70 192.168.1.70

Subnet mask 00000000 0 255.255.255.0

Network 00000000 0 192.168.1.0

Broadcast 11111111 255 192.168.1.255First host 00000001 1 192.168.1.1

Last host 11111110 254 192.168.1.254

M Rajab - 2008

Page 28: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 28/52

28

Calculating addresses  A host has IP address 192.168.1.70/26

What is the subnet mask?

What is the network address?

What is the broadcast address?

What is the range of host addresses in the network?

M Rajab - 2008

192 168 1 70/26 fill i th

Page 29: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 29/52

29

192.168.1.70/26 fill in the

table

Last octet

binary

Last octet

decimal

Full

Host

Subnet mask

Network

BroadcastFirst host

Last host

M Rajab - 2008

Page 30: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 30/52

30

192.168.1.70/26

Last octet

binary

Last octet

decimal

Full

Host 01000110 70 192.168.1.70

Subnet mask 11000000 192 255.255.255.192

Network 01000000 64 192.168.1.64

Broadcast 01111111 127 192.168.1.127First host 01000001 65 192.168.1.65

Last host 01111110 126 192.168.1.126

M Rajab - 2008

Page 31: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 31/52

31

Calculating addresses  A host has IP address 192.168.1.70/28

What is the subnet mask?

What is the network address?

What is the broadcast address?

What is the range of host addresses in the network?

M Rajab - 2008

192 168 1 70/28 fill i th

Page 32: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 32/52

32

192.168.1.70/28 fill in the

table

Last octet

binary

Last octet

decimal

Full

Host

Subnet mask

Network

BroadcastFirst host

Last host

M Rajab - 2008

Page 33: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 33/52

33

192.168.1.70/28

Last octet

binary

Last octet

decimal

Full

Host 01000110 70 192.168.1.70

Subnet mask 11110000 240 255.255.255.240

Network 01000000 64 192.168.1.64

Broadcast 01001111 79 192.168.1.79First host 01000001 65 192.168.1.65

Last host 01001110 78 192.168.1.78

M Rajab - 2008

Page 34: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 34/52

34

Unicast, Multicast, Broadcast Unicast – a message addressed to one host

Broadcast – a message addressed to all hosts on a

network. Uses network’s broadcast address or 

255.255.255.255 locally

Multicast – a message addressed to a group of hosts.

Uses an address starting 224 - 239

M Rajab - 2008

Page 35: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 35/52

35

Private IP addresses Unrestricted use on private networks. Not routed

across the Internet.

10.0.0.0 – 10.255.255.255 (10.0.0.0/8)

172.16.0.0 – 172.31.255.255 (172.16.0.0/20)

192.168.0.0 – 192.168.255.255 (192.168.0.0/24)

M Rajab - 2008

Page 36: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 36/52

36

Public IP addresses Routed over the Internet

Master holder is IANA

 Assigned to regional registries and then to ISPs

ISPs allocate them to organizations and individual

users

Use is strictly controlled as duplicate addresses are not

allowed

M Rajab - 2008

Page 37: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 37/52

37

Special addresses 0.0.0.0 “all addresses” in default route. Hosts cannot be

given addresses starting 0.

127.0.0.1 is loopback. Hosts cannot be given

addresses starting 127.

240.0.0.0 and higher  – reserved for experimental

purposes.

169.254.0.0 - 169.254.255.255 local only

192.0.2.0 to 192.0.2.255 for teaching

M Rajab - 2008

Page 38: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 38/52

38

Network address translation  A large number of hosts on a network use private

addresses to communicate with each other.

The ISP allocates one or a few public addresses.

NAT allows the hosts to share the public addresses

when they want to use the Internet

M Rajab - 2008

Page 39: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 39/52

39

 Addressing hosts Static addressing – address is configured by an

administrator 

Servers, printers, routers, switches need static

addresses

Dynamic addressing – address is allocated

automatically by DHCP by leasing addresses from a

pool

Dynamic addressing is best for workstations

M Rajab - 2008

Page 40: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 40/52

40

Blocks of addresses

Use Address range Summary

Network address 192.168.1.0 192.168.1.0/25

User hosts 192.168.1.1-127

Servers 192.168.1.128 - 191 192.168.1.128/26

Peripherals 192.168.1.192 - 223 192.168.1.192/27

Network devices 192.168.1.224 - 253 192.168.1.224/27

Router 192.168.1.254

Broadcast 192.168.1.255

M Rajab - 2008

Page 41: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 41/52

41

Subnetting 192.168.1.0/24

M Rajab - 2008

 Address 192.168.1.0 00000000

Subnet mask 255.255.255.0 00000000

Last octet binary

Borrow 1 bit from host part, give it to network part, /25

 Addresses 192.168.1.0

192.168.1.128

00000000

10000000Subnet mask 255.255.255.128 10000000

Page 42: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 42/52

42

Subnetting 192.168.1.0/24

M Rajab - 2008

Borrow 2 bits from host part, give to network part, /26

 Addresses 192.168.1.0

192.168.1.64

192.168.1.128192.168.1.192

00000000

01000000

1000000011000000

Subnet mask 255.255.255.192 11000000

Page 43: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 43/52

43

Subnetting 192.168.1.0/24

M Rajab - 2008

Borrow 3 bits from host part, give to network part, /27

 Addresses 192.168.1.0

192.168.1.32

192.168.1.64192.168.1.96

192.168.1.128

192.168.1.160

192.168.1.192192.168.1.224

00000000

00100000

0100000001100000

10000000

10100000

1100000011100000

Subnet mask 255.255.255.224 11100000

Page 44: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 44/52

44

Subnetting 192.168.1.0/24

M Rajab - 2008

Borrow 4 bits from host part, give to network part, /28

192.168.1.0

192.168.1.16

192.168.1.32

192.168.1.48192.168.1.64

192.168.1.80

192.168.1.96

192.168.1.112

192.168.1.128

192.168.1.144

192.168.1.160

192.168.1.176192.168.1.192

192.168.1.208

192.168.1.224

192.168.1.240

00000000

00010000

00100000

0011000001000000

01010000

01100000

01110000

10000000

10010000

10100000

1011000011000000

11010000

11100000

11110000

Subnet mask 255.255.255.240 11110000

 And so on… 

Page 45: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 45/52

45

Subnetting 192.168.1.0/24 Every time you borrow another bit you:

Double the number of subnets

Halve the size of the subnets

Each subnet has a network address, a broadcast

address, and everything in between is a host address.

Here are some ways of visualising the process.

M Rajab - 2008

Page 46: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 46/52

46

Subnetting 192.168.1.0/24

M Rajab - 2008

Bits borrowed 1 2 3 4 5 6

No of networks 2 4 8 16 32 64

Prefix /25 /26 /27 /28 /29 /30

Bit value/

network size

128 64 32 16 8 4

No of hosts 126 62 30 14 6 2

Subnet mask 128 192 224 240 248 252

Page 47: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 47/52

47

 Address space Make a spreadsheet or table with numbers 0 to 255

Link to show table 

M Rajab - 2008

Page 48: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 48/52

48

Subnet chart

M Rajab - 2008

Page 49: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 49/52

49

Subnetting There are many subnet calculators, but you will not be

able to use them in exams.

Start with the biggest subnet and work down to the

smallest.

Make sure the subnets are valid sizes with valid subnet

masks.

Make sure that there are no overlaps.

M Rajab - 2008

Page 50: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 50/52

50

Ping and traceroute Ping sends an ICMP message. If all is well, the

destination replies. If not, a router may reply to say the

destination is unreachable, or the ping may time out.

Traceroute sends a series of messages so that eachrouter along the path replies. You get a list of 

addresses of all the routers.

M Rajab - 2008

Page 51: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 51/52

51

IPv6 Development started in 1990s because of concerns

about IPv4 addresses running out

 A whole new protocol suite – not just layer 3

Uses 128-bit hierarchical addressing, written using

hexadecimal

Simpler header 

Integrated security – authentication, privacy

Quality of service mechanisms

M Rajab - 2008

Page 52: Chapter 6 - Addressing the Network IPv4

7/27/2019 Chapter 6 - Addressing the Network IPv4

http://slidepdf.com/reader/full/chapter-6-addressing-the-network-ipv4 52/52

The End