NetEngine 8000 F1A V800R022C00SPC600 Configuration Guide

Ethernet Interface Configuration

Ethernet Interface Configuration

Ethernet Description

Overview of Ethernet

Overview

Ethernet technology originated from an experimental network on which multiple PCs were connected at 3 Mbit/s. In general, Ethernet refers to a standard connection for 10 Mbit/s Ethernet networks. The Digital Equipment Corporation (DEC), Intel, and Xerox joined efforts to develop and then issue Ethernet technology in 1982. The IEEE 802.3 standard is based on and compatible with the Ethernet standard.

In TCP/IP, the encapsulation format of IP packets of Ethernet and the IEEE 802.3 network is defined in RFC standard. Currently, the most commonly-used encapsulation format is Ethernet_II which is also called Ethernet DIX.

To distinguish Ethernet frames of these two types, in this document Ethernet frames of Ethernet are called Ethernet_II frames; Ethernet frames of IEEE802.3 network are called IEEE 802.3 frames.

Purpose

Ethernet and token ring networks are typical local area network (LANs).

Ethernet has become the most important LAN networking technology because it is flexible, simple, and easy to implement.

  • Shared Ethernet

    Initially, Ethernet networks were shared networks with 10M Ethernet technology. Ethernet networks were constructed with coaxial cables, and computers and terminals were connected through intricate connectors. This structure is complex and only suitable for communications in half-duplex mode because only one line exists.

    In 1990, 10BASE-T Ethernet based on twisted pair cables emerged. In this technology, terminals are connected to a hub through twisted pair cables and communicate through a shared bus in the hub. The structure is physically a star topology. CSMA/CD is still used because inside the hub, all terminals are connected to a shared bus.

    All the hosts are connected to a coaxial cable in a similar manner. When a large number of hosts exist, the following problems arise:

    • Reliability of the media is low.

    • Media access conflicts are severe.

    • Packets are not properly broadcast.

    • Security is not ensured.

  • 100M Ethernet

    100M Ethernet works at a higher rate (10 times the rate of 10M Ethernet) and differs from 10M Ethernet in the following ways:

    • Network type: 10M Ethernet supports only a shared Ethernet, while 100M Ethernet is a 10M/100M auto-sensing Ethernet and can work in half-duplex or full-duplex mode.

    • Negotiation mechanism: 10M Ethernet uses Normal Link Pulses (NLPs) to detect the link connection status, while 100M Ethernet uses auto-negotiation between two link ends.

  • Gigabit Ethernet (GE) and 10GE

    With the advancement of computer technology, applications such as large-scale distributed databases and high-speed transmission of video images emerged. Those applications require high bandwidth, and traditional 100M Fast Ethernet (FE) cannot meet the requirements. GE was introduced to provide higher bandwidth.

    GE inherits the data link layer of traditional Ethernet. This protects earlier investments in traditional Ethernet. The GE and traditional Ethernet have different physical layers, however, to transmit data at 1000 Mbit/s, the GE uses optical fiber channels.

    As computer science develops, the 10GE technology becomes mature and is widely used on Datacom backbone networks. This technology is also used to connect high-end database servers.

Understanding Ethernet

Ethernet Physical Layer

Introduction to Ethernet Cable Standards

The following Ethernet cabling standards exist:

  • 10BASE-2

  • 10BASE-5

  • 10BASE-T

  • 10BASE-F

  • 100BASE-T4

  • 100BASE-TX

  • 100BASE-FX

  • 1000BASE-SX

  • 1000BASE-LX

  • 1000BASE-TX

In these cabling standards, 10, 100, and 1000 represent the transmission rate (in Mbit/s), and BASE represents baseband.

  • 10M Ethernet cable standard

    Table 1-332 lists the 10M Ethernet cabling standard specifications defined in IEEE 802.3.

    Table 1-332 10M Ethernet cable standard

    Name

    Cable

    Maximum Transmission Distance

    10BASE-5

    Thick coaxial cable

    500 m

    10BASE-2

    Thin coaxial cable

    200 m

    10BASE-T

    Twisted pair cable

    100 m

    10BASE-F

    Fiber

    2000 m

    The greatest limitation of coaxial cable is that devices on the cable are connected in series, so a single point of failure (SPOF) may cause a breakdown of the entire network. As a result, the physical standards of coaxial cables, 10BASE-2 and 10BASE-5, have fallen into disuse.

  • 100M Ethernet cable standard

    100M Ethernet is also called Fast Ethernet (FE). Compared with 10M Ethernet, 100M Ethernet has a faster transmission rate at the physical layer, but has the same rate at the data link layer.

    Table 1-333 lists the 100M Ethernet cable standard specifications.

    Table 1-333 100M Ethernet cable standard

    Name

    Cable

    Maximum Transmission Distance

    100Base-T4

    Four pairs of Category 3 twisted pair cables

    100 m

    100Base-Tx

    Two pairs of Category 5 twisted pair cables

    100 m

    100Base-Fx

    Single-mode or multi-mode fiber

    2000 m

    10Base-T and 100Base-TX have different transmission rates, but both apply to Category 5 twisted pair cables. 10Base-T transmits data at 10 Mbit/s, while 100Base-TX transmits data at 100 Mbit/s.

    100Base-T4 is now rarely used.

  • Gigabit Ethernet cable standard

    Gigabit Ethernet developed from the Ethernet standard defined in IEEE 802.3. Based on the Ethernet protocol, Gigabit Ethernet increases the transmission rate to 10 times the FE transmission rate, reaching 1 Gbit/s. Table 1-334 lists the Gigabit Ethernet cable standard specifications.

    Table 1-334 Gigabit Ethernet cable standard

    Name

    Cable

    Maximum Transmission Distance

    1000Base-LX

    Single-mode or multi-mode fiber

    316 m

    1000Base-SX

    Multi-mode fiber

    316 m

    1000Base-TX

    Category 5 twisted pair cable

    100 m

    Using Gigabit Ethernet technology, you can upgrade an existing Fast Ethernet network from 100 Mbit/s to 1000 Mbit/s.

    Gigabit Ethernet uses 8B10B coding at the physical layer. In traditional Ethernet transmission technologies, the data link layer delivers 8-bit data sets to the physical layer, where they are processed and sent still as 8 bits to the physical link for transmission.

    In contrast, on the optical fiber-based Gigabit Ethernet, the physical layer maps the 8-bit data sets transmitted from the data link layer to 10-bit data sets before sending them out.

  • 10GE cable standards

    10GE cable standards are numerous and continuously evolving, and include IEEE802.3ae, IEEE802.3an, IEEE 802.3aq, and IEEE 802.3ap. 10GE provides a 10 Gbit/s transmission rate, which overcomes bandwidth and transmission distance problems and enables Ethernet technology to be applied to the backbone and aggregation layers of metro networks. 10GE only supports the full-duplex mode. Table 1-335 lists the related cable standards.

    Table 1-335 10GE cable standards

    Name

    Cable

    Maximum Transmission Distance

    10GBase-SR

    Multi-mode fiber

    300 m

    10GBase-LR

    Single-mode fiber

    10 km

    10GBase-LRM

    Multi-mode fiber

    260 m

    10GBase-ER

    Single-mode fiber

    40 km

    10GBase-ZR

    Single-mode fiber

    80 km

    10GBase-LX4

    Single-mode or multi-mode fiber

    10 km

    10GBase-CX4

    Shielded twisted pair

    15 m

    10GBase-T

    Category 6 twisted pair

    55 m

    10GBase-KX4

    Copper line

    1 m

    10GBase-KR

    Copper line

    1 m

    The development of 10GE is well under way, and will be widely deployed in future.

CSMA/CD
  • Concept of CSMA/CD

    Ethernet was originally designed to connect stations, such as computers and peripherals, on a shared physical line. However, the stations can only access the shared line in half-duplex mode. Therefore, a mechanism of collision detection and avoidance is required to enable multiple devices to share the same line in way that gives each device fair access. Carrier Sense Multiple Access with Collision Detection (CSMA/CD) was therefore introduced.

    The concept of CSMA/CD is as follows:

    • CS: carrier sense

      Before transmitting data, a station checks to see if the line is idle. In this manner, chances of collision are decreased.

    • MA: multiple access

      The data sent by a station can be received by other stations.

    • CD: collision detection

      If two stations transmit electrical signals at the same time, the signals are superimposed, doubling the normal voltage amplitude. This situation results in collision.

      The stations stop transmitting after sensing the conflict, and then resume transmission after a random delay time.

  • Working process of CSMA/CD

    CSMA/CD works as follows:

    1. A station continuously checks whether the shared line is idle.

      • If the line is idle, the station sends data.

      • If the line is in use, the station waits until the line is idle.

    2. If two stations send data at the same time, a conflict occurs on the line, and the signal becomes unstable.

    3. After detecting an instability, the station immediately stops sending data.

    4. The station sends a series of pulses.

      The pulses inform other stations that a conflict has occurred on the line.

      After detecting a conflict, the station waits for a random period of time, and then resumes the data transmission.

Minimum Frame Length and Maximum Transmission Distance
  • Minimum frame length

    Due to the CSMA/CD algorithm limitation, an Ethernet frame cannot be shorter than a certain length. The minimum frame length is 64 bytes. This length was determined based on Ethernet maximum transmission distance and the collision detection mechanism.

    The use of a minimum frame length prevents situations in which station A finishes sending the last bit of a frame, but the first bit has not arrived at station B. Station B senses that the line is idle and begins to send data, leading to a conflict.

    The upper layer protocol must ensure that each frame's Data field contains at least 46 bytes. As such, a Data field with a 14-byte Ethernet frame header and a 4-byte check code at the end of the frame equals the minimum frame length of 64 bytes. If the Data field is less than 46 bytes, the upper layer protocol must make up the difference.

    The maximum length of the Data field is arbitrary, but it has been set to 1500 bytes as required by the memory cost and buffer of low-cost LAN controllers in 1979.

  • Maximum transmission distance

    The maximum transmission distance depends on factors such as line quality and signal attenuation.

Ethernet Duplex Modes

The Ethernet physical layer can work in either half- or full-duplex mode.

  • Half-duplex mode

    Half-duplex mode has the following features:

    • Sending and receiving data takes place in one direction at a time.

    • The CSMA/CD mechanism is used.

    • The transmission distance is limited.

    Hubs work in half-duplex mode.

  • Full-duplex mode

    After Layer 2 switches replace hubs, the shared Ethernet changes to the switched Ethernet, and the half-duplex mode is replaced by the full-duplex mode. As a result, the transmission rate of data frames increases significantly, with the maximum throughput doubled.

    The full-duplex mode fundamentally solves the problem of collisions on Ethernets and eliminates the need for CSMA/CD.

    Full-duplex mode has the following features:

    • Transmitting and receiving data can take place simultaneously.

    • The maximum throughput is theoretically twice that of half-duplex mode.

    • This mode extends the transmission distance of half-duplex mode.

    Except for hubs, all network cards, Layer 2 switches, and routers produced in the past 10 years support full-duplex mode.

    Full-duplex mode has the following requirements:

    • Full-duplex network cards and modules

    • Physical media over which sending and receiving frames are separated

    • Point-to-point connection

Ethernet Auto-Negotiation
  • Purpose of auto-negotiation

    As the earlier Ethernet utilizes a 10 Mbit/s half-duplex mode, mechanisms such as CSMA/CD are required to guarantee system stability. As technology developed, the full-duplex mode and 100M Ethernet have emerged in succession, both of which have significantly improved Ethernet performance. However, they have also introduced an entirely new problem: achieving compatibility between older and newer Ethernet networks.

    The auto-negotiation technology has been introduced to solve this problem. With auto-negotiation, the device at each end of a physical link chooses the same operation parameters by exchanging information. The main parameters to be automatically negotiated include mode (half-duplex or full-duplex), rate, and flow control. Once negotiation completes, the devices operate in the agreed mode and rate.

  • Principle of auto-negotiation

    Auto-negotiation is based on a bottom-layer mechanism of twisted-pair Ethernets, and applies only to such Ethernets.

    When data is not transmitted over a twisted pair cable, the cable does not remain idle. Instead, it continues transmitting low frequency pulse signals, and any Ethernet adapter with interfaces for twisted pair cables can identify these pulses. The device at each end can also identify lower frequency pulses — referred to as fast link pulses (FLPs) — after such pulses have been inserted. In this way, the devices achieve auto-negotiation by using FLPs to transmit a small amount of data. Figure 1-585 shows the pulse insertion process.

    Figure 1-585 Pulse insertion

    Auto-negotiation priorities of the Ethernet duplex link are listed as follows in descending order:

    • 1000M full-duplex

    • 1000M half-duplex

    • 100M full-duplex

    • 100M half-duplex

    • 10M full-duplex

    • 10M half-duplex

    If auto-negotiation succeeds, the Ethernet card activates the link. Then, data can be transmitted over it. If auto-negotiation fails, the link is inaccessible.

    Auto-negotiation is implemented at the physical layer and does not require any data packets or have impact on upper-layer protocols.

  • Auto-negotiation rules for interfaces

    Two connected interfaces can communicate with each other only when they are in the same working mode.
    • If both interfaces work in the same non-auto-negotiation mode, the interfaces can communicate.
    • If both interfaces work in auto-negotiation mode, the interfaces can communicate through negotiation. The negotiated working mode depends on the interface with lower capability. Specifically, if one interface works in full-duplex mode and the other interface works in half-duplex mode, the negotiated working mode is half-duplex. The auto-negotiation function also allows the interfaces to negotiate the use of the traffic control function.
    • If a local interface works in auto-negotiation mode and the remote interface works in a non-auto-negotiation mode, the negotiated working mode of the local interface depends on the working mode of the remote interface.

      Table 1-336 describes the auto-negotiation rules for interfaces of the same type.

      Table 1-336 Auto-negotiation rules for interfaces of the same type (local interface working in auto-negotiation mode)

      Interface Type

      Working Mode of the Remote Interface

      Auto-negotiation Result

      Description

      FE electrical interface

      10M half-duplex

      10M half-duplex

      If the remote interface works in 10M full-duplex or 100M full-duplex mode, the working modes of the two interfaces are different after auto-negotiation, and packets may be dropped. Therefore, if the remote interface works in 10M full-duplex or 100M full-duplex mode, configure the local interface to work in the same mode.

      10M full-duplex

      10M half-duplex

      100M half-duplex

      100M half-duplex

      100M full-duplex

      100M half-duplex

      GE electrical interface

      FE auto-negotiation

      100M full-duplex

      If the remote interface works in 10M full-duplex or 100M full-duplex mode, the working modes of the two interfaces are different after auto-negotiation, and packets may be dropped. Therefore, if the remote interface works in 10M full-duplex or 100M full-duplex mode, configure the local interface to work in the same mode.

      10M half-duplex

      10M half-duplex

      10M full-duplex

      10M half-duplex

      100M half-duplex

      100M half-duplex

      100M full-duplex

      100M half-duplex

      1000M full-duplex

      1000M full-duplex

      Table 1-337 describes the auto-negotiation rules for interfaces of different types.

      Table 1-337 Auto-negotiation rules for interfaces of different types

      Interface Type

      Working Mode of an FE Electrical Interface

      Working Mode of a GE Electrical Interface

      Auto-negotiation Result

      Description

      An FE electrical interface connecting to a GE electrical interface

      10M half-duplex

      Auto-negotiation

      10M half-duplex

      If the FE electrical interface works in 10M full-duplex or 100M full-duplex mode and the GE electrical interface works in auto-negotiation mode, the working modes of the two interfaces are different after auto-negotiation and packets may be dropped. Therefore, if the FE electrical interface works in 10M full-duplex or 100M full-duplex mode, configure the GE electrical interface to work in the same mode.

      10M full-duplex

      10M half-duplex

      100M half-duplex

      100M half-duplex

      100M full-duplex

      100M half-duplex

      Auto-negotiation

      10M half-duplex

      10M half-duplex

      If the FE electrical interface works in auto-negotiation mode and the GE electrical interface works in 10M full-duplex or 100M full-duplex mode, the working modes of the two interfaces are different after auto-negotiation, and packets may be dropped. Therefore, if the GE electrical interface works in 10M full-duplex or 100M full-duplex mode, configure the FE electrical interface to work in the same mode.

      If you configure the GE electrical interface to work in 1000M full-duplex mode, auto-negotiation fails.

      10M full-duplex

      10M half-duplex

      100M half-duplex

      100M half-duplex

      100M full-duplex

      100M half-duplex

      1000M full-duplex

      Failure

      According to the auto-negotiation rules described in Table 1-336 and Table 1-337, if an interface works in auto-negotiation mode and the connected interface works in a non-auto-negotiation mode, packets may be dropped or auto-negotiation may fail. It is recommended that you configure two connected interfaces to work in the same mode to ensure that they can communicate properly.

      FE and higher-rate optical interfaces only support full-duplex mode. Auto-negotiation is enabled on GE optical interfaces only for the negotiation of flow control only. When devices are directly connected using GE optical interfaces, auto-negotiation is enabled on the optical interfaces to detect unidirectional optical fiber faults. If one of two optical fibers is faulty, the fault information is synchronized on both ends through auto-negotiation. As a result, interfaces on both ends go Down. After the fault is rectified, the interfaces go Up again through auto-negotiation.

HUB
  • Hub principle

    When terminals are connected through twisted pair cables, a convergence device called a hub is required. Hubs operate at the physical layer. Figure 1-586 shows a hub operation model.

    Figure 1-586 Hub operation mode

    A hub is configured as a box with multiple interfaces, each of which can connect to a terminal. Therefore, multiple devices can be connected through a hub to form a star topology.

    Note that although the physical topology is a star, the hub uses bus and CSMA/CD technologies.

    Figure 1-587 Hub operation principle
  • Two types of hubs are possible, distinguished by their interfaces:
    • Category-I hub: provides a single type of physical interfaces.

      For example, a Category-I hub can accommodate either Category-5 twisted pair interfaces, Category-3 twisted pair interfaces, or optical fiber interfaces.

    • Category-II hub: provides interfaces of different types. For example, a Category-II hub can provide both Category-5 twisted pair interfaces and optical fiber interfaces.

      Aside from the interface provision, these hub types have no differences in their internal operation. In practice, Category-I hubs are commonly used.

Ethernet Data Link Layer

Hierarchical Structure of the Data Link Layer

In Ethernet, the following access modes are used according to different duplex modes:

  • CSMA/CD is used in half-duplex mode.

  • Data is sent in full-duplex mode without having to detect if the line is idle.

Duplex mode, either half or full, refers to the operation mode of the physical layer. Access mode refers to the access of the data link layer. Therefore, in the Ethernet, the data link layer and physical layer are associated.

Therefore, different access modes are required for different operation modes. This brings about some inconvenience to the design and application of the Ethernet.

Some organizations and vendors have proposed dividing the data link layer into two sub-layers: the Logical Link Control (LLC) sub-layer and the Media Access Control (MAC) sub-layer. Then, different physical layers correspond to different MAC sub-layers, and the LLC sub-layer becomes totally independent, as shown in Figure 1-588.

Figure 1-588 Hierarchical structure of the Ethernet data link layer
MAC Sub-layer
  • Functions of the MAC sub-layer

    The MAC sub-layer is responsible for the following:

    • Accessing physical links

    • Identifying stations at the data link layer

      The MAC sub-layer reserves a unique MAC address to identify each station.

    • Transmitting data over the data link layer. After receiving data from the LLC sub-layer, the MAC sub-layer adds the MAC address and control information to the data, and then transfers the data to the physical link. During this process, the MAC sub-layer provides other functions, such as the check function.

  • Accessing physical links

    The MAC sub-layer is associated with the physical layer so that different MAC sub-layers provide access to different physical layers.

    Ethernet has two types of MAC sub-layers:

    • Half-duplex MAC: provides access to the physical layer in half-duplex mode.

    • Full-duplex MAC: provides access to the physical layer in full-duplex mode.

    The two types of MAC are integrated in a network interface card. After the network interface card is initialized, auto-negotiation is performed to choose an operation mode, and then a MAC is chosen according to the operation mode.

  • Identifying stations at the data link layer

    The MAC sub-layer uses a MAC address to uniquely identify a station.

    MAC addresses are managed by the Institute of Electrical and Electronics Engineers (IEEE) and allocated in blocks. An organization, generally a vendor, obtains a unique address block from the IEEE. The address block is called the Organizationally Unique Identifier (OUI), and can be used by the organization to allocate addresses to 16,777,216 devices.

    A MAC address consists of 48 bits, generally represented in dotted hexadecimal notation. For example, the 48-bit MAC address 000000001110000011111100001110011000000000110100 is generally represented as 00e0.fc39.8034.

    The first 24 bits stand for the OUI; the last 24 bits are allocated by the vendor. For example, in 00e0.fc39.8034, 00e0.fc is the OUI allocated by the IEEE to Huawei; 39.8034 is the address number allocated by Huawei.

    The second bit of a MAC address indicates whether the address is globally or locally unique. The Ethernet uses globally unique MAC addresses.

    Ethernet uses the following types of MAC addresses:

    • Physical MAC address

      A physical MAC address is permanently stored in network interface hardware (such as a network interface card) and is used to uniquely identify a terminal on an Ethernet.

    • Broadcast MAC address

      A broadcast MAC address indicates all the terminals on a network.

      The 48 bits of a broadcast MAC address are all 1s. In hexadecimal notation, this address is ffff.ffff.ffff.

    • Multicast MAC address

      A multicast MAC address indicates a group of terminals on a network.

      The eighth bit of a multicast MAC address is 1, such as 000000011011101100111010101110101011111010101000.

  • Transmitting data at the data link layer

    Data transmission at the data link layer is as follows:

    1. The upper layer delivers data to the MAC sub-layer.

    2. The MAC sub-layer stores the data in a buffer.

    3. The MAC sub-layer adds the destination and source MAC addresses to the data, calculates the length of the data frame, and forms Ethernet frames.

    4. The Ethernet frame is sent to the peer according to the destination MAC address.

    5. The peer compares the destination MAC address with entries in the MAC address table.

      • If there is a matching entry, the frame is accepted.

      • If there is no matching entry, the frame is discarded.

    The preceding describes frame transmission in unicast mode. After an upper-layer application is added to a multicast group, the data link layer generates a multicast MAC address according to the application, and then adds the multicast MAC address to the MAC address table. The MAC sub-layer then receives frames with the multicast MAC address and transmits the frames to the upper layer.

Ethernet Frame Structure
  • Format of an Ethernet_II frame

    Figure 1-589 Format of an Ethernet_II frame

    An Ethernet_II frame has the following fields:

    • DMAC

      Indicates the destination MAC address, which specifies the receiver of the frame.

    • SMAC

      Indicates the source MAC address, which specifies the sender of the frame.

    • Type

      The 2-byte Type field identifies the upper layer protocol of the Data field. The receiver can interpret the meaning of the Data field according to the Type field.

      Multiple protocols can coexist on a local area network (LAN). The hexadecimal values in the Type field of an Ethernet_II frame specify different protocols.

      • Frames with the Type field value 0800 are IP frames.

      • Frames with the Type field value 0806 are Address Resolution Protocol (ARP) frames.

      • Frames with the Type field value 0835 are Reverse Address Resolution Protocol (RARP) frames.

      • Frames with the Type field value 8137 are Internetwork Packet Exchange (IPx) and Sequenced Packet Exchange (SPx) frames.

    • Data

      The minimum length of the Data field is 46 bytes, which ensures that the frame is at least 64 bytes in length. A 46-byte Data field is required even if a station transmits 1 byte of data.

      If the payload of the Data field is less than 46 bytes, the Data field must be padded to 46 bytes.

      The maximum length of the Data field is 1500 bytes.

    • CRC

      The Cyclic Redundancy Check (CRC) field provides an error detection mechanism.

      Each sending device calculates a CRC code from the DMAC, SMAC, Type, and Data fields. Then the CRC code is filled into the 4-byte CRC field.

  • Format of an IEEE 802.3 frame

    Figure 1-590 Format of an IEEE 802.3 frame

    As shown in Figure 1-590, the format of an IEEE 802.3 frame is similar to that of an Ethernet_II frame. In an IEEE 802.3 frame, however, the Type field is changed to the Length field, and the LLC field and Sub-Network Access Protocol (SNAP) field occupy 8 bytes of the Data field.

    • Length

      The Length field specifies the number of bytes of the Data field.

    • LLC

      The LLC field consists of three sub-fields: Destination Service Access Point (DSAP), Source Service Access Point (SSAP), and Control.

    • SNAP

      The SNAP field consists of the Org Code field and Type field. Three bytes of the Org Code field are all 0s. The Type field functions the same as that in Ethernet_II frames.

    For descriptions of other fields, see the description of Ethernet_II frames.

    Based on the values of DSAP and SSAP, IEEE 802.3 networks use the following types of frames:

    • If DSAP and SSAP are both 0xff, the IEEE 802.3 frame becomes a NetWare-Ethernet frame bearing NetWare data.

    • If DSAP and SSAP are both 0xaa, the IEEE 802.3 frame becomes an Ethernet_SNAP frame.

      Ethernet_SNAP frames can encapsulate the data of multiple protocols. The SNAP can be considered as an extension of the Ethernet protocol. SNAP allows vendors to invent their own Ethernet transmission protocols.

      The Ethernet_SNAP standard is defined by IEEE 802.1 to help ensure compatibility between the operations between IEEE 802.3 LANs and Ethernet networks.

    • Other values of DSAP and SSAP indicate IEEE 802.3 frames.

  • Jumbo frames

    Jumbo frames are Ethernet frames of greater length complying with vendor standards. Such frames are dedicated to Gigabit Ethernet.

    Jumbo frames carry more than 1518 bytes of payload. Generally, Ethernet frames carry a maximum payload of 1518 bytes. Therefore, to implement transmission of large-sized datagrams at the IP layer, datagram fragmentation is required to transmit the data within an Ethernet frame. A frame header and a framer trailer are added to each frame during frame transmission. Therefore, to reduce network costs and improve network usage and transmission rate, Jumbo frames are introduced.

    The two Ethernet interfaces that need to communicate must both support jumbo frames so that NetEngine 8000 Fs can merge several standard-sized Ethernet frames into a jumbo frame to improve transmission efficiency.

    The default value of the Jumbo frame is 10000 bytes.

LLC Sub-layer

As described, the MAC sub-layer supports IEEE 802.3 frames and Ethernet_II frames. In an Ethernet_II frame, the Type field identifies the upper layer protocol. Therefore, on a device, the LLC sub-layer is not needed and only the MAC sub-layer is required.

In an IEEE 802.3 frame, useful features are defined at the LLC sub-layer in addition to the traditional services of the data link layer. These features are specified by the sub-fields of DSAP, SSAP, and Control.

Networks can support the following types of point-to-point services:

  • Connection-less service

    Currently, the Ethernet implements this service.

  • Connection-oriented service

    The connection is set up before data is transmitted. The reliability of the data transmission is ensured.

  • Connection-less data transmission with acknowledgment

    The connection is not required before data transmission. The acknowledgment mechanism is adopted to improve reliability.

The following is an example describing the application of SSAP and DSAP with terminals A and B that use connection-oriented services. Data is transmitted using the following process:

  1. A sends a frame to B to request a connection with B.

  2. After receiving the frame, if B has enough resources, B returns an acknowledgment message that contains a Service Access Point (SAP). The SAP identifies the connection required by A.

  3. After receiving the acknowledgment message, A knows that B has set up a local connection between them. After creating a SAP, A sends a message containing the SAP to B. The connection is set up.

  4. The LLC sub-layer of A encapsulates the data into a frame. The DSAP field is filled in with the SAP sent by B; the SSAP field is filled in with that created by A. Then the LLC sub-layer of A transfers the data to its MAC sub-layer.

  5. The MAC sub-layer of A adds the MAC address and Length field to the frame, and then transfers the frame to the data link layer.

  6. After the frame is received at the MAC sub-layer of B, the frame is transferred to the LLC sub-layer. The LLC sub-layer identifies the connection that the frame belongs to according to the DSAP field.

  7. After checking and acknowledging the frame based on the connection type, the LLC sub-layer of B transfers the frame to the upper layer.

  8. After the frame reaches its destination, A sends B a frame instructing B to release the connection. At this time, the communications end.

Application Scenarios for Ethernet

Computer Interconnection

Computer interconnection is the principal object and the major application of Ethernet technology.

In early Ethernet LANs, computers were connected through coaxial cables to access shared directories or a file server. All the computers, whether they are servers or hosts, are equal on this network.

However, because most traffic flows between clients and servers, the early traffic model led to bottlenecks on servers.

After the introduction of full-duplex Ethernet technology and Ethernet switches, servers can connect to high-speed interfaces (100 Mbit/s) on Ethernet switches. Clients can use lower-speed interfaces. This approach reduces traffic bottlenecks. The modern operating system provides distributed services and database services, and allows servers to communicate with clients and other servers for data synchronization. 100M FE cannot meet the bandwidth requirement; therefore, the 1000M Ethernet technology is introduced to meet the requirements of the modernized technology.

Interconnection Between High-Speed Network Devices

The need to support Internet traffic challenged the bandwidth between some traditional network devices such as routers. 1000M Ethernet was the first choice to solve the problem. 100M FE also helped because after being converged, 100M FE networks can form FE channels whose speed ranges from 100 Mbit/s to 1000 Mbit/s.

MAN Access Methods

Accessing a Metropolitan Area Network (MAN) enables users to surf the Internet, download files, and view Video on Demand (VoD) programs. Ethernet technology is the technology used to access MANs because most computers support Ethernet network interface cards.

Ethernet Interface Configuration

Ethernet has become the most important local area network (LAN) networking technology because it is flexible, simple, and easy to implement.

Overview of Ethernet Interfaces

Ethernet interfaces include conventional Ethernet interfaces, Fast Ethernet (FE) interfaces, and Gigabit Ethernet (GE) interfaces.

Introduction

Both Ethernet and token ring networks are typical types of LANs. The Ethernet technology has become the most important LAN networking technology because it is flexible, simple, and easy to implement.

The NetEngine 8000 F supports the following types of Ethernet interfaces:
  • GE interfaces: comply with 1000Base-TX physical layer specifications and are compatible with the 10Base-T and 100Base-TX physical layer specifications.

  • 10GE interfaces: comply with IEEE 802.3ae and are compatible with 10Base-T, 100Base-TX, and 1000Base-TX physical layer specifications.

  • 25GE interfaces: comply with IEEE802.by.
  • 40GE interfaces: comply with IEEE802.3ba.
  • 50GE interfaces: comply with IEEE802.3cd.
  • 100GE interfaces: comply with IEEE 802.3ba and are compatible with 100GBase-LR4 physical layer specifications.

  • 200GE interfaces: comply with IEEE802.3bs.
  • 400GE interfaces: comply with IEEE802.3bs.

Ethernet electrical interfaces can work in either full-duplex or half-duplex mode. They support auto-sensing. In auto-sensing mode, they negotiate with other network devices for the most suitable duplex mode and rate. This simplifies system configuration and management.

Basic Concepts of Ethernet Interfaces

  • Ethernet interface types

    Table 1-338 shows the types of Ethernet interfaces defined on the device. Ethernet interfaces are classified into different types to meet various network requirements.

    Table 1-338 Ethernet interface types

    Interface type

    Description

    Layer 3 Ethernet interface

    A physical interface that operates at the network layer. The interface can be configured with an IP address, supporting Layer 3 protocols and providing routing functions.

    Layer 3 Ethernet sub-interface

    A logical interface that is configured on a main interface. The main interface can be a physical interface (such as a Layer 3 Ethernet interface) or a logical interface. The Layer 3 Ethernet sub-interface shares physical layer parameters of the main interface and can be configured with specific link layer and network layer parameters. You can activate or deactivate the sub-interface, without affecting the performance of the main interface. The change of the main interface status, however, affects the sub-interface. The sub-interface functions properly only if the main interface is in the Up state.

  • Ethernet interface rate and duplex mode

    Only Ethernet electrical interfaces instead of Ethernet optical interfaces support rate and duplex mode configuration. Ethernet optical interfaces support only the auto-negotiation mode.

    By default, the Ethernet interface rate and duplex mode are automatically negotiated. In auto-negotiation mode, a local interface automatically adjusts its rate and duplex mode based on the peer interface rate and duplex mode so that both ends can work in the same duplex mode at the highest possible rate.

    If interface hardware complies with auto-negotiation standards, it is recommended that Ethernet interfaces work in auto-negotiation mode, unless the two ends of a link have different Ethernet rates or duplex modes. In this case, you can disable auto-negotiation and manually set the interface rate and duplex mode.

    However, manually setting the interface rate and duplex mode usually complicates network planning and maintenance, and incorrect settings may affect or even interrupt the network communication.

    • If the rates of Ethernet interfaces at two ends of a link are set to 10 Mbit/s and 100 Mbit/s respectively, the link goes down.

    • If the Ethernet interface at one end of a link works in duplex mode at a fixed rate (such as 10 Mbit/s or 100 Mbit/s) and the Ethernet interface at the other end works in auto-negotiation mode, the interface working in auto-negotiation mode can detect the peer interface's fixed rate, not the duplex mode. In this case, even if negotiation between the two ends succeeds, the interface working in auto-negotiation mode adopts the default working mode, 10M half duplex.

      That is, if one end works in auto-negotiation mode while the other end works in a fixed mode, the auto-negotiation mechanism does not take effect. To implement the auto-negotiation mechanism, both the communicating parties must work in auto-negotiation mode.

    • If one end of a link works in full-duplex mode while the other end works in half-duplex mode, communication performance of the interfaces is affected.

    Manually setting the interface rate and duplex mode is recommended only when auto-negotiation of an Ethernet link fails. When there is an auto-negotiation problem, you are advised to upgrade device software or hardware for the device to support the auto-negotiation mechanism defined in IEEE 802.3u/z.

    The poor quality of network cables may also cause auto-negotiation failures.

  • Maximum transmission unit (MTU)

    MTU is the largest packet of data that can be transmitted on a network, expressed in bytes. MTU is determined by data link layer protocols, and MTU values vary with networks.

    The size of packets is limited at the network layer. Whenever receiving an IP packet, the IP layer determines the next-hop interface for the packet and obtains the MTU configured on the interface. Then, the IP layer compares the MTU with the packet length. If the packet length is longer than the MTU, the IP layer fragments the packet into smaller packets, which are shorter than or equal to the MTU. If unfragmentation is configured, some packets may be discarded during data transmission at the IP layer.

    If the size of packets is much greater than the configured MTU value, the packets are broken into a great number of fragments. The packets may be discarded by quality of service (QoS) queues.

  • LAN mode of 10GE interfaces

    A ten-GigabitEthernet (10GE) interface can operate in either of the following modes in terms of its physical feature:
    • LAN mode: In this mode, the 10GE interface transmits Ethernet packets and connects to an Ethernet network.
  • Overhead bytes

    SDH frames contain various overhead bytes that are used to implement operation and maintenance functions, such as layered management of SDH transport networks. J0 and J1 are used for interoperability between devices of different countries, areas, or manufacturers.

  • Loopback test for Ethernet interfaces

    Loopback tests can be performed on Ethernet interfaces to check whether the interfaces operate properly.

    The loopback tests are classified as follows:

    • Internal loopback test: establishes a loop within the switching module of an Ethernet interface to check whether certain hardware of the interface is faulty.

    • External loopback test: sends the packet received from a remote interface back to the remote interface, instead of forwarding the packet to the destination address. This kind of test is used to check whether the link between the local and peer ends is faulty.

    • An Ethernet interface cannot properly forward packets during a loopback test.

    • If an Ethernet interface is down, only internal loopback tests can be performed.

      If an Ethernet interface is administratively down using the shutdown command, neither internal nor external loopback tests can be performed.

    • The shutdown command cannot be run on an Ethernet interface during the loopback test.

    • After the loopback test function is enabled on an Ethernet interface, the interface operates in full-duplex mode. After the loopback test function is disabled, the Ethernet interface restores the original settings.

Configuration Precautions for Ethernet Interface

Feature Requirements

Table 1-339 Feature requirements

Feature Requirements

Series

Models

In the interconnection scenario, the negotiation modes, duplex modes, and rates of the two ends of a link must be the same. Otherwise, the interconnection may fail.

NetEngine 8000 F1A

NetEngine 8000 F1A

When an interface works in 1GE/10GE mode, the forwarding delay is long when large packets are received or sent. This is because the forwarding delay includes the delay for receiving/sending entire packets, which is calculated by dividing the interface rate into the maximum packet length. For example, if the maximum packet length is 9300 bytes, the receiving delay of a 1GE interface is 74.4 μs (9300 bytes/1GE = 74.4 μs).

NetEngine 8000 F1A

NetEngine 8000 F1A

Configuring an Ethernet Interface on an Interface Board

You can configure parameters for Ethernet interfaces on interface boards to ensure that physical connections work properly between devices.

Usage Scenario

You need to configure parameters for an Ethernet interface before using the interface to transmit packets on an Ethernet.

All parameters for an Ethernet interface have default values, except the IP address. Any change to an Ethernet interface on a local device must be the same as that on the peer device.

Pre-configuration Tasks

None

Ethernet Interface Attributes

Ethernet interfaces on the NetEngine 8000 F support different attributes, as listed in Table 1-340.

Table 1-340 Ethernet interface attributes

Ethernet Interface Attribute

Ethernet Electrical Interface

Ethernet Optical Interface

10GE WAN Interface

10GE LAN/WAN Interface

25GE Interface

400GE Interface

40GE Interface

50GE Interface

50|100GE Interface

MTU configuration for an Ethernet interface:

mtu mtu or ipv6 mtu mtu

Supported

Supported

Supported

Supported

Supported

Supported

Supported

Not supported

Not supported

Duplex mode configuration for an Ethernet interface:

duplex { full | half | auto }

Supported

Not supported (the default full-duplex mode is supported)

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Rate configuration for an Ethernet electrical interface:

speed { 10 | 100 | 1000 | auto }

Supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Negotiation mode configuration for an Ethernet interface:

negotiation auto

Supported

Supported

Supported only when the interfaces at both ends support the GE rate. The configuration takes effect only in the GE interface view.

Supported only when the interfaces at both ends support the GE rate. The configuration takes effect only in the GE interface view.

Supported

Not supported

Not supported

Not supported

Not supported

Flow control configuration for a GE interface:

flow control [ receive | send ]

Supported

Supported

Supported

Supported

Supported

Supported

Supported

Supported

Supported

Setting the Maximum Frame Length Allowed by an Ethernet Interface

Jumbo frames are designed for gigabit Ethernet networks. They are giant frames and their lengths vary according to vendors. To enable devices that transmit different lengths of jumbo frames to communicate successfully, adjust the maximum frame length allowed by either the local or peer Ethernet interface.

Context

An Ethernet network splits data into frames with a certain length and adds frame headers and trailers when transmitting them. If jumbo frames are used to complete file transfer, frame costs are reduced, and network resource utilization and transmission efficiency are improved.

To enable two interfaces to communicate successfully, ensure that a jumbo frame sent by an interface is not greater than that allowed by the other interface.

  • Properly plan the jumbo frame length before network deployment. A jumbo frame is discarded or processed incorrectly if its length exceeds that allowed by an interface.
  • Setting the maximum frame length allowed by an Ethernet interface limits the maximum length of Ethernet Layer 2 packets, thus affecting the MTU for Layer 3 packets. If a service also has MTU requirements, plan both the MTU and maximum frame length properly.

Perform the following operations on each router:

Procedure

  • Set the maximum frame length allowed by an Ethernet interface.
    1. Run system-view

      The system view is displayed.

    2. Run interface gigabitethernet interface-number

      The Ethernet interface view is displayed.

    3. Run jumboframe value

      The maximum frame length allowed by the Ethernet interface is set.

    4. Run commit

      The configuration is committed.

Configuring the MTU for an Ethernet Interface

MTU is the largest packet of data that can be transmitted on a network, expressed in bytes. MTU is determined by data link layer protocols, and MTU values vary with networks. A proper MTU is a prerequisite for normal communication between network devices.

Context

The size of packets is limited at the network layer. Whenever receiving an IP packet, the IP layer determines the next-hop interface for the packet and obtains the MTU configured on the interface. Then, the IP layer compares the MTU with the packet length. If the packet length is longer than the MTU, the IP layer fragments the packet into smaller packets, which are shorter than or equal to the MTU.

If unfragmentation is configured, some packets may be discarded during data transmission at the IP layer. To ensure that jumbo packets are not dropped during transmission, set an MTU on an interface to fragment these packets into smaller ones.

  • If the size of packets is much greater than the configured MTU value, the packets are broken into a great number of fragments. The packets may be discarded by quality of service (QoS) queues.

  • If the configured MTU value is too large, packets may be transmitted at a low speed.

  • After changing the MTU of an Ethernet interface, also change the MTU of the peer Ethernet interface to ensure that the MTUs of both interfaces are the same. If the MTUs are different, services may be interrupted.

Perform the following steps on each router:

Procedure

  • Set an IPv4 MTU for an Ethernet interface.
    1. Run system-view

      The system view is displayed.

    2. Run interface gigabitethernet interface-number

      The specified Ethernet interface view is displayed.

    3. Run mtu mtu

      An IPv4 MTU is set for the Ethernet interface.

      The MTU is expressed in bytes. The MTU value range of an Ethernet interface is determined by the device type.

    4. Run commit

      The configuration is committed.

  • Set an IPv6 MTU for an Ethernet interface.
    1. Run system-view

      The system view is displayed.

    2. Run interface gigabitethernet interface-number

      The specified Ethernet interface view is displayed.

    3. Run ipv6 enable

      IPv6 is enabled on the Ethernet interface.

    4. Run ipv6 mtu mtu

      An IPv6 MTU is set for the Ethernet interface.

      The MTU is expressed in bytes. The MTU value range of an Ethernet interface is determined by the specific device.

    5. Run commit

      The configuration is committed.

Follow-up Procedure

The length of a QoS queue is limited. If the size of packets is much greater than the configured MTU value, the packets are broken into a great number of fragments. The packets may be discarded by the QoS queue. To address this problem, you can increase the length of the QoS queue. The queue scheduling mechanism First In First Out (FIFO) is used on an interface by default. You can change the FIFO queue length. For detailed configuration of a QoS queue, see HUAWEI NetEngine 8000 F1A series Router Configuration Guide - QoS.

Configuring a Working Mode for an Ethernet Interface

An Ethernet interface works in either half-duplex or full-duplex mode at the physical layer of an Ethernet network. To ensure communication between devices, configure a proper duplex mode for an Ethernet interface.

Context

On a large-scale Ethernet network, manually setting the interface rate and duplex mode, verifying device configurations, and checking Ethernet interface statistics are time-consuming. Manually setting the interface rate and duplex mode is recommended only when auto-negotiation of an Ethernet link fails. When there is an auto-negotiation problem, you are advised to upgrade device software or hardware for the device to support the auto-negotiation mechanism defined in IEEE 802.3u/z.

Perform the following steps on each router:

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface gigabitethernet interface-number

    The Ethernet interface view is displayed.

  3. Run either of the following commands:

    • To configure a working mode for the Ethernet interface, run the duplex { full | half | auto } command.

    • To configure the Ethernet interface to work in auto-negotiation mode, run the negotiation auto command.

    • Ethernet optical interfaces work only in full-duplex mode.
    • When connecting to a hub, an Ethernet electrical interface on the router must work in half-duplex mode because the hub can work only in this mode. When connecting to a LAN switch, an Ethernet electrical interface on the router can work in either full-duplex or half-duplex mode. Ethernet electrical interfaces on the router and peer device must work in the same mode.
    • If the working rate of a GE electrical interface is 1000 Mbit/s, you cannot configure the GE electrical interface to work in half-duplex mode.
    • If the working rate of a GE electrical interface is 1000 Mbit/s and auto-negotiation is enabled, you cannot configure the GE electrical interface to work in half-duplex or full-duplex mode. In addition, you cannot disable auto-negotiation on the interface.
    • If the working rate of a GE electrical interface is 10 Mbit/s or 100 Mbit/s, you can configure the interface to work in half-duplex mode and auto-negotiation mode.
    • The rate of a 50|100GE interface can be adjusted using the switch mode command.

  4. Run commit

    The configuration is committed.

Configuring the Working Rate for an Ethernet Electrical Interface

The volume of traffic that can be transmitted on an Ethernet electrical interface is determined by the working rate of the interface. To ensure communication between devices, set a proper working rate for Ethernet electrical interfaces.

Context

On a large-scale Ethernet network, it takes a great deal of time to manually set the interface rate and duplex mode, verify device configurations, and check statistics on Ethernet interfaces. Manually setting the interface rate and duplex mode is recommended only when auto-negotiation of an Ethernet link fails. When there is an auto-negotiation problem, upgrade software or hardware to support the auto-negotiation mechanism defined in IEEE 802.3u/z.

You need to set the working rate only for Ethernet electrical interfaces, not Ethernet optical interfaces.

Perform the following steps on each router:

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface gigabitethernet interface-number

    The specified Ethernet electrical interface view is displayed.

  3. Run speed { 10 | 100 | 1000 | auto }

    The working rate is set for the Ethernet electrical interface.

  4. Run commit

    The configuration is committed.

Configuring the LAN/WAN Transmission Mode for a 10GE Interface

A 10G XFP multi-mode optical transceiver works in either LAN or WAN mode. You can configure a proper mode as required.

Context

In VS mode, this configuration task is supported only by the admin VS.

Perform the following steps on the router:

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface gigabitethernet interface-number

    The view of the 10GE interface is displayed.

  3. Run shutdown

    The interface is shut down.

  4. Run set transfer-mode { lan | wan }

    The LAN/WAN transmission mode is configured for the 10GE interface.

  5. Run undo shutdown

    The interface is restarted.

    Before configuring a 10GE LAN, 100GE LAN interface to work in LAN transmission mode, delete all configurations but the IP address from the interface and shut down the interface.

  6. Run commit

    The configuration is committed.

Configuring the Overhead Byte for a 10GE WAN Interface

SONET/SDH provides a variety of overhead bytes. You can configure overhead bytes for a 10GE WAN interface to implement monitoring at different levels.

Context

10 GE WAN interfaces need to use SDH/SONET as the frame format, and the overhead byte needs to be set.

Perform the following steps on the router:

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The specified Ethernet interface view is displayed.

  3. Configure an overhead byte for the 10GE WAN interface.

    Run any of the following commands as required.

    • Run flag j0 64byte-or-null-mode [ j0-value ] or flag j0 { 16byte-mode | 1byte-mode } [16byte-value |1byte-value]

      The overhead byte j0 is configured for the interface.

    • Run flag j1 64byte-or-null-mode [ j1-value ] or flag j1 { 16byte-mode | 1byte-mode } j1-value

      The overhead byte j1 is configured for the interface.

    • Run flag c2 c2-value

      The overhead byte c2 is configured for the interface.

  4. Run commit

    The configuration is committed.

Enabling Flow Control on a GE Interface

To prevent traffic congestion between a local device and its peer device, configure flow control on GE interfaces of both devices to control the rates at which the GE interfaces send and receive packets.

Context

Perform the following steps on each router:

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface gigabitethernet interface-number

    The specified Ethernet interface view is displayed.

  3. Run flow control [ receive | send ]

    Flow control is enabled on a GE interface.

    After flow control is enabled on a GE interface, if the rate at which the peer interface sends traffic reaches the set threshold, such as 1 Gbit/s, the interface sends a Pause frame to instruct the peer interface to send traffic at a lower rate. If the peer interface also supports flow control, it sends data at a lower rate after receiving the Pause frame. This allows the local interface to process received frames properly. If the peer interface does not support flow control, it will not send data at a lower rate after receiving the Pause frame.

  4. Run commit

    The configuration is committed.

Configuring Self-Loop Detection on the GE Interface

After the self-loop detection function is enabled, the self-loop on an interface can be detected and then the interface is blocked.

Context

A router enabled with the loopback detect function periodically sends specially constructed loopback detect packets. If a self-loop exists on an interface, the loopback detect packets will be looped back to the router, and the router can then determine that a self-loop has occurred. A malicious attacker can trick a loopback-detect-enabled router into believing that a self-loop has occurred, by sending loopback detect packets obtained using Sniffer back to the router.

The GE interface self-loop detection function is used only for link self-loop tests in the service deployment phase. To prevent security risks, disable this function after services are running properly.

Do as follows on the routers:

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface gigabitethernet interface-number

    The GE interface view is displayed.

  3. Run loopback-detect enable

    The self-loop detection function is enabled.

  4. Run loopback-detect block block-time

    Set the delay time of the interface recovery after the self-loop on the interface is eliminated.

Enabling the Statistics Function on a Sub-interface

After enabling the statistics function on a sub-interface, you can view the statistics about received or sent packets on the sub-interface.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The view of the Ethernet sub-interface that requires the statistics function is displayed.

  3. Run statistic enable

    The statistics function is enabled on an Ethernet sub-interface.

  4. Run commit

    The configuration is committed.

    In addition to running the statistic enable command on a sub-interface to enable the statistics function, you can run the subinterface traffic-statistics enable command in the system view or Ethernet interface view to enable the statistics function in batches. Running the subinterface traffic-statistics enable command consumes a large number of system resources. Therefore, exercise caution when running this command. Note the following points:
    • If the subinterface traffic-statistics enable command is run in the system view, the traffic statistics function is enabled on all sub-interface of the device.
    • If the subinterface traffic-statistics enable command is run in the view of a physical interface, the traffic statistics function is enabled on all sub-interfaces of the interface.

Configuring the Hold-Time Interval After an Interface Goes Up/Down

When an interface frequently alternates between Up and Down, flapping may occur. To prevent the problem, you can configure the hold-time interval after an interface goes Up or Down. This command is supported only by the admin VS.

Procedure

  1. Run system-view

    The system view is displayed.

  2. To configure the hold-time interval after the interface goes Up or Down globally, perform either of the following configurations as required.

    • Run the carrier up-hold-time interval command to configure the hold-time interval before the interface goes Up.

    • Run the carrier down-hold-time interval command to configure the hold-time interval before the interface goes Down.

    When a non-default hold-time interval is configured on the interface, the interval configured on the interface takes effect. When the interface uses the default hold-time interval, the global configuration takes effect.

  3. To set the hold-time interval value on a specified interface, run interface interface-type interface-number

    The interface view is displayed.

  4. Run either of the following commands as required.

    • To configure the hold-time interval after an interface goes Up, run carrier up-hold-time interval

    • To configure the hold-time interval after an interface goes Down, run carrier down-hold-time interval

  5. Run commit

    The configuration is committed.

Configuring an Alarm threshold for a Sudden Traffic Rate Change on an Interface

To allow a device to detect real-time traffic rate changes on an interface, you can configure the device to generate an alarm when the traffic rate change (%) on the interface exceeds a specified threshold (value of the ratio-threshold parameter) and the bandwidth usage (%) is not lower than the lower threshold (value of the bandwidth-usage-threshold parameter). Traffic rate change on an interface (%) = (Interface rate in the current traffic statistics collection interval – Interface rate in the previous traffic statistics collection interval)/Interface rate in the previous traffic statistics collection interval

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The view of the Ethernet interface on which the alarm threshold for a sudden traffic rate change needs to be set is displayed.

  3. Run flow-change fall start-check bandwidth-ratio bandwidth-ratio-threshold

    The lower threshold of the initial bandwidth usage (%) is set for triggering the sudden traffic rate change alarm.

  4. Run flow-change fall { input-threshold-ratio | output-threshold-ratio } ratio-threshold

    An alarm threshold for a sudden traffic rate change is set on the interface.

  5. (Optional) Run flow-change interval interval-value

    The interval for collecting traffic statistics is set on the interface.

  6. (Optional) Run flow-change fall disable

    Detection of sudden traffic rate changes is disabled on the interface.

  7. Run quit

    Return to the system view.

  8. (Optional) Run flow-change fall remain-time interval

    An alarm clearance period is set.

  9. (Optional) Run reset flow-change fall interface interface-type interface-number

    Detection of traffic rate changes is reset on the interface.

  10. Run commit

    The configuration is committed.

Disabling an Ethernet Interface or Sub-interface from Broadcasting Packets

To protect a device against attacks from broadcast packets and improve network security, disable the Ethernet interfaces or sub-interfaces on the device from broadcasting packets.

Context

An Ethernet interface or sub-interface broadcasts the packets they receive. Broadcasting attack packets from attackers consumes a lot of device resources, causing device performance deterioration and even device breakdown. To resolve this problem, disable the Ethernet interface or sub-interface from broadcasting packets.

You can disable the Ethernet interface or sub-interface from broadcasting packets if the network has fixed topologies or is configured with routes specified by static MAC addresses.

Procedure

  • Disable an Ethernet interface from broadcasting packets.

    The Ethernet interface must work in Layer 2 mode. Otherwise, it cannot be disabled from broadcasting packets.

    1. Run system-view

      The system view is displayed.

    2. Run interface interface-type interface-number

      The view of the Ethernet interface to be disabled from broadcasting packets is displayed.

    3. Run portswitch

      The interface is switched to the Layer 2 mode.

      If the Ethernet interface has been operating in Layer 2 mode, skip this step.

    4. Run broadcast discard

      The Ethernet interface is disabled from broadcasting packets.

    5. Run commit

      The configuration is committed.

  • Disable an Ethernet sub-interface from broadcasting packets.

    Before disabling an Ethernet sub-interface from broadcasting packets, make sure that the sub-interface is configured as a Dot1q sub-interface, QinQ VLAN tag termination sub-interface, Dot1q VLAN tag termination sub-interface, or QinQ stacking sub-interface.

    1. Run system-view

      The system view is displayed.

    2. Run interface interface-type interface-number.subinterface-number

      The view of the Ethernet sub-interface to be disabled from broadcasting packets is displayed.

    3. Run any of the following commands:

      • To configure the Ethernet sub-interface as a Dot1q sub-interface, run the vlan-type dot1q vlan-id command.

      • To configure the Ethernet sub-interfaces as a Dot1q sub-interface and configure a policy for it, run the vlan-type dot1q vlanid { 8021p { 8021p-value1 [ to 8021p-value2 ] } &<1-8> | dscp { dscp-value1 [ to dscp-value2 ] } &<1-10> | default | eth-type eth-type-value } command.

      • To configure the Ethernet sub-interface as a Dot1q VLAN tag termination sub-interface, run the dot1q termination vid low-pe-vid [ to high-pe-vid ] [ vlan-group group-id ] command.

      • To configure the Ethernet sub-interface as a Dot1q VLAN tag termination sub-interface and configure a policy for it, run the dot1q termination vid low-pe-vid [ to high-pe-vid ] { 8021p { val8021p1 [ to val8021p2 ] } &<1-8> | dscp { valdscp1 [ to valdscp2 ] } &<1-10> | eth-type eth-type-value | default } [ vlan-group group-id ] command.

      • To configure the Ethernet sub-interface as a QinQ VLAN tag termination sub-interface, run the qinq termination pe-vid pe-vid [ to high-pe-vid ] ce-vid ce-vid [ to high-ce-vid ] [ vlan-group group-id ] command.

      • To configure the Ethernet sub-interface as a QinQ stacking sub-interface, run the qinq stacking vid low-ce-vid [ to high-ce-vid ] [ vlan-group group-id ] command.

      • To configure the Ethernet sub-interface as a QinQ stacking sub-interface and configure a policy for it, run the qinq stacking vid [ low-ce-vid to high-ce-vid ] { 8021p { 8val8021p1 [ to val8021p2 ] } &<1-8> | dscp { valdscp1 [ to valdscp2 ] } &<1-10> | eth-type eth-type-value | default } [ vlan-group group-id ] command.

    4. Run broadcast discard

      The Ethernet sub-interface is disabled from broadcasting packets.

    5. Run commit

      The configuration is committed.

(Optional) Setting a Bandwidth Mode for an Interface

An interface's bandwidth mode (1/10/25 Gbit/s) is restricted by its hosting device's hardware. Before setting a bandwidth mode for an interface, ensure that the hardware supports this function.

Context

When interconnecting interfaces that require the same bandwidth mode, you can run the port-mode command to set an interface's bandwidth.

In VS mode, this configuration task is supported only by the admin VS.

Perform the following steps on the router:

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The GE interface view is displayed.

  3. Set an interface's bandwidth.

    Run port-mode

    The bandwidth mode for a GE interface is configured.

  4. Run commit

    The configuration is committed.

Verifying the Ethernet Interface Configuration

After an Ethernet interface is successfully configured on an interface board, you can view information about the IP address, MTU, working rate, working mode, and interface type of the Ethernet interface, and statistics about packets sent and received on the interface.

Procedure

  • Run the display interface gigabitethernet interface-number command to check the status of the specified Ethernet interface.
  • Run the display transfer-mode command to check the transfer mode of a specific 10 GE LAN WAN interface.

Configuring Ethernet Sub-interfaces to Support Communication Between VLANs

To implement communication between hosts in a VLAN and hosts in another VLAN, create sub-interfaces on the Ethernet interface of a Layer 3 device that connects to a Layer 2 device and encapsulate 802.1q on the sub-interfaces.

Usage Scenario

When a Layer 2 switch belongs to different VLANs, create sub-interfaces on the Ethernet interface of a Layer 3 device that connects to the Layer 2 switch and add each sub-interface to a VLAN to ensure communication between hosts from different VLANs. In addition, configure 802.1q encapsulation and an IP address on each sub-interface.

As shown in Figure 1-591, the PE uses an Ethernet interface to connect to CE, and CE is connected to hosts in VLAN 10 and VLAN 20.

Figure 1-591 Networking for Ethernet sub-interfaces supporting communication between VLANs

To allow hosts in VLAN 10 to communicate with hosts in VLAN 20, perform the following steps on the PE:

  • Create Ethernet sub-interfaces.

  • Configure 802.1q encapsulation on the sub-interfaces and associate the sub-interfaces with VLANs.

  • Assign IP addresses to the sub-interfaces.

Pre-configuration Tasks

Before configuring Ethernet sub-interfaces to support communication between VLANs, power on the device and ensure a successful self-check.

Creating a Sub-interface

To ensure communication between VLANs, create Ethernet sub-interfaces on a Layer 3 device.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number.subinterface-number

    An Ethernet sub-interface is created. If an Ethernet sub-interface exists, the Ethernet sub-interface view is displayed.

    Sub-interfaces cannot be created on an Eth-Trunk member interface.

  3. Run commit

    The configuration is committed.

    In the scenario where an interface has a large number of sub-interfaces, if you run the shutdown command in the sub-interface view to shut down the sub-interfaces one after another, the work load is huge. To shut down the sub-interface in batch, run the shutdown interface command in the system view.

Configuring an IP address

To implement communication between VLANs, establish IP routes.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number.subinterface-number

    The view of the Ethernet sub-interface that needs to be configured with an IP address is displayed.

  3. Run ip address ip-address ip-mask [ sub ]

    An IP address is assigned to the Ethernet sub-interface.

    When two or more IP addresses are configured for an Ethernet sub-interface, the keyword sub can be used to indicate secondary IP addresses.

    For the detailed configuration of an IP address, see the NetEngine 8000 F Configuration Guide - IP Service.

  4. Run commit

    The configuration is committed.

    In the scenario where an interface has a large number of sub-interfaces, if you run the shutdown command in the sub-interface view to shut down the sub-interfaces one after another, the work load is huge. To shut down the sub-interface in batch, run the shutdown interface command in the system view.

Configuring 802.1Q Encapsulation

When a Layer 3 device uses an Ethernet interface to connect to a Layer 2 device and the Layer 2 device's interfaces are added to VLANs, configure 802.1q encapsulation on the sub-interfaces of the Ethernet interface to ensure communication between the Layer 3 and Layer 2 devices.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number.subinterface-number

    The view of the Ethernet sub-interface that needs to be configured with 802.1Q encapsulation is displayed.

  3. Run either of the following commands as required:

    • To configure a dot1q sub-interface, run the vlan-type dot1q vlan-id command.

      Each Ethernet sub-interface can be associated with only one VLAN. Sub-interfaces of different interfaces can be bound to the same VLAN; sub-interfaces of the same interface cannot be bound to the same VLAN.

    • To configure a dot1q sub-interface and a matching policy for the sub-interface, run thevlan-type dot1q vlanid { 8021p { 8021p-value1 [ to 8021p-value2 ] } &<1-8> | dscp { dscp-value1 [ to dscp-value2 ] } &<1-10> | default | eth-type PPPoE } command.

    • If you do not configure a matching policy, the dot1q sub-interface matches packets carrying the specified VLAN ID. If you configure a matching policy, the dot1q sub-interface matches packets carrying the specified VLAN ID+802.1p value/DSCP value/EthType.

    • After the vlan-type dot1q vlan-id command is run in the Ethernet sub-interface view, the VLAN range belongs to the sub-interface, and any VLAN within the VLAN range cannot be configured with the 802.1p value/DSCP value/EthType on other sub-interfaces.

  4. Run commit

    The configuration is committed.

    In the scenario where an interface has a large number of sub-interfaces, if you run the shutdown command in the sub-interface view to shut down the sub-interfaces one after another, the work load is huge. To shut down the sub-interface in batch, run the shutdown interface command in the system view.

Verifying the Ethernet Sub-interface Configuration

After Ethernet sub-interfaces are configured to support communication between VLANs, you can view information about the sub-interface, including the MTU, IP address, and VLAN encapsulation.

Prerequisites

The Ethernet sub-interfaces have been configured to support communication between VLANs.

Procedure

  • Run the display interface gigabitethernet [ interface-number [ .subnumber ] ] command to check the status of an Ethernet sub-interface.

Configuration Examples for Ethernet Interfaces or Sub-interfaces

This section provides configuration examples of Ethernet interfaces or sub-interfaces, including networking requirements, configuration roadmap, data preparation, and configuration files.

Example for Configuring Ethernet Interface Parameters

In this example, two interconnected Ethernet interfaces work at different rates, causing the link to go Down.

Networking Requirements

As shown in Figure 1-592, Ethernet electrical interfaces on Device A, Device B, and Device C are connected to the IP network 10.1.1.0/24, and an IP address is configured for each interface. Device A and Device B can ping each other but Device A and Device C cannot ping each other. It is found that the link between Device A and Device C is Down and the rate of GE 0/1/1 on Device A is 100 Mbit/s and the rate of GE 0/1/1 on Device B 10 Mbit/s.

Figure 1-592 Networking for configuring Ethernet interface parameters

Interface 1 in this example represents GE 0/1/1.



Precautions

  • Rates of the Ethernet interfaces at the two ends of a link must be the same.

  • After the rate of an interface is changed, you need to restart the interface to make the configuration take effect.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Change the rate of the Ethernet interface on router C to be the same as the rate of the peer interface.

    If both Ethernet interfaces support auto-negotiation, configure the interfaces to work in the default auto-negotiation mode. In this mode, the interfaces automatically negotiate their rate and duplex mode.

  2. Assign an IP address to each interface of the router for communication at the network layer.

Data Preparation

To complete the configuration, you need the following data:

  • All devices in this example support the auto-negotiation mode, and parameters of all the Ethernet interfaces adopt the default values.

Procedure

  1. Configure Device A.

    <HUAWEI> system-view
    [HUAWEI] sysname DeviceA
    [HUAWEI] commit
    [~DeviceA] interface gigabitethernet 0/1/1
    [~DeviceA-GigabitEthernet0/1/1] undo shutdown
    [~DeviceA-GigabitEthernet0/1/1] description DeviceA to Ethernet
    [~DeviceA-GigabitEthernet0/1/1] speed auto
    [~DeviceA-GigabitEthernet0/1/1] duplex auto
    [~DeviceA-GigabitEthernet0/1/1] shutdown
    [~DeviceA-GigabitEthernet0/1/1] commit
    [~DeviceA-GigabitEthernet0/1/1] undo shutdown
    [~DeviceA-GigabitEthernet0/1/1] ip address 10.1.1.1 255.255.255.0
    [~DeviceA-GigabitEthernet0/1/1] commit
    [~DeviceA-GigabitEthernet0/1/1] quit

  2. Configure Device B.

    <HUAWEI> system-view
    [HUAWEI] sysname DeviceB
    [HUAWEI] commit
    [~DeviceB] interface gigabitethernet 0/1/1
    [~DeviceB-GigabitEthernet0/1/1] undo shutdown
    [~DeviceB-GigabitEthernet0/1/1] description DeviceB to Ethernet
    [~DeviceB-GigabitEthernet0/1/1] speed auto
    [~DeviceB-GigabitEthernet0/1/1] duplex auto
    [~DeviceB-GigabitEthernet0/1/1] shutdown
    [~DeviceB-GigabitEthernet0/1/1] commit
    [~DeviceB-GigabitEthernet0/1/1] undo shutdown
    [~DeviceB-GigabitEthernet0/1/1] ip address 10.2.1.2 255.255.255.0
    [~DeviceB-GigabitEthernet0/1/1] commit
    [~DeviceB-GigabitEthernet0/1/1] quit

  3. Configure Device C.

    <HUAWEI> system-view
    [HUAWEI] sysname DeviceC
    [HUAWEI] commit
    [~DeviceC] interface gigabitethernet 0/1/1
    [~DeviceC-GigabitEthernet0/1/1] undo shutdown
    [~DeviceC-GigabitEthernet0/1/1] description DeviceC to Ethernet
    [~DeviceC-GigabitEthernet0/1/1] speed auto
    [~DeviceC-GigabitEthernet0/1/1] duplex auto
    [~DeviceC-GigabitEthernet0/1/1] shutdown
    [~DeviceC-GigabitEthernet0/1/1] commit
    [~DeviceC-GigabitEthernet0/1/1] undo shutdown
    [~DeviceC-GigabitEthernet0/1/1] ip address 10.3.1.3 255.255.255.0
    [~DeviceC-GigabitEthernet0/1/1] commit
    [~DeviceC-GigabitEthernet0/1/1] quit

  4. Verify the configuration.

    After the configurations are complete, you can use the following methods to check whether the Ethernet interfaces work properly.

    • Run the display interface brief or display interface gigabitethernet 0/1/1 command repeatedly on each router.

      • Check whether statistics about error frames remain the same on the routers. If the statistics remain the same, the Ethernet interfaces work properly.

      • Check whether the physical status and protocol status of each interface are Up.

        After the rate of GE 0/1/1 on Device C is changed, the link between Device C and Device A goes Up.

    • When traffic is light, use one router to ping the Ethernet interface address on another router, and then check whether all ping packets are replied.

      After the rate of GE 0/1/1 on Device C is changed, Device C and Device A can ping each other.

    Use the command output on Device A as an example.

    <DeviceA> display interface brief
    PHY: Physical
    *down: administratively down
    ^down: standby
    (l): loopback
    (s): spoofing
    (b): BFD down
    (e): EFM down
    (d): Dampening Suppressed
    InUti/OutUti: input utility/output utility
    Interface                        PHY   Protocol  InUti OutUti   inErrors  outErrors
    GigabitEthernet0/1/1             up    up        0%    0%       0         0
    <DeviceA> display interface gigabitethernet 0/1/1
    GigabitEthernet0/1/1 current state : UP (ifindex: 6)
    Line protocol current state : UP
    Last line protocol up time :  2013-07-29 15:39:29
    Description:RouterA to Ethernet
    Route Port,The Maximum Transmit Unit is 9600
    Internet protocol processing : enabled
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc12-3456
    Last physical up time   :  2013-07-29 15:39:23
    Last physical down time : 2013-07-29 15:38:41
    Current system time: 2013-07-30 09:15:33
    Statistics last cleared:never
          Last 300 seconds input rate: 23513 bits/sec, 2 packets/sec
          Last 300 seconds output rate: 64319 bits/sec, 3 packets/sec
          Input peak rate 26099 bits/sec, Record time: 2013-07-29 15:40:58
          Output peak rate 64809 bits/sec, Record time: 2013-07-30 03:59:41
          Input: 183126871 bytes, 182525 packets 
          Output: 509287017 bytes, 244628 packets
        Input:
          Unicast: 55 packets, Multicast: 160762 packets
          Broadcast: 21708 packets, JumboOctets: 31031 packets
          CRC: 0 packets, Symbol: 0 packets
          Overrun: 0 packets, InRangeLength: 0 packets
          LongPacket: 0 packets, Jabber: 0 packets, Alignment: 0 packets
          Fragment: 0 packets, Undersized Frame: 0 packets
          RxPause: 0 packets
        Output:
          Unicast: 53 packets, Multicast: 243990 packets
          Broadcast: 585 packets, JumboOctets: 0 packets
          Lost: 0 packets, Overflow: 0 packets, Underrun: 0 packets
          System: 0 packets, Overruns: 0 packets
          TxPause: 0 packets
        Last 300 seconds input utility rate:  0.01%
        Last 300 seconds output utility rate: 0.01%

Configuration Files

  • Device A configuration file

    #
    sysname DeviceA
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 10.1.1.1 255.255.255.0
     description DeviceA to Ethernet
    #
    return
  • Device B configuration file

    #
    sysname DeviceB
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 10.2.1.2 255.255.255.0
     description DeviceB to Ethernet
    #
    return
  • Device C configuration file

    #
    sysname DeviceC
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 10.3.1.3 255.255.255.0
     description DeviceC to Ethernet
    #
    return

Example for Configuring Ethernet Sub-interfaces to Support Communication Between VLANs

You can configure Ethernet sub-interfaces to enable users in different VLANs and network segments to communicate with each other.

Networking Requirements

Users in different communities and network segments require the same services, such as Internet, IPTV, and VoIP services. The network administrator in each community configures a VLAN for each service to simplify management. After the configuration, users in different communities belong to different VLANs, but the users need to communicate with each other for the same services.

On the network shown in Figure 1-593, users in communities 1 to 4 belong to different VLANs and network segments but all require the Internet service. These users must be able to communicate with each other.

Figure 1-593 Networking for configuring Ethernet sub-interfaces for inter-VLAN communication

Sub-interface 1.1, sub-interface 1.2, sub-interface 2.1, and sub-interface 2.2 in this example represent GE 0/1/1.1, GE 0/1/1.2, GE 0/1/9.1, and GE 0/1/9.2, respectively.



Precautions

IP addresses of hosts in a VLAN must be in the same network segment as the IP address of the PE sub-interface associated with the VLAN.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create sub-interfaces on the PE and associate the sub-interfaces with VLANs so that the sub-interfaces can identify packets carrying VLAN tags.

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

Data Preparation

To complete the configuration, you need the following data:

  • VLAN IDs associated with the PE sub-interfaces

  • VLAN IDs associated with the PE sub-interfaces

Procedure

  1. Create sub-interfaces on the PE and associate the sub-interfaces with VLANs.

    <HUAWEI> system-view
    [~HUAWEI] sysname PE
    [*HUAWEI] commit
    [~PE] interface gigabitethernet 0/1/1
    [~PE-GigabitEthernet0/1/1] undo shutdown
    [*PE-GigabitEthernet0/1/1] quit
    [*PE] interface gigabitethernet 0/1/1.1
    [*PE-GigabitEthernet0/1/1.1] vlan-type dot1q 10
    [*PE-GigabitEthernet0/1/1.1] quit
    [*PE] interface gigabitethernet 0/1/1.2
    [*PE-GigabitEthernet0/1/1.2] vlan-type dot1q 20
    [*PE-GigabitEthernet0/1/1.2] quit
    [*PE] interface gigabitethernet 0/1/9
    [*PE-GigabitEthernet0/1/9] undo shutdown
    [*PE-GigabitEthernet0/1/9] quit
    [*PE] interface gigabitethernet 0/1/9.1
    [*PE-GigabitEthernet0/1/9.1] vlan-type dot1q 30
    [*PE-GigabitEthernet0/1/9.1] quit
    [*PE] interface gigabitethernet 0/1/9.2
    [*PE-GigabitEthernet0/1/9.2] vlan-type dot1q 40
    [*PE-GigabitEthernet0/1/9.2] quit

  2. Configure IP addresses.

    [*PE] interface gigabitethernet 0/1/1.1
    [*PE-GigabitEthernet0/1/1.1] ip address 10.110.6.3 24
    [*PE-GigabitEthernet0/1/1.1] quit
    [*PE] interface gigabitethernet 0/1/1.2
    [*PE-GigabitEthernet0/1/1.2] ip address 10.110.5.3 24
    [*PE-GigabitEthernet0/1/1.2] quit
    [*PE] interface gigabitethernet 0/1/9.1
    [*PE-GigabitEthernet0/1/9.1] ip address 10.110.4.3 24
    [*PE-GigabitEthernet0/1/9.1] quit
    [*PE] interface gigabitethernet 0/1/9.2
    [*PE-GigabitEthernet0/1/9.2] ip address 10.110.3.3 24
    [*PE-GigabitEthernet0/1/9.2] quit
    [*PE] commit

  3. For detailed configurations on the switch, see the related Configuration Guide.
  4. Verify the configuration.

    On PCs in VLAN 10, configure the IP address 10.110.6.3/24 of GE 0/1/1.1 as the default gateway address.

    On PCs in VLAN 20, configure the IP address 10.110.5.3/24 of GE 0/1/1.2 as the default gateway address.

    On PCs in VLAN 30, configure the IP address 10.110.4.3/24 of GE 0/1/9.1 as the default gateway address.

    On PCs in VLAN 40, configure the IP address 10.110.3.3/24 of GE 0/1/9.2 as the default gateway address.

    After the configurations are complete, PCs in VLANs 10, 20, 30, and 40 can ping each other.

PE Configuration File

#
sysname PE
#
interface GigabitEthernet0/1/1
 undo shutdown
#
interface GigabitEthernet0/1/1.1
 vlan-type dot1q 10
 ip address 10.110.6.3 255.255.255.0
#
interface GigabitEthernet0/1/1.2
 vlan-type dot1q 20
 ip address 10.110.5.3 255.255.255.0
#
interface GigabitEthernet0/1/9
 undo shutdown
#
interface GigabitEthernet0/1/9.1
 vlan-type dot1q 30
 ip address 10.110.4.3 255.255.255.0
#
interface GigabitEthernet0/1/9.2
 vlan-type dot1q 40
 ip address 10.110.3.3 255.255.255.0
#
return

Example for Configuring Ethernet Sub-interfaces for Communication Between VLAN Users and Non-VLAN Users

This example describes how to configure communication between VLAN users and non-VLAN users.

Networking Requirements

Users in a community belong to different network segments. The network administrator in the community adds the users to different VLANs to simplify management. However, users in another community are not added to any VLAN. VLAN users must be able to communicate with non-VLAN users.

On the network shown in Figure 1-594, users in community 1 belong to different VLANs and network segments, and users in community 2 do not belong to any VLAN. It is required that users in VLAN 10 be able to communicate with users in community 2.

Figure 1-594 Networking for configuring Ethernet sub-interfaces for communication between VLAN users and non-VLAN users

Sub-interface 1.1 and interface 2 in this example represent GE 0/1/1.1 and GE 0/1/9, respectively.



Precautions

  • The IP address assigned to the sub-interface connected to VLAN users must be on the same network segment as IP addresses of VLAN users.
  • The IP address assigned to the interface connected to non-VLAN users must be on the same network segment as IP addresses of non-VLAN users.
  • The default gateway addresses of PCs in VLAN 10 must be the IP address of the sub-interface. Otherwise, VLAN and non-VLAN users cannot communicate with each other.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create sub-interfaces on the PE and associate the sub-interfaces with VLANs so that the sub-interfaces can identify packets carrying VLAN tags.

  2. Assign IP addresses to interfaces for communication at the network layer.

    • Assign an IP address to the sub-interface.
    • Assign an IP address to the interface connecting the PE to non-VLAN users.

Data Preparation

To complete the configuration, you need the following data:

  • VLAN ID associated with the PE sub-interface

  • IP address of the PE sub-interface

Procedure

  1. Create a sub-interface on the PE and associate the sub-interface with a VLAN.

    <HUAWEI> system-view
    [~HUAWEI] sysname PE
    [*HUAWEI] commit
    [~PE] interface gigabitethernet 0/1/1
    [~PE-GigabitEthernet0/1/1] undo shutdown
    [*PE] interface gigabitethernet 0/1/1.1
    [*PE-GigabitEthernet0/1/1.1] vlan-type dot1q 10

  2. Configure IP addresses.

    [*PE-GigabitEthernet0/1/1.1] ip address 10.110.2.5 24
    [*PE-GigabitEthernet0/1/1.1] quit
    [*PE] interface gigabitethernet 0/1/9
    [*PE-GigabitEthernet0/1/9] undo shutdown
    [*PE-GigabitEthernet0/1/9] ip address 10.110.3.5 24
    [*PE-GigabitEthernet0/1/9] quit
    [*PE] commit

  3. For the detailed configuration of the switch, see the related Configuration Guide.
  4. Verify the configuration.

    On PCs in VLAN 10, configure the IP address 10.110.2.5/24 of GE 0/1/1.1 as the default gateway address.

    On CE 2, configure the IP address 10.110.3.5 of GE 0/1/9 as the default gateway address.

    After the configurations are complete, users in VLAN 10 and non-VLAN users can ping each other.

PE Configuration File

#
sysname PE
#
interface GigabitEthernet0/1/1
 undo shutdown
#
interface GigabitEthernet0/1/1.1
 vlan-type dot1q 10
 ip address 10.110.2.5 255.255.255.0
#
interface GigabitEthernet0/1/9
 undo shutdown
 ip address 10.110.3.5 255.255.255.0
#
return