Skip to main content
beginner Email gate

Huawei Router Commands: Free PDF for SSH, PPP CHAP and OSPF

Reviewed 2026-10-04

Direct answer
The core Huawei router commands for an AR lab are system-view, sysname, interface, ip address, ospf 1, display ip routing-table and save. This free PDF puts SSH, PPP with CHAP and OSPF area 0 in paste-ready order for two Huawei AR routers.

The Huawei router commands you’ll use most on an AR router are system-view, sysname, interface, ip address, ospf 1, display ip routing-table and save. This free PDF puts them in paste-ready order for two Huawei AR routers: SSH login, a PPP link with CHAP, OSPF area 0 and a full ping test.

Huawei router lab topology: AR1 and AR2 linked by a serial PPP connection, each serving a LAN with a switch and PC
The lab behind the free PDF: two Huawei AR routers, one serial link, two LANs.

What are the basic Huawei router commands?

Huawei routers run VRP, and its commands follow one pattern: display shows things, undo removes things, and save writes them to flash. Here’s the short list.

TaskCommand
Enter configuration modesystem-view
Set the router namesysname AR1
Show interface statusdisplay ip interface brief
Show the running configdisplay current-configuration
Show the saved configdisplay saved-configuration
Show the routing tabledisplay ip routing-table
Show OSPF neighboursdisplay ospf peer brief
Show PPP state on a serial linkdisplay interface Serial 1/0/0
Bring an interface upundo shutdown
Save the configsave
Wipe the saved configreset saved-configuration, then reboot

Run reset saved-configuration before you start a lab on a used router. Old config causes strange conflicts.

Huawei vs Cisco commands: what’s the equivalent?

If you know Cisco IOS, you already know the logic. Only the words change. Our Cisco commands cheat sheet PDF is a good side-by-side partner for this table.

TaskCisco IOSHuawei VRP
Enter config modeconfigure terminalsystem-view
Set hostnamehostname R1sysname AR1
Interface summaryshow ip interface briefdisplay ip interface brief
Running configshow running-configdisplay current-configuration
Saved configshow startup-configdisplay saved-configuration
Routing tableshow ip routedisplay ip routing-table
OSPF neighboursshow ip ospf neighbordisplay ospf peer brief
Enable an interfaceno shutdownundo shutdown
Save configwrite memorysave
Rebootreloadreboot
Cisco IOS to Huawei VRP command map: system-view, display ip interface brief, save and more
Huawei Router Commands vs Cisco Commands

What’s inside the free Huawei router configuration PDF?

The PDF walks through one working lab, start to finish. Two Huawei AR routers (AR1220 or AR2220, or the same lab in eNSP) sit back to back over a serial WAN link. Each router serves a LAN through a Layer 2 switch and one PC.

DeviceInterfaceIP addressRole
AR1GE 0/0/0192.168.10.1/24LAN gateway
AR1Serial 1/0/010.10.10.1/30WAN, DCE side
AR2GE 0/0/0192.168.20.1/24LAN gateway
AR2Serial 1/0/010.10.10.2/30WAN, DTE side
PC1NIC192.168.10.100/24Gateway 192.168.10.1
PC2NIC192.168.20.100/24Gateway 192.168.20.1

You get nine sections: topology and addressing, console access, SSH, interface IPs, PPP with CHAP, OSPF, end-to-end tests, saving the config and a one-page quick reference. Every block is written to copy and paste.

Studying for HCIA Datacom? This lab is one scenario. The Huawei HCIA Datacom Workbook is built from 10 chapters and 53 topics mapped to the H12-811 exam, so you practise the whole blueprint and not just one topology.

How do you configure SSH on a Huawei router?

Huawei calls SSH login STelnet. The order matters: generate the RSA key first, then enable the server, then create the user and lock the VTY lines to SSH.

<Huawei> system-view
[Huawei] sysname AR1
[AR1] rsa local-key-pair create
  (type 2048 when it asks for the modulus bits)
[AR1] stelnet server enable
[AR1] aaa
[AR1-aaa] local-user netadmin password irreversible-cipher <YourStrongPassword>
[AR1-aaa] local-user netadmin service-type ssh
[AR1-aaa] local-user netadmin privilege level 15
[AR1-aaa] quit
[AR1] ssh user netadmin authentication-type password
[AR1] ssh user netadmin service-type stelnet
[AR1] user-interface vty 0 4
[AR1-ui-vty0-4] authentication-mode aaa
[AR1-ui-vty0-4] protocol inbound ssh
[AR1-ui-vty0-4] quit

Three things to know before you paste:

  • protocol inbound ssh switches Telnet off on the VTY lines. That’s the point, but keep your console cable handy.
  • SSH 2.0 is the default server version, so you don’t need a version command. Only turn on ssh server compatible-ssh1x enable if an old client needs it.
  • The lab passwords in the PDF are samples. Replace them with your own before you use any of this on a live router.

To test, run display ssh server status, then connect from the other router with stelnet 192.168.10.1. Huawei’s own CLI login guide for AR1200 and AR2200 shows the same flow. You can also tune retries (range 1 to 5, default 3) with the ssh server authentication-retries command.

Five steps to configure SSH on a Huawei router: RSA key, STelnet server, AAA user, SSH user and VTY lines
Five steps turn SSH on, in this order.

Want to see SSH, Telnet and AAA practised in more than one scenario? Chapters 4 and 5 of the HCIA Datacom lab workbook cover AAA, RADIUS and remote login with full display outputs.

How do you set up PPP with CHAP on a Huawei serial link?

PPP is the link protocol, and CHAP is the handshake that proves each side knows a shared secret. The link comes up only if LCP and IPCP both open.

[AR1] interface Serial 1/0/0
[AR1-Serial1/0/0] link-protocol ppp
[AR1-Serial1/0/0] ip address 10.10.10.1 255.255.255.252
[AR1-Serial1/0/0] ppp authentication-mode chap
[AR1-Serial1/0/0] ppp chap user AR1
[AR1-Serial1/0/0] ppp chap password cipher <SharedSecret>
[AR1-Serial1/0/0] undo shutdown

Do the mirror on AR2 with ppp chap user AR2 and the same secret. Then check the result:

  • display interface Serial 1/0/0 should show LCP opened, IPCP opened.
  • ping 10.10.10.2 from AR1 should answer.

Two serial details trip people up. On a real V.35 cable, only the DCE end takes physical-mode synchronous and baudrate. The default baud rate is 64000 bit/s, and baudrate works only when the router acts as DCE. If the serial port stays down, check the cable end and the clock first.

On Huawei AR routers the router that authenticates its peer also needs that peer’s name and password in AAA, with service type PPP. Huawei’s CHAP authentication guide for AR1200 and AR2200 lists this step. If CHAP won’t come up, that’s the first thing to check. For the protocol rules behind it, read RFC 1661 (PPP) and RFC 1994 (CHAP).

How do you configure OSPF on a Huawei router?

Put both routers in OSPF process 1, area 0, and advertise the LAN and the WAN subnet. Huawei uses a wildcard mask in the network command, so a /24 is 0.0.0.255 and a /30 is 0.0.0.3. If wildcard masks feel shaky, our subnet mask cheat sheet fixes that in five minutes.

[AR1] ospf 1 router-id 1.1.1.1
[AR1-ospf-1] area 0
[AR1-ospf-1-area-0.0.0.0] network 192.168.10.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0] network 10.10.10.0 0.0.0.3
[AR1-ospf-1-area-0.0.0.0] quit
[AR1-ospf-1] silent-interface GigabitEthernet 0/0/0
[AR1-ospf-1] quit

silent-interface stops Hello packets going out the LAN port. The subnet is still advertised, but no one tries to form a neighbour with a PC.

Verify in this order:

  1. display ospf peer brief shows the neighbour in state Full.
  2. display ip routing-table lists 192.168.20.0/24 as an OSPF route.
  3. display ospf lsdb brief shows the link-state database.

No neighbour? Check that area 0 is on both routers and the network statements match. The full protocol is defined in RFC 2328 (OSPFv2). For a deeper look at how OSPF behaves in service provider networks, grab our OSPF and MPLS LDP free PDF.

Huawei router verification outputs: PPP LCP and IPCP opened, OSPF neighbour Full, OSPF route learned
Three outputs that prove the PPP, OSPF and routing setup works.

How do you test that the Huawei lab works end to end?

Run five pings in order, and stop at the first failure. Don’t skip ahead.

  1. ping 192.168.10.1 from AR1 (the LAN interface is up).
  2. ping 10.10.10.2 from AR1 (the PPP link works).
  3. ping 192.168.20.1 from AR1 (OSPF learned the far LAN).
  4. ping 192.168.20.100 from AR1 (the path reaches PC2).
  5. ping 192.168.20.100 from PC1 (full end-to-end).

Then run tracert 192.168.20.100 on PC1. You should see three hops: AR1, AR2 and PC2. When it all works, run return and then save on both routers. An unsaved config disappears on a power cycle. If the ping tests fail, our network troubleshooting commands PDF gives you a checklist to work through.

Where does this free PDF stop?

It’s one lab: two routers, one OSPF area, plain Layer 2 switches. You’ll hit its limits fast.

  • No VLANs, STP or Eth-Trunk on the switches.
  • No WLAN, NAT or IPv6.
  • No break-and-fix labs where you hunt a hidden fault.
  • No exam mapping, so you can’t tell which skills the H12-811 test checks.

The Huawei HCIA Datacom Certification Workbook fills those gaps. You get 10 chapters covering VLANs, STP, VRRP, OSPF, WLAN, AAA, ACLs, NAT, IPv6 and SDN, ready-made eNSP topology files, copy-ready configs, and full display outputs so you can compare your result line by line. There’s a 30-day money-back guarantee. Use the free PDF to warm up, then move to the workbook when you want the whole exam blueprint.

Free Huawei router commands PDF compared with the Huawei HCIA Datacom Workbook, one lab versus 10 chapters
From one free lab to the full HCIA Datacom blueprint.

More free networking PDFs

Answer the main question in two or three sentences here, then expand below.

Frequently asked questions

How do I configure a Huawei router?
Enter system-view, name the router with sysname, set interface IPs with ip address, add a routing protocol such as ospf 1, then run save. The PDF gives the full paste-ready sequence for two AR routers.
What are the commands to check a Huawei router's status?
Use display ip interface brief for interfaces, display ip routing-table for routes, display ospf peer brief for OSPF neighbours and display current-configuration for the running config.
How do I enable SSH on a Huawei router?
Generate a key with rsa local-key-pair create, run stelnet server enable, create an AAA user with service type ssh, bind it with ssh user, and set protocol inbound ssh on the VTY lines.
How do I check if SSH is enabled on a Huawei router?
Run display ssh server status. It shows the SSH version and whether the STelnet server is enabled. display ssh user-information lists the SSH users.
How do I save the configuration on a Huawei router?
Return to user view with return, then run save and answer y. Run display saved-configuration to confirm what's stored.
Do the same commands work on Huawei switches?
Most basics do. system-view, sysname, display, save and the STelnet SSH steps are the same on Huawei S-series switches. Serial, PPP and router-only features aren't. Huawei documents the switch version in its STelnet login guides.
Can I practise these commands without a real router?
Yes. Huawei's simulator runs these labs. The classic eNSP hasn't been updated since 2019, and Huawei's newer eNSP Pro came out in 2023. See Huawei's page on eNSP Pro and how to download it.
Is this about the Huawei Wi-Fi router at 192.168.100.1?
No. This page covers Huawei AR enterprise routers you configure from the command line. Home Wi-Fi routers use a web login and a different set of settings

Reviewed by

CCDE/CCIE

How to cite this resource

SMEnode Labs (2026). Huawei Router Commands: Free PDF for SSH, PPP CHAP and OSPF. SMEnode Labs. https://smenode-labs.com/free-pdf/networking/huawei-router-commands/

APA

SMEnode Labs. (2026). Huawei Router Commands: Free PDF for SSH, PPP CHAP and OSPF. SMEnode Labs. https://smenode-labs.com/free-pdf/networking/huawei-router-commands/

BibTeX

@misc{smenodelabs2026,
  title = {Huawei Router Commands: Free PDF for SSH, PPP CHAP and OSPF},
  author = {{SMEnode Labs}},
  year = {2026},
  url = {https://smenode-labs.com/free-pdf/networking/huawei-router-commands/},
  note = {SMEnode Labs}
}