interconnecting networks with tcp/ip · • identify ip address classes, ip addresses, ip subnet...

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

Upload: others

Post on 15-Aug-2020

24 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

© 2000, Cisco Systems, Inc. 8-1

Interconnecting Networks with

TCP/IP

Interconnecting Networks with

TCP/IP

Page 2: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Early protocol suite

Universal

Introduction to TCP/IPIntroduction to TCP/IP

Host

Internet

TCP/IP

Host

Page 4: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Transmission control protocol Services:· Resource Utilization (multiplexing)· Connection Management (establishing) · Flow Control (Buffering / Windowing) · Reliable Transport (positive acknowledgment / error checking)

Transmission control protocol Transmission control protocol

Page 8: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Connection Management

The Transport Layer is responsible for establishing, maintaining and terminating connections between devices on a network. This Connection-Oriented Service has three phases:

Connection-Establishment

Data-Transfer

Connection Termination

Page 9: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Connection-EstablishmentConnection-Establishment

Phase 1 - Connection-Establishment: The source and destination negotiate a connection with a three-way handshake and a simple path between the two is determined.

Page 10: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Phase 2 - Data-Transfer: Data is transmitted along the designated path of the network, arriving at the destination in the order it was sent.

Phase 2 - Data-Transfer: Data is transmitted along the designated path of the network, arriving at the destination in the order it was sent.

Connection-EstablishmentConnection-Establishment

Page 11: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Connection-EstablishmentConnection-Establishment

Phase 3 - Connection-Termination: The connection between the source and the destination is terminated when it is no longer needed. If they require additional communications after termination, another connection must be established.

Phase 3 - Connection-Termination: The connection between the source and the destination is terminated when it is no longer needed. If they require additional communications after termination, another connection must be established.

Page 12: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 13: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 14: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 15: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 16: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Page 17: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1 Receive 1

Page 18: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1 Receive 1

Receive ACK 2 Send ACK 2

Page 19: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1 Receive 1

Receive ACK 2 Send ACK 2

Send 2Receive 2

Page 20: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1 Receive 1

Receive ACK 2 Send ACK 2

Send 2Receive 2

Receive ACK 3Send ACK 3

Page 21: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Simple AcknowledgmentTCP Simple Acknowledgment

Window size = 1

Sender Receiver

Send 1 Receive 1

Receive ACK 2 Send ACK 2

Send 2Receive 2

Receive ACK 3Send ACK 3

Send 3Receive 3

Page 22: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Window size = 1

Sender Receiver

Send 1 Receive 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 23: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

© 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#

Source Dest. Seq. Ack.

1028 23 10 1

I justsent #10.

Page 24: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Sequence and Acknowledgment Numbers

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

SourcePort

SourcePort

Dest.Port

Dest.Port ……

Sequence#

Sequence#

Acknowledgement#

Acknowledgement#

10281028 2323Source Dest.

101010Seq.

11Ack.

102810282323Source Dest.

111111Seq.

11Ack.

I justsent #10.

Page 25: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Sequence and Acknowledgment Numbers

TCP Sequence and Acknowledgment Numbers

SourcePort

SourcePort

Dest.Port

Dest.Port ……Sequence

#Sequence

#Acknowledgement

#Acknowledgement

#

10281028 2323

Source Dest.

111111

Seq.

22

Ack.

10281028 2323Source Dest.

101010Seq.

11Ack.

102810282323Source Dest.

111111Seq.

11Ack.

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

I justsent #11.

Page 26: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP Sequence and Acknowledgment Numbers

TCP Sequence and Acknowledgment Numbers

SourcePort

SourcePort

Dest.Port

Dest.Port ……Sequence

#Sequence

#Acknowledgement

#Acknowledgement

#

10281028 2323

Source Dest.

111111

Seq.

101101

Ack.

10281028 2323Source Dest.

101010Seq.

100100Ack.

102810282323Source Dest.

111111Seq.

100100Ack.

102810282323Source Dest.

121212Seq.

101101Ack.

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

I justsent #11.

Page 27: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP WindowingTCP Windowing

Sender Receiver

Page 28: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

TCP WindowingTCP Windowing

Window size = 3Send 2

Sender ReceiverWindow size = 3Send 1

Window size = 3Send 3

Page 29: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

© 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

Receiver

Page 30: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 31: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 32: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

udpudp

UDP is a TCP/IP Transport Layer protocol designed for applications that provide their own error recovery process. It trades reliability for speed. UDP is simple and efficient, but not reliable. UDP is connectionless and unacknowledged.UDP depends on upper layer protocols for reliability.Although UDP is responsible for transmitting messages, no software checking for segment delivery is provided at this layer.

The UDP header length is always 64 bits. Examine the field definitions of the UDP segment below by moving your mouse over each area. (View info without mouseover):

Page 33: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 34: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Data is transmitted along the designated path of the network, arriving at the destination in the order it was sent.

Data is transmitted along the designated path of the network, arriving at the destination in the order it was sent.

UDP data transferring UDP data transferring

Page 35: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 36: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

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 & Typeof 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 37: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Determines destination upper-layer protocol

Protocol FieldProtocol Field

TransportLayer

InternetLayer

TCP UDP

ProtocolNumbers

IP

176

Page 38: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Internet Control Message Protocol

Internet Control Message Protocol

Application

Transport

Internet

Data Link

Physical

Destination Unreachable

Echo (Ping)

Other

ICMP1

Page 39: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Address Resolution ProtocolAddress Resolution Protocol

Used to resolve or map a known IP address to a MAC sublayer address to allow commnication on a multi-access medium such as Ethernet. To determine a destination address for a datagram, the ARP cache table is checked. If the address is not in the table, ARP sends a broadcast looking for the destination station. Every station on the network receives the broadcast.

Page 40: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Reverse ARPReverse ARP

On the local segment, RARP can be used to initiate a remote operating system load sequence. ARP and RARP are implemented directly on top of the data link layer.Dynamic Host Configuration Protocol (DHCP) is a modern implementation of RARP. DHCP provides a mechanism for allocating IP addresses dynamically so that addresses can be reused when hosts no longer need them. For more information on DHCP, refer to the Building Cisco Remote Access Networks (BCRAN) course.

Page 41: Interconnecting Networks with TCP/IP · • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure

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

Do not deleteDo not delete