13.hcna-hntd--Switching Network Fundamentals

Source: Internet
Author: User

The common Ethernet device includes hub, switch, etc., the switch works at the data link layer, it effectively isolates the collision domain of Ethernet, and greatly improves the performance of Ethernet.

Learning Goals:
1. Master the basic operating principle of the switch
2. Master the basic configuration of the switch


With the development of the enterprise network, more and more users need to access the network, the switch provides a large number of access ports to meet this demand. At the same time, the switch solves the conflict problem of early Ethernet, greatly improves the performance of Ethernet, and also improves the security of Ethernet.
The switch works at the data link layer and operates on the data frame. When a data frame is received, the switch forwards the data frame based on the header information of the data frame.
Next, we take the small switching network as an example to explain how the switch works.


There is a MAC address table in the switch that stores the mapping between the MAC address and the switch port. The MAC Address Table is also known as the cam (Content addressable Memory) table.
, there are three types of switch-to-frame forwarding operations: flood (flooding), forwarding (Forwarding), discarding (discarding).
1. Flooding: The switch forwards the frames that come in from one end to the other ports (note that "all other ports" refer to all ports except the one on which the frame enters the switch).
2. Forwarding: The switch forwards the frame that comes in from one end to another port (note that the "other port" cannot be the one on which the frame enters the switch).
3. Discard: The switch discards the frames that come in from one end of the port directly.
The basic workings of the switch can be described in a nutshell as follows:
1. If a unicast frame is entered into the switch, the exchange opportunity goes to the MAC address table to find the destination MAC address of the frame.
1) If the MAC address is not found, the switch performs a flood operation.
2) If the MAC address is found, then compare the MAC address in the MAC address table corresponding to the port is not this frame into the switch port. If not,
The switch performs a forward operation. If so, the switch performs a drop operation.
2. If a broadcast frame is entered into the switch, the switch does not look up the MAC address table, but instead performs a flood operation directly.
3. If the switch is a multicast frame, the processing behavior of the switch is more complex, beyond the scope of the study here, so omitted to say.
In addition, the switch also has the ability to learn. When a frame enters the switch, the switch checks the source MAC address of the frame, maps the source MAC address to the port on which the frame enters the switch, and then stores the mapping relationship in the MAC address table.


In the initial state, the switch does not know the MAC address of the connected host, so the MAC address table is empty. In this case, SWA is the initial state, and there are no table entries in the MAC address table until the data frame sent by host A is received.


When host a sends data to host C, the ARP request is typically sent first to obtain the MAC address of host C, the destination MAC address in this ARP request frame is the broadcast address, and the source MAC address is its own MAC address. SWA when the frame is received, the mapping of the source MAC address and the receive port is added to the MAC address table. By default, the X7 series switch learns a MAC Address table entry that has an aging time of 300 seconds. If the data frame sent by host A is received again within the aging time, the aging time of the MAC address of host a saved in SWA and the G0/0/1 mapping will be refreshed. Thereafter, if the switch receives a data frame with a destination MAC address of 00-01-02-03-04-AA, it is forwarded through the G0/0/1 port.


In this case, the destination MAC address of the data frame sent by host A is the broadcast address, so the switch broadcasts this data frame through the G0/0/2 and G0/0/3 ports to host B and host C.


When Host B and host C receive this data frame, they will see the ARP data frame. However, Host B does not reply to the frame, host C processes the frame and sends an ARP response, the destination MAC address of the reply data frame is the MAC address of host A, and the source MAC address is the MAC address of host C. SWA when a reply data frame is received, the map of the source MAC address and interface of the frame is added to the MAC address table. If this mapping relationship already exists in the MAC address table, it will be refreshed. The SWA then queries the MAC Address table and forwards this data frame from G0/0/1 after locating the corresponding forwarding port based on the destination MAC address of the frame.


The early Ethernet mode of operation was 10M half-duplex. With the development of technology, there is a full-duplex mode, followed by the advent of the hundred Gigabit and Gigabit Ethernet. Devices with different modes of operation cannot communicate directly with each other; the advent of self-negotiation technology solves the compatibility problem between different Ethernet working modes. Self-negotiated content mainly includes duplex mode and run rate. Once negotiated, the devices on both ends of the link have the same working parameters.
The Negotiation Auto command is used to set the self-negotiation capability of the Ethernet port. Whether the port should enable self-negotiation mode, consider whether the ports on both sides of the device support auto-negotiation. If the Ethernet port of the peer device does not support self-negotiation mode, then the Undo Negotiation Auto Command needs to be configured for non-self-negotiation mode on the local port. After that, the rate and duplex mode of modifying this port is kept consistent with the peer to ensure proper communication.
The duplex command is used to set the duplex mode of the Ethernet port. When the operating rate of the GE port is 1000mbit/s, only full-duplex mode is supported, and the duplex mode is not negotiated with the link-to-end port.
The speed command is used to set the operating rate of the port. Configure the port's rate and duplex mode before you need to configure the port for non-self-negotiation mode.


The display interface [Interface-type [Interface-number [. Subnumber]] command is used to view the current running status and statistics of the port.
The current state represents the physical status of the port and, if it is up, indicates that the port is open.
Line protocol Current state indicates the link protocol status of the port, and if it is up, the link protocol for the port is in a normal startup state.
Speed represents the operating rate of the port, and the SWA G0/0/1 port operating rate is 100mbit/s.
The duplex represents the duplex mode of the port, and the SWA G0/0/1 Port duplex mode is full duplex.

Summarize:
What happens to the switch MAC Address table when one host moves from one port on the switch to another?
For:
When a host is removed from a port on the switch, the switch detects a physical link down, so the Mac table entry for the corresponding host is purged from the MAC address table. Once the host is connected to another port on the switch, the switch detects the physical link up corresponding to the new port. After the host sends the message, the switch learns the mapping between the host's MAC address and the new port, and adds it to the MAC address table.

13.hcna-hntd--Switching Network Fundamentals

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.