You are on page 1of 34

Understanding

TCP/IP Internet
Layer
Internet Protocol Characteristics

 Operates at network layer of OSI


 Connectionless protocol
 Packets treated independently
 Hierarchical addressing
 Best-effort delivery
 No data-recovery features

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-2


Why IP Addresses?

 They uniquely identify each device on an IP network.


 Every host (computer, networking device, peripheral) must have
a unique address.
 Host ID:
– Identifies the individual host
– Is assigned by organizations to individual devices

Network.Host
© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-3
IP PDU Header

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-4


IP Address Format: Dotted Decimal
Notation

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-5


IPv4 address

• Provide an addressing scheme to identify networks


and individual hosts
• 32 bits total
• Has two parts: Network and Host
• Ex: 192.168.10.1

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-6


IPv4 address
192. 168. 21. 17
11000000 10101000 00010101 00010001

octet octet octet octet

network part host part

Prefix /24 Subnet mask:


255. 255. 255. 0
11111111 11111111 11111111 00000000

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-7


3 types of address

• Every network has:


• Network address – the first one
• Broadcast address – the last one
• Host addresses – everything in between

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-8


Classful addressing

A 10. 17. 53. 60


network part host part

B 172. 16. 38. 201


network part host part

C 192. 168. 21. 17


network part host part

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-9


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

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-10


Classless addressing

• Any suitable prefix can be used


• We (and devices) need to know what the prefix is.
• More flexible, less wasteful.

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-11


Binary and decimal

• Convert to 8-bit binary


• 248
• 187
• 89
• Convert to decimal
• 00110100
• 01010101
• 11001111

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-12


Classless addressing /16

• 172.16.0.0/16 mask 255.255.0.0


• Broadcast address 172.16.255.255

172. 16. 0. 0
10101100 00010000 00000000 00000000

• Hosts 172.16.0.1 to 172.16.255.254


• 65534 host addresses

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-13


Classless addressing /24

• 172.16.0.0/24 mask 255.255.255.0


• Broadcast address 172.16.0.255

172. 16. 0. 0
10101100 00010000 00000000 00000000

• Hosts 172.16.0.1 to 172.16.0.254


• 254 host addresses

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-14


Classless addressing /22

• 172.16.0.0/22 mask 255.255.252.0


• Broadcast address 172.16.3.255

172. 16. 0. 0
10101100 00010000 00000000 00000000

• Hosts 172.16.0.1 to 172.16.3.254


• 1022 host addresses

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-15


Classless addressing /26

• 172.16.0.0/22 mask 255.255.255.192


• Broadcast address 172.16.0.63

172. 16. 0. 0
10101100 00010000 00000000 00000000

• Hosts 172.16.0.1 to 172.16.0.62


• 62 host addresses

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-16


Classless addressing /28

• 172.16.0.0/28 mask 255.255.255.240


• Broadcast address 172.16.0.15

172. 16. 0. 0
10101100 00010000 00000000 00000000

• Hosts 172.16.0.1 to 172.16.0.14


• 14 host addresses

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-17


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?

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-18


192.168.1.70/24 – fill in the table
Last octet binary Last octet Full
decimal

Host
Subnet mask

Network

Broadcast

First host

Last host

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-19


192.168.1.70/24
Last octet binary Last octet Full
decimal

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.255

First host 00000001 1 192.168.1.1

Last host 11111110 254 192.168.1.254

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-20


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?

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-21


192.168.1.70/26 fill in the table

Last octet binary Last octet Full


decimal

Host
Subnet mask

Network

Broadcast

First host

Last host

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-22


192.168.1.70/26
Last octet binary Last octet Full
decimal

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.127

First host 01000001 65 192.168.1.65

Last host 01111110 126 192.168.1.126

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-23


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?

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-24


192.168.1.70/28 fill in the table

Last octet binary Last octet Full


decimal

Host
Subnet mask

Network

Broadcast

First host

Last host

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-25


192.168.1.70/28
Last octet binary Last octet Full
decimal

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.79

First host 01000001 65 192.168.1.65

Last host 01001110 78 192.168.1.78

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-26


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)

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-27


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

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-28


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

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-29


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.

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-30


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

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-31


Network Connection

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-32


ipconfig

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—1-33


-- End of presentation --

Internetworking 34

You might also like