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

ME60 V800R010C10SPC500 Configuration Guide - LAN Access and MAN Access 01

This is ME60 V800R010C10SPC500 Configuration Guide - LAN Access and MAN Access
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).
Configuring Inter-VLAN Communication

Configuring Inter-VLAN Communication

Configuring inter-VLAN communication allows users in different VLANs to communicate with each other. The inter-VLAN communication configuration involves the configurations of VLAN sub-interfaces or VLANIF interfaces.

Applicable Environment

Currently, schemes listed in Table 8-3 are provided for inter-VLAN communication. You can choose one of them based on the real world situation.

Table 8-3 Schemes for inter-VLAN communication

Inter-VLAN Communication Scheme

Advantage

Disadvantage

Usage Scenario

Sub-interface

After sub-interfaces are configured, users in different VLANs and network segments can communicate with each other as long as routes are reachable.

  • Both Layer 2 and Layer 3 devices are required, which increases expenditure.
  • If multiple users on a network belong to different VLANs, each VLAN requires a sub-interface on a Layer 3 device. Each sub-interface needs to be assigned an IP address. This increases configuration workload and uses up a large number of IP addresses.

This scheme is applicable to small-scale networks on which users belong to different network segments.

If Layer 3 forwarding of packets is mainly required, use sub-interfaces.

VLANIF interface

After sub-interfaces are configured, users in different VLANs and network segments can communicate with each other as long as routes are reachable.

Inter-VLAN communication can also be implemented by Layer 3 switches if routes are reachable. This scheme boasts of low operating costs.

If multiple users on a network belong to different VLANs, each VLAN requires a VLANIF interface. Each VLANIF interface needs to be assigned an IP address. This increases configuration workload and uses a lot of IP addresses.

This scheme is applicable to small-scale networks on which users belong to different network segments and IP addresses of these users are seldom changed.

If a large number of VLANs are configured and both Layer 2 and Layer 3 forwarding of packets are required, use VLANIF interfaces.

VLAN mapping

This scheme is easily configured and does not rely on routes.

IP addresses of users in different VLANs must belong to the same network segment.

This scheme is applicable to large-scale networks on which multiple users belong to one network segment.

Pre-configuration Tasks

Before configuring communication between VLANs, complete the following task:
  • Creating VLANs

Configuration Procedures

You can choose one or more configuration tasks (excluding "Checking the Configuration") as required.

Configuring Sub-interfaces for Inter-VLAN Communication

If users belong to different VLANs and reside on different network segments, sub-interfaces can be created on an Layer 3 device and assigned IP addresses to allow these users to communicate with each other at the network layer.

Context

During communication at the data link layer on a LAN, source MAC addresses identify where data comes from, and destination MAC addresses guide data to destinations. If the source and destination PCs reside on different network segments, a Layer 2 network is unable to send data from the source to the destination. In this case, data has to be forwarded at the network layer 3. After the default gateway address of the Layer 2 device is specified as the IP address of the Layer 3 device, the Layer 2 device sends data that needs to be forwarded at the network layer to the Layer 3 device. After receiving a packet, the Layer 3 device searches its routing table according to the destination address in the packet. If the Layer 3 device finds a matching route in the routing table, the Layer 3 device directly forwards the packet to another network segment. If the Layer 3 device does not find any matching route, it discards the packet.

On the network shown in Figure 8-8, VLANs 2 to n belong to different network segments. To allow users in VLANs 2 to n to communicate with each other, you can create a sub-interface on the PE for each VLAN and assign an IP address to each sub-interface. After VLANs are configured, the CE is logically divided into n parts. Accordingly, the Layer 3 device must have n logical interfaces corresponding to n VLANs. The detailed implementation process is as follows:

  1. A PC in VLAN 2 checks the destination IP address and finds that the destination PC in VLAN n is on a different network segment.
  2. The PC in VLAN 2 sends an ARP request. After receiving the request, the PE considers itself the destination, translates its MAC address into an IP address, and sends an ARP reply to the PC in VLAN 2.
  3. After receiving data from the PC in VLAN 2, the CE adds a VLAN tag to the data and searches the MAC address table for an outbound port.
  4. The PE receives the frame and sends it to sub-interface 2.
  5. Sub-interface 2 removes the VLAN tag from the frame, searches for an ARP entry based on the IP address in the IP header, and forwards the packet at the network layer.
  6. Sub-interface n receives the packet, reencapsulates the packet with the VLAN ID of n and the destination MAC address of the MAC address of the destination PC, and sends the frame.
  7. After receiving the frame, the CE searches the MAC address table for the destination MAC address based on the VLAN ID carried in the packet to determine the outbound port.
  8. The PC in VLAN n receives the frame from VLAN 2.

    If a PC in VLAN n sends a packet to a PC in VLAN 2, the process is similar and not described in this document.

Figure 8-8 Networking diagram for configuring sub-interfaces for inter-VLAN communication

On the network shown in Figure 8-8, downstream ports on the CE are separately added to VLAN 2 to VLAN n. The configuration roadmap for communication between these VLANs is as follows:

  1. Create n-1 sub-interfaces on the Etherent interface connecting the PE to the CE.

  2. The sub-interface is associated with a VLAN.

  3. Assign an IP address to each sub-interface for communication at the network layer.

  4. Configure the port connecting the CE to the PE as a trunk or hybrid port to allow frames with VLAN IDs from 2 to n to pass through.

NOTE:

The default gateway address of each PC in a VLAN must be the IP address of the corresponding sub-interface. Otherwise, inter-VLAN communication fails.

Procedure

  • Do as follows on the PE:
    1. Run system-view

      The system view is displayed.

    2. Run interface { ethernet | gigabitethernet } interface-number.subinterface-number

      An Ethernet sub-interface is created and the view of the Ethernet sub-interface is displayed.

      The Ethernet interface in this step is the interface connecting the PE to the CE.

    3. Run vlan-type dot1q vlan-id

      The sub-interface is associated with a VLAN.

      NOTE:

      Sub-interfaces of different interfaces can be associated with the same VLAN; sub-interfaces of one interface cannot be associated with the same VLAN.

    4. Run ip address ip-address { mask | mask-length } [ sub ]

      An IP address is assigned to the sub-interface for communication at the network layer.

    5. Run commit

      The configuration is committed.

Configuring VLANIF Interfaces for Inter-VLAN Communication

Configuring VLANIF interfaces for inter-VLAN communication saves expenditure and helps implement fast forwarding.

Context

VLAIF interfaces are Layer 3 logical interfaces. After being assigned IP addresses, VLANIF interfaces are able to communicate at the network layer. Layer 3 switches and routers can be configured with VLANIF interfaces.

By using VLANIF interfaces to implement inter-VLAN communication, you need to configure a VLANIF interface for each VLAN and assign an IP address to each VLANIF interface. The communication process by using VLANIF interfaces is similar to that by using sub-interfaces.

Figure 8-9 Networking diagram for configuring VLANIF interfaces for inter-VLAN communication

NOTE:

The default gateway address of each PC in a VLAN must be the IP address of the corresponding VLANIF interface. Otherwise, inter-VLAN communication will fail.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface vlanif vlan-id

    A VLANIF interface is created and the VLANIF interface view is displayed.

    The VLAN ID specified in this command must be the ID of an existing VLAN.

    NOTE:

    A VLANIF interface is Up only when at least one physical port added to the corresponding VLAN is Up.

  3. Run ip address ip-address { mask | mask-length } [ sub ]

    An IP address is assigned to the VLANIF interface.

    VLANIF interfaces must belong to different network segments.

  4. Run commit

    The configuration is committed.

Configuring VLAN Mapping for Inter-VLAN Communication

The configuration of VLAN mapping is simple and independent of Layer 3 routing.

Context

VLAN mapping is also called VLAN translation. With VLAN mapping, a switch maps the VLAN tag of a frame to another VLAN tag after receiving the frame and before sending the frame. On the network shown in Figure 8-10, ports connecting CE 1 to users are added to VLAN 2 and ports connecting CE 2 to users are added to VLAN 3. To allow users in VLAN 2 and VLAN 3 to communicate with each other, configure VLAN mapping on interface1 connecting CE 1 to CE 2.
  • Before sending a frame to VLAN 3, interface1 on CE 1 replaces the VLAN ID 2 in the frame with the VLAN ID 3.

  • After receiving a frame from VLAN 3, interface1 on CE 1 replaces the VLAN ID 3 in the frame with the VLAN ID 2.

Figure 8-10 Networking diagram for configuring VLAN mapping for inter-VLAN communication

NOTE:

Before configuring VLAN mapping to allow PCs in two VLANs to communicate, IP addresses of the PCs must belong to the same network segment. Otherwise, devices in different VLANs must communicate with each other at the network layer. In this case, VLAN mapping does not make sense.

Currently, the ME60 supports the following mapping modes:
  • 1 to 1 VLAN mapping

    After receiving a single-tagged frame, the device replaces the tag with a specified tag.

    1 to 1 VLAN mapping is applicable to the networking environment shown in Figure 8-11.

    Figure 8-11 Networking diagram for 1 to 1 VLAN mapping

    On the network shown in Figure 8-11, different types of services (Internet, IPTV, and VoIP) of each household are transmitted in separate VLANs. To differentiate between households, you need to configure 1 to 1 VLAN mapping on each corridor switch to transmit the same type of services for different households in separate VLANs. In this case, the aggregate switch must provide a large number of VLAN IDs to separate services of different households. As the number of available VLAN IDs on the aggregate switch is limited, you need to implement VLAN aggregation to transmit the same type of services for different households in one VLAN.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Add ports connecting CE 1 and CE 2 to users to separate VLANs.
  3. Configure the Layer 2 port type.

    1. Run the interface interface-ytpe interface-number command to enter the view of an Ethernet port to be configured with VLAN mapping.

    2. Run the port link-type trunk command to configure the Layer 2 Ethernet port as a trunk port.

  4. Run port vlan-mapping vlan vlan-id1 [ to vlan-id2 ] map-vlan vlan-id3

    VLAN mapping is configured to change the outer VLAN tag to vlan-id3.

  5. Run the port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all } command to specify the VLAN IDs. Frames carrying these VLAN IDs can pass through the port configured with VLAN mapping.

    The VLAN ID specified in this command must be private VLAN IDs but not public VLAN IDs.

  6. Run commit

    The configuration is committed.

Verifying the Inter-VLAN Communication Configuration

After inter-VLAN communication is configured, you can check whether users in different VLANs can communicate with each other and check information about VLANs to which users belong.

Prerequisites

The configurations of inter-VLAN communication are complete.

Procedure

  • Run the ping [ ip ] [ -a source-ip-address | -c count | -d | -f | -h ttl-value | -i interface-type interface-number | -m time | -n | -p pattern | -q | -r | -s packetsize | -system-time | -t timeout | -tos tos-value | -v | -vpn-instance vpn-instance-name ] * host command to check whether users in different VLANs can communicate with each other.

    If the ping fails, you can run the following commands to locate the fault:

    • Run the display vlan [ vlan-id [ verbose ] ] command to check information about all VLANs or a specified VLAN.

    • Run the display interface vlanif [ vlan-id ] command to check information about VLANIF interfaces.

      Before running this command, ensure that VLANIF interfaces have been configured.

Example

Check whether the PC at 10.1.1.2 is reachable.

<HUAWEI> ping 10.1.1.2
  PING 10.1.1.2: 56  data bytes, press CTRL_C to break
    Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=2 ms
    Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms
  --- 10.1.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/2 ms 

If the ping fails, you can run the following commands to locate the fault:

  • Run the display vlan command. The command output shows the VLAN ID, VLAN type, and VLAN status. For example:

    <HUAWEI> display vlan
    The total number of vlans is : 2
    VID  Type     Status  Property  MAC-LRN STAT    BC  MC  UC  Description
    --------------------------------------------------------------------------------
    1    common   enable  default   enable  disable FWD FWD FWD VLAN 0001
    2    common   enable  default   enable  disable FWD FWD FWD VLAN 0002
  • Run the display interface vlanif command. The command output shows the physical status, link protocol status, IP address, and mask of a VLANIF interface. For example:

    <HUAWEI> display interface vlanif 10
    Vlanif10 current state : UP (ifindex: 22)
    Line protocol current state : UP
    Last line protocol up time : 2013-08-07 07:28:59
    Description:
    Route Port,The Maximum Transmit Unit is 1500
    Internet Address is 10.1.1.2/24
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 38ba-23f8-7303
    Physical is VLANIF
    Current system time: 2013-08-08 07:30:27
        Last 300 seconds input rate 941 bits/sec, 2 packets/sec
        Last 300 seconds output rate 968 bits/sec, 3 packets/sec
        Input: 827 packets,0 bytes
               410 unicast,417 broadcast,0 multicast
               0 errors,0 drops
        Output:819 packets,0 bytes
               402 unicast,417 broadcast,0 multicast
               0 errors,0 drops
        Last 300 seconds input utility rate:  --
        Last 300 seconds output utility rate: --
Translation
Download
Updated: 2019-01-04

Document ID: EDOC1100059440

Views: 27284

Downloads: 18

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