73
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks and Telecommunications, 7th edition May only be used by adopters of the book

© 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

Embed Size (px)

Citation preview

Page 1: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-1

TCP/IP Internetworking

Chapter 8Updated January 2009

Raymond Panko’sBusiness Data Networks and Telecommunications, 7th edition

May only be used by adopters of the book

Page 2: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-2

Recap

• Internets– Connect multiple switched networks using routers

– 70%-80% of internet traffic follows TCP/IP standards

– These standards are created by the IETF

– Chapter 10 looks in more detail at TCP/IP management

Page 3: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-3

Frames and Packets

• Messages at the data link layer are called frames

• Messages at the internet layer are called packets

• Within a single network, packets are encapsulated in the data fields of frames

FrameHeader

Packet(Data Field)

FrameTrailer

Recap

Page 4: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-4

Internet and Transport Layer

Transport Layerend-to-end (host-to-host)

TCP is connection-oriented, reliableUDP is connectionless and unreliable

Internet Layer(usually IP)

hop-by-hop (host-router or router-router)connectionless, unreliable

Router 1 Router 2 Router 3

Client PCServer

Recap

Page 5: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-5

8-1: Major TCP/IP Standards

5 Application

User Applications Supervisory Applications

HTTP SMTPMany

OthersDNS

Dynamic Routing

Protocols

Many Others

4 Transport TCP UDP

3 Internet IP ARP

2 Data Link None: Use OSI Standards

1 Physical None: Use OSI Standards

Note: Shaded protocols are discussed in this chapter

ICMP

TCP/IP has core internet and transport standards:IP, TCP, and UDP.

Page 6: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-6

8-1: Major TCP/IP Standards

5 Application

User Applications Supervisory Applications

HTTP SMTPMany

OthersDNS

Dynamic Routing

Protocols

Many Others

4 Transport TCP UDP

3 Internet IP ARP

2 Data Link None: Use OSI Standards

1 Physical None: Use OSI Standards

Note: Shaded protocols are discussed in this chapter

ICMP

TCP/IP also has many application standards.

Page 7: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-7

8-1: Major TCP/IP Standards

5 Application

User Applications Supervisory Applications

HTTP SMTPMany

OthersDNS

Dynamic Routing

Protocols

Many Others

4 Transport TCP UDP

3 Internet IP ARP

2 Data Link None: Use OSI Standards

1 Physical None: Use OSI Standards

Note: Shaded protocols are discussed in this chapter

ICMP

TCP/IP also has many supervisory standards at the internet, transport, and application layers.

Page 8: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-8

IP Addresses

32-Bit Strings

Dotted Decimal Notation for Human Reading(e.g., 128.171.17.13)

Page 9: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-9

8-3: Hierarchical IP Address

IP addresses are notsimple 32-bit numbers.

They usually have 3 parts.

Consider the example128.171.17.13

Page 10: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-10

8-4: Border Router, Internal Router, Networks, and Subnets

Figure 8-4: Border Router, Internal Router, Networks, and Subnets

ISP Network60.x.x.x

Subnet 192.168.2.x

Subnet 192.168.3.x

Subnet192.168.1.xInternal

Router

BorderRouter

CorporateNetwork

192.168.x.x

Border routers connect different networks on the Internet(In this case, 192.168.x.x and 60.x.x.x).

An “x” indicates anything, so192.168.x.x means 192.168.0.0 through 192.168.255.255.

Page 11: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-11

8-4: Border Router, Internal Router, Networks, and Subnets

Figure 8-4: Border Router, Internal Router, Networks, and Subnets

ISP Network60.x.x.x

Subnet 192.168.2.x

Subnet 192.168.3.x

Subnet192.168.1.xInternal

Router

BorderRouter

CorporateNetwork

192.168.x.x

Internal routers connect different subnets in a network.In this case, the three subnets are boxed in red:

192.168.1.x, 192.168.2.x, and 192.168.3.x.

Page 12: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-12

Router Operation

Page 13: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-13

8-5: IP Network and Subnet Masks

• The Problem– There is no way to tell by looking at an IP address what

sizes the network, subnet, and host parts are—only their total of 32 bits

– The solution: masks

Page 14: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Masks– In spray painting, you often use a mask.

– The mask allows part of the paint through but stops the rest from going through.

– Network andsubnet masksdo somethingsimilar.

9.5: IP Network and Subnet Masks

14

Page 15: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-15

8-5: IP Network and Subnet Masks

• Masking– A mask is a series of initial ones followed by series of

final zeros for a total of 32 bits

• Example: 255.255.0.0 is 16 ones followed by 16 zeros

• In prefix notation, /16

• (Decimal 0 is 8 zeros and Decimal 255 is 8 ones)

Page 16: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Masks are applied to 32-bit IP addresses.

16

8-5: IP Network and Subnet Masks

IP Address bit 1 0 1 0

Mask bit 1 1 0 0

Result bit 1 0 0 0

If the mask bit = 0, the result is always 0.

If the mask bit = 1, the result is always the IP address bit in that position.

Page 17: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-17

8-5: IP Network and Subnet Masks

• Masking– Eight 0s is 0

– Eight 1s is 255

IP Address Octet

Mask Octet

Result

128 171 17 13

255 255 0 0

128 171 0 0

Page 18: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2011 Pearson Education, Inc.

Publishing as Prentice Hall18

9.5: IP Network and Subnet Masks

Network Mask Dotted Decimal Notation

Destination IP Address 128 171 17 13

Network Mask 255 255 0 0

Bits in network part, followed by zeros

128 171 0 0

Page 19: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2011 Pearson Education, Inc.

Publishing as Prentice Hall19

9.5: IP Network and Subnet Masks

Subnet Mask Dotted Decimal Notation

Destination IP Address 128 171 17 13

Subnet Mask 255 255 255 0

Bits in network part, followed by zeros

128 171 17 0

Page 20: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-20

8-6: Ethernet Switching Versus IP Routing

Destination address is E5-BB-47-21-D3-56.Ethernet switches are arranged in a hierarchy.

So there is only one possible path between hosts.So only one row can match an Ethernet address.

Finding this row is very simple and fast.So Ethernet switching is inexpensive per frame handled.

One correct row

Frame toE5-…

Page 21: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-21

8-6: Ethernet Switching Versus IP Routing

Because of multiple alternative routes in router meshes,routers may have several rows that match an IP address.

Routers must find All matches and then select the BEST ONE.This is slow and therefore expensive compared to switching.

Route 3:CE

(Selected)

Page 22: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Routing– Processing an individual packet and passing it on its

way is called routing.

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

22

8-7: The Routing Process

Page 23: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• The Routing Table– Each router has a routing table that it uses to make

routing decisions.

– Routing Table Rows

• Each row represents a route for a range of IP addresses—often packets goingto the same networkor subnet.

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

23

8-7: The Routing Process

Page 24: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

Column Meaning

Row Define the row in the routing table

Destination

Range of IP addresses governed by the row

Mask Mask for the row

Metric Quality of the route listed in this row

Interface The interface (port) to use to send the packet out

Next-Hop Router

Device (router or destination host) on the interface subnet to receive the packet 24

Routing Table Columns

Page 25: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-25

8-8: Routing Table

Each row represents a routeFor a range of IP addresses

For Row 1, the address rangeIs 128.171.0.0 to 128.171.255.255

Page 26: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• A Routing Decision– Whenever a packet arrives, the router looks at its IP

address, then…

– Step 1: Finds All Row Matches

– Step 2: Finds the Best-Match Row

– Step 3: Sends the Packet Back out According to Directions in the Best-Match Row

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

26

8-7: The Routing Process

Page 27: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-27

8-7: The Routing Process

• Step 1: Finding All Row Matches– The router looks at the destination IP address in an

arriving packet

– For each row:

• Apply the row’s mask to the destination IP address

• Compare the result with the row’s destination value

• If the two match, the row is a match

Page 28: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-28

8-7: The Routing Process

• A Routing Decision– Step 1: Finding All Row Matches

• Example 1: A Destination IP Address that is in NOT the Range

– Destination IP Address of Arriving Packet 60.43.7.8 – Apply the row’s (Network) Mask 255.255.0.0– Result of Masking 60.43.0.0– Row’s destination Column Value 128.171.0.0– Destination Matches the Masking Result? No– Conclusion Not a match

Page 29: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-29

8-7: The Routing Process

• A Routing Decision– Step 1: Finding All Row Matches

• Example 2: A Destination IP Address that is in the Range

– Destination IP Address of Arriving Packet 128.171.17.13

– Apply the row’s Mask 255.255.0.0– Result of Masking

128.171.0.0– Row’s destination Column Value 128.171.0.0– Destination Matches the Masking Result? Yes– Conclusion Row is a match

Page 30: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-30

8-7: The Routing Process

• Step 1: Finding All Row Matches– The router do this to ALL rows because there may be

multiple matches

– This step ends with a set of matching rows

Page 31: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• A Routing Decision– Whenever a packet arrives, the router looks at its IP

address, then…

– Step 1: Finds All Row Matches

– Step 2: Finds the Best-Match Row

– Step 3: Sends the Packet Back out According to Directions in the Best-Match Row

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

31

8-7: The Routing Process

Page 32: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• To find the best-match row, the router uses the mask column and perhaps the metric column.

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

32

8-7: The Routing Process

Row Mask Metric(Cost)

1 /16 472 /24 03 /24 12

Page 33: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Step 2: Find the Best-Match Row– The router examines the matching rows it found in Step 1

to find the best-match row.

– Basic Rule: it selects the row with the longest match (Initial 1s in the row mask).

• Row 99 matches, mask is /16 (255.255.0.0)

• Row 78 matches, mask is /24 (255.255.255.0)

• Select Row 78 as the best-match row.

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

33

8-7: The Routing Process

Page 34: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Step 2: Find the Best-Match Row– Basic Rule: it selects the row with the longest match

(Initial 1s in the row mask).

– Tie Breaker: if there is a tie for longest match, select among the tie rows based on metric.

• There is a tie for longest length of match.

• Row 668 has match length /16, cost metric = 20.

• Row 790 has match length /16, cost metric = 16.

• Router selects 790, which has the best cost.

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

34

8-7: The Routing Process

Page 35: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Step 2: Find the Best-Match Row– The following rows are matches.

• Row / Mask / Metric

• 220 /24 / speed metric = 40

• 345 /18 / speed metric = 50

• 682 /8 /speed metric = 40

– Question: What is the best-match row? Why?

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

35

8-7: The Routing Process

Page 36: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Step 2: Find the Best-Match Row– The following rows match.

• 107 / 12 / speed metric = 30

• 220 / 14 / speed metric = 100

• 345 / 18 / speed metric = 50

• 682 / 18 / speed metric = 40

– Question: What is the best-match row? Why?

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

36

8-7: The Routing Process

Page 37: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• A Routing Decision– Whenever a packet arrives, the router looks at its IP

address, then…

– Step 1: Finds All Row Matches

– Step 2: Finds the Best-Match Row

– Step 3: Sends the Packet Back out According to Directions in the Best-Match Row

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

37

8-7: The Routing Process

Page 38: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Step 3: Send the Packet Back out– Send the packet out the router interface (port)

designated in the best-match row.

– Send the packet to the router in the next-hop router column.

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

38

9.7: The Routing Process

Row Interface Next-Hop Router

1 2 G

2 1 Local

3 2 H

Router Port = Interface

Page 39: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

• Step 3: Send the Packet Back out– If the address says Local, the destination host is out that

interface.

• Sends the packet to the destination IP address in a frame.

© 2011 Pearson Education, Inc. Publishing as Prentice Hall

39

9.7: The Routing Process

Row Interface Next-Hop Router

1 2 G

2 1 Local

3 2 H

Page 40: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

8-7: The Routing Process

• A Routing Decision– Step 3: Send the Packet Back Out

– Example 1: Row 18,924 is the best match

– Interface = 4, Next-hop-router is 128.171.17.47

– The router will send the packet out Interface 4, to 128.171.17.13

8-40

Page 41: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-41

The Internet Protocol (IP)

Versions 4 and 6

Page 42: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

IP Class Scheme

Page 43: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

Address Space

Page 44: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

IP Class Scheme

• From the previous figure, we see that the 32-bit address is split into 4 octets.

• If the first 4 bits of the first octet are– 0xxx: Class A address (0 – 127)

– 10xx: Class B address (128 – 191)

– 110x: Class C address (192 – 223)

– 1110: Class D address (Multicast)

– 1111: Class E address

Page 45: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

Subnet Mask

45

Page 46: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-46

The Transmission Control Protocol (TCP)

Page 47: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-47

8-12: TCP Session Openings and Closings

SYN

SYN/ACK

ACK

Normal Three-Way Opening

A SYN segment is a segment in which the SYN bit is set.One side sends a SYN segment requesting an opening.

The other side sends a SYN/acknowledgment segment for the SYN segment.Originating side acknowledges the SYN/ACK.

Page 48: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-48

8-12: TCP Session Openings and Closings

FIN

ACK

FIN

ACK

Normal Four-Way Close

A FIN segment is a segment in which the FIN bit is set.Like both sides saying “good bye” to end a conversation.

Data

ACK

Page 49: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-49

8-12: TCP Session Openings and Closings

FIN

ACK

FIN

ACK

Normal Four-Way Close

The side that initiated the closewill send no more data segments, butit will still transmit acknowledgements

Data

ACK

Page 50: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-50

8-12: TCP Session Openings and Closings

RST

Abrupt Reset

An RST segment is a segment in which the RST bit is set.A single RST segment breaks a connection.

Like hanging up during a phone call.

There is no acknowledgmentbecause the RST sender is no longer listening.

Page 51: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-51

Port Numbers and Sockets in TCP and UDP

Page 52: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-52

TCP and UDP Port Numbers

• Computers are multitasking devices– They run multiple applications at the same time

– On a server, a port number designates a specific application

Server

HTTP WebserverApplication

SMTP E-MailApplications

Port 80 Port 25

Page 53: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-53

TCP and UDP Port Numbers

• Major Applications Have Well-Known Port Numbers– Well-known port number range is 0 to 1023 for both TCP

and UDP

– HTTP’s well-known port number is TCP Port 80

– SMTP’s well-known port number is TCP Port 25

Server

HTTP WebserverApplication

SMTP E-MailApplication

Port 80 Port 25

Page 54: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-54

TCP and UDP Port Numbers

• Clients Use Ephemeral Port Numbers– 1024 to 4999 for Windows Client PCs– A client has a separate port number for each connection

to a program on a server

Client

Port 4400 Port 3270

WebserverApplication

on Webserver

E-MailApplication

on MailServer

Page 55: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-55

TCP and UDP Port Numbers

Client 60.171.18.22

Webserver1.33.17.13

Port 80

SMTP Server123.30.17.120

Port 25

A socket is anIP address, a colon, and a port number.

1.33.17.3:80123.30.17.120:25

128.171.17.13:2849

It represents a specific application (Port number)on a specific server (IP address)

Or a specific connectionon a specific client.

Client PC128.171.17.13

Port 2849

Page 56: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-56

8-13: Use of TCP (and UDP) Port Numbers

Client60.171.18.22

Webserver1.33.17.13

Port 80

Source: 60.171.18.22:2707Destination: 1.33.17.13:80

SMTP Server123.30.17.120

Port 25

This shows sockets for a clientpacket sent to a webserver application

on a webserver

Page 57: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-57

8-13: Use of TCP (and UDP) Port Numbers

Client60.171.18.22

Webserver1.33.17.13

Port 80

Source: 60.171.18.22:2707Destination: 1.33.17.13:80

Source: 1.33.17.13:80Destination: 60.171.18.22:2707

SMTP Server123.30.17.120

Port 25

Sockets intwo-way

transmission

Page 58: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-58

8-13: Use of TCP (and UDP) Port Numbers

Client60.171.18.22

Webserver1.33.17.13

Port 80

Source: 60.171.18.22:2707Destination: 1.33.17.13:80

Source: 1.33.17.13:80Destination: 60.171.18.22:2707

Source: 60.171.18.22:4400Destination: 123.30.17.120:25

SMTP Server123.30.17.120

Port 25Clients use a different ephemeralport number for different connections

Page 59: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-59

Dynamic Routing Protocols

Routing Table Information

Dynamic Routing Protocol

Router Router

Page 60: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

Dynamic Routing Protocols

• How do routers get the information for their routing tables?– The answer is that they constantly talk to each other,

sharing routing information

– This communication must be standardized

– These standards are called dynamic routing protocols

– There are several dynamic routing protocols; partners must select one to use

– Dynamic routing protocols exchange IP address ranges, masks, metric values, and sometimes other information

8-60

Page 61: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-61

Dynamic Routing Protocols

Here is a simpleexample of how adynamic routingprotocol works.

Here, the metric isthe number of hopsto the destination IP

addresses, 128.171.x.x

1

Page 62: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-62

8-15: Dynamic Routing Protocols: Interior and Exterior

When they talk to otherAutonomous systems, they

Must negotiate whichExterior DRP they will use.

Large organizations andISPs are autonomous systems.

Autonomous systems canSelect their interior

Dynamic routing protocols.

1

Page 63: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-63

8-14: Dynamic Routing Protocols

Dynamic Routing Protocol

Interior or Exterior Routing

Protocol?

Remarks

RIP (Routing Information Protocol)

Interior Only for small autonomous TCP/IP systems with low needs for security

OSPF (Open Shortest Path First)

Interior For large autonomous systems that only use TCP/IP

EIGRP (Enhanced Interior Gateway Routing Protocol)

Interior Proprietary Cisco Systems protocol. Not limited to TCP/IP routing. Also handles IPX/SPX, SNA, and so forth

BGP (Border Gateway Protocol)

Exterior Organization cannot choose what exterior routing protocol it will use. TCP/IP protocol

Page 64: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall

Routing

• Note that routing has two meanings– Routing means the process by which a router receives a

packet, selects the best route for a packet, and sends the packet back out

– Routing also means the process by which routers exchange routing table information

8-64

Page 65: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-65

The Internet Control Message Protocol (ICMP)

Page 66: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-66

8-16: Internet Control Message Protocol (ICMP) for Supervisory Messages

ICMP is the internet layersupervisory protocol.

ICMP messages are encapsulatedin the data field of IP packets.

These packets have nohigher-layer contents.

Page 67: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-67

8-16: Internet Control Message Protocol (ICMP) for Supervisory Messages

At the Windows command line,Type “ping <IPaddress>[Enter]”

1

Pinging a host sends itan ICMP echo message.

When the host receivesthis ping, it sends back.

An echo reply message.pinging is a quick way to

learn if a host is available.

Page 68: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-68

8-16: Internet Control Message Protocol (ICMP) for Supervisory Messages

If a router cannot deliver a packet,it may send an ICMP error

message to the source host.

There are several types ofICMP messages, for

different types of error.

Page 69: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 8-69

Dynamic Host Configuration Protocol (DHCP)

Page 70: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-70

Dynamic Host Configuration Protocol

• Every Host Must Have a Unique IP address

– Server hosts are given static IP addresses (unchanging)

– Clients get dynamic (temporary) IP addresses that may be different each time they use an internet

• Dynamic Host Configuration Protocol (DHCP)

– Clients get these dynamic IP addresses from Dynamic Host Configuration Protocol (DHCP) servers

Page 71: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-71

8-17: Dynamic Host Configuration Protocol (DHCP)

Client PCA3-4E-CD-59-28-7F

DHCPServer

DHCP Request Message:“My 48-bit Ethernet address is A3-4E-CD-59-28-7F”.

Please give me a 32-bit IP address.”

Pool ofIP Addresses

Page 72: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-72

8-17: Dynamic Host Configuration Protocol (DHCP)

Client PCA3-4E-CD-59-28-7F

DHCPServer

DHCP Response Message:“Computer at A3-4E-CD-59-28-7F,

your 32-bit IP address is 11010000101111101010101100000010”.(Usually other configuration parameters as well, including

The subnet mask, the IP address of the default router, and theIP addresses of the organization’s DNS servers)

Pool ofIP Addresses

Page 73: © 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks

© 2009 Pearson Education, Inc.  Publishing as Prentice Hall8-73

Why DHCP?

• If You Give PCs Static Information,– The cost of manual entry of configuration information

(subnet mask, default router, DNS servers, etc.) is high

– If something changes, such as the IP address of your DNS server, the cost of manually reconfiguring each PC is high

– If something changes, your PCs may be inoperable until you make the manual changes

• With DHCP, users get hot fresh configuration data automatically