TCP/IP Internetworking Chapter 8. 8-2 Recap Single Networks (Subnets) –Chapters 4 and 5 covered single LANs –Chapters 6 and 7 covered residential Internet.

Slides:



Advertisements
Similar presentations
Chapter 8 Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson.
Advertisements

CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
CCNA – Network Fundamentals
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
Intermediate TCP/IP TCP Operation.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Module A.  This is a module that some teachers will cover while others will not  This module is a refresher on networking concepts, which are important.
Networking and Internetworking: Standards and Protocols i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg.
COS 338 Day DAY 16 Agenda Capstone Proposals Overdue 3 accepted, 3 in mediation Capstone progress reports still overdue I forgot to mark in calendar.
Institute of Technology Sligo - Dept of Computing Semester 2 Chapter 9 The TCP/IP Protocol Suite Paul Flynn.
Defining Network Protocols Application Protocols –Application Layer –Presentation Layer –Session Layer Transport Protocols –Transport Layer Network Protocols.
COS 338 Day 15.
1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015.
Gursharan Singh Tatla Transport Layer 16-May
CS 356 Systems Security Spring Dr. Indrajit Ray
Lecture 8 Modeling & Simulation of Communication Networks.
IST 228\Ch3\IP Addressing1 TCP/IP and DoD Model (TCP/IP Model)
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
More on the IP Internet Protocol. Internet Layer Process Transport layer process passes EACH TCP segment to the internet layer process for delivery Transport.
A Closer Look at HTTP, TCP, IP, and PPP Chapter 3 Copyright 2001 Prentice Hall Revision 2: July 2001.
Chapter 8 Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson Revised August 2013.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks.
Chapter 8 Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson.
TCP/ IP Internetworking I
Protocol Architecture
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
Cisco – Chapter 11 Routers All You Ever Wanted To Know But Were Afraid to Ask.
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
COS 338 Day 4. DAY 3 Agenda Questions? Write-up for Lab due next class Assignment 2 Posted Due on September 26 Assignment 1 Review 1 A, 1 B, 1 C, 2 D’s.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 8-1 TCP/IP Internetworking Chapter 8 Updated January 2009 Raymond Panko’s Business Data Networks.
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall TCP/IP Internetworking Chapter 8 Panko’s Business Data Networks and Telecommunications, 7th.
10/13/20151 TCP/IP Transmission Control Protocol Internet Protocol.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
TCP: A Closer Look Transmission Control Protocol.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy Network Fundamentals.
1 Figure 3-2: TCP/IP Standards (Study Figure) Origins  Defense Advanced Research Projects Agency (DARPA) created the ARPANET  An internet connects multiple.
TCOM 515 IP Routing. Syllabus Objectives IP header IP addresses, classes and subnetting Routing tables Routing decisions Directly connected routes Static.
1 TCP/IP Internetting ä Subnet layer ä Links stations on same subnet ä Often IEEE LAN standards ä PPP for telephone connections ä TCP/IP specifies.
Review the key networking concepts –TCP/IP reference model –Ethernet –Switched Ethernet –IP, ARP –TCP –DNS.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 7 Internet Protocol (IP) Routing.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
Internet 1) Internet basic concepts 2) The IP protocol stack 3) The IP datagram header (IPv4 and IPv6) 4) Addressing and routing 5) Example: downloading.
Internet Protocols (chapter 18) CSE 3213 Fall 2011.
1 Introduction to TCP/IP. 2 OSI and Protocol Stack OSI: Open Systems Interconnect OSI ModelTCP/IP HierarchyProtocols 7 th Application Layer 6 th Presentation.
TCP/IP Internetworking Chapter 8 Panko’s Business Data Networks and Telecommunications, 6th edition Copyright 2007 Prentice-Hall May only be used by adopters.
TCP/IP Internetworking Chapter 8 Panko’s Business Data Networks and Telecommunications, 6th edition Copyright 2007 Prentice-Hall May only be used by adopters.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
1. Layered Architecture of Communication Networks: TCP/IP Model
1 12-Jan-16 OSI network layer CCNA Exploration Semester 1 Chapter 5.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 Module 10 Routing Fundamentals and Subnets.
Cisco Confidential © 2013 Cisco and/or its affiliates. All rights reserved. 1 Cisco Networking Training (CCENT/CCT/CCNA R&S) Rick Rowe Ron Giannetti.
Sem1 - Module 10 Routing Fundamentals and Subnets
IP Protocol CSE TCP/IP Concepts Connectionless Operation Internetworking involves connectionless operation at the level of the Internet Protocol.
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
Lecture 13 IP V4 & IP V6. Figure Protocols at network layer.
1 Layer 3: Protocols Honolulu Community College Cisco Academy Training Center Semester 1 Version
1 28-Sep-16 S Ward Abingdon and Witney College CCNA Exploration Semester 1 OSI network layer CCNA Exploration Semester 1 Chapter 5.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 OSI network layer CCNA Exploration Semester 1 – Chapter 5.
Dr. Richard Spillman Fall 2006
TCP/IP Internetworking
TCP/IP Internetworking
TCP/IP Internetworking
TCP/IP Internetworking (Part 2)
Network Architecture Models: Layered Communications
Presentation transcript:

TCP/IP Internetworking Chapter 8

8-2 Recap Single Networks (Subnets) –Chapters 4 and 5 covered single LANs –Chapters 6 and 7 covered residential Internet access and single WANs Internets –Connect multiple single 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

8-3 Figure 2-8: Hybrid TCP/IP-OSI Architecture General PurposeLayerSpecific Purpose Application-application communication Application (5)Application-application interworking Transmission across an internet Transport (4)Host-host communication Internet (3)Packet delivery across an internet Transmission across a single network (LAN or WAN) Data Link (2)Frame delivery across a network Physical (1)Device-device connection Recap TCP/IP standards dominate at the internet and transport layers— transmission across an internet

8-4 Figure 2-11: Internet and Transport Layer, Cont. Transport Layer end-to-end (host-to-host) TCP is connection-oriented, reliable UDP is connectionless and unreliable Internet Layer (usually IP) hop-by-hop (host-router or router-router) connectionless, unreliable Router 1Router 2 Router 3 Client PC Server Recap

8-5 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 Frame Header Packet (Data Field) Frame Trailer Recap

8-6 Frames and Packets In an internet with hosts separated by N networks, there will be: –2 hosts –One packet (going all the way between hosts) One route (between the two hosts) –N frames (one in each network) Recap

8-7 Figure 2-21: Combining Horizontal and Vertical Communication Int App DL Trans Phy Int Trans Int Source Host Destination Host Switch 1 Switch 2 Router 1 Switch 3 Router 2 Transmission Control Protocol (TCP) Or User Datagram Protocol (UDP) Internet Protocol (IP) Recap IP

8-8 Figure 8-1: Major TCP/IP Standards 5 Application User Applications HTTPSMTP Many Others DNS Routing Protocols Many Others Supervisory Applications TCPUDP4 Transport IP3 Internet MPLS ARP None: Use OSI Standards2 Data Link None: Use OSI Standards1 Physical Internetworking is done at the internet and transport layers. There are only a few standards at these layers. We will look at the shaded protocols in this chapter. ICMP

8-9 Figure 8-1: Major TCP/IP Standards, Continued 5 Application User Applications HTTPSMTP Many Others DNS Routing Protocols Many Others Supervisory Applications TCPUDP4 Transport IP3 InternetICMPARP None: Use OSI Standards2 Data Link None: Use OSI Standards1 Physical At the application layer, there are user applications and supervisory applications. We will look at two TCP/IP application layer supervisory applications in this chapter.

IP Addresses 32-Bit Strings Dotted Decimal Notation for Human Reading (e.g., )

8-11 Figure 8-3: Hierarchical IP Address IP addresses are not simple 32-bit numbers. They usually have 3 parts. Consider the example

8-12 Hierarchical Addressing Hierarchical Addressing Brings Simplicity –Phone System Country code-area code-exchange-subscriber number –Long-distance switches near the top of the hierarchy only have to deal with country codes and area codes to set up circuits –Similarly, core Internet routers only have to consider network or network and subnet parts of packets

Router Operation

8-14 Figure 8-4: Border Router, Intrernal Router, Networks, and Subnets Border routers connect different Internet networks (In this case, x.x and 60.x.x.x). An “x” indicates anything.

8-15 Figure 8-4: Border Router, Internal Router, Networks, and Subnets Internal routers connect different subnets in a network. In this case, the three subnets are boxed in red: x, x, and x.

8-16 Figure 8-5: Multiprotocol Routing Real routers must handle multiple internet and transport layer architectures— TCP/IP, IPX/SPX, SNA, etc. We will only look at TCP/IP routing

8-17 Figure 8-6: Ethernet Switching Versus IP Routing Destination address is E5-BB 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

8-18 Figure 8-6: Ethernet Switching Versus IP Routing Routing Matches Host x 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.

8-19 Figure 8-7: The Routing Process Routing –Processing an individual packet and passing it on its way is called routing Router ports are called interfaces Packet arrives in one interface The router sends the packet out another interface

8-20 Figure 8-7: The Routing Process 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 a network or subnet All packets with addresses in this range are routed according to that row Route IP Address Range Governed by the route Metric Next-Hop Router x.x9B

8-21 Figure 8-7: The Routing Process The Routing Table –Routing Table Columns Row (route) number: Not in real routing tables IP address range governed by the row Metric for the quality of the route Next-hop router that should get the packet next if the row is selected as the best match RouteIP Address Range MetricNext-Hop Router x.x9B x.x2B

8-22 Figure 8-7: The Routing Process A Routing Decision –The router looks at the destination IP address in an arriving packet (in this case, ). –1. The router determines which rows match (have an IP address range containing the packet’s destination IP address) The router must check ALL rows for possible matches RouteIP Address Range MetricNext-Hop Router x.x9B x.x2B Arriving Packet Match No Match

8-23 Figure 8-7: The Routing Process A Routing Decision –2. After finding all matches, the router then determines the BEST-MATCH row 2A. Selects the row with the LONGEST MATCH –60.3.x.x has 16 bits of match – x has 24 bits of match so is a better match 2B. If two or more rows tie for the longest match, router uses the METRIC column value –If cost, lowest metric value is best –If speed, highest metric value is best –Etc.

8-24 Figure 8-7: The Routing Process A Routing Decision –3. After selecting the best-match row, the router sends the packet on to the next-hop router indicated in the best-match row—Next-Hop Router B in this example. RouteIP Address Range MetricNext-Hop Router x.x9B x.x2B Best-Match Row Send Packet out to NHR B

A More Detailed Look at Routing Decisions Box

8-26 Figure 8-8: Detailed Row-Matching Algorithm Routing Table IP Address Range RowDestinationMask……… ……… 2…………… 3…………… Box Actually, the table does not really have an “IP Address Range” column. Instead, it has two columns to indicate the IP address range: Destination (an IP address) and a mask

8-27 Figure 8-8: Detailed Row-Matching Algorithm 1. Basic Rule of Masking –Information Bit –Mask Bit –Result Where mask bits are one, the result gives the original IP address bits Where mask bits are zero, the result contains zeros Box

8-28 Figure 8-8: Detailed Row-Matching Algorithm 2. Example –Address (partial) –Mask –Result Box

8-29 Figure 8-8: Detailed Row-Matching Algorithm 3. Common 8-bit Segment Values in Dotted Decimal Notation –SegmentDecimal Value Example – is 24 ones followed by 8 zero – is also called /24 in “prefix notation” Box

8-30 Figure 8-8: Detailed Row-Matching Algorithm Example 1: A Destination IP Address that is in the Range Destination IP Address of Arriving Packet Apply the Mask Result of Masking Destination Value Does Destination Value Match the Masking Result?Yes ConclusionRow 1 is a match. RowDestinationMask……… ……… Box

8-31 Figure 8-8: Detailed Row-Matching Algorithm Example 2: A Destination IP Address that is NOT in the Range Destination IP Address of Arriving Packet Apply the Mask Result of Masking Destination Value Does Destination Value Match the Masking Result?No ConclusionRow 1 is NOT a match. RowDestinationMask……… ……… Box

8-32 Figure 8-9: Interface and Next-Hop Router Switches –A switch port connects directly to a single computer or another switch –Sending the frame out a port automatically gets it to the correct destination Frame Box

8-33 Figure 8-9: Interface and Next-Hop Router Routers –Router ports (interfaces) connect to subnets, which have multiple hosts and that may have multiple routers –The packet must be forwarded to a specific host or router on that subnet Subnet on Router Interface IP Packet Next-Hop Router Host Box Next-Hop Router

8-34 Figure 8-9: Interface and Next-Hop Router Box Best-match row has both an interface (indicating a subnet) and also a next-hop router value to indicate a host or router on the subnet. (Not just a Next Hop Router Column) Interface (port)Next-Hop Router

Dynamic Routing Protocols Routing Table Information Dynamic Routing Protocol

8-36 Figure 8-10: Dynamic Routing Protocols Routing –How do routers get their routing table information? –Routers constantly exchange routing table information with one another using dynamic routing protocols –Note that the term routing is used in two ways In TCP/IP For IP packet forwarding and For the exchange of routing table information through routing protocols Routing Table Information Dynamic Routing Protocol

8-37 Figure 8-10: Dynamic Routing Protocols Autonomous System –An organization’s internal network (internet) Exterior Dynamic Routing Protocols –Between Autonomous Systems, companies use an exterior dynamic routing protocol –The dominant exterior dynamic routing protocol is the Border Gateway Protocol (BGP) Gateway is an obsolete name for router –Company is not free to choose whatever exterior routing protocol it wishes

8-38 Figure 8-10: Dynamic Routing Protocols Interior Dynamic Routing Protocols –Within an Autonomous System, firms use interior dynamic routing protocols –Can select their own interior dynamic routing protocol –Routing Information Protocol (RIP) for small internets –Open Shortest Path First (OSPF) for larger internets –Enhanced Interior Gateway Routing Protocol (EIGRP) Non-TCP/IP proprietary CISCO protocol Can handle multiple protocols, not just TCP/IP

8-39 Figure 8-11: Dynamic Routing Protocols Recap

The Address Resolution Protocol (ARP)

8-41 Figure 8-12: Address Resolution Protocol (ARP) The Situation: The router wishes to pass the packet to the destination host or to a next-hop router. The router knows the destination IP address of the target. The router must learn the target’s MAC layer address in order to be able to send the packet to the target in a frame. The router uses the Address Resolution Protocol (ARP) Packet Frame

8-42 Figure 8-12: Address Resolution Protocol (ARP) 1: Router broadcasts ARP Request to all hosts and routers on the subnet.

8-43 Figure 8-12: Address Resolution Protocol (ARP) This is the Destination host 2: ARP Reply sent by the host with the target IP address. Other hosts ignore it.

8-44 Figure 8-12: Address Resolution Protocol (ARP) 3. Router puts the MAC address in its ARP cache; uses it for subsequent packets to the host

Multiprotocol Label Switching (MPLS)

8-46 Figure 8-13: Multiprotocol Label Switching (MPLS) Routers are Connected in a Mesh –Multiple alternative routes make the routing decision for each packet very expensive PSDNs (Chapter 7) also are Arranged in a Mesh –However, a best path (virtual circuit) is set up before transmission begins –Once a VC is in place, subsequent frames are handled quickly and inexpensively MPLS Does Something Like this for Routers

8-47 Figure 8-13: Multiprotocol Label Switching (MPLS) MPLS Adds a Label Before Each Packet –Label sits between the frame header and the IP header –Contains an MPLS label number –Like a virtual circuit number in a PSDN frame –Label-switching router merely looks up the MPLS label number in its MPLS table and sends the packet back out Data Link Header MPLS Label IP Packet

8-48 Figure 8-13: Multiprotocol Label Switching (MPLS) Advantages of MPLS –Router does a simple table lookup. This is fast and therefore inexpensive per packet handled As fast as Ethernet switching! –Can use multiple label numbers to give traffic between two sites multiple levels of priority or quality of service guarantees –MPLS supports traffic engineering: balancing traffic on an internet LabelPort 13 82

8-49 Figure 8-13: Multiprotocol Label Switching (MPLS) First router adds the label Last router drops the label

The Domain Name System (DNS)

8-51 Figure 8-14: Domain Name System (DNS) Hierarchy A domain is a group of resources under the control of an organization. The domain name system is a general system for managing names. It is a hierarchical naming system. Queries to a DNS server can get Information about a domain.

8-52 Figure 8-14: Domain Name System (DNS) Hierarchy The highest level (0) is called the root. There are 13 DNS Root Servers. They point to lower-level servers.

8-53 Figure 8-14: Domain Name System (DNS) Hierarchy Top-level domains are generic TLDs (.com,.net.,.org, etc.) or country TLDs (.ca,.uk,.ie, etc.)

8-54 Figure 8-14: Domain Name System (DNS) Hierarchy Organizations seek good second- level domain names cnn.com microsoft.com hawaii.edu etc. Firms get them from address registrars

8-55 Figure 8-14: Domain Name System (DNS) Hierarchy Host names are the bottom of the DNS hierarchy. A DNS request for a host name will return its IP address.

The Internet Control Message Protocol (ICMP)

8-57 Figure 8-15: Internet Control Message Protocol (ICMP) for Supervisory Messages ICMP messages are encapsulated in the data fields of IP packets. There are no transport or Application layer headers or messages ICMP is the supervisory protocol at the internet layer.

8-58 Figure 8-15: Internet Control Message Protocol (ICMP) for Supervisory Messages When an error occurs, the device noting the error may try to respond with an ICMP error message describing the problem. ICMP error messages often are not sent for security reasons because attackers can use them to learn about a network

8-59 Figure 8-15: Internet Control Message Protocol (ICMP) for Supervisory Messages To see if another host is active, a host can send the target host an ICMP echo message (called a ping). If the host is active, it will send back an echo response message confirming that it is active.

Dynamic Host Configuration Protocol (DHCP) From Chapter 1

8-61 Figure 8-16: Dynamic Host Configuration Protocol (DHCP) DHCP Gives Each Client PC at Boot-Up: –A temporary IP Address (we saw this in Chapter 1) –A subnet mask –The IP addresses of local DNS servers Better Than Manual Configuration –If subnet mask or DNS IP addresses change, only the DHCP server has to be updated manually –Client PCs are automatically updated when they next boot up

The Internet Protocol (IP) Versions 4 and 6

8-63 Figure 8-17: IPv4 and IPv6 Packets IP Version 4 Packet Version (4 bits) Value is 4 (0100) Header Length (4 bits) Flags (3 bits) Time to Live (8 bits) Header Checksum (16 bits) Diff-Serv (8 bits) Total Length (16 bits) Length in octets Bit 0 Bit 31 Identification (16 bits) Unique value in each original IP packet Fragment Offset (13 bits) Octets from start of original IP fragment’s data field Protocol (8 bits) 1=ICMP, 6=TCP, 17=UDP IPv4 is the dominant version of IP today. The version number in its header is 4 (0100). The header length and total length field tell the size of the packet. The Diff-Serv field can be used for quality of service labeling. (But MPLS is being used instead by most carriers)

8-64 Figure 8-17: IPv4 and IPv6 Packets IP Version 4 Packet Version (4 bits) Value is 4 (0100) Header Length (4 bits) Flags (3 bits) Time to Live (8 bits) Header Checksum (16 bits) Diff-Serv (8 bits) Total Length (16 bits) Length in octets Bit 0 Bit 31 Identification (16 bits) Unique value in each original IP packet Fragment Offset (13 bits) Octets from start of original IP fragment’s data field Protocol (8 bits) 1=ICMP, 6=TCP, 17=UDP The second row is used for reassembling fragmented IP packets, but fragmentation is quite rare, so we will not look at these fields.

8-65 Figure 8-17: IPv4 and IPv6 Packets IP Version 4 Packet Version (4 bits) Value is 4 (0100) Header Length (4 bits) Flags (3 bits) Time to Live (8 bits) Header Checksum (16 bits) Diff-Serv (8 bits) Total Length (16 bits) Length in octets Bit 0 Bit 31 Identification (16 bits) Unique value in each original IP packet Fragment Offset (13 bits) Octets from start of original IP fragment’s data field Protocol (8 bits) 1=ICMP, 6=TCP, 17=UDP The sender sets the time-to-live value (usually 64 to 128). Each router along the way decreases the value by one. A router decreasing the value to zero discards the packet. It may send an ICMP error message. The protocol field describes the message in the data field (1=ICMP, 2=TCP, 3=UDP, etc.) The header checksum is used to find errors in the header. If a packet has an error, the router drops it. There is no retransmission at the internet layer, so the internet layer is still unreliable.

8-66 Figure 8-17: IPv4 and IPv6 Packets IP Version 4 Packet Source IP Address (32 bits) Bit 0 Bit 31 Destination IP Address (32 bits) PaddingOptions (if any) Data Field The source and destination IP addresses Are 32 bits long, as you would expect. Options can be added, but these are rare.

8-67 Figure 8-17: IPv4 and IPv6 Packets IP Version 6 Packet Source IP Address (128 bits) Bit 0 Bit 31 Hop Limit (8 bits) Next Header (8 bits) Name of next header Payload Length (16 bits) Version (4 bits) Value is 6 (0110) Diff-Serv (8 bits) Flow Label (20 bits) Marks a packet as part of a specific flow Destination IP Address (128 bits) Next Header or Payload (Data Field) IP Version 6 is the emerging version of the Internet protocol. Has 128 bit addresses for an almost unlimited number of IP addresses. Needed because of rapid growth in Asia. Also needed because of the exploding number of mobile devices

The Transmission Control Protocol (TCP)

8-69 Figure 8-18: TCP Segment and UDP Datagram TCP Segment Window Size (16 bits) Bit 0 Bit 31 Destination Port Number (16 bits)Source Port Number (16 bits) Sequence Number (32 bits) Acknowledgment Number (32 bits) Urgent Pointer (16 bits)TCP Checksum (16 bits) Header Length (4 bits) Reserved (6 bits) Flag Fields (6 bits) Flag fields are one-bit fields. They include SYN, ACK, FIN, and RST. The source and destination port numbers specify a particular application on the source and destination multitasking computers (Discussed later) Sequence numbers are 32 bits long. So are acknowledgment numbers.

8-70 Figure 8-18: TCP Segment and UDP Datagram TCP Segment Window Size (16 bits) Bit 0 Bit 31 Destination Port Number (16 bits)Source Port Number (16 bits) Sequence Number (32 bits) Acknowledgment Number (32 bits) Urgent Pointer (16 bits)TCP Checksum (16 bits) Header Length (4 bits) Reserved (6 bits) Flag Fields (6 bits) Flags are one-bit fields. If a flag’s value is 1, it is “set”. If a flag’s value is 0, it is “not set.” TCP has six flags If the TCP Checksum field’s value is correct, The receiving process sends back an acknowledgment.

8-71 Figure 8-18: TCP Segment and UDP Datagram TCP Segment Window Size (16 bits) Bit 0 Bit 31 Destination Port Number (16 bits)Source Port Number (16 bits) Sequence Number (32 bits) Acknowledgment Number (32 bits) Urgent Pointer (16 bits)TCP Checksum (16 bits) Header Length (4 bits) Reserved (6 bits) Flag Fields (6 bits) For flow control (to tell the other party to slow down), The sender places a small value in the Window Size field. If the Window Size is small, the receiver will have to stop transmitting after a few more segments (unless it gets a new acknowledgment extending the number of segments it may send.)

8-72 Figure 8-18: TCP Segment and UDP Datagram TCP SegmentBit 0 Bit 31 PaddingOptions (if any) Data Field TCP segment headers can end with options. Unlike IPv4 options, TCP options are very common. If an option does not end at a 32-bit boundary, padding must be added.

The User Datagram Protocol (UDP)

8-74 Figure 8-18: TCP Segment and UDP Datagram UDP DatagramBit 0 Bit 31 Source Port Number (16 bits)Destination Port Number (16 bits) UDP Length (16 bits)UDP Checksum (16 bits) Data Field UDP messages (datagrams) are very simple. Like TCP, UDP has 16-bit port numbers. The UDP length field allows variable-length application messages. If the UDP checksum is correct, there is no acknowledgment. If the UDP checksum is incorrect, the UDP datagram is dropped.

8-75 Figure 8-19: TCP Connection Openings and Closings TCP is a connection-oriented protocol –Each connection has a formal opening process –Each connection has a formal closing process –During a connection, each TCP segment is acknowledged (Of course, pure acknowledgments are not acknowledged)

8-76 Figure 8-19: TCP Connection 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. Originating side acknowledges the SYN/ACK.

8-77 Figure 8-19: TCP Connection 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.

8-78 Figure 8-19: TCP Connection 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 acknowledgment.

Port Numbers and Sockets in TCP and UDP

8-80 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 applications Server HTTP Webserver Application SMTP Applications Port 80 Port 25

8-81 TCP and UDP Port Numbers Major Applications Have Well-Known Port Numbers –0 to 1023 for both TCP and UDP –HTTP is TCP Port 80 –SMTP is TCP Port 25 Server HTTP Webserver Application SMTP Applications Port 80 Port 25

8-82 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 Webserver Application on Webserver Application on Mail Server

8-83 Figure 8-20: Use of TCP (and UDP) Port Numbers Client Webserver Port 80 SMTP Server Port 25 A socket is an IP address, a colon, and a port number : : :2849 It represents a specific application (Port number) on a specific server (IP address) Or a specific connection on a client. Client PC Port 2849

8-84 Figure 8-20: Use of TCP (and UDP) Port Numbers Client Webserver Port 80 Source: :2707 Destination: :80 SMTP Server Port 25 This shows sockets for a client packet sent to a webserver application on a webserver

8-85 Figure 8-20: Use of TCP (and UDP) Port Numbers Client Webserver Port 80 Source: :2707 Destination: :80 Source: :80 Destination: :2707 SMTP Server Port 25 Sockets in two-way transmission

8-86 Figure 8-20: Use of TCP (and UDP) Port Numbers Client Webserver Port 80 Source: :2707 Destination: :80 Source: :80 Destination: :2707 Source: :4400 Destination: :25 SMTP Server Port 25 Clients use a different ephemeral port number for different connections

Layer 3 Switches

8-88 Figure 8-21: Layer 3 Switches and Routers in Site Networks Usually too expensive to replace workgroup switches. Usually too limited in functionality to replace border routers. Replaces core switches in the middle.