92
© 2000, Cisco Systems, Inc. 8-1 Chapter 8 Interconnecting Networks with TCP/IP

Subnetting Techniques ppt

Embed Size (px)

DESCRIPTION

IP Dressing techniques

Citation preview

Page 1: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. 8-1

Chapter 8Chapter 8

Interconnecting Networks with

TCP/IP

Interconnecting Networks with

TCP/IP

Page 2: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-3

Upon completion of this chapter you will be able to perform the following tasks:• Identify the IP protocol stack, its protocol layer functions, and commonly used IP protocols

• Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers.

• Configure IP addresses and subnet masks on a router interface and optionally configure a host table.

• Interconnect the VLANs with a layer three device such

as a router on a stick.

ObjectivesObjectives

Page 3: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-4

Early protocol suite

Universal

Introduction to TCP/IPIntroduction to TCP/IP

Host

Internet

TCP/IP

Host

Page 4: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-5

TCP/IP Protocol StackTCP/IP Protocol Stack

7

6

5

4

3

2

5

4

3

2

Application

Presentation

Session

Transport

Network

Data Link

Physical1

Application

Transport

Internet

Data Link

Physical1

Page 5: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-6

Application Layer OverviewApplication Layer Overview

*Used by the router

Application

Transport

Internet

Data Link

Physical

File Transfer- TFTP *- FTP *- NFS

E-Mail- SMTP

Remote Login- Telnet *- rlogin *

Network Management- SNMP *

Name Management- DNS*

File Transfer- TFTP *- FTP *- NFS

E-Mail- SMTP

Remote Login- Telnet *- rlogin *

Network Management- SNMP *

Name Management- DNS*

Page 6: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-7

Transport Layer OverviewTransport Layer Overview

Transmission ControlProtocol (TCP)

User Datagram Protocol (UDP)

Transmission ControlProtocol (TCP)

User Datagram Protocol (UDP)

Application

Transport

Internet

Data Link

Physical

Connection-Oriented

Connectionless

Page 7: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-8

TCP Segment FormatTCP Segment Format

Source port (16) Destination port (16)

Sequence number (32)

Headerlength (4)

Acknowledgement number (32)

Reserved (6) Code bits (6) Window (16)

Checksum (16) Urgent (16)

Options (0 or 32 if any)

Data (varies)

20Bytes

Bit 0 Bit 15 Bit 16 Bit 31

Page 8: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-9

Port NumbersPort Numbers

TCP

Port Numbers

FTP

TransportLayer

TELNET

DNS

SNMP

TFTP

SMTP

UDP

ApplicationLayer

2121 2323 2525 5353 6969 161161

RIP

520520

Page 9: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-10

TCP Port NumbersTCP Port Numbers

SourcePort

SourcePort

Dest.Port

Dest.Port ……

Host A

10281028 2323 ……

SP DP

Host ZTelnet Z

Dest. port = 23.Send packet to my

Telnet application.

Page 10: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-11

Send SYN (seq=100 ctl=SYN)

SYN received

Host A Host B

TCP Three Way Handshake/Open Connection

TCP Three Way Handshake/Open Connection

1

Page 11: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-12

Send SYN (seq=100 ctl=SYN)

SYN received

Send SYN, ACK (seq=300 ack=101 ctl=syn,ack)

Host A Host B

SYN received

1

2

TCP Three Way Handshake/Open Connection

TCP Three Way Handshake/Open Connection

Page 12: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-13

Send SYN (seq=100 ctl=SYN)

SYN received

Send SYN, ACK (seq=300 ack=101 ctl=syn,ack)

Established(seq=101 ack=301 ctl=ack)

Host A Host B

1

2

3

SYN received

TCP Three Way Handshake/Open Connection

TCP Three Way Handshake/Open Connection

Page 13: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-14

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Page 14: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-15

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1Receive 1

Page 15: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-16

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1Receive 1

Receive ACK 2 Send ACK 2

Page 16: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-17

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1Receive 1

Receive ACK 2 Send ACK 2

Send 2Receive 2

Page 17: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-18

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1Receive 1

Receive ACK 2 Send ACK 2

Send 2Receive 2

Receive ACK 3Send ACK 3

Page 18: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-19

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1Receive 1

Receive ACK 2 Send ACK 2

Send 2Receive 2

Receive ACK 3Send ACK 3

Send 3Receive 3

Page 19: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-20

Window size = 1

Sender Receiver

Send 1Receive 1

Receive ACK 2 Send ACK 2

Send 2Receive 2

Receive ACK 3Send ACK 3

Send 3Receive 3

Receive ACK 4 Send ACK 4

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Page 20: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-21

TCP Sequence and Acknowledgment Numbers

TCP Sequence and Acknowledgment Numbers

SourcePort

SourcePort

Dest.Port

Dest.Port

……Sequence#

Sequence#

Acknowledgement#

Acknowledgement#

Source Dest. Seq. Ack.

1028 23 10 1

I justsent #10.

Page 21: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-22

TCP Sequence and Acknowledgment Numbers

I just got #10,now I need #11.

SourcePort

SourcePort

Dest.Port

Dest.Port ……

Sequence#

Sequence#

Acknowledgement#

Acknowledgement#

10281028 2323

Source Dest.

10101010

Seq.

11

Ack.

102810282323

Source Dest.

11111111

Seq.

11

Ack.

I justsent #10.

Page 22: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-23

TCP Sequence and Acknowledgment Numbers

TCP Sequence and Acknowledgment Numbers

SourcePort

SourcePort

Dest.Port

Dest.Port ……

Sequence#

Sequence#

Acknowledgement#

Acknowledgement#

10281028 2323

Source Dest.

11111111

Seq.

22

Ack.

10281028 2323

Source Dest.

10101010

Seq.

11

Ack.

102810282323

Source Dest.

11111111

Seq.

11

Ack.

I just got #10,now I need #11.

I justsent #11.

Page 23: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-24

TCP Sequence and Acknowledgment Numbers

TCP Sequence and Acknowledgment Numbers

SourcePort

SourcePort

Dest.Port

Dest.Port ……

Sequence#

Sequence#

Acknowledgement#

Acknowledgement#

10281028 2323

Source Dest.

11111111

Seq.

101101

Ack.

10281028 2323

Source Dest.

10101010

Seq.

100100

Ack.

102810282323

Source Dest.

11111111

Seq.

100100

Ack.

102810282323

Source Dest.

12121212

Seq.

101101

Ack.

I just got #11,now I need #12.

I justsent #11.

Page 24: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-25

TCP WindowingTCP Windowing

Sender Receiver

Page 25: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-26

TCP WindowingTCP Windowing

Window size = 3Send 2

Sender ReceiverWindow size = 3Send 1

Window size = 3Send 3

Page 26: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-27

Window size = 3Send 2

TCP WindowingTCP Windowing

Sender Window size = 3Send 1

Window size = 3Send 3

ACK 3Window size = 2

Packet 3 isDropped

Receiver

Page 27: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-28

Window size = 3Send 2

TCP WindowingTCP Windowing

Sender Window size = 3Send 1

Window size = 3Send 3

ACK 3Window size = 2

Packet 3 isDropped

Window size = 3Send 4

Window size = 3Send 3

Receiver

Page 28: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-29

Window size = 3Send 2

TCP WindowingTCP Windowing

Sender Window size = 3Send 1

Window size = 3Send 3

ACK 3Window size = 2

Packet 3 isDropped

Window size = 3Send 4

Window size = 3Send 3

ACK 5Window size = 2

ReceiverWindow size = 3

Page 29: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-30

No sequence or acknowledgment fields

UDP Segment FormatUDP Segment Format

Source port (16) Destination port (16)

Length (16)

Data (if any)

1Bit 0 Bit 15 Bit 16 Bit 31

Checksum (16)

8Bytes

Page 30: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-31

Internet Layer OverviewInternet Layer Overview

OSI network layer corresponds to the TCP/IP internet layer

Internet Protocol (IP)

Internet Control MessageProtocol (ICMP)

Address ResolutionProtocol (ARP)

Reverse AddressResolution Protocol (RARP)

Internet Protocol (IP)

Internet Control MessageProtocol (ICMP)

Address ResolutionProtocol (ARP)

Reverse AddressResolution Protocol (RARP)

Application

Transport

Internet

Data Link

Physical

Page 31: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-32

IP DatagramIP Datagram

Version(4)

Destination IP Address (32)

Options (0 or 32 if any)

Data (varies if any)

1Bit 0 Bit 15 Bit 16 Bit 31

HeaderLength (4)

Priority & Type of Service (8) Total Length (16)

Identification (16)Flags

(3) Fragment offset (13)

Time to live (8) Protocol (8) Header checksum (16)

Source IP Address (32)

20Bytes

Page 32: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-33

Determines destination upper-layer protocol

Protocol FieldProtocol Field

TransportLayer

InternetLayer

TCP UDP

ProtocolNumbers

IP

176

Page 33: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-34

Internet Control Message Protocol

Internet Control Message Protocol

Application

Transport

Internet

Data Link

Physical

Destination Unreachable

Echo (Ping)

Other

ICMP1

Page 34: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-35

Address Resolution ProtocolAddress Resolution Protocol

172.16.3.1 172.16.3.2

IP: 172.16.3.2 = ???IP: 172.16.3.2 = ???

I need the Ethernet address of 176.16.3.2.

Page 35: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-36

Address Resolution ProtocolAddress Resolution Protocol

172.16.3.1 172.16.3.2

IP: 172.16.3.2 = ???IP: 172.16.3.2 = ???

I heard that broadcast. The message is for me. Here is my Ethernet address.

I need the Ethernet address of 176.16.3.2.

Page 36: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-37

Address Resolution ProtocolAddress Resolution Protocol

172.16.3.1

IP: 172.16.3.2 Ethernet: 0800.0020.1111 IP: 172.16.3.2 Ethernet: 0800.0020.1111

172.16.3.2

IP: 172.16.3.2 = ???IP: 172.16.3.2 = ???

I heard that broadcast. The message is for me. Here is my Ethernet address.

I need the Ethernet address of 176.16.3.2.

Page 37: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-38

Address Resolution ProtocolAddress Resolution Protocol

Map IP MAC

Local ARP

172.16.3.1

IP: 172.16.3.2 Ethernet: 0800.0020.1111 IP: 172.16.3.2 Ethernet: 0800.0020.1111

172.16.3.2

IP: 172.16.3.2 = ???IP: 172.16.3.2 = ???

I heard that broadcast. The message is for me. Here is my Ethernet address.

I need the Ethernet address of 176.16.3.2.

Page 38: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-39

Reverse ARPReverse ARP

Ethernet: 0800.0020.1111 IP = ???Ethernet: 0800.0020.1111 IP = ???

What is my IP address?

Page 39: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-40

Reverse ARPReverse ARP

Ethernet: 0800.0020.1111 IP = ???Ethernet: 0800.0020.1111 IP = ???

What is my IP address?

I heard that broadcast. Your IP address is 172.16.3.25.

Page 40: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-41

Reverse ARPReverse ARP

Ethernet: 0800.0020.1111IP: 172.16.3.25

Ethernet: 0800.0020.1111IP: 172.16.3.25

Ethernet: 0800.0020.1111 IP = ???Ethernet: 0800.0020.1111 IP = ???

What is my IP address?

I heard that broadcast. Your IP address is 172.16.3.25.

Page 41: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-42

Reverse ARPReverse ARP

Map MAC IP

Ethernet: 0800.0020.1111IP: 172.16.3.25

Ethernet: 0800.0020.1111IP: 172.16.3.25

Ethernet: 0800.0020.1111 IP = ???Ethernet: 0800.0020.1111 IP = ???

What is my IP address?

I heard that broadcast. Your IP address is 172.16.3.25.

Page 42: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-43

• Unique addressing allows communication between end stations

• Path choice is based on destination addressLocation is represented by an address

Introduction to TCP/IP Addresses

Introduction to TCP/IP Addresses

172.18.0.2

172.18.0.1

172.17.0.2172.17.0.1

172.16.0.2

172.16.0.1

SADAHDR DATA10.13.0.0 192.168.1.0

10.13.0.1 192.168.1.1

Page 43: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-44

IP Addressing

255 255 255 255

DottedDecimal

Maximum

Network Host

32 bits

Page 44: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-45

IP AddressingIP Addressing

255 255 255 255

DottedDecimal

Maximum

Network Host

128 64 32 16 8 4 2 1

11111111 11111111 11111111 11111111Binary

32 bits

1 8 9 16 17 24 25 32

128 64 32 16 8 4 2 1

128 64 32 16 8 4 2 1

128 64 32 16 8 4 2 1

Page 45: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-46

IP AddressingIP Addressing

255 255 255 255

DottedDecimal

Maximum

Network Host

128 64 32 16 8 4 2 1

11111111 11111111 11111111 11111111

10101100 00010000 01111010 11001100

Binary

32 bits

172 16 122 204ExampleDecimal

ExampleBinary

1 8 9 16 17 24 25 32

128 64 32 16 8 4 2 1

128 64 32 16 8 4 2 1

128 64 32 16 8 4 2 1

Page 46: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-47

Class A:

Class B:

Class C:

Class D: Multicast

Class E: Research

IP Address ClassesIP Address Classes

NetworkNetwork HostHost HostHost HostHost

NetworkNetwork NetworkNetwork HostHost HostHost

NetworkNetwork NetworkNetwork NetworkNetwork HostHost

8 bits 8 bits 8 bits 8 bits

Page 47: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-48

IP Address ClassesIP Address Classes

1

Class A:

Bits:

0NNNNNNN0NNNNNNN HostHost HostHost HostHost

8 9 16 17 24 25 32

Range (1-126)

1

Class B:

Bits:

10NNNNNN10NNNNNN NetworkNetwork HostHost HostHost

8 9 16 17 24 25 32

Range (128-191)1

Class C:

Bits:

110NNNNN110NNNNN NetworkNetwork NetworkNetwork HostHost

8 9 16 17 24 25 32

Range (192-223)1

Class D:

Bits:

1110MMMM1110MMMM Multicast GroupMulticast Group Multicast GroupMulticast Group Multicast GroupMulticast Group

8 9 16 17 2425 32

Range (224-239)

Page 48: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-49

Host AddressesHost Addresses

172.16.2.2

172.16.3.10

172.16.12.12

10.1.1.1

10.250.8.11

10.180.30.118

E1

172.16 12 12

Network Host

. . Network Interface

172.16.0.0

10.0.0.0

E0

E1

Routing Table

172.16.2.1

10.6.24.2

E0

Page 49: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-50

11111111

Determining Available Host Addresses

Determining Available Host Addresses

172 16 0 0

10101100 00010000 00000000 00000000

16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

Network Host

00000000 00000001

11111111 11111111 11111111 11111110

...

... 00000000 00000011

11111101

123

655346553565536-

...

2

65534

N

2N-2 = 216-2 = 65534

Page 50: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-51

IP Address Classes ExerciseIP Address Classes Exercise

Address Class Network Host

10.2.1.1

128.63.2.100

201.222.5.64

192.6.141.2

130.113.64.16

256.241.201.10

Page 51: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-52

IP Address Classes Exercise Answers

IP Address Classes Exercise Answers

Address Class Network Host

10.2.1.1

128.63.2.100

201.222.5.64

192.6.141.2

130.113.64.16

256.241.201.10

A

B

C

C

B

Nonexistent

10.0.0.0

128.63.0.0

201.222.5.0

192.6.141.0

130.113.0.0

0.2.1.1

0.0.2.100

0.0.0.64

0.0.0.2

0.0.64.16

Page 52: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-53

Network 172.16.0.0

172.16.0.0

Addressing without SubnetsAddressing without Subnets

172.16.0.1 172.16.0.2 172.16.0.3

…...

172.16.255.253 172.16.255.254

Page 53: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-54

Network 172.16.0.0

Addressing with SubnetsAddressing with Subnets

172.16.1.0 172.16.2.0

172.16.3.0

172.16.4.0

Page 54: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-55

Subnet AddressingSubnet Addressing

172.16.2.200

172.16.2.2

172.16.2.160

172.16.2.1

172.16.3.5

172.16.3.100

172.16.3.150

E0

172.16

Network

Network Interface

172.16.0.0

172.16.0.0

E0

E1

New Routing Table

2 160

Host

. .

172.16.3.1E1

Page 55: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-56

Subnet AddressingSubnet Addressing

172.16.2.200

172.16.2.2

172.16.2.160

172.16.2.1

172.16.3.5

172.16.3.100

172.16.3.150

172.16.3.1

E0E1

172.16 2 160

Network Host

. . Network Interface

172.16.2.0

172.16.3.0

E0

E1

New Routing Table

Subnet

Page 56: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-57

Subnet MaskSubnet Mask

172172 1616 00 00

255255 255255 00 00

255255 255255 255255 00

IPAddress

DefaultSubnet

Mask

8-bitSubnet

Mask

Network Host

Network Host

Network Subnet Host

Also written as “/16” where 16 represents the number of 1s in the mask.

Also written as “/24” where 24 represents the number of 1s in the mask.

11111111 11111111 00000000 00000000

Page 57: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-58

Decimal Equivalents of Bit Patterns

Decimal Equivalents of Bit Patterns

0 0 0 0 0 0 0 0 = 0

1 0 0 0 0 0 0 0 = 128

1 1 0 0 0 0 0 0 = 192

1 1 1 0 0 0 0 0 = 224

1 1 1 1 0 0 0 0 = 240

1 1 1 1 1 0 0 0 = 248

1 1 1 1 1 1 0 0 = 252

1 1 1 1 1 1 1 0 = 254

1 1 1 1 1 1 1 1 = 255

128 64 32 16 8 4 2 1

Page 58: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-59

16

Network Host

172 0 0

10101100

11111111

10101100

00010000

11111111

00010000

00000000

00000000

10100000

00000000

00000000

Subnets not in use—the default

00000010

Subnet Mask without SubnetsSubnet Mask without Subnets

172.16.2.160172.16.2.160

255.255.0.0 255.255.0.0

NetworkNumber

Page 59: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-60

Network number extended by eight bits

Subnet Mask with SubnetsSubnet Mask with Subnets

16

Network Host

172.16.2.160172.16.2.160

255.255.255.0 255.255.255.0

172 2 0

10101100

11111111

10101100

00010000

11111111

00010000

11111111

00000010

10100000

00000000

00000000

00000010

Subnet

NetworkNumber

128

192

224

240

248

252

254

255

Page 60: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-61

Subnet Mask with Subnets (cont.)

Subnet Mask with Subnets (cont.)

Network Host

172.16.2.160172.16.2.160

255.255.255.192 255.255.255.192

10101100

11111111

10101100

00010000

11111111

00010000

11111111

00000010

10100000

11000000

10000000

00000010

Subnet

Network number extended by ten bits

16172 2 128

NetworkNumber

128

192

224

240

248

252

254

255

128

192

224

240

248

252

254

255

Page 61: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-62

Subnet Mask ExerciseSubnet Mask Exercise

Address Subnet Mask Class Subnet

172.16.2.10

10.6.24.20

10.30.36.12

255.255.255.0

255.255.240.0

255.255.255.0

Page 62: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-63

Subnet Mask Exercise Answers

Subnet Mask Exercise Answers

Address Subnet Mask Class Subnet

172.16.2.10

10.6.24.20

10.30.36.12

255.255.255.0

255.255.240.0

255.255.255.0

B

A

A

172.16.2.0

10.6.16.0

10.30.36.0

Page 63: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-64

Broadcast AddressesBroadcast Addresses

172.16.1.0

172.16.2.0

172.16.3.0

172.16.4.0

172.16.3.255(Directed broadcast)

255.255.255.255(Local network broadcast)

XX

172.16.255.255(All subnets broadcast)

Page 64: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-65

Addressing Summary Example

Addressing Summary Example

16172 2 160

10101100 00010000 1010000000000010 Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

4

1

Page 65: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-66

Addressing Summary Example

Addressing Summary Example

10101100

11111111

00010000

11111111 11111111

10100000

11000000

00000010 Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

1

2

16172 2 160

Page 66: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-67

Addressing Summary Example

Addressing Summary Example

10101100

11111111

00010000

11111111 11111111

10100000

11000000

00000010 Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

1

2

3

7

16172 2 160

Page 67: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-68

Addressing Summary Example

Addressing Summary Example

10101100

11111111

00010000

11111111 11111111

10100000

11000000

10000000

00000010 Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

1

2

3

4

16172 2 160

Page 68: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-69

Addressing Summary Example

Addressing Summary Example

10101100

11111111

00010000

11111111 11111111

10100000

11000000

10000000

00000010

10111111

Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

1

2

3

4

56

16172 2 160

Page 69: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-70

Addressing Summary Example

Addressing Summary Example

10101100

11111111

00010000

11111111 11111111

10100000

11000000

10000000

00000010

10111111

10000001

Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

1

2

3

4

56

16172 2 160

Page 70: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-71

Addressing Summary Example

Addressing Summary Example

10101100

11111111

00010000

11111111 11111111

10100000

11000000

10000000

00000010

10111111

10000001

10111110

Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

1

2

3

4

56

7

16172 2 160

Page 71: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-72

Addressing Summary Example

Addressing Summary Example

10101100

11111111

10101100

00010000

11111111

00010000

11111111

00000010

10100000

11000000

10000000

00000010

10101100 00010000 00000010 10111111

10101100 00010000 00000010 10000001

10101100 00010000 00000010 10111110

Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

1

2

3

4

56

7

8

16172 2 160

Page 72: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-73

Addressing Summary Example

Addressing Summary Example

10101100

11111111

10101100

00010000

11111111

00010000

11111111

00000010

10100000

11000000

10000000

00000010

10101100 00010000 00000010 10111111

10101100 00010000 00000010 10000001

10101100 00010000 00000010 10111110

Host

Mask

Subnet

Broadcast

Last

First

172.16.2.160

255.255.255.192

172.16.2.128

172.16.2.191

172.16.2.129

172.16.2.190

1

2

3

4

56

7

89

16172 2 160

Page 73: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-74

IP Host Address: 172.16.2.121Subnet Mask: 255.255.255.0

Subnet Address = 172.16.2.0Host Addresses = 172.16.2.1–172.16.2.254Broadcast Address = 172.16.2.255Eight bits of subnetting

Network Subnet Host

10101100 00010000 00000010 11111111

172.16.2.121:

255.255.255.0:

10101100

11111111

Subnet: 10101100 00010000

00010000

11111111

00000010

00000010

11111111

01111001

00000000

00000000

Class B Subnet ExampleClass B Subnet Example

Broadcast:

Network

Page 74: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-75

Subnet PlanningSubnet Planning

Other subnets

192.168.5.16

192.168.5.32 192.168.5.48

20 subnets

5 hosts per subnet

Class C address:

192.168.5.0

20 subnets

5 hosts per subnet

Class C address:

192.168.5.0

Page 75: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-76

11111000

IP Host Address: 192.168.5.121Subnet Mask: 255.255.255.248

Network Subnet Host

192.168.5.121: 11000000

11111111

Subnet: 11000000 10101000

10101000

11111111

00000101

00000101

11111111

01111001

01111000

255.255.255.248:

Class C Subnet Planning Example

Class C Subnet Planning Example

Subnet Address = 192.168.5.120Host Addresses = 192.168.5.121–192.168.5.126Broadcast Address = 192.168.5.127Five Bits of Subnetting

Broadcast:

NetworkNetwork

11000000 10101000 00000101 01111111

Page 76: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-77

Broadcast Addresses ExerciseBroadcast Addresses Exercise

Address Class Subnet Broadcast

201.222.10.60 255.255.255.248

Subnet Mask

15.16.193.6 255.255.248.0

128.16.32.13 255.255.255.252

153.50.6.27 255.255.255.128

Page 77: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-78

Broadcast Addresses Exercise Answers

Broadcast Addresses Exercise Answers

153.50.6.127

Address Class Subnet Broadcast

201.222.10.60 255.255.255.248 C 201.222.10.63201.222.10.56

Subnet Mask

15.16.193.6 255.255.248.0 A 15.16.199.25515.16.192.0

128.16.32.13 255.255.255.252 B 128.16.32.15128.16.32.12

153.50.6.27 255.255.255.128 B 153.50.6.0

Page 78: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-79

Switch IP Address Configuration

Switch IP Address Configuration

• Assigns an address and subnet mask• Starts IP processing on a switch

Switch(config)#ip address ip-address subnet-maskSwitch(config)#ip address ip-address subnet-mask

Switch(config)#ip default-gateway ip-addressSwitch(config)#ip default-gateway ip-address

• Specifies a default gateway

Page 79: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-80

Router IP Address Configuration

Router IP Address Configuration

• Assigns an address and subnet mask• Starts IP processing on a router interface

Router(config-if)#ip address ip-address subnet-maskRouter(config-if)#ip address ip-address subnet-mask

Page 80: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-81

Router IP Address Configuration

Router IP Address Configuration

Router(config-line)#ip netmask-format {bitcount | decimal | hexadecimal} Router(config-line)#ip netmask-format {bitcount | decimal | hexadecimal}

• Sets format of network mask for a specific line

Router#term ip netmask-format {bitcount| decimal | hexadecimal} Router#term ip netmask-format {bitcount| decimal | hexadecimal}

• Sets display format of network mask forcurrent session

Page 81: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-82

• Defines static host name to IP address mapping

• Hosts/interfaces selectable by name or IP address

Router IP Host NamesRouter IP Host Names

Router(config)#ip host name [tcp-port-number]address [address]Router(config)#ip host name [tcp-port-number]address [address]

ip host Norine 172.16.3.1 192.168.3.1ip host Roger 172.16.4.3ip host Norine 172.16.3.1 192.168.3.1ip host Roger 172.16.4.3

Page 82: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-83

• Specifies one or more hosts that supplyhost name to logical address resolution

Router Name Server Configuration

Router Name Server Configuration

Router(config)#ip name-server server-address1 [[server-address2]...[server-address6]]Router(config)#ip name-server server-address1 [[server-address2]...[server-address6]]

DNS Server

Page 83: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-84

• DNS enabled by default

Router Name SystemRouter Name System

Router(config)#ip domain-lookupRouter(config)#endRouter#patTranslating ”pat"...domain server (255.255.255.255)% Unknown command or computer name, or unable to find computer addressRouter#config tRouter(config)#no ip domain-lookupRouter(config)#endRouter#patTranslating ”pat"% Unknown command or computer name, or unable to find computer addressRouter#

Page 84: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-85

Router Display Host NamesRouter Display Host Names

Router#show hostsDefault domain is not setName/address lookup uses domain serviceName servers are 255.255.255.255

Host Flags Age Type Address(es)Norine (perm, OK) 0 IP 172.16.100.100Roger (perm, OK) 0 IP 172.16.100.101Frank (perm, OK) 0 IP 172.16.200.200Bob (perm, OK) 0 IP 172.16.200.201

• Shows the host table

Page 85: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-86

VLAN to VLAN OverviewVLAN to VLAN Overview

VLAN 1 VLAN 2

ISL

10.1.1.2 10.2.2.2

Network layer devices combine multiple broadcast domains

Router on a stick

Application

TCPIP

ISLEthernet

Fa0/0

Page 86: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-87

Dividing a Physical Interface into Subinterfaces

Dividing a Physical Interface into Subinterfaces

FastEthernet 0/0

FastEthernet 0/0.2FastEthernet 0/0.3

FastEthernet 0/0.1

Physical interfaces can be divided into multiple subinterfaces

Page 87: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-88

ISL EncapsulationISL Encapsulation

• Enables ISL on a subinterface

Router(config-subif)#encapsulation isl vlan identifierRouter(config-subif)#encapsulation isl vlan identifier

Page 88: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-89

Routing Between VLANsRouting Between VLANs

VLAN 1 VLAN 2

ISL

interface fastethernet 0/0 no ip address!interface fastethernet 0/0.1 ip address 10.1.1.1 255.255.255.0 encapsulation isl 1interface fastethernet 0/0.2 ip address 10.2.2.1 255.255.255.0 encapsulation isl 2

FastE0/0

10.1.1.2 10.2.2.2

Page 89: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-90

Routing Between WANsRouting Between WANs

ISL

interface Serial0 ip address 172.16.1.1 255.255.255.0

Application

TCPIP

HDLCSerial

S0

172.16.1.1172.16.1.2

VLAN 1 VLAN 2

10.1.1.2 10.2.2.2

Page 90: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-91

Visual ObjectiveVisual Objective

core_ server

wg_sw_a10.1.1.10

wg_sw_l10.1.1.120

...

e0/1fa0/26(port A)

e0/1fa0/26(port A)

fa0/1 fa0/12

fa0/24

core_sw_a10.1.1.2

core_sw_b10.1.1.4

fa0/12 fa0/1

fa0/13 fa0/13

fa0/27(port B)

fa0/27(port B)

wg_pc_a10.2.2.12

wg_pc_l10.13.13.12

Core_ro

fa0/23

fa0/0

fa0/14fa0/14

VLAN2

VLAN13

SUBNET VLAN POD10.1.1.0 1 wg_ro_x, wg_sw_x, core_sw_a, core_sw_b10.2.2.0 2 wg_pc_a, core_server, core_ro10.3.3.0 3 wg_pc_b, core_server, core_ro10.4.4.0 4 wg_pc_c, core_server, core_ro10.5.5.0 5 wg_pc_d, core_server, core_ro10.6.6.0 6 wg_pc_e, core_server, core_ro10.7.7.0 7 wg_pc_f, core_server, core_ro10.8.8.0 8 wg_pc_g, core_server, core_ro10.9.9.0 9 wg_pc_h, core_server, core_ro10.10.10.0 10 wg_pc_i, core_server, core_ro10.11.11.0 11 wg_pc_j, core_server, core_ro10.12.12.0 12 wg_pc_k, core_server, core_ro10.13.13.0 13 wg_pc_l, core_server, core_ro

SUBNET VLAN POD10.1.1.0 1 wg_ro_x, wg_sw_x, core_sw_a, core_sw_b10.2.2.0 2 wg_pc_a, core_server, core_ro10.3.3.0 3 wg_pc_b, core_server, core_ro10.4.4.0 4 wg_pc_c, core_server, core_ro10.5.5.0 5 wg_pc_d, core_server, core_ro10.6.6.0 6 wg_pc_e, core_server, core_ro10.7.7.0 7 wg_pc_f, core_server, core_ro10.8.8.0 8 wg_pc_g, core_server, core_ro10.9.9.0 9 wg_pc_h, core_server, core_ro10.10.10.0 10 wg_pc_i, core_server, core_ro10.11.11.0 11 wg_pc_j, core_server, core_ro10.12.12.0 12 wg_pc_k, core_server, core_ro10.13.13.0 13 wg_pc_l, core_server, core_ro

Page 91: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-92

SummarySummary

After completing this chapter, you should be able to perform the following tasks:• Identify the TCP/IP protocol stack and the functions

of each layer

• Separate an IP address into its subcomponents: the network, subnet, and host portions

• Configure IP addresses on Cisco router and switch interfaces

• Interconnect VLANs using a layer three device such as a “router on a stick”

Page 92: Subnetting  Techniques ppt

© 2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a—8-93

Review QuestionsReview Questions

1. What is the difference between the TCP and UDP transport layer protocols?

2. Given a host with IP address, 192.168.20.1 255.255.255.240, how many other hosts can you have in that network?

3. What is required to interconnect separate VLANs?