First, why data exchange

  • Switches are derived from the need for communication between multiple hosts. And the remote multiple hosts, can not use the same switch, so it is necessary to exchange network between multiple switches, to achieve the exchange between multiple hosts.

Second, circuit switching

3. Message exchange

  • Packet: indicates the total information sent by the source application. (That is, if a message is to be sent, the message is composed of some fields, and the message is not cut.)
  • The path for sending packets is uncertain. The path of the switch device is determined based on the current situation.

1. The advantages

  • No connection required
  • Storage and forwarding, dynamic allocation of lines
  • High line reliability. Even if one road is out of use, it can be detoured.
  • High line utilization. It is not only open for two machines, but can be used by multiple machines without worrying about being idle.
  • Multi-objective service

2. The shortcomings

  • There is storage latency. If it is not the paper’s turn, the paper is waiting.
  • The size of packets varies, requiring large cache space on network nodes.

4. Packet switching

  • Grouping: Dividing large data blocks into smaller data blocks.

1. The advantages

  • No connection required
  • Storage and forwarding, dynamic allocation of lines
  • High line reliability
  • High line utilization
  • Compared with packet switching, storage management is easier. Because it’s already broken up into smaller chunks.

2. The shortcomings

  • There is storage latency.
  • Additional information needs to be transmitted. For example, the group number.
  • If the order is out of order to the destination host, the group must be sorted and reassembled.

3. Compare packet switching and packet switching

  • Message switching: serial
  • Packet switching: parallel

4. Compare the three ways

5. Data exchange mode

1. The datagram

  • No connection: The transmission path is not determined for packet transmission in advance. Each packet determines the transmission path independently. Different packets may have different transmission paths.
  • Each packet carries the source address and destination address
  • The router forwards packets according to their destination addresses. Build forwarding table based on routing protocol/algorithm; Retrieval referral; Each group selects routes independently.

2. The virtual circuit

  • Combine datagram mode and circuit switching mode, give full play to the advantages of both.
  • Virtual circuit: first establish a connection, determine a good path. All subsequent datagrams that are sent follow this path (the virtual circuit).

3. Difference between datagram and virtual circuit

  • It should support UDP and TCP, respectively