1 / 42

Data and Computer Communications

Data and Computer Communications. Chapter 10 Packet Switching. Basic Operation. Data transmitted in small packets Longer messages split into series of packets Each packet contains a portion of user data plus some control info Control info Routing (addressing) info

bob
Download Presentation

Data and Computer Communications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data and Computer Communications Chapter 10 Packet Switching

  2. Basic Operation • Data transmitted in small packets • Longer messages split into series of packets • Each packet contains a portion of user data plus some control info • Control info • Routing (addressing) info • Packets are received, stored briefly (buffered) and past on to the next node • Store and forward operation

  3. Use of Packets

  4. Advantages • Line efficiency • Single node to node link can be shared by many packets over time • Packets queued and transmitted as fast as possible • Data rate conversion • Each station connects to the local node at its own speed • Nodes buffer data if required to equalize rates • Packets are accepted even when network is busy • But delivery may slow down • Priorities can be used

  5. Switching Technique • Station breaks long message into packets • Packets sent one at a time to the network • Packets handled in two ways • Datagram • Virtual circuit

  6. Datagram • Each packet treated independently • Packets can take any practical route • Packets may arrive out of order • Packets may go missing • Up to receiver to re-order packets and recover missing packets

  7. Virtual Circuit • Preplanned route established before any packets sent • Call request and call accept packets establish connection (handshaking) [Similar to circuit switching except that it is done with packets rather than signals] • Each packet contains a virtual circuit identifier instead of destination address • No routing decisions required for individual packets • Clear request packet is used to drop circuit • Not a dedicated path (unlike circuit switching, the path may be shared)

  8. Virtual Circuits versus Datagram • Virtual circuits • Network can provide sequencing and error control • Packets are forwarded more quickly • No routing decisions to make • Less reliable • Loss of a node looses all circuits through that node • Datagram • No call setup phase • Better if few packets • More flexible • Routing can be used to avoid congested parts of the network

  9. Effect of Packet Size on Transmission Time Small packet size decreases total transmission time; but, there is a limit to this approach because of the header. Here, d is larger than c. So, transmission time starts to increase again as a function of header to data ratio.

  10. Circuit v Packet Switching • Performance; 3 types of delay may affect performance: • Propagation delay: Time for a signal to propagate from one node to another (mostly negligible) • Transmission time: Time for a transmitter to transmit a block of data • Node delay: Node's data processing time (delay)

  11. Event Timing

  12. External and Internal Operation • One of the most important characteristics of a packet switching network is whether it uses datagrams or virtual circuits. There are 2 dimensions of this characteristic; one for the interface between station and it corresponding network node (external), and the other for the network itself (internal). • Interface between station and network node • Connection oriented [External Virtual Circuit Service] • Station requests logical connection (virtual circuit) • All packets identified as belonging to that connection & sequentially numbered • Network delivers packets in sequence • External virtual circuit service • e.g. X.25 • Different from internal virtual circuit operation • Connectionless [External Datagram Service] • Packets handled independently • External datagram service • Different from internal datagram operation

  13. Possible Combinations (1) • External virtual circuit, internal virtual circuit • Dedicated route through network • External virtual circuit, internal datagram • Network handles each packet separately • Different packets for the same external virtual circuit may take different internal routes • Network buffers at destination node for re-ordering

  14. Combinations (2) • External datagram, internal datagram • Packets treated independently by both network and user • External datagram, internal virtual circuit • External user does not see any connections • External user sends one packet at a time • Network sets up logical connections

  15. External Virtual Circuit andDatagram Operation

  16. InternalVirtualCircuit andDatagram Operation

  17. Routing • Complex, crucial aspect of packet switched networks • Characteristics required • Correctness • Simplicity • Robustness • Stability • Fairness • Optimality • Efficiency

  18. Performance Criteria • Used for selection of route and based on: • Minimum hop or: • Least cost • See Stallings appendix 10A for routing algorithms

  19. Decision Time and Place • 2 key characteristics concerned with routing decisions are: • Decision Time • Packet or virtual circuit basis meaning decision is made when packet is sent (datagram approach), or when virtual circuit is set up • Decision Place • Distributed • Decision made by each node • Centralized • Decision made by a central network node • Source • Decision made by source

  20. Network Information Source and Update Timing • Routing decisions are usually (not not always) based on knowledge of network • Distributed routing • Nodes use local knowledge • May collect info from adjacent nodes • May collect info from all nodes on a potential route • Central routing • Collect info from all nodes • Update timing • When is network info held by nodes, updated? • Fixed - never updated • Adaptive - regular updates

  21. Routing Strategies • Fixed • Flooding • Random • Adaptive

  22. Fixed Routing • Single permanent route for each source to destination pair • Determine routes using a least cost algorithm (appendix 10A) • Route fixed, at least until a change in network topology happens

  23. Fixed RoutingTables For each source-destination pair, the routing table shows the next node on the route.

  24. Flooding • No network info required • Packet sent by node to every neighbor • Incoming packets retransmitted on every link except incoming link • Eventually a number of copies will arrive at destination • Each packet is uniquely numbered so duplicates can be discarded • Nodes can remember packets already forwarded to keep network load in bounds • Can include a hop count in packets • Hop count is set to a maximum value. When packet passes a node, it decrements the count. Packet is discarded if the count reaches zero before reaching its destination

  25. Flooding Example

  26. Properties of Flooding • All possible routes are tried • Very robust • At least one packet will have taken minimum hop count route • Can be used to set up virtual circuit • All nodes are visited • Useful to distribute information (e.g. routing)

  27. Random Routing • Node selects one outgoing path for retransmission of incoming packet • Selection can be random or round robin • Can select outgoing path based on probability calculation • No network info needed • Route is typically neither least cost nor minimum hop

  28. Adaptive Routing • Used by almost all packet switching networks • Routing decisions change as conditions on the network change • Failure • Congestion • Requires info about network • Decisions are more complex • The tradeoff here is between quality of network info and overhead associated with the time involved in gathering the information, etc.

  29. Adaptive Routing - Advantages • Improved performance • Aids in congestion control (covered in chapter 12)

  30. X.25 • Originally approved in 1976 • Specifies interface between host and packet switched network • Almost universal on packet switched networks and packet switching in ISDN • Defines three layers • Physical • Link • Packet

  31. X.25 - Physical Layer • Specifies interface between attached station and link to node • Data terminal equipment DTE (user equipment) • Data circuit terminating equipment DCE (node) • Uses physical layer specification X.21, but often other standards such as RS232 are used instead • Provides for a reliable transfer across physical link by transmitting the data as a sequence of frames

  32. X.25 - Link Layer • Uses Link Access Protocol Balanced (LAPB) • Subset of HDLC • see LAPB frame structure (chapter 7 page 222) and User Data and X.25 Control Information (chapter 10 page 331)

  33. X.25 - Packet • Provides external virtual circuit service which enables logical connections (virtual circuits) between subscribers

  34. X.25 Use of Virtual Circuits

  35. Virtual Circuit Service • Provides for 2 types of virtual circuits: • Virtual Call • Dynamically established virtual circuits using a call setup and call clearing procedure • Permanent virtual circuit • Fixed network assigned virtual circuit; data transfer happens same way as virtual calls, but no call setup and clearing is required.

  36. Virtual Call · See figure 10.16 and explanations on pages 331-333 · Left side shows the packets exchanged between user machine A and the packet switching node to which it is attached

  37. Packet Format (see Page 333)

  38. Multiplexing • Most important service provided by X.25 • Packets contain a 12 bit virtual circuit number • DTE is allowed to establish up to 4095 (212-1) simultaneous virtual circuits with other DTEs over a single DTC-DCE link • Number zero is reserved for diagnostic packets common to all virtual circuits • The rest of the numbers are assigned by the DCE or DTE depending on which one is initiating the virtual circuit call

  39. Virtual Circuit Numbering Used when address overflow from top or bottom happens

  40. Flow and Error Control • Like HDLC (Chapter 7) using sliding window protocol [3 bit, 7 bit, or 15 bit sequence numbers] with: • P(S)=Send sequence number and • P(R)=Receive sequence number [number of next packet expected from the other side] • Acknowledgement has either local or end-to-end significance. • When D bit=0, acknowledgement is exercises between DTE and the network. • When D bit=1, acknowledgement is exercises between DTE and the remote DTE • The error control scheme is Go-Back-N ARQ

  41. Packet Sequences • X.25 provides the capacity to identify an adjacent sequence of data packets, which is called a complete packet sequence • This allows the network to form longer blocks of data sent across network with smaller packet size without loss of block integrity • To specify this mechanism, X.25 defines 2 types of packets: • A packets • M bit 1 (means there are additional complete packets to follow), D bit 0 • B packets • The rest (all other packets) • In a complete packet sequence, there are zero or more A packets followed by a B packet. The network may combine or break down this sequence to make larger or smaller packets for transmission. • See figure 10.19

  42. Reset and Restart • Two methods that X.25 uses to recover from errors are: • Reset • Reinitialize virtual circuit • Sequence numbers set to zero • Packets in transit lost • Up to higher level protocol to recover lost packets • Triggered by loss of packet, sequence number error, congestion, loss of network internal virtual circuit • Restart • Equivalent to a clear request on all virtual circuits • E.g. temporary loss of network access

More Related