Which switch forwarding method




















Each port in the switch has the ability to hold frames in memory, before transmitting them onto the Ethernet cable connected to the port.

For example, if the port is already busy transmitting when a frame arrives for transmission, then the frame can be held for the short time it takes for the port to complete transmitting the previous frame. To transmit the frame, the switch places the frame into the packet switching queue for transmission on port 2.

During this process, a switch transmitting an Ethernet frame from one port to another makes no changes to the data, addresses, or other fields of the basic Ethernet frame. Using our example, the frame is transmitted intact on port 2 exactly as it was received on port 6.

Therefore, the operation of the switch is transparent to all stations on the network. Note that the switch will not forward a frame destined for a station that is in the forwarding database onto a port unless that port is connected to the target destination.

In other words, traffic destined for a device on a given port will only be sent to that port; no other ports will see the traffic intended for that device.

This switching logic keeps traffic isolated to only those Ethernet cables, or segments, needed to receive the frame from the sender and transmit that frame to the destination device. This prevents the flow of unnecessary traffic on other segments of the network system, which is a major advantage of a switch.

This is in contrast to the early Ethernet system, where traffic from any station was seen by all other stations, whether they wanted the data or not.

Switch traffic filtering reduces the traffic load carried by the set of Ethernet cables connected to the switch, thereby making more efficient use of the network bandwidth. Switches automatically age out entries in their forwarding database after a period of time—typically five minutes—if they do not see any frames from a station.

This keeps the forwarding database from growing full of stale entries that might not reflect reality. This also happens when a station is newly connected to a switch, or when a station has been powered off and is turned back on more than five minutes later.

So how does the switch handle packet forwarding for an unknown station? The solution is simple: the switch forwards the frame destined for an unknown station out all switch ports other than the one it was received on, thus flooding the frame to all other stations.

Flooding the frame guarantees that a frame with an unknown destination address will reach all network connections and be heard by the correct destination device, assuming that it is active and on the network. When the unknown device responds with return traffic, the switch will automatically learn which port the device is on, and will no longer flood traffic destined to that device. In addition to transmitting frames directed to a single address, local area networks are capable of sending frames directed to a group address, called a multicast address , which can be received by a group of stations.

They can also send frames directed to all stations, using the broadcast address. Group addresses always begin with a specific bit pattern defined in the Ethernet standard, making it possible for a switch to determine which frames are destined for a specific device rather than a group of devices.

A frame sent to a multicast destination address can be received by all stations configured to listen for that multicast address. The Ethernet interface address assigned at the factory is called a unicast address, and any given Ethernet interface can receive unicast frames and multicast frames.

In other words, the interface can be programmed to receive frames sent to one or more multicast group addresses, as well as frames sent to the unicast MAC address belonging to that interface. The broadcast address is a special multicast group: the group of all of the stations in the network.

A packet sent to the broadcast address the address of all 1s is received by every station on the LAN. This way, a broadcast packet sent by any station will reach all other stations on the LAN. Multicast traffic can be more difficult to deal with than broadcast frames. More sophisticated and usually more expensive switches include support for multicast group discovery protocols that make it possible for each station to tell the switch about the multicast group addresses that it wants to hear, so the switch will send the multicast packets only to the ports connected to stations that have indicated their interest in receiving the multicast traffic.

However, lower cost switches, with no capability to discover which ports are connected to stations listening to a given multicast address, must resort to flooding multicast packets out all ports other than the port on which the multicast traffic was received, just like broadcast packets. Stations send broadcast and multicast packets for a number of reasons. Broadcasts and multicasts are also used for dynamic address assignment, which occurs when a station is first powered on and needs to find a high-level network address.

Multicasts are also used by certain multimedia applications, which send audio and video data in multicast frames for reception by groups of stations, and by multi-user games as a way of sending data to a group of game players. Therefore, a typical network will have some level of broadcast and multicast traffic.

However, when many stations are combined by switches into a single large network, broadcast and multicast flooding by the switches can result in significant amounts of traffic. Large amounts of broadcast or multicast traffic may cause network congestion, since every device on the network is required to receive and process broadcasts and specific types of multicasts; at high enough packet rates, there could be performance issues for the stations.

Streaming applications video sending high rates of multicasts can generate intense traffic. Disk backup and disk duplication systems based on multicast can also generate lots of traffic. If this traffic ends up being flooded to all ports, the network could congest.

One way to avoid this congestion is to limit the total number of stations linked to a single network, so that the broadcast and multicast rate does not get so high as to be a problem. Yet another method is to use a router, also called a Layer 3 switch. Since a router does not automatically forward broadcasts and multicasts, this creates separate network systems. A major difficulty with this simple model of switch operation is that multiple connections between switches can create loop paths, leading to network congestion and overload.

The design and operation of Ethernet requires that only a single packet transmission path may exist between any two stations. An Ethernet grows by extending branches in a network topology called a tree structure, which consists of multiple switches branching off of a central switch. The danger is that, in a sufficiently complex network, switches with multiple inter-switch connections can create loop paths in the network.

On a network with switches connected together to form a packet forwarding loop, packets will circulate endlessly around the loop, building up to very high levels of traffic and causing an overload. The looped packets will circulate at the maximum rate of the network links, until the traffic rate gets so high that the network is saturated. Broadcast and multicast frames, as well as unicast frames to unknown destinations, are normally flooded to all ports in a basic switch, and all of this traffic will circulate in such a loop.

Once a loop is formed, this failure mode can happen very rapidly, causing the network to be fully occupied with sending broadcast, multicast, and unknown frames, and it becomes very difficult for stations to send actual traffic. Unfortunately, loops like the dotted path shown with arrows in Figure are all too easy to achieve, despite your best efforts to avoid them. As networks grow to include more switches and more wiring closets, it becomes difficult to know exactly how things are connected together and to keep people from mistakenly creating a loop path.

While the loop in the drawing is intended to be obvious, in a sufficiently complex network system it can be challenging for anyone working on the network to know whether or not the switches are connected in such a way as to create loop paths. The IEEE The purpose of the spanning tree protocol STP is to allow switches to automatically create a loop-free set of paths, even in a complex network with multiple paths connecting multiple switches.

It provides the ability to dynamically create a tree topology in a network by blocking any packet forwarding on certain ports, and ensures that a set of Ethernet switches can automatically configure themselves to produce loop-free paths. Operation of the spanning tree algorithm is based on configuration messages sent by each switch in packets called Bridge Protocol Data Units, or BPDUs.

Each BPDU packet is sent to a destination multicast address that has been assigned to spanning tree operation. All IEEE The process of creating a spanning tree begins by using the information in the BPDU configuration messages to automatically elect a root bridge. The election is based on a bridge ID BID which, in turn, is based on the combination of a configurable bridge priority value 32, by default and the unique Ethernet MAC address assigned on each bridge for use by the spanning tree process, called the system MAC.

Assuming that the bridge priority was left at the default value of 32,, then the bridge with the lowest numerical value Ethernet address will be the one elected as the root bridge. Electing the root bridge sets the stage for the rest of the operations performed by the spanning tree protocol. Once a root bridge is chosen, each non-root bridge uses that information to determine which of its ports has the least-cost path to the root bridge, then assigns that port to be the root port RP.

All other bridges determine which of their ports connected to other links has the least-cost path to the root bridge. The bridge with the least-cost path is assigned the role of designated bridge DB , and the ports on the DB are assigned as designated ports DP.

The difference between this and Store-and-Forward isthat Store-and-Forward receives the whole frame before forwarding. Since frame errors cannot be detected by reading only thedestination address, Cut-Through may impact network performance byforwarding corrupted or truncated frames. These bad frames cancreate broadcast storms wherein several devices on the networkrespond to the corrupted frames simultaneously.

Sorry we couldn't help! This switching mode is no longer widely used these days, so we only mention it for reference. A cut-through switch can make a forwarding decision as soon as it gets the destination MAC address of the frame, which means it needs only the first 6 bytes. It does not have to wait for the rest of the Ethernet frame to make its forwarding decision.

An example of this behavior is shown in Figure 3. However, more sophisticated cut-through switches today do not necessarily take this approach. They may parse an incoming frame until they have enough information from the frame content to perform all additional features. For example, if there is an Access Control List ACL configured on the interface, the switch must receive the frame up to the IP and transport-layer headers 20 bytes for IPv4 header and 20bytes for TCP header to match the information there against the interface access list.

This means a total of 54 bytes up to that point. Another example would be if there is a quality of service QoS configured or any other advanced feature. Unlike store-and-forward switching, cut-through switching does not drop invalid Ethernet frames.

They get forwarded to the next nodes until some device along the path invalidates the FCS of the frame and drops it. A primary advantage of this switching approach is that the amount of time the switch takes to start forwarding the packet referred to as the switch's latency is way lower than store-and-forward switching. Most modern switch platforms come with cut-through switching mode enabled by default. Duplex mismatch occurs when one or both ports on a link are reset, and the autonegotiation process does not result in the two link partners having the same configuration.

It also can occur when users reconfigure one side of a link and forget to reconfigure the other. Both sides of a link should have autonegotiation on, or both sides should have it off. Best practice is to configure both Ethernet switch ports as full-duplex. At one time, connections between devices required the use of either a crossover cable or a straight-through cable.

The type of cable required depended on the type of interconnecting devices. For example, Figure identifies the correct cable types required to interconnect a switch to a switch, a switch to a router, a switch to a host, or a router to a host.

A crossover cable is used for connecting like devices, and a straight-through cable is used for connecting unlike devices. Figure Cable Types. Most switch devices now support the automatic medium-dependent interface crossover auto-MDIX feature.

When this feature is enabled, the switch automatically detects the type of cable attached to the port and configures the interfaces accordingly.

However, the feature can be disabled. For this reason, you should always use the correct cable type and should not rely on the auto-MDIX feature. Auto-MDIX can be re-enabled using the mdix auto interface configuration command. I would like to receive exclusive offers and hear about products from Cisco Press and its family of brands.

I can unsubscribe at any time. Pearson Education, Inc. This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:. For inquiries and questions, we collect the inquiry or question, together with name, contact details email address, phone number and mailing address and any other additional information voluntarily submitted to us through a Contact Us form or an email.

We use this information to address the inquiry and respond to the question. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes. Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing.

Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law. If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information ciscopress. On rare occasions it is necessary to send out a strictly service related announcement.

For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature. We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site.

While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information.



0コメント

  • 1000 / 1000