52
Guide to TCP/IP, Third Edition Chapter 3: Data Link and Network Layer TCP/IP Protocols 1 Protocols

Chapter 3: Data Link and Network Layer TCP/IP Protocols2profs.net/steve/CISNTWK413/PPTs/ch03.pdf · – Kti ARP hi t ti tKept in an ARP cache in memory on most operating systems •

  • Upload
    ngocong

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Guide to TCP/IP, Third Edition

Chapter 3:pData Link and Network Layer TCP/IP

Protocols

1

Protocols

CISNTWK-11PermissionsObjectives

• Understand the role that data link protocols, such as SLIP and PPP play for TCP/IPand PPP, play for TCP/IP

• Distinguish among various Ethernet and token ring frame typesyp

• Understand how hardware addresses work in a TCP/IP environment, and the services that ARP and RARP provide for such networksfor such networks

2Guide to TCP/IP, Third Edtion 2

CISNTWK-11PermissionsObjectives (continued)

• Appreciate the overwhelming importance of the Internet Protocol (IP) and how IP packets behave on TCP/IPProtocol (IP), and how IP packets behave on TCP/IP networks

• Understand the lifetime of an IP datagram, and the process g pof fragmentation and reassembly

• Appreciate service delivery optionsd d h d fi ld d f i• Understand IP header fields and functions

3Guide to TCP/IP, Third Edtion 3

CISNTWK-11PermissionsData Link Protocols

• Key jobs of Data Link layer M di A C t l (MAC)– Media Access Control (MAC)

– Logical Link Control (LLC)

• Point-to-point data transferp– Shipping data from one MAC layer address to another

4Guide to TCP/IP, Third Edtion 4

CISNTWK-11PermissionsData Link Protocols (continued)

• WAN encapsulation of frames at Data Link layer involves one or more of the following servicesone or more of the following services– Addressing– Bit-level integrity check– Delimitation– Protocol identification (PID)

5Guide to TCP/IP, Third Edtion 5

CISNTWK-11PermissionsSerial Line Internet Protocol (SLIP)

• Original point-to-point protocolS i d• Sometimes used to – Manage communications or networking equipment through a dial-

up serial port connection

• Simple packet-framing protocol described in RFC 1055• Uses a special END character (0xC0)

Pl d h b i i d d f h IP d d li i– Placed at the beginning and end of each IP datagram to delimit, or separate, each payload

6Guide to TCP/IP, Third Edtion 6

CISNTWK-11PermissionsPoint-to-Point Protocol

• Provides F d li it ti– Frame delimitation

– Protocol identification and bit-level integrity check services• RFC 1661 includes

– Encapsulation methods – A special Link Control Protocol (LCP)– A collection of negotiation protocolsA collection of negotiation protocols

7Guide to TCP/IP, Third Edtion 7

CISNTWK-11PermissionsPoint-to-Point Protocol (continued)

• Fields in the PPP header and trailer includeFl– Flag

– Protocol identifier– Frame Check Sequence (FCS)

• Supports a default MTU of 1,500 bytes– Which makes it ideal for interconnecting Ethernet-based networks

(or peers)(or peers)

8Guide to TCP/IP, Third Edtion 8

CISNTWK-11PermissionsSpecial Handling for PPP Links

• For switched technologiesBidi ti l ti t b ti t d b t th t– Bidirectional connections must be negotiated between peers that wish to exchange data

• X.25: RFC 1356. X.25– Standard set of protocols defined in the 1970s by the International

Telecommunications Union (ITU)• Frame relay: RFC 2427y

– Assumes that digital-quality transmission lines are available for creating WAN links

9Guide to TCP/IP, Third Edtion 9

CISNTWK-11Permissions

Special Handling for PPP Links (continued)(continued)

• ATM: RFCs 1577 and 1626Hi h d l h l b db d ll it h d t ki– High-speed, long-haul, broadband, cell-switched networking technology

– Offers astonishing and ever-increasing bandwidth

• PPPoE: RFC 2516 – Protocol used by Internet service providers to authenticate and

manage broadband subscribersg

10Guide to TCP/IP, Third Edtion 10

CISNTWK-11PermissionsFrame Types

• At Data Link layer– Protocol data units are called frames

• Frame• Frame – Represents same data that appears in digital form at the Network

layer in an IP datagram

11Guide to TCP/IP, Third Edtion 11

CISNTWK-11PermissionsEthernet Frame Types

• Ethernet II frame typeD f t t d d f t d f IP d t t i i– De facto standard frame type used for IP datagram transmissions over Ethernet networks

– Has protocol identification field

• Ethernet frame types that TCP/IP can use– Ethernet II– Ethernet 802.2 Logical Link ControlEthernet 802.2 Logical Link Control– Ethernet 802.2 Sub-Network Access Protocol (SNAP)

12Guide to TCP/IP, Third Edtion 12

CISNTWK-11PermissionsEthernet II Frame Structure

• Ethernet II frame type fields and structureP bl– Preamble

– Destination Address Field– Source Address Field– Type Field– Data Field– Frame Check Sequence FieldFrame Check Sequence Field

13Guide to TCP/IP, Third Edtion 13

CISNTWK-11PermissionsEthernet II Frame Structure

(continued)

14Guide to TCP/IP, Third Edtion 14

CISNTWK-11PermissionsEthernet II Frame Structure

(continued)

15Guide to TCP/IP, Third Edtion 15

CISNTWK-11Permissions

Ethernet 802.2 LLC Frame StructureStructure

• Unique fields– Preamble– Preamble– Start Frame Delimiter Field:– Length Field

Destination Service Access Point (DSAP) Field:– Destination Service Access Point (DSAP) Field:– Source Service Access Point (SSAP) Field:– Control Field

D ti ti Add– Destination Address– Source Address– Data

F Ch k S– Frame Check Sequence

16Guide to TCP/IP, Third Edtion 16

CISNTWK-11PermissionsEthernet 802.2 LLC Frame Structure

(continued)

17Guide to TCP/IP, Third Edtion 17

CISNTWK-11PermissionsEthernet 802.2 LLC Frame Structure

(continued)

18Guide to TCP/IP, Third Edtion 18

CISNTWK-11PermissionsEthernet SNAP Frame Structure

• Fields– Organization Code Field– Organization Code Field– Ether Type Field– Preamble

Start Frame Delimiter– Start Frame Delimiter– Destination Address– Source Address

L th– Length– Destination Service Access Point– Source Service Access Point

19Guide to TCP/IP, Third Edtion 19

CISNTWK-11PermissionsEthernet SNAP Frame Structure

(continued)

20Guide to TCP/IP, Third Edtion 20

CISNTWK-11PermissionsToken Ring Frame Types

• IEEE 802.5 standard D fi t k i t ki– Defines token ring networking

• Token ring networks– Rely on a physical star design, although they use a logical ring y p y g g y g g

transmission path

• On a token ring networkEach token ring workstation acts as a repeater– Each token ring workstation acts as a repeater

• Variations of token ring frames– Token Ring 802.2 LLC frames– Token Ring SNAP frames

21Guide to TCP/IP, Third Edtion 21

CISNTWK-11PermissionsToken Ring Frame Types (continued)Token Ring Frame Types (continued)

22Guide to TCP/IP, Third Edtion 22

CISNTWK-11Permissions

Hardware Addresses in the IP Environment

• IP addresses – Identify individual IP hosts on a TCP/IP internetwork

• TCP/IP networking uses ARP to• TCP/IP networking uses ARP to– Determine the hardware address of the local target for the packet

• ARP cache – Table of hardware addresses learned through the ARP process

23Guide to TCP/IP, Third Edtion 23

CISNTWK-11Permissions

Hardware Addresses in the IP Environment (continued)Environment (continued)

24Guide to TCP/IP, Third Edtion 24

CISNTWK-11Permissions

Hardware Addresses in the IP Environment (continued)Environment (continued)

25Guide to TCP/IP, Third Edtion 25

CISNTWK-11Permissions

Hardware Addresses in the IP Environment (continued)Environment (continued)

26Guide to TCP/IP, Third Edtion 26

CISNTWK-11PermissionsARP Packet Fields and Functions

• Basic ARP packetsB d t ARP t k t– Broadcast ARP request packet

– Directed, or unicast, ARP reply packet

• Most confusing part of ARP g p– Interpretation of the sender and target address information

27Guide to TCP/IP, Third Edtion 27

CISNTWK-11PermissionsARP Packet Fields and Functions

(continued)

28Guide to TCP/IP, Third Edtion 28

CISNTWK-11PermissionsARP Packet Fields and Functions

(continued)

29Guide to TCP/IP, Third Edtion 29

CISNTWK-11PermissionsARP Cache

• ARP information K t i ARP h i t ti t– Kept in an ARP cache in memory on most operating systems

• Windows-based systems– Command arp -a is used to view the table contentsp– Have utility to view IP and hardware addresses

30Guide to TCP/IP, Third Edtion 30

CISNTWK-11Permissions

ARP C h ( ti d)ARP Cache (continued)

31Guide to TCP/IP, Third Edtion 31

CISNTWK-11PermissionsProxy ARP

• Method that allows IP host to use a simplified subnetting designdesign

• Enables a router to “ARP” in response to an IP host’s ARP broadcasts

• Most network configurations– May never need to use proxy ARP

32Guide to TCP/IP, Third Edtion 32

CISNTWK-11Permissions

Proxy ARP (continued)

33Guide to TCP/IP, Third Edtion 33

CISNTWK-11PermissionsReverse ARP

• Used to obtain an IP address for an associated data link addressaddress

• Initially defined to– Enable diskless workstations to find their own IP addresses upon p

booting or startup

• BOOTP, and eventually DHCP, replaced RARP

34Guide to TCP/IP, Third Edtion 34

CISNTWK-11PermissionsAbout Internet Protocol

• Network layer communications E d t d i ti– End-to-end communications

• Internet Protocol – Network layer protocol used in the TCP/IP suitey p

• IP version 4 (IPv4)– Widely implemented

l i ( )• Internet Protocol version 6 (IPv6)– Most used in pilot or experimental implementations

35Guide to TCP/IP, Third Edtion 35

CISNTWK-11PermissionsSending IP Datagrams

• Requirements for building an IP datagram packet to transmit on the wiretransmit on the wire– IP addresses of the source and destination– Hardware address of the source and next-hop router

• IP host – Can use a manually entered destination IP address or the DNS to

obtain a destination’s IP addressobtain a destination s IP address

36Guide to TCP/IP, Third Edtion 36

CISNTWK-11PermissionsRoute Resolution Process

• Enables IP host to determine if desired destination is local or remoteor remote

• Local or Remote Destination?– Upon determination of IP address p

• IP host compares network portion of destination address to its own local network address

37Guide to TCP/IP, Third Edtion 37

CISNTWK-11Permissions

Route Resolution Process (continued)

38Guide to TCP/IP, Third Edtion 38

CISNTWK-11PermissionsIf Remote, Which Router?

• Types of route table entriesH t t t– Host route entry

– Network route entry

• Receiving gateway typically does one of the followingg g y yp y g– Forwards packet– Sends an ICMP reply

Sends an ICMP reply indicating that it is unclear where to send the– Sends an ICMP reply indicating that it is unclear where to send the packet

39Guide to TCP/IP, Third Edtion 39

CISNTWK-11PermissionsLifetime of an IP Datagram

• IP packets H d fi d lif ti i di t d i h k t’ Ti t Li– Have a pre-defined lifetime indicated in each packet’s Time to Live (TTL) field

• 64– Recommended starting TTL value

• 128Default TTL in Windows 2000 Windows 2003 and Windows XP– Default TTL in Windows 2000, Windows 2003, and Windows XP

40Guide to TCP/IP, Third Edtion 40

CISNTWK-11PermissionsLifetime of an IP Datagram (continued)Lifetime of an IP Datagram (continued)

41Guide to TCP/IP, Third Edtion 41

CISNTWK-11PermissionsFragmentation and Reassembly

• IP fragmentation E bl l k t t b t ti ll f t d b t– Enables a larger packet to be automatically fragmented by a router

• Once fragmented– No reassembly occurs until fragments arrive at destinationy g– All fragments are given the same TTL value

42Guide to TCP/IP, Third Edtion 42

CISNTWK-11PermissionsService Delivery Options

• PrecedenceU d b t t d t i h t k t t d– Used by routers to determine what packet to send

• Type of Service– Used to select routing path when multiple paths existg p p p– Routing protocols

• OSPF and Border Gateway Protocol (BGP)

43Guide to TCP/IP, Third Edtion 43

CISNTWK-11Permissions

Differentiated Services and Explicit Congestion NotificationCongestion Notification

• RFC 2474, RFC 2475, and RFC 3168 Off f th TOS fi ld bit– Offer a new use of the TOS field bits

– Suggest that TOS and Precedence field bytes be replaced by a Differentiated Services Code Point (DSCP) field

• Diffserv – Uses DSCP value to enable routers to offer varying levels of

service to traffic based on marker placed in the DSCP fieldp

44Guide to TCP/IP, Third Edtion 44

CISNTWK-11PermissionsIP Header Fields And Functions

• Version Field– First field in IP header– First field in IP header

• Header Length Field– Denotes the length of the IP header only

• Type of Service Field– Has two components: precedence and Type of Service

• Total Length FieldTotal Length Field– Defines length of the IP header and any valid data

45Guide to TCP/IP, Third Edtion 45

CISNTWK-11PermissionsIP Header Fields And Functions

(continued)

46Guide to TCP/IP, Third Edtion 46

CISNTWK-11Permissions

IP Header Fields And Functions (continued)(continued)

• Identification FieldE h k t i i i ID l h t– Each packet is given a unique ID value when sent

• Flags Field– Three bits longg– Typically, fragmentation is allowed

• Fragment Offset Field Sh h t l k t’ d t h f t– Shows where to place packet’s data when fragments are reassembled

47Guide to TCP/IP, Third Edtion 47

CISNTWK-11Permissions

IP Header Fields And Functions (continued)(continued)

• Time to Live (TTL) FieldD t th i i lif ti f th k t– Denotes the remaining lifetime of the packet

• Protocol Field– Indicates what is coming up nextg p

• Header Checksum Field– Provides error detection on the contents of the IP header only

dd i ld• Source Address Field– The IP address of the IP host that sent the packet

48Guide to TCP/IP, Third Edtion 48

CISNTWK-11Permissions

IP Header Fields And Functions (continued)(continued)

• Destination Address FieldC i l d i t lti t b d t dd– Can include a unicast, multicast, or broadcast address

– Final destination of the packet

• Options Fieldsp– Exist primarily to provide additional IP routing controls– Can be useful when testing or debugging code or specific

connectionsconnections

49Guide to TCP/IP, Third Edtion 49

CISNTWK-11PermissionsSummary

• Data link protocols M t f f d t th t k– Manage transfer of datagrams across the network

• At Data Link layer– Protocols must deliver services, such as delimitation, bit-level

integrity checks, addressing, and protocol identification

• Ethernet II framesMost common frame type on LANs– Most common frame type on LANs

50Guide to TCP/IP, Third Edtion 50

CISNTWK-11PermissionsSummary (continued)

• Understanding frame layouts C i l f h dli f t t– Crucial for proper handling of contents

• At the lowest level of detail– Important to understand the differences in field layouts and p y

meanings

• Imperative to understand how TCP/IP manages the translation between MAC layer addresses and numeric IPtranslation between MAC layer addresses and numeric IP addresses

51Guide to TCP/IP, Third Edtion 51

CISNTWK-11PermissionsSummary (continued)

• Proxy ARP P it t t i t t lti l t k t– Permits router to interconnect multiple network segments

• Network layer protocols – Make their way into the Data Link layer through a process known y y g p

as data encapsulation

• Important characteristics of IP datagramsTime to Live (TTL) values– Time to Live (TTL) values

– Fragmentation of incoming frames– Service delivery options

52Guide to TCP/IP, Third Edtion 52