Networking Test Friday Online

profileBell0216
chapter_6.1_powepoint.pdf

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

Addressing the Network – IPv4

Network Fundamentals – Chapter 6

Dr. C. BouSaba

2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP addressing – works at

� OSI model layer 3

� TCP/IP model Internet layer

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

3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Addressing topics

� Types of IP addresses

� Assigning addresses

� Network part and subnet masks

� Calculating addresses

� Ping and Traceroute Utilities

4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IPv4 address

00010001000101011010100011000000

1721.168.192.

octetoctet octet octet

network part host part

00000000111111111111111111111111

0255.255.255.

Prefix /24 Subnet mask:

• 24 bits for the network part

• 24 ones in the mask

5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Find the network address

To find the network addressnetwork address, turn all host bits to 0s.

The router needs to do this for every packet.

00010001000101011010100011000000

1721.168.192.

00000000000101011010100011000000

021.168.192.

6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Logical AND

00010001000101011010100011000000

1721.168.192.

00000000111111111111111111111111

0255.255.255.

Do a logical AND at each position

00000000000101011010100011000000

021.168.192.

AND: Λ

7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Find the broadcast address

To find the broadcast addressbroadcast address, turn all host bits to 1s

The broadcast address is the last address in the

network.

00010001000101011010100011000000

1721.168.192.

11111111000101011010100011000000

25521.168.192.

8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

3 Types of addresses

� Every network has:

� Network address – the first one

� Broadcast address – the last one

� Host addresses – everything in between

9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classful addressing

6053.17.10.

network part host part

A

20138.16.172.

network part host part

B

1721.168.192.

network part host part

C

10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classless addressing

� Any suitable prefix can be used

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

� More flexible, less wasteful.

12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

00000000000000000001000010101100

00.16.172.

13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

00000000000000000001000010101100

00.16.172.

14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

00000000000000000001000010101100

00.16.172.

15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

00000000000000000001000010101100

00.16.172.

16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

00000000000000000001000010101100

00.16.172.

17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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?

18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/24 – fill in the table

Last host

First host

Broadcast

Network

Subnet mask

Host

FullLast octet decimal

Last octet binary

19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/24

192.168.1.25425411111110Last host

192.168.1.1100000001First host

192.168.1.25525511111111Broadcast

192.168.1.0000000000Network

255.255.255.0000000000Subnet mask

192.168.1.707001000110Host

FullLast octet decimal

Last octet binary

20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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?

21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/26 fill in the table

Last host

First host

Broadcast

Network

Subnet mask

Host

FullLast octet decimal

Last octet binary

22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/26

192.168.1.12612601111110Last host

192.168.1.656501000001First host

192.168.1.12712701111111Broadcast

192.168.1.646401000000Network

255.255.255.19219211000000Subnet mask

192.168.1.707001000110Host

FullLast octet decimal

Last octet binary

23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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?

24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/28 fill in the table

Last host

First host

Broadcast

Network

Subnet mask

Host

FullLast octet decimal

Last octet binary

25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/28

192.168.1.787801001110Last host

192.168.1.656501000001First host

192.168.1.797901001111Broadcast

192.168.1.646401000000Network

255.255.255.24024011110000Subnet mask

192.168.1.707001000110Host

FullLast octet decimal

Last octet binary

26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

27© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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)

28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Public IP addresses

� Routed over the Internet

� Master holder is IANA

� Assigned to regional registries and then to ISPs

� ISPs allocate them to organisations and individual users

� Use is strictly controlled as duplicate addresses are not allowed

29© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Blocks of addresses

192.168.1.255Broadcast

192.168.1.254Router

192.168.1.224/27192.168.1.224 - 253Network devices

192.168.1.192/27192.168.1.192 - 223Peripherals

192.168.1.128/26192.168.1.128 - 191Servers

192.168.1.1-127User hosts

192.168.1.0/25192.168.1.0Network address

SummaryAddress rangeUse

33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

00000000255.255.255.0Subnet mask

00000000192.168.1.0Address

Last octet binary

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

10000000255.255.255.128Subnet mask

00000000 10000000

192.168.1.0 192.168.1.128

Addresses

34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

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

11000000255.255.255.192Subnet mask

00000000 01000000 10000000 11000000

192.168.1.0 192.168.1.64 192.168.1.128 192.168.1.192

Addresses

35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

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

11100000255.255.255.224Subnet mask

00000000 00100000 01000000 01100000 10000000 10100000 11000000 11100000

192.168.1.0 192.168.1.32 192.168.1.64 192.168.1.96 192.168.1.128 192.168.1.160 192.168.1.192 192.168.1.224

Addresses

36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

Borrow 4 bits from host part, give to network part, /28 192.168.1.128 192.168.1.144 192.168.1.160 192.168.1.176 192.168.1.192 192.168.1.208 192.168.1.224 192.168.1.240

Subnet mask 255.255.255.240 11110000

10000000 10010000 10100000 10110000 11000000 11010000 11100000 11110000

00000000 00010000 00100000 00110000 01000000 01010000 01100000 01110000

192.168.1.0 192.168.1.16 192.168.1.32 192.168.1.48 192.168.1.64 192.168.1.80 192.168.1.96 192.168.1.112

And so on…

37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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.

38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

252248240224192128Subnet mask

26143062126No of hosts

48163264128Bit value/ network size

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

643216842No of networks

654321Bits borrowed

39© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Address space

� Make a spreadsheet or table with numbers 0 to 255

40© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnet chart

41© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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.

42© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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 each router along the path replies. You get a list of addresses of all the routers.

� ICMP: Internet Control Message Protocol

43© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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

44© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public