No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

AR500, AR510, and AR530 V200R007 CLI-based Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring transparent bridge, MAC table, link aggregation, VLANs, STP/RSTP/MSTP, and so on.The document provides the configuration procedures and configuration examples to illustrate the service configuration methods and application scenario.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Inter-VLAN Communication

Inter-VLAN Communication

After VLANs are assigned, broadcast packets are only forwarded in the same VLAN. That is, hosts in different VLANs cannot communicate at Layer 2. Therefore, VLAN technology isolates broadcast domains. In real-world applications, hosts in different VLANs often need to communicate, so inter-VLAN communication needs to be implemented to resolve this.

Similar to intra-VLAN communication described in Intra-VLAN Communication, inter-VLAN communication goes through three phases: packet transmission from the source host, Ethernet switching in a device, and adding and removing VLAN tags during the exchange between devices. According to the Ethernet switching principle, broadcast packets are only forwarded in the same VLAN and hosts in different VLANs cannot directly communicate at Layer 2. Layer 3 routing or VLAN translation technology is required to implement inter-VLAN communication.

Inter-VLAN Communication Technologies

Huawei provides a variety of technologies to implement inter-VLAN communication. The following two technologies are commonly used.
  • VLANIF interface

    A VLANIF interface is a Layer 3 logical interface. After an IP address is configured for a VLANIF interface, the device adds the MAC address and VLAN ID of the VLANIF interface to the MAC address table and sets the Layer 3 forwarding bit for the MAC address entry. When the destination MAC address of a packet matches the MAC address entry, the device forwards the packet at Layer 3, thereby implementing inter-VLAN Layer 3 connectivity.

    VLANIF interfaces require that users in VLANs be located on different network segments. (When hosts are located on the same network segment, a host encapsulates the destination host' MAC address in packets. The device determines that packets should be forwarded at Layer 2. Layer 2 switching is performed only in the same VLAN, and broadcast packets cannot reach different VLANs. In this case, the device cannot obtain destination hosts' MAC addresses and therefore cannot forward packets to the destination host.) However, a VLANIF interface needs to be configured for each VLAN and each VLANIF interface requires an IP address. As a result, this technology wastes IP addresses. On a network, VLAN aggregation can allow hosts on the same network segment in different VLANs to communicate.

    VLAN aggregation, also known as super-VLAN, associates a super-VLAN with multiple sub-VLANs. The sub-VLANs share the IP address of the super-VLAN as the gateway IP address to implement Layer 3 connectivity with an external network. Proxy ARP can be enabled between sub-VLANs to implement Layer 3 connectivity between sub-VLANs. VLAN aggregation conserves IP addresses in inter-VLAN Layer 3 communication.

    VLAN aggregation applies to scenarios where multiple VLANs share a gateway. For details about VLAN aggregation, see VLAN Aggregation Configuration.

  • Dot1q termination sub-interface

    A sub-interface is also a Layer 3 logical interface. A device implements inter-VLAN Layer 3 connectivity through sub-interfaces in a similar way as through VLANIF interfaces. After a sub-interface is configured with Dot1q termination and an IP address, the device adds a MAC address entry of the sub-interface to the MAC address table and sets the Layer 3 forwarding bit.

    A Dot1q termination sub-interface applies to scenarios where a Layer 3 Ethernet interface connects to multiple VLANs. In such a scenario, data flows from different VLANs preempt bandwidth of the primary Ethernet interface; therefore, the primary Ethernet interface may become a bottleneck when the network is busy.

    For details about the Dot1q termination sub-interface, see VLAN Termination Configuration.

Inter-VLAN Communication Through the Same Device

As shown in Figure 3-12, Host_1 (source host) and Host_2 (destination host) connect to the same router, are located on different network segments, and belong to VLAN 2 and VLAN 3, respectively. After VLANIF 2 and VLANIF 3 are created on the router and allocated IP addresses, the default gateway addresses of the hosts are set to IP addresses of the VLANIF interfaces.

Figure 3-12  Using VLANIF interfaces to implement inter-VLAN communication through the same device

When Host_1 sends a packet to Host_2, the packet is transmitted as follows (assuming that no forwarding entry exists on the router):

  1. Host_1 determines that the destination IP address is on a different network segment from its own IP address, and therefore sends an ARP Request packet to request the gateway MAC address. The ARP Request packet carries the destination IP address of 10.1.1.1 (gateway's IP address) and all-F destination MAC address.
  2. When the ARP Request packet reaches IF_1 on the Router, the Router tags the packet with VLAN 2 (PVID of IF_1). The Router then adds the mapping between the source MAC address, VLAN ID, and interface (1-1-1, 2, IF_1) in its MAC address table.
  3. The Router detects that the packet is an ARP Request packet and the destination IP address is the IP address of VLANIF 2. The Router then encapsulates VLANIF 2's MAC address of 3-3-3 into the ARP Reply packet and removes the tag with VLAN 2 from the packet before sending it from IF_1. In addition, the Router adds the binding of the IP address and MAC address of Host_1 in its ARP table.
  4. After receiving the ARP Reply packet from the Router, Host_1 adds the binding of the IP address and MAC address of VLANIF 2 on the Router in its ARP table and sends a packet to the Router. The packet carries the destination MAC address of 3-3-3 and destination IP address of 10.2.2.2 (Host_2's IP address).
  5. After the packet reaches IF_1 on the Router, the Router tags the packet with VLAN 2.
  6. The Router updates its MAC address table based on the source MAC address, VLAN ID, and inbound interface of the packet, and compares the destination MAC address of the packet with the MAC address of VLANIF 2. If they are the same, the Router determines that the packet should be forwarded at Layer 3 and searches for a Layer 3 forwarding entry based on the destination IP address. If no entry is found, the Router sends the packet to the CPU. The CPU then searches for a routing entry to forward the packet.
  7. The CPU looks up the routing table based on the destination IP address of the packet and detects that the destination IP address matches a directly connected network segment (network segment of VLANIF 3). The CPU continues to look up its ARP table but finds no matching ARP entry. Therefore, the Router broadcasts an ARP Request packet with the destination address of 10.2.2.2 to all interfaces in VLAN 3. Before sending the ARP Request packet from IF_2, the Router removes the tag with VLAN 2 from the packet.
  8. After receiving the ARP Request packet, Host_2 detects that the IP address is its own IP address and sends an ARP Reply packet with its own. Additionally, Host_2 adds the mapping between the MAC address and IP address of VLANIF 3 to its ARP table.
  9. After IF_2 on the Router receives the ARP Reply packet, IF_2 tags the packet with VLAN 3 to the packet and adds the binding of the MAC address and IP address of Host_2 in its ARP table. Before forwarding the packet from Host_1 to Host_2, the Router removes the tag with VLAN 3 from the packet. The Router also adds the binding of Host_2's IP address, MAC address, VLAN ID, and outbound interface in its Layer 3 forwarding table.

The packet sent from Host_1 then reaches Host_2. The packet transmission process from Host_2 to Host_1 is similar. Subsequent packets between Host_1 and Host_2 are first sent to the gateway (Router), and the Router forwards the packets at Layer 3 based on its Layer 3 forwarding table.

Inter-VLAN Communication Through Multiple Devices

When hosts in different VLANs connect to multiple routers, you need to configure static routes or a dynamic routing protocol in addition to VLANIF interface addresses. This is because IP addresses of VLANIF interfaces can only be used to generate direct routes.

As shown in Figure 3-13, Host_1 (source host) and Host_2 (destination host) are located on different network segments, connect to Router_1 and Router_2, and belong to VLAN 2 and VLAN 3, respectively. On Router_1, VLANIF 2 and VLANIF 4 are created and allocated IP addresses of 10.1.1.1 and 10.1.4.1. On Router_2, VLANIF 3 and VLANIF 4 are created and allocated IP addresses of 10.1.2.1 and 10.1.4.2. Static routes are configured on Router_1 and Router_2. On Router_1, the destination network segment in the static route is 10.1.2.0/24 and the next hop address is 10.1.4.2. On Router_2, the destination network segment in the static route is 10.1.1.0/24 and the next hop address is 10.1.4.1.

Figure 3-13  Using VLANIF interfaces to implement inter-VLAN communication through multiple devices

When Host_1 sends a packet to Host_2, the packet is transmitted as follows (assuming that no forwarding entry exists on Router_1 and Router_2):

  1. The first six steps are similar to steps 1 to 6 in inter-VLAN communication when hosts connect to the same device. After the steps are complete, Router_1 sends the packet to its CPU and the CPU looks up the routing table.
  2. The CPU of Router_1 looks up the routing table based on the destination IP address of 10.1.2.2 and finds a matching entry with the network segment 10.1.2.0/24 corresponding to VLANIF 3 and the next hop IP address 10.1.4.2. The CPU continues to look up its ARP table but finds no matching ARP entry. Therefore, Router_1 broadcasts an ARP Request packet with the destination address of 10.1.4.2 to all interfaces in VLAN 4. IF_2 on Router_1 transparently transmits the ARP Request packet to IF_2 on Router_2 without removing the tag from the packet.
  3. After the ARP Request packet reaches Router_2, Router_2 finds that the destination IP address of the ARP Request packet is the IP address of VLANIF 4. Router_2 then sends an ARP Reply packet with the MAC address of VLANIF 4 to Router_1.
  4. IF_2 on Router_2 transparently transmits the ARP Reply packet to Router_1. After Router_1 receives the ARP Reply packet, it adds the binding of the MAC address and IP address of VLANIF4 in its ARP table.
  5. Before forwarding the packet of Host_1 to Router_2, Router_1 changes the destination MAC address of the packet to the MAC address of VLANIF 4 on Router_2 and the source MAC address to the MAC address of VLANIF 4 on itself. In addition, Router_1 records the forwarding entry (10.1.2.0/24, next hop IP address, VLAN, and outbound interface) in its Layer 3 forwarding table. Similarly, the packet is transparently transmitted to IF_2 on Router_2.
  6. After Router_2 receives packets of Host_1 forwarded by Router_1, the steps similar to steps 6 to 9 in inter-VLAN communication when hosts connect to the same device are performed. In addition, Router_2 records the forwarding entry (Host_2's IP address, MAC address, VLAN, and outbound interface) in its Layer 3 forwarding table.

VLAN Damping

In a specified VLAN where a VLANIF interface has been configured, when all interfaces in the VLAN go Down, the VLAN becomes Down. The interface Down event is reported to the VLANIF interface, causing the VLANIF interface status change.

To avoid network flapping due to the status change of the VLANIF interface, you can enable VLAN damping on the VLANIF interface and set a delay after which the VLANIF interface goes Down.

With VLAN damping enabled, when the last Up interface in the VLAN goes Down, the Down event will be reported to the VLANIF interface after a delay (the delay can be set as required). If an interface in the VLAN goes Up during the delay, the status of the VLANIF interface keeps unchanged. That is, the VLAN damping function postpones the time at which the VLAN reports a Down event to the VLANIF interface, avoiding unnecessary route flapping.

Translation
Download
Updated: 2019-05-25

Document ID: EDOC1000097279

Views: 20734

Downloads: 64

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next