Wednesday, September 30, 2020

How to configure port mapping on Huawei ONT?

This post will show you how to configure port mapping on Huawei GPON ONT.

Port Mapping


Port mapping allows extranet access to an intranet server (such as to a WWW server or FTP server on an extranet). The private IP address and service port of an intranet server is mapped into a public IP address and port, so that users from the extranet can access the intranet server. With port mapping, the public IP address but not the private IP address is visible to the users.


The following uses an example to describe how to configure the port mapping.


Configuration Example


User A installs a camera at home with IP address 192.168.100.100 and port 80. The ONT IP address is 192.168.100.1 (private IP address), the WAN IP address is 100.100.100.100, and the port number is 8080. To allow users to remotely check the camera footage, the required port mapping configurations are as follows:


Port Mapping


Prerequisite


Huawei ONT such as HS8546V5 has been connected to the Internet.


Configuration Method


On the ONT web page, configure the port mapping.


Port Mapping


Note: The web page may vary according to ONTs.

 

Type: To customize port mapping content, select User-defined; to implement port mapping for common services such as FTP, Telnet, and HTTP, select Apply. In this example, as the access object is a camera, set Type to User-defined.

 

Protocol: Select a protocol used for communication with the server (camera in this example). In this example, select TCP.

 

External Port number : Specify a port range used by extranet users to access the intranet server (camera in this example). In this example, only 1 port is used. Set External Port number** to 2000--2000.

 

Internal Port number: Specify a port range used by the intranet server (camera in this example). In this example, only 1 port is used. Set Internal Port number to 3000--3000.

 

Internal Host: Specify the IP address of the intranet server (camera in this example).


Extranet Access


After the configuration is successful, enter http://20.1.110.236:2000 in the address bar of the browser on a smartphone to access the camera and check the home. (20.1.110.236 is the ONT WAP IP address.)



Tips: The ONT WAN IP address can be queried in the status information.


3

Wednesday, September 16, 2020

How to delect Layer 2 Loop of Huawei S5700 Switch?

This acticle will  introduce beriefly how to delect Layer 2 Loop of Huawei S5700 Switch?

Definition

To improve reliability of an Ethernet switching network, device like S5720-28X-SI-AC

redundancy and link redundancy are commonly used. However, many factors such as networking adjustment, configuration modification, and upgrade/migration, may cause protocol or data packets to be forwarded along a loop path. For example, loops will occur if every two devices are connected, as shown in Figure 6-1. Broadcast storm will occur if no loop prevention protocol is configured or network configurations are modified.

Figure 6-1 Link redundancy on the Ethernet switching network

The major harm of a Layer 2 loop is that it causes broadcast storm. If there is no loop on an Ethernet, broadcast Ethernet frames are flooded on the network to ensure that they can be received by every device. With sufficient bandwidth, each bridge forwards received broadcast frames to all interfaces except the receiving interface. However, if a loop occurs, this broadcast mechanism will cause severe faults.

When broadcast storm is generated, Ethernet frames are forwarded permanently, and the forwarding speed reaches or approximates the line speed on an interface, consuming link bandwidth at an enormous speed. According to Ethernet forwarding rules, the devices on the loop will copy these broadcast frames to all their interfaces. Therefore, the entire network is full of broadcast frames. Assume that an Ethernet uses GE connections, every link is full of broadcast frames at the speed of 1000 M/s. As a result, other data packets cannot be forwarded.

In a broadcast domain, if Layer 2 devices forward broadcast frames repeatedly, broadcast storm will occur. The broadcast storm causes the MAC address table to become unstable, degrading the communication quality and even interrupting communication.

To prevent loops and ensure network reliability, loop prevention protocols can be configured on switches. Currently, the S series switches support the following Layer 2 loop prevention protocols:

  • STP/RSTP/MSTP
  • RRPP
  • SEP
  • Smart Link
  • ERPS

In addition, Huawei S series switches support the following loop detection functions:

  • Loop Detection
  • Loopback Detection

This document describes how to identify Layer 2 loops.

Purpose

This is a guide for technical support personnel to remove Layer 2 loops, including:

  • Helping frontline service engineers describe the fault symptom and determine the scope of the fault.
  • Helping TAC engineers collect NE information, analyze anomalies of NEs, and quickly locate the faulty NE and service.
  • Helping R&D engineers locate the fault.

On a stably running network, the following factors may cause a fault:

  • Network adjustment: such as network topology adjustment, configuration modification, and upgrade/migration
  • Network environment change: such as network storm, user online behavior change (holidays, promotion activity, use of smart terminals), power/temperature change, fiber disconnection, change to daylight saving time, microwave transmission affected by weather change (rain/fog), and accident (flood/fire/earthquake/lightning)
  • Network device failure: such as software bug, hardware aging (card/fiber/optical module)

The anomalies will be reflected in the traps, logs, traffic statistics, or port status on the certain NE. Therefore, to locate a fault, you need to quickly determine the fault occurrence time and fault impact scope, learn the operations that have been performed and affected NEs, and find out the faulty NE to locate the root cause.

If one or more symptoms in the following figure appear, there is a high probability that a Layer 2 loop has occurred.

Figure 6-2 Layer 2 loop symptoms




Thursday, September 3, 2020

CPU and CPU Usage Overview of Huawei S Series Switches

 CPU - The Core of a Switch


Huawei switch uses the distributed architecture, including forwarding and control planes. The forwarding plane implements Layer 2 and Layer 3 forwarding; the control plane implements forwarding control.

As shown in Figure 15-1, the control plane uses the universal embedded CPU and the forwarding plane uses forwarding chip:

  • The forwarding chip implements Layer 2 and Layer 3 forwarding, for example, updating the MAC address table for Layer 2 forwarding and Layer 3 forwarding table for IP forwarding. The forwarding chip implements data forwarding with a high throughput.
  • The CPU maintains software entries, such as routing and ARP entries, and configures the hardware Layer 3 forwarding table in chip based on the software forwarding entries. The CPU can also provide software-based Layer 3 forwarding. However, a disadvantage of CPU is that it has a low processing capability.
Figure 15-1 Distributed architecture

Packets on a network can be classified into control packets and data packets depending on their functions. If a switch does not have any hardware forwarding entry, the first packet reaching the switch is forwarded by the CPU and a Layer 3 forwarding hardware entry is created. The follow-up packets enter the forwarding chip through the inbound interface. Figure 15-2 shows this process.

Figure 15-2 Processing non-initial packets
  • Flow 1 (data packets) is sent out by the forwarding chip, and does not pass the CPU. The flow processing does not consume CPU resources.
  • Flow 2 (control packets and a part of data packets) is forwarded to the CPU through the forwarding chip. The CPU determines whether to send the flow out or terminate it. Flow 2 consumes CPU resources, and cannot be forwarded in a high speed.

The Layer 2 and Layer 3 hardware entries in the forwarding chip determine whether a switch can implement high-speed forwarding; however, the hardware entries in the forwarding chip are created based on the software entries maintained in the CPU. Therefore, the CPU is the core of a switch.

CPU Usage

After a switch like Huawei S6730 switch starts, the CPU runs more than 200 active tasks to manage the switch and monitor Layer 3 entry learning. The number of tasks may vary according to switch models. In addition, when more features are configured on a switch, more tasks run in the system

CPU usage is the percentage of the amount of time a CPU spends processing non-idle tasks. It has the following characteristics:

  • Constantly changing: A switch's CPU usage keeps changing with system operations and changes of the environment.
  • Non-real-time: CPU usage data reflects CPU usage within a statistical period.
  • Entity-relevant: CPU usage is calculated based on physical CPU. Generally, each service card on a switch has an independent physical CPU. Therefore, the CPU usages of different cards are calculated separately.

A CPU usage reflects task running status at a specified time point. In Figure 15-3, task A occupies CPU resource for 10 ms, task B occupies CPU resource for 30 ms, and they stop for 60 ms. Then, task A occupies CPU resource for 10 ms, task B occupies CPU resource for 30 ms, and they stop for 60 ms. In this period, the CPU usage is 40%. A high CPU usage indicates that the switch is running many tasks.

Figure 15-3 Tasks occupy CPU resources

It can be found that the CPU usage is directly related to CPU performance. Therefore, the CPU usage is a key indicator of switch performance.