Chapter 6: Network Communications and Protocols - PowerPoint PPT Presentation

1 / 95
About This Presentation
Title:

Chapter 6: Network Communications and Protocols

Description:

Understand the function and structure of packets in a network, and analyze and ... Data payload or actual data can vary from 512 bytes to 16 kilobytes ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 96
Provided by: anned171
Category:

less

Transcript and Presenter's Notes

Title: Chapter 6: Network Communications and Protocols


1
Chapter 6Network Communications and Protocols

2
Learning Objectives
  • Understand the function and structure of packets
    in a network, and analyze and understand those
    packets
  • Understand the function of protocols in a network
  • Discuss the layered architecture of protocols,
    and describe common protocols and their
    implementation
  • Understand channel access methods

3
Function of Packets in Network Communications
  • Networks reformat data into smaller, more
    manageable pieces called packets or frames
  • Advantages of splitting data include
  • More efficient transmission, since large units of
    data saturate network
  • More computers able to use network
  • Faster transmissions since only packets
    containing errors need to be retransmitted

4
Packet Structure
  • Three basic parts of packet, as seen in Header
    contains source and destination address along
    with clocking information to synchronize
    transmission
  • Data payload or actual data can vary from 512
    bytes to 16 kilobytes
  • Trailer information to verify packets
    contents, such as Cyclic Redundancy Check (CRC)

5
Typical Packet Structure
6
Packet Size
7
Packet Creation
  • From sender, data moves down layers ofOSI model
  • Each layer adds header or trailer information
  • Data travels up layers at receiver
  • Each layer removes header or trailer information
    placed by corresponding sender layer

8
Header/Trailer Information Added or Removed
9
Packet Creation (continued)
  • Outgoing data stream enters OSI model as complete
    message
  • Remains as data at layers 5-7
  • Lower layers split data
  • Transport layer 4 splits it into segments
  • Network layer 3 splits segments into packets
  • Data Link layer 2 puts packets into frames
  • Physical layer 1 transmits packets as bits

10
Understanding Packets
  • Three kinds of packets
  • Unicast packet addressed to only one computer
  • Broadcast packet created for all computers on
    network
  • Multicast packet created for any computers on
    network that listen to shared network address

11
Protocols
  • Rules and procedures for communicating
  • To communicate, computers must agree on
    protocols
  • Many kinds of protocols
  • Connectionless
  • Connection-oriented
  • Routable
  • Nonroutable

12
The Function of Protocols
  • Each protocol has different purpose and function
  • Protocols may work at one or more layers
  • More sophisticated protocols operate at higher
    layers of OSI model
  • Protocol stack or protocol suite is set of
    protocols that work cooperatively
  • Most common protocol stack is TCP/IP used by the
    Internet and pretty much all operating systems

13
Protocol Functions
  • Fragmentation and reassembly
  • Flow control
  • Error control

14
Fragmentation and Reassembly
  • Exchange data between two entities
  • Characterized as sequence of PDUs of some bounded
    size
  • Application level message
  • Lower-level protocols may need to break data up
    into smaller blocks
  • Communications network may only accept blocks of
    up to a certain size
  • ATM 53 octets
  • Ethernet 1526 octets

15
Disadvantages of Fragmentation
  • Make PDUs as large as possible because
  •  PDU contains some control information
  • Smaller block, larger overhead
  • PDU arrival generates interrupt
  • Smaller blocks, more interrupts
  • More time processing smaller, more numerous PDUs
  •  

16
Reassembly
  • Segmented data must be reassembled into messages
  • More complex if PDUs out of order

17
PDUS and Fragmentation
18
Flow Control
  • Performed by receiving entity to limit amount or
    rate of data sent
  • Stop-and-wait
  • Each PDU must be acknowledged before next sent
  • Credit
  • Amount of data that can be sent without
    acknowledgment
  • E.g. HDLC sliding-window
  • Must be implemented in several protocols
  • Network traffic control
  • Buffer space
  • Application overflow
  • E.g. waiting for disk access

19
Error Control
  • Guard against loss or damage
  • Error detection and retransmission
  • Sender inserts error-detecting code in PDU
  • Function of other bits in PDU
  • Receiver checks code on incoming PDU
  • If error, discard
  • If transmitter doesnt get acknowledgment in
    reasonable time, retransmit
  • Error-correction code
  • Enables receiver to detect and possibly correct
    errors
  • Error control is performed at various layers of
    protocol
  • Between station and network
  • Inside network

20
Design Issues
  • Routing
  • Datagram lifetime
  • Fragmentation and re-assembly
  • Error control
  • Flow control

21
Routing
  • End systems and routers maintain routing tables
  • Indicate next router to which datagram should be
    sent
  • Static
  • May contain alternative routes
  • Dynamic
  • Flexible response to congestion and errors
  • Source routing
  • Source specifies route as sequential list of
    routers to be followed
  • Security
  • Priority
  • Route recording

22
Datagram Lifetime
  • Datagrams could loop indefinitely
  • Consumes resources
  • Transport protocol may need upper bound on
    datagram life
  • Datagram marked with lifetime
  • Time To Live field in IP
  • Once lifetime expires, datagram discarded (not
    forwarded)
  • Hop count
  • Decrement time to live on passing through a each
    router
  • Time count
  • Need to know how long since last router

23
Fragmentation and Re-assembly
  • Different packet sizes
  • When to re-assemble
  • At destination
  • Results in packets getting smaller as data
    traverses internet
  • Intermediate re-assembly
  • Need large buffers at routers
  • Buffers may fill with fragments
  • All fragments must go through same router
  • Inhibits dynamic routing

24
IP Fragmentation (1)
  • IP re-assembles at destination only
  • Uses fields in header
  • Data Unit Identifier (ID)
  • Identifies end system originated datagram
  • Source and destination address
  • Protocol layer generating data (e.g. TCP)
  • Identification supplied by that layer
  • Data length
  • Length of user data in octets

25
IP Fragmentation (2)
  • Offset
  • Position of fragment of user data in original
    datagram
  • In multiples of 64 bits (8 octets)
  • More flag
  • Indicates that this is not the last fragment

26
Fragmentation Example
27
Fragmentation Header
  • Fragmentation only allowed at source
  • No fragmentation at intermediate routers
  • Node must perform path discovery to find smallest
    MTU(max transmission unit) of intermediate
    networks
  • Source fragments to match MTU
  • Otherwise limit to 1280 octets

28
Fragmentation Header Fields
  • Next Header
  • Reserved
  • Fragmentation offset
  • Reserved
  • More flag
  • Identification

29
Error Control
  • Not guaranteed delivery
  • Router should attempt to inform source if packet
    discarded
  • e.g. for time to live expiring
  • Source may modify transmission strategy
  • May inform high layer protocol
  • Datagram identification needed

30
Flow Control
  • Allows routers and/or stations to limit rate of
    incoming data
  • Limited in connectionless systems
  • Send flow control packets
  • Requesting reduced flow
  • e.g. ICMP

31
Protocols in a Layered Architecture
  • Most protocols can be positioned and explained in
    terms of layers of OSI model
  • Protocol stacks may have different protocols for
    each layer
  • See Figure 6-3 for review of functions of each
    layer of OSI model
  • See Figure 6-4 for three major protocol types
  • Application protocols at layers 5-7
  • Transport protocols at layer 4
  • Network protocols at layers 1-3

32
Functions of OSI Model Layers
33
Three Main Protocol Types
34
Network Protocols
  • Provide addressing and routing information, error
    checking, and retransmission requests
  • Services provided by network protocols are called
    link services
  • Popular network protocols include
  • Internet Protocol version 4 (IPv4)
  • Internetwork Packet Exchange (IPX) and NWLink
  • NetBEUI
  • Internet Protocol version 6 (IPv6)

35
Transport Protocols
  • Handle data delivery between computers
  • May be connectionless or connection-oriented
  • Transport protocols include
  • Transmission Control Protocol (TCP)
  • Sequenced Packet Exchange (SPX) and NWLink
  • NetBIOS/NetBEUI

36
Application Protocols
  • Operate at upper layers of OSI model to provide
    application-to-application service
  • Some common application protocols are
  • Simple Mail Transport Protocol (SMTP)
  • File Transfer Protocol (FTP)
  • Simple Network Management Protocol (SNMP)
  • NetWare Core Protocol (NCP)
  • AppleTalk File Protocol (AFP)

37
Common Protocol Suites
  • Combination of protocols that work
    cooperatively to accomplish network
    communications
  • Some of the most common protocol suites are
  • TCP/IP
  • NWLink (IPX/SPX)
  • NetBIOS/NetBEUI
  • AppleTalk
  • DLC
  • XNS
  • DECNet
  • X.25

38
Transmission Control Protocol/ Internet Protocol
(TCP/IP)
  • Called the Internet Protocol (IP)
  • Most commonly used protocol suite for networking
  • Excellent scalability and superior functionality
  • Able to connect different types of computers and
    networks
  • Default protocol for Novell NetWare, Windows
    XP/2000/2003, all Unix/Linux varieties, and Mac
    OS X
  • See Figure 6-5 for relationship to OSI model

39
TCP/IP Compared to OSI Model
40
IP Addressing
  • Logical addresses, 32-bits or 4 bytes long
  • Four octets separated by periods, each with
    decimal value from 0-255
  • First part of address identifies network
  • Second part of address identifies host or
    individual computer
  • IP addresses broken into classes
  • Number of IP address registries under control of
    Internet Assigned Numbers Authority (IANA)

41
Classless Inter-Domain Routing (CIDR)
  • Internet uses CIDR
  • Demarcation between network and host not always
    based on octet boundaries
  • May be based on specific number of bits from
    beginning of address
  • Called subnetting, the process involves
    stealing bits from host portion of address for
    use in network address
  • Provides fewer hosts on each network but more
    networks overall

42
IPv4 Header
43
Header Fields (1)
  • Version
  • Currently 4
  • IP v6 - see later
  • Internet header length
  • In 32 bit words
  • Including options
  • Type of service
  • Total length
  • Of datagram, in octets

44
Header Fields (2)
  • Identification
  • Sequence number
  • Used with addresses and user protocol to identify
    datagram uniquely
  • Flags
  • More bit
  • Dont fragment
  • Fragmentation offset
  • Time to live
  • Protocol
  • Next higher layer to receive data field at
    destination

45
Header Fields (3)
  • Header checksum
  • Reverified and recomputed at each router
  • 16 bit ones complement sum of all 16 bit words in
    header
  • Set to zero during calculation
  • Source address
  • Destination address
  • Options
  • Padding
  • To fill to multiple of 32 bits long

46
Data Field
  • Carries user data from next layer up
  • Integer multiple of 8 bits long (octet)
  • Max length of datagram (header plus data) 65,535
    octets

47
IPv4 Address Formats
48
IP Addresses - Class A
  • 32 bit global internet address
  • Network part and host part
  • Class A
  • Start with binary 0
  • All 0 reserved
  • 01111111 (127) reserved for loopback
  • Range 1.x.x.x to 126.x.x.x
  • All allocated

49
IP Addresses - Class B
  • Start 10
  • Range 128.x.x.x to 191.x.x.x
  • Second Octet also included in network address
  • 214 16,384 class B addresses
  • All allocated

50
IP Addresses - Class C
  • Start 110
  • Range 192.x.x.x to 223.x.x.x
  • Second and third octet also part of network
    address
  • 221 2,097,152 addresses
  • Nearly all allocated
  • See IPv6

51
Routing Using Subnets
52
ICMP
  • Internet Control Message Protocol
  • RFC 792
  • Transfer of (control) messages from routers and
    hosts to hosts
  • Feedback about problems
  • e.g. time to live expired
  • Encapsulated in IP datagram
  • Not reliable

53
ICMP Message Formats
54
IP v6 - Version Number
  • IP v 1-3 defined and replaced
  • IP v4 - current version
  • IP v5 - streams protocol
  • IP v6 - replacement for IP v4
  • During development it was called IPng
  • Next Generation

55
IPv6
  • Current four byte version is IPv4
  • Now reaching limit of 4-byte addresses
  • IPv6 being used now on the Internet backbone and
    other large networks
  • Uses 16 byte (128-bit) addresses
  • Retains backward compatibility with IPv4 4-byte
    addresses
  • Will provide limitless supply of addresses

56
Why Change IP?
  • Address space exhaustion
  • Two level addressing (network and host) wastes
    space
  • Network addresses used even if not connected to
    Internet
  • Growth of networks and the Internet
  • Extended use of TCP/IP
  • Single address per host
  • Requirements for new types of service

57
IPv6 Enhancements (1)
  • Expanded address space
  • 128 bit
  • Improved option mechanism
  • Separate optional headers between IPv6 header and
    transport layer header
  • Most are not examined by intermediate routes
  • Improved speed and simplified router processing
  • Easier to extend options
  • Address autoconfiguration
  • Dynamic assignment of addresses

58
IPv6 Enhancements (2)
  • Increased addressing flexibility
  • Anycast - delivered to one of a set of nodes
  • Improved scalability of multicast addresses
  • Support for resource allocation
  • Replaces type of service
  • Labeling of packets to particular traffic flow
  • Allows special handling
  • e.g. real time video

59
IPv6Structure
60
IP v6 Header
61
IP v6 Header Fields (1)
  • Version
  • 6
  • Traffic Class
  • Classes or priorities of packet
  • Still under development
  • See RFC 2460
  • Flow Label
  • Used by hosts requesting special handling
  • Payload length
  • Includes all extension headers plus user data

62
IP v6 Header Fields (2)
  • Next Header
  • Identifies type of header
  • Extension or next layer up
  • Source Address
  • Destination address

63
IPv6 Addresses
  • 128 bits long
  • Assigned to interface
  • Single interface may have multiple unicast
    addresses
  • Three types of address

64
Subnet Masks
  • Part of IP address identifies network and part
    identifies host
  • IP uses subnet mask to determine what part of
    address identifies network and what part
    identifies host
  • Network section identified by binary 1
  • Host section identified by binary 0

65
Network Address Translation (NAT)
  • Allows organization to use private IP addresses
    while connected to the Internet
  • Performed by network device such as router that
    connects to Internet
  • See Simulation 6-3 and Figure 6-6 for examples of
    NAT

66
Network Address Translation (NAT) (continued)
67
Dynamic Host Configuration Protocol (DHCP)
  • DHCP server receives block of available IP
    addresses and their subnet masks
  • When computer needs address, DHCP server selects
    one from pool of available addresses
  • Address is leased to computer for designated
    length and may be renewed
  • Can move computers with ease no need to
    reconfigure IP addresses
  • Some systems, such as Web servers, must have
    static IP address

68
NetBIOS and NetBEUI
  • Consortium of Microsoft, 3Com, and IBM developed
    lower-level protocol NetBEUI in mid-1980s
  • NetBIOS Extended User Interface
  • Spans layers 2, 3, and 4 of OSI model
  • Both designed for small- to medium-sized
    networks, from 2-250 computers

69
NetBIOS and NetBEUI (continued)
  • Figure 6-7 shows Microsoft protocol suite and its
    relationship to OSI model
  • Defines four components above Data Link layer
  • Runs on any network card or physical medium
  • Redirector interprets requests and determines
    whether they are local or remote
  • If remote, passes request to Server Message Block
    (SMB)
  • SMB passes information between networked computers

70
Microsoft Protocol Suite Compared to OSI Model
71
NetBIOS and NetBEUI (continued)
  • NetBEUI works at Transport layer to manage
    communications between two computers
  • Nonroutable protocol skips Network layer
  • NetBEUI packet does not contain source or
    destination network information

72
NetBIOS and NetBEUI (continued)
  • NetBIOS operates at Session layer to provide
    peer-to-peer network application support
  • Unique 15-character name identifies each computer
    in NetBIOS network
  • NetBIOS broadcast advertises computers name
  • Connection-oriented protocol, but can also use
    connectionless communications
  • Nonroutable protocol, but can be routed when
    using routable protocol for transport

73
NetBIOS and NetBEUI (continued)
  • NetBEUI is small, fast, nonroutable Transport and
    Data Link protocol
  • All Windows versions include it
  • Ideal for DOS based computers
  • Good for slow serial links
  • Limited to small networks
  • Server Message Block operates at Presentation
    layer
  • Used to communicate between redirector and server
    software

74
IPX/SPX
  • Original protocol suite designed for Novells
    NetWare network operating system
  • Still supported with NetWare 6.0, but TCP/IP is
    now primary protocol
  • NWLink is Microsofts implementation of IPX/SPX
    protocol suite
  • Figure 6-8 shows protocols in NWLink and
    corresponding OSI layers
  • Must consider which Ethernet frame type with
    NWLink

75
NWLink Compared to OSI Model
76
AppleTalk
  • Defines physical transport in Apple Macintosh
    networks
  • Divides computers in zones
  • AppleTalk Phase II allows connectivity outside
    Macintosh world

77
Implementing and Removing Protocols
  • Easy to add or remove protocols
  • TCP/IP loads automatically when most operating
    systems are installed
  • In Windows 2000/2003/XP, use Local Area
    Connections Properties to add or remove protocols
  • See Figure 6-9

78
Network and Dial-up Connections
79
Putting Data on the Cable Access Methods
  • Consider several factors
  • How computers put data on the cable
  • How computers ensure data reaches destination
    undamaged

80
Function of Access Methods
  • Rules specify when computers can access cable or
    data channel
  • Channel access methods assure data reaches its
    destination
  • Prevents two or more computers from sending
    messages that may collide on cable
  • Allows only one computer at a time to send data

81
Major Access Methods
  • Channel access is handled at Media Access Control
    (MAC) sublayer of Data Link layer
  • Five major access methods
  • Contention
  • Switching
  • Token passing
  • Demand priority
  • Polling

82
Contention
  • In early networks, contention method allowed
    computers to send data whenever they had data to
    send, resulting in frequent collisions and
    retransmissions
  • Figure 6-11 shows data collision
  • Two carrier access methods were developed for
    contention-based networks
  • Carrier Sense Multiple Access with Collision
    Detection (CSMA/CD)
  • Carrier Sense Multiple Access with Collision
    Avoidance (CSMA/CA)

83
Data Collision
84
CSMA/CD
  • Popular access method used by Ethernet
  • Prevents collisions by listening to channel
  • If no data on line, may send message
  • If collision occurs, stations wait random period
    of time before resending data
  • See Figure 6-11

85
CSMA/CD (continued)
86
CSMA/CD (continued)
  • Limitations and disadvantages of CSMA/CD
  • Not effective at distances over 2500 meters
  • More computers on network likely to cause more
    collisions
  • Computers have unequal access to media
  • Computer with large amount of data can monopolize
    channel

87
CSMA/CA
  • Uses collision avoidance, rather than detection,
    to avoid collisions
  • When computer senses channel is free, it signals
    its intent to transmit data
  • Used with Apples LocalTalk
  • Advantages and disadvantages
  • More reliable than CSMA/CD at avoiding collisions
  • Intent to transmit packets add overhead and
    reduce network speed

88
Switching
  • Switch interconnects individual nodes and
    controls access to media
  • Switching usually avoids contention and allows
    connections to use entire bandwidth
  • Other advantages include
  • Fairer than contention-based technology
  • Permits multiple simultaneous conversations
  • Supports centralized management
  • Disadvantage include
  • Higher cost
  • Failure of switch brings down network

89
Token Passing
  • Token passes sequentially from one computer to
    next
  • Only computer with token can send data, as seen
    in Figure 6-12
  • Advantages and disadvantages
  • Prevents collisions
  • Provides all computers equal access to media
  • Computer must wait for token to transmit, even if
    no other computer wants to transmit
  • Complicated process requires more expensive
    equipment

90
Communication in a Token-Passing Network
91
Demand Priority
  • Used only by 100VG-AnyLAN 100 Mbps Ethernet
    standard (IEEE 802.12)
  • Runs on star bus topology, as seen in Figure 6-13
  • Intelligent hubs control access to network
  • Computer sends hub demand signal when it wants to
    transmit
  • Advantages and disadvantages
  • Allows certain computers to have higher
    priorities
  • Eliminates extraneous traffic by not broadcasting
    packets but sending them to each computer
  • Price is major disadvantage

92
Demand Priority Uses Star Bus Topology
93
Polling
  • One of oldest access methods
  • Central controller, called primary device, asks
    each computer or secondary device if it has data
    to send, as seen in Figure 6-14
  • Advantages and disadvantages
  • Allows all computers equal access to channel
  • Can grant priority for some computers
  • Does not make efficient use of media
  • If primary device fails, network fails

94
Primary Device Controls Polling
95
Choosing an Access Method
  • Network topology is biggest factor in choosing
    access method
  • Ring topology usually uses token-passing
  • Switching can emulate all common topologies
Write a Comment
User Comments (0)
About PowerShow.com