Principles of Computer Networks (Xie Xiren Eighth Edition) Detailed Explanation of Exercises in Chapter 3

3-01 What is the difference between a data link and a link? What is the difference between "the circuit is connected" and "the data link is connected"?

A link is a physical line from one node to another. And there are no other switching nodes in the middle. When communicating data, the communication path between two computers traverses many such links.

When it is necessary to transmit data on a link, in addition to a physical line, there must be some necessary communication protocols to control the transmission of these data. If the hardware and software implementing these protocols are added to the link, a data link is formed.

3-02 What functions does link control in the data link layer include? Discuss the advantages and disadvantages of making the data link layer a reliable link layer.

Link control includes: encapsulation into frames; transparent transmission; error detection.

If the data link layer is made into a reliable link layer, it means that every link in the entire communication path from the source host to the destination host is reliable. The advantage of this is that if an error occurs at a certain node in the transmission process, the error can be corrected through data link retransmission in time; if the data link layer is made unreliable, then when a certain node in the network When the node finds that the received frame has an error, it just discards the frame and does not notify the sending node to retransmit the errored frame. Only when the host's high-level protocol (such as the TCP protocol) finds this error, will the source host retransmit the errored frame. But at this time, it is relatively late, and more data may have to be retransmitted. Some waste of network resources.

However, if the high-level protocol uses the unreliable transmission protocol UDP, UDP does not require retransmission of erroneous data. In some cases, it will not bring more benefits (such as real-time voice and video calls). It is inappropriate to compromise reliability and sacrifice real-time performance.

3-03 What is the function of the network adapter? At which layer do network adapters work?

The adapter is also called a network card. The adapter and the local area network are transmitted serially through a cable or twisted pair, while the data is transmitted in parallel between the adapter and the IO on the computer motherboard. Therefore, an important function of the adapter is to convert data between serial and parallel. In addition to the initial, the adapter also has the ability to implement the Ethernet protocol. When the adapter receives and sends various data frames, it will not notify the computer. If the received frame is an error frame, it will be discarded directly and will not notify the computer. Only when the correct frame is received, it will use the interrupt to notify the computer to process. .

3-04 Why must the three basic problems of the data link layer (encapsulation into frames, transparent transmission, and error detection) be solved?

Encapsulation into a frame is to add a header and a tail before and after a piece of data, thus forming a frame. After receiving the bit stream submitted by the physical layer, the receiving end can identify the start and end of the frame from the received bit stream according to the header and tail marks.

Transparent transmission refers to the data handed over by the upper layer, no matter what kind of bit combination it is, it must be able to be transmitted correctly. Since the start and end markers of the frame use specially designated control characters. Therefore, any combination of bits in the transmitted data must not allow the control character of a specific frame delimiter to appear, otherwise it will cause a frame delimiter error.

If there is no error detection in the data link layer, when the destination host receives the data frame sent by other hosts, after handing it over to the upper-layer application, the data of the upper-layer application must be guaranteed to be correct. If the data is found to be wrong, the destination host can be requested to retransmit the data. Doing so can achieve the purpose of receiving data correctly. But this way of working has a big disadvantage, that is, some wrong data appears in the transmission process. If the link layer has the function of error detection, the wrong frame can be discarded directly. It will not be sent in the future. Otherwise the frame has to be sent all over the network.

3-05 If encapsulation and framing are not performed at the data link layer, what problems will occur?

If the encapsulation into frames is not performed at the data link layer, after receiving some data, the data link layer cannot know which of the data transmitted by the other party is data and which is control information, or even whether there is an error in the data. Clear (since framing error detection is not possible). The data link layer does not know whether the data transmission is over, so it does not know when to hand over the received data to the upper layer.

3-06 What are the main features of the PPP agreement? Why doesn't PPP use frame numbers? What situations does PPP apply to? Why can't the PPP protocol make the data link layer realize reliable transmission?

  1. The simple PPP protocol is very simple. Every time the receiver receives a frame, it performs a CRC cycle check. If the CRC check is correct, it accepts the frame, otherwise it discards the frame.
  2. Encapsulation into frames: The PPP protocol specifies special characters as frame delimiters, so that the receiver can accurately find out the start and end positions of the frame from the received bit stream.
  3. Transparency: The PPP protocol can ensure the transparency of data transmission. If the same bit combination as the frame delimiter appears in the data, the PPP protocol provides a series of measures to solve this problem.
  4. Support multiple network layer protocols: PPP protocol supports the operation of multiple network layer protocols on the same link. When the point-to-point link is connected to a LAN or a router, the PPP protocol must be able to support various network layer protocols running on the LAN or router connected to the link at the same time.
  5. Support for various types of links: PPP can run on various types of links. For example, serial (send only one bit at a time) or parallel (send multiple bits in parallel at a time), synchronous or asynchronous, low-speed or high-speed point-to-point links.

PPP does not use frame numbering, because frame numbering is for efficient retransmission in case of errors, and PPP does not require reliable transmission.

The PPP protocol is suitable for the case where the line quality is not too bad. If the communication quality is too bad, transmission errors will occur frequently, but PPP has no numbering and confirmation mechanism, so it must rely on the upper layer protocol to ensure the correctness of data transmission. This reduces the efficiency of data transmission.

3-07 The data to be sent is 1101011011. The generator polynomial using CRC is P(X)=X4+X+1. Find the remainder that should be added after. The last 1 of the data becomes 0 during the transmission process, can the receiving end find it? If the last two 1s of the data become 0 during the transmission process, can the receiving end find it? After adopting the CRC check, is the transmission of the data link layer a reliable transmission?

Solution: Use CRC generator polynomial P(X)=X4+X+1, the divisor is P=10011 in binary representation, now the divisor is 5 bits. Therefore, it is necessary to add 4 0s after the dividend 1101011011 (the highest divisor is 4), and then perform the modulo 2 operation :

 Now the last 1 of the data becomes 0 during the transmission process, that is, 1101011010, and then the frame check sequence 1110 is connected to the data 110111010, and the next step is to perform the CRC check:

 

It is obtained that the remainder is 0011 but not 0, so it is judged that the received data has an error. A CRC check can detect this error.

If the last two 1s become 0 during the data transmission process, that is, 1101011000, add the true check sequence 1110 to the back of 1101011000, and perform CRC check:

 

Now the remainder R is 0101 but not 0, so it can be judged that the received data has an error.

After the CRC check is adopted, the transmission of the data link layer does not become a reliable transmission. When the receiver performs the CRC check, if an error is found, the frame is discarded. The data link layer cannot guarantee that what the receiver receives is exactly the same as what was sent.

3-08 The data to be sent is 101110. Using the CRC generator polynomial P(X)=X3+1, try to find the remainder that should be added later.

Solution: The generator polynomial of CRC is P(X)=X3+1, so the divisor expressed in binary is P=1001, add 3 0s after the data to be sent, and the remainder should be 3 bits. Perform CRC operation:

 

The resulting remainder R is 011.

3-09 The data part of a PPP frame (written in hexadecimal) is 7D 5E FE 27 7D 5D 7D 5D 65 7D 5E, what is the real data?

Solution: Underline the 2-byte sequence starting with the escape character 7D:

Escape the original 7D 5E to 7E, and convert the original 7D 5D to 7D, so the real data part is: 7E FE 27 7D 7D 65 7E

3-10 The PPP protocol uses synchronous transmission technology to transmit the bit string 0110 1111 1111 1100. What kind of bit string becomes after filling with 0 bits? If the data part of the PPP frame received by the receiving end is 0001 1101 1111 0111 1101 10, What kind of bit string becomes after deleting the 0 bit added by the sender?

Solution: The first bit string 0110 1111 1111 1100, 0-bit padding means that a 0 must be inserted after five consecutive 1s. After 0-bit padding, it becomes 0110 1111
1(0)11 111(0) 00 with parentheses The 0's are padding.
Another bit string is 0001 1101 1111 0111 1101 10: Delete the 0 bit added by the sender (the first 0 after 5 consecutive 1s is deleted), and become 0001 1101 1111-1111 1-110 (- means that 0 is deleted )

3-11 respectively discusses under what conditions the following situations are transparent transmission and under what conditions it is not transparent transmission.

  1. Ordinary phone service.
  2. Internet-delivered e-mail service

Solution: Due to the limited bandwidth and distortion of the telephone system, ordinary telephone communication is not transparently transmitted.
Email is transmitted transparently.

3-12 What are the working states of the PPP agreement? When the user wants to use the PPP protocol to establish a connection with the ISP for communication, what types of connections need to be established? What problem does each connection solve?

Solution: There are 6 working states of the PPP protocol, and the relationship between these state diagrams is shown in the figure:

 

When the user wants to use the ISP of the PPP protocol to establish a connection for communication, two kinds of connections need to be established.
The first type of connection is a physical layer connection, the process from "link static" to "connection establishment" in the above figure. We know that only when a physical connection is established can the data link layer establish a connection.

The second layer connection is a data link layer connection, that is, to establish an LCP link . At this time, the user PC sends a series of LCP packets (encapsulated into multiple PPP frames) to the ISP to establish an LCP connection. At this time, the LCP starts to negotiate some Configuration options. After the negotiation, the two parties establish an LCP connection, and then enter the authentication state. The PC sends the identity identifier and password (the system allows the user to retry several times). If the authentication is successful, it enters the "network layer protocol" state , the network control layer protocol NCP at both ends of the PPP link exchanges network-layer-specific packets with each other according to different protocols of the network layer. If the IP protocol is running on the PPP link, configure an IP protocol module for each end of the PPP link (such as assigning an IP address), it is necessary to use the protocol that supports IP in the NCP - the IP control protocol IPCP. IPCP packets are also encapsulated into PPP frames. When running on low-speed links, the two parties can also negotiate to use compressed TCP and IP headers to reduce the number of bits sent on the link.

When the network is configured, the link enters a "link-up state" where communication can take place. The two PPP endpoints of the link can send packets to each other.

What is the main characteristic of 3-13 local area network? Why do LANs use broadcast communication but not WANs?

Solution: The most important feature of LAN is that it is owned by one unit, and the geographical scope and the number of sites are limited. It is very simple and convenient to use broadcast communication, but the wide area network has a large range. If broadcast communication is used, it will inevitably cause a great waste of communication resources. Therefore, the wide area network does not use broadcast communication.

3-14 What types of common LAN network topology? Which architecture is most popular now?

Solution: Common LAN network topologies are: star network, ring network (typical token ring network) and bus network. Now the most popular is the star network.

3-15 What is traditional Ethernet? What are the two standards for Ethernet?

Solution: The traditional Ethernet is the earliest popular Ethernet with a rate of 10Mbit/s.
Ethernet has two standards, namely DIX Ethernet V2 standard and IEEE 802.3 standard.

3-16 What is the symbol transmission rate of Ethernet with a data rate of 10Mbit/s on the medium in the house/second?

untie:

 

For Ethernet with a data rate of 10Mbit/s, before Manchester encoding, the baseband signal sends 10x106106 symbols per second, but after Manchester encoding, each symbol of the original signal source becomes two symbols, so , the last symbol sent to the line through the network adapter is 20x106106 symbols per second, that is, the rate is 20 trillion symbols per second.

3-17 Why is the standard for the LLC sub-layer has been developed but is rarely used now?

Solution: The LLC sublayer used to flow in the token ring network, token bus network, etc. in the past, but these have disappeared in the market, and now the IP data packets are directly placed in the Ethernet, as the data of the Ethernet part.

3-19 Try to explain the meaning of each field in 10BASE-T.

Solution: 10 means that the Ethernet rate is 10Mbit/s, and BASE means that the signal on the connecting line is a baseband signal. T stands for twisted pair.

3-20 Assume that the 1km-long CSMA/CD network uses a data rate of 1GBit/s, and assume that the signal propagation rate on the network is 200,000km/s, and find the shortest frame length that can use this protocol.

Solution: The end-to-end propagation delay of a 1km long CSMA/CD network ττ=(1km)/(200000km/s)=5μμs
2ττ=10μμs, during which (1Gbit/s)(10μμs)=10000bit is to be sent. Only after such a period of time can the collision information be received (if a collision occurs), so the shortest frame length is 10000bit, that is, 1250 bytes (10000/8).

3-21 What is bit time? What are the benefits of using this time unit? How many microseconds is 100 bit times?

Solution: Bit time refers to the time required to send 1 bit, regardless of the data rate, the benefit is convenience. To convert "bit time" to "seconds" or "microseconds", you must first know what the data rate is.

3-22 Assume that in the 10Mbit/s Ethernet using the CSMA/CD protocol, a certain station detects a collision when sending data, and chooses the random number r=100 when executing the backoff algorithm. How long does this station need to wait before sending data again? What about 100Mbit/s Ethernet?

Solution: For 10Mbit/s Ethernet, the contention period is 512 bit times, and now r=100, so the backoff time is 512*100=51200 bit times, namely: 51200X10=5120μμs. For 100Mbit/s Ethernet, the contention period is still 512 bit times. The backoff time is still 51200 bit times, ie 51200/100=512μμs.

Is the utilization rate of 3-23 Ethernet unrelated to the number of sites connected to a network?

Solution: The utilization rate of Ethernet is related to the number of stations connected to a network.

3-24 Assume that site A and site B are on the same 10Mbit/s Ethernet network segment. The propagation delay between these two stations is 225 bit times. Now assume that A starts sending a frame and also sends a frame before A finishes sending. If A sends the shortest frame allowed by Ethernet, can A send its own data before detecting a collision with B?

Solution: as shown in the figure

 

When t=0, start sending, and the shortest frame length sent by A is 64 bytes=512 bits. In fact, there are 8 bytes (64bit) of preamble and frame start delimiter transmitted on the channel. So t=512+64=576bit time. After A should be sent, after the propagation time, that is, t=225 bit time, B detects the signal of A, as shown in the figure:

Therefore, B will not send data after t=225 bit time. Conversely, if B sends data at or before t=224 bit time, it will definitely collide with the data sent by A. The first bit sent by B at t=224 bit time will arrive at A at t=224+256=449 bit time, so A obviously has not finished sending before detecting a collision with the data sent by B, (449<576 ). When A does not detect a collision before it finishes sending (t=576 bit time), it means that the frame sent by A will not collide with the frame sent by B.

3-25 Station A and station B in the above question sent data frames at the same time at t=0. When t=225 bit time, both A and B detect that a collision has occurred. And the transmission of the interference signal is completed at t=225+48 bit time. A and B have selected different r value backoffs in the CSMA/CD algorithm. Assuming that the random number decibels selected by A and B are rA=0 and rB=1, when will A and B start retransmitting data frames? When does the data frame retransmitted by A arrive at B? Will the data retransmitted by A collide with the data retransmitted by B again? Will B stop generating data at the scheduled retransmission time?

Solution: As shown in the figure below:

At t=0, A and B start sending data.
At t = 225 bit times, both A and B detect a collision.
t=273 bit time, A and B end the transmission of the interference signal. A and B execute the backoff algorithm immediately.
Because rA=0, rB=1, so A detects the channel immediately, and B can detect the channel after a delay of 512 bits.
That is to say, A starts to detect the channel at t=273 bit time, but B does not detect the channel until t=785 bit time.

When t=273+225=498 bit time, the last bit in B’s infection signal arrives at A: A detects that the channel is idle, but A cannot generate data immediately, and must wait for 96 bit time to generate data (minimum of Ethernet interval is 96 bit times). In this way, when t=498+96=594bit time, A starts to send data.

Let's see when B can send data. When t=273+512=785 bit time (B counts from 273 bit time, after a contention period of 512 bit time), check the channel again, if it is idle, then B is after the 96bit event, that is, t=785+96 = 881 bit times to send data. Please note that only when B detects that the channel is idle during 785-881 bit time, B sends data at 881 bit time.

When t=594+225=819bit time, the data sent by A at 594bit time reaches B. It can be seen that counting from the 785bit time, only 34bit time has passed, and B detects that the channel is busy. So B does not send data for 881 bit times.

3-26 There are only two stations on the Ethernet, and they send data at the same time, resulting in a collision. Then the retransmission is performed according to the stage binary exponential backoff algorithm. The number of retransmissions is recorded as i, i=1,2,3.... Try to calculate the probability that the first retransmission fails, the probability that the second retransmission fails, and the probability that the third retransmission fails. and the average number of retransmissions l before a station successfully sends data.

Solution: Let the i-th retransmission failure probability be Pi, obviously: Pi=(0.5)^k, k=min(i,10).
The probability that the first retransmission fails is P1=0.5.
The probability of the second retransmission failure is P2=0.50.5^2=0.25.
The probability of the third retransmission failure is P2=0.50.5^3=0.125.

P[Successful i-th transmission]=P[1st transmission failure]xP[2nd transmission failure]x...xP[i-1th transmission failure]xP[i-th transmission success] p[
transmission 1 successful]=0.5
p[2 successful transmissions]=P[1 failed transmission]x[2 successful transmissions]=p[1 failed transmission]x(1-[2 failed transmissions])=0.5x0 .75=0.375
P[Transmission 3 times successful]=P[Transmission 1 time failed]xP[Transmission 2 times failed]xP[Transmission 3 times successful]=p[Transmission 1 time failed]xp[Transmission 1 time failed]x( 1-[3 failed transmissions])=0.5x0.25x0.875=0.1094.

Find the statistical average of {p[successful transmission i times]}, and get: average number of retransmissions=1x(0.5)+2x(0.375)+3x(0.1094)+...≈≈1.64

3-27 There are 10 stations connected to the Ethernet, try to calculate the bandwidth that each station can get in the following three situations.

  1. All 10 stations are connected to a 10Mbit/s Ethernet hub.
  2. All 10 stations are connected to a 100Mbit/s Ethernet hub.
  3. 10 stations are connected to a 10Mbit/s Ethernet switchboard.

Solution: The bandwidth that each site can get is as follows:

  1. Assuming that the utilization rate of the Ethernet basically reaches 100%, then 10 stations share 10Mbit/s, that is, each station can obtain a bandwidth of 1Mbit/s on average.
  2. Assuming that the utilization rate of the Ethernet basically reaches 100%, then 10 stations share 10Mbit/s, that is, each station can obtain a bandwidth of 10Mbit/s on average.
  3. Each station monopolizes the bandwidth 10Mbit/s of an interface of the switch.

3-29 What are the characteristics of Ethernet switching? How to use it to form a virtual local area network?

Solution: The Ethernet switch is essentially a multi-interface bridge. Each interface of the Ethernet is directly connected to a single host or another hub, and generally works in full-duplex mode. When the host needs to communicate, the switch can connect many pairs of interfaces at the same time, so that each pair of hosts that communicate with each other can transmit data without collision as if they exclusively use the transmission medium. The frame forwarding table inside the Ethernet is also automatically and gradually established through a self-learning algorithm. When the communication between the two stations is completed, the connection is disconnected. Since a special switching structure chip is used inside, the switching rate is relatively high.

 

 

A virtual local area network (VLAN) is a logical group composed of some iLAN network segments, which has nothing to do with physical locations, and these network segments have certain common requirements. Each VLAN frame has a clear identifier, indicating which VLAN the workstation sending the frame belongs to. In 1998, the IEEE approved the 802.3ac standard, which defines the extension of the Ethernet frame format to support virtual local area networks. The virtual local area network protocol allows the Ethernet frame format to insert a 4-byte identifier, called a VLAN tag, which is used to indicate which virtual local area network the workstation sending the frame belongs to. If the original Ethernet frame format is still used, obviously it cannot Divide virtual local area networks.

3-30 In Figure T-3-30, the Ethernet switch of a certain college has three interfaces, which are respectively connected to the Ethernets of the three departments of the college, and the other three interfaces are respectively connected to the email server, the World Wide Web server, and the network connected to the Internet. The router is connected. A, B, and C in the picture are all 100Mbit/s Ethernet switches. It is assumed that the aluminum plating of all links is 100Mbit/s, and any of the 9 hosts in the picture can communicate with any server or host . Try to calculate the maximum total throughput generated by 9 hosts and 2 servers. Why?

 

Solution: The total throughput of the 9 hosts and the two servers here is 900+200=1100Mbit/s.

3-31 Assuming that the complaints of all links in the above figure are still 100Mbit/s, but the Ethernet switches of the three series are all replaced with 100Mbit/s hubs, try to calculate the total output generated by these 9 hosts and two servers the maximum throughput. Why?

Solution: The maximum throughput is 100x3+200=500Mbit/s.

3-32 Assuming that the rate of all links in the above figure is still 100Mbit/s, but all Ethernet switches are replaced with 100Mbit/s hubs, try to calculate the total throughput generated by these 9 hosts and two servers maximum value. Why?

Solution: Now the whole system is a collision domain, so the maximum throughput is 100Mbit/s.

3-33 In Figure T-3-33, the Ethernet switch has 6 interfaces, which are respectively connected to 5 hosts and a router.

 In the "Action" column in the table below, it is indicated that 4 frames were sent successively. Assume that at the beginning, the switching table of the Aiwang switch is empty. It is to complete all the other columns in the form.

 

3-35 Assume that 80% of the communication traffic on one Ethernet is carried out on the local area network, and the remaining 20% ​​of the communication traffic is carried out between the local area network and the Internet, and the situation of the other Ethernet is reversed . One of the two Ethernets uses an Ethernet hub and the other uses an Ethernet switch. In which network do you think Ethernet switches should be used?

Solution: The most important feature of using a hub is that this LAN is still logically a bus network, and each host on the LAN shares a logical bus, and the CSMA/CD protocol is used (to be exact, each host The adapter on the network implements the CSSMA/CD protocol), the hosts in the network must compete for the control of the transmission medium, and only one host is allowed to send data at the same time.

The most important feature of Ethernet switching is that each interface of the switch is directly connected to a single host or another hub, and generally works in full-duplex mode. When the host communicates, the switch can connect many pairs of interfaces at the same time, so that each pair of hosts that communicate with each other can transmit data without collision as if they monopolize the communication medium.

It is assumed that 80% of the traffic on the Ethernet E1 is carried out on the local area network, and the remaining 20% ​​is carried out between the local area network and the Internet. . Assume that 20% of the communication traffic on the Ethernet E2 is carried out on the local area network, while the remaining 80% are carried out on the local area network and the Internet.

The performance of the switch is obviously due to the performance of the hub. So, which Ethernet (E1 or E2) should use the switch?

If the administrator of the Ethernet thinks that it is the most important to ensure that the hosts on the LAN communicate with each other, then the switch should be installed on the Ethernet E1. This can ensure that multiple pairs of hosts on the LAN communicate at the same time. On the contrary, if the hub is installed on the Ethernet E1, then at the same time, only one pair of hosts can communicate on the LAN.

If the administrator of the Ethernet thinks that it is most important to ensure that the hosts residing on the network can access the Internet, then the switch should be installed on the Ethernet E2, but it should be noted that the hosts residing on the network must access the Internet. First, it must go through the router on the local area network. If there is only one router on the Ethernet E2, only one host can access the Internet through this router at the same time, and other hosts on the network can no longer connect to this router, unless there are several routers on this LAN, and through these Both routers are able to connect to the internet. Please note that on an Ethernet using a hub, no matter how many routers there are on the LAN, only one host can be connected to a certain router at a time.

3-36 What is the working principle and characteristics of the bridge? What are the similarities and differences between bridge transponders and Ethernet switches?

Solution: The bridge works at the data link layer, and it forwards and filters the received frames according to the destination address of the MAC frame. When a bridge receives a frame, it does not forward the frame to all interfaces, but first checks the destination MAC address of the frame, and then determines which interface to forward the frame to. Or to drop it (i.e. filter), the bridge relies on the forwarding table to forward the frame.

Using a bridge provides the following benefits:

  1. Filter traffic to increase throughput.
  2. The physical range is increased and therefore the number of workstations on the overall Ethernet network is also increased.
  3. The reliability is improved. When the network fails, generally only individual network segments are affected.
  4. It can interconnect different physical layers, different MAC sublayers and Ethernets of different speeds (such as 10 Mbit/s and 100 Mbit/s Ethernet).

Of course, bridges also have some disadvantages, such as:

  1. Because the bridge needs to store and search the forwarding table for the received frame before forwarding, and before forwarding, it must also execute the CSMA/CD algorithm, which increases the delay.
  2. There is no flow control function in the MAC sublayer. When the load on the network is heavy, the buffer space in the bridge may not be enough and overflow occurs, resulting in frame loss.
  3. Bridges are only suitable for LANs with a small number of users (no more than a few hundred) and low traffic. Otherwise, sometimes network congestion will occur due to the broadcast information spreading too fast, which is the so-called broadcast storm.

The biggest difference between a bridge and a forwarder is the difference in the working level. The bridge works at the data link layer, and it forwards and filters the received frames according to the destination address of the MAC address. The transponder works at the physical layer and is used to connect different network segments of the Ethernet in order to expand the coverage of the Ethernet. Is it a valid frame or an invalid frame.

An Ethernet switch is essentially a bridge with multiple interfaces, each of which is directly connected to a host or a hub (note: the interface of an ordinary bridge is often connected to a network segment of the Ethernet), and generally Work in full duplex mode.

3-37 Figure T-3-37 indicates that there are five sites connected to three LANs, but you use bridges B1 and B2 to connect them. Each bridge has two interfaces (1 and 2). At the beginning, the forwarding tables in the two bridges are empty, and then the following stations send data frames to other stations in sequence: A sends to E, C sends to B, D sends to C, B sends to A, try to fill in the relevant data in the table T-3-37-a

 

 

A->E: When B1 receives this frame, the forwarding table is empty, so add the source address A of the received frame and the transfer interface 1 where this frame arrives, namely (A,1). The destination address of the received frame is not in the forwarding table, so the frame is forwarded from interface 2 and sent to LAN2. When B2 receives this frame, it processes it according to the same steps. The frame is therefore forwarded out interface 2. Send to LAN2. When B2 receives this frame, it processes it according to the same steps. Station E on LAN3 receives this frame.

C->B: Both B1 and B2 receive this frame, because they are connected to the same LAN as C, and there is no C in the forwarding table of B1, so (C,2) is added. And forward LAN1 from interface 1, station B on LAN1 receives this frame, and there is no C in the forwarding table of B2, so (C,1) is added. And forward from interface 2 to LAN3. All stations on this LAN will discard the frame.

D->C: When B2 receives this frame, there is no D in the forwarding table. Therefore, add (D, 2) and check the forwarding table of B2. The destination address C that received this frame has this option in the forwarding table, and its interface is 1, so it is forwarded from the corresponding interface 1, and C receives the frame. to this frame. When B1 receives this frame, add (D,2) to it. Then find the destination address C. Because the forwarding interface 2 corresponding to C is the same as the interface 2 where this frame arrived, B1 will no longer forward this frame, thus discarding it.

B->A: B1 receives this frame and writes B and interface 1 into the forwarding table. Then look up the B1 forwarding table. The destination address A that received this frame has this item in the forwarding table. Its interface is 1, which is the same as the arrival interface of this frame. It no longer needs to be forwarded, so this frame is discarded, and B2 cannot receive it. For this frame, it is no longer possible to forward Western Sydney written to B in the forwarding table. It can be seen that the communication of B->A does not involve LAN2 and LAN3.

3-38 The forwarding table in the network bridge is established by learning algorithm. If some sites always receive data without sending data, is there no corresponding item in the capture table? If a data frame is to be sent to this site, can the bridge forward the data frame to the destination address correctly?

Solution: If some sites always do not send data, then there is no item corresponding to such sites in the forwarding table. If you want this site to send data frames, then the bridge can still forward the data to the destination address correctly, because the LAN has a broadcast function.

3-39 means that there are 6 stations connected to three LANs respectively, and they are connected by bridges B1 and B2. Each bridge has two interfaces (1 and 2). At the beginning, the two bridges The forwarding table is empty. Afterwards, the following stations sent data frames to other stations: B sent to A, E sent to D, C sent to E, A sent to B, F sent to E, try to fill in the relevant data in the same table T- 3-37-a.

 

 

B->A: A on LAN1 directly receives the data frame sent by B, but this frame is also received by bridge B1. B1 receives this frame and the forwarding table is empty, so add the source station address B and the arriving interface 1 (B,1). The destination station does not have it in the forwarding table, so the frame is sent out from interface 2 and sent to LAN2. When B2 on LAN2 receives this frame, follow the same steps to process it, add the source station address B and the arriving interface 1 (B,1) to the forwarding table, and then forward the frame from interface 2 to LAN2 , this frame is dropped last in LAN3.

E->D: When B2 receives this frame, there is no E in the forwarding table, so add (E, 2), and then check the forwarding table of B1. The destination address E that received this frame has an entry in the forwarding table (E ,2), but this frame is received from interface 2, so this frame cannot be forwarded to LAN2. This frame is dropped last in LAN1. B2 on LAN2 receives the frame from C on interface 1. When B2 receives this frame, it adds (C,1) and forwards this frame from interface 2 to LAN3, and this frame is finally discarded in LAN3.

C->E: B1 receives this frame, and there is no C in the forwarding table, so add (C,2), and then check the forwarding table of B1, the destination address of the received frame has this item in the forwarding table ( E, 2), but this frame is received from interface 2, so this frame cannot be forwarded to LAN2, this frame is finally discarded in LAN1, and the B2 interface on LAN2 receives the message sent by C from interface 1 Frame, when B2 receives this frame, add (C,1), and forward this frame from interface 2 to LAN3, and this frame is finally discarded in LAN3.

A->B: B on LAN1 directly receives the frame sent by A, but this frame is also received by bridge B1. When B1 receives this frame, it adds the source station address A and the arriving interface 1 to the forwarding table. (A,1). The destination station of this frame is in the relay table of B1, which is interface 1. Therefore, B1 no longer forwards the frame, just discards it, and neither LAN2 nor LAN3 will receive this frame.

F->E: When B2 receives this frame from the interface, there is no F in the forwarding table, so add (F, 2), and then check the forwarding table of B2, the destination address E of the received frame is listed in the forwarding table This item is (E,2), but this frame is received from interface 2, so it is no longer forwarded from interface 2 to LAN3. B2 discards this frame and does not forward it. Neither LAN2 nor LAN1 will receive this frame.

Guess you like

Origin blog.csdn.net/peng_lv/article/details/128070318