Huawei:VRP: Difference between revisions
(→Basics) |
No edit summary |
||
| Line 72: | Line 72: | ||
== Checks == | == Checks == | ||
=== Common === | === Common === | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Show basic system information (User view) | # Show basic system information (User view) | ||
display version | display version | ||
| Line 93: | Line 93: | ||
=== Hardware === | === Hardware === | ||
<syntaxhighlight > | <syntaxhighlight lang="bash"> | ||
# Display hardware modules and current status | # Display hardware modules and current status | ||
display health | display health | ||
| Line 99: | Line 99: | ||
=== Configuration === | === Configuration === | ||
<syntaxhighlight > | <syntaxhighlight lang="bash"> | ||
# Show the switches' current configuration | # Show the switches' current configuration | ||
display current-configuration | display current-configuration | ||
| Line 120: | Line 120: | ||
=== Logs === | === Logs === | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Display logs | # Display logs | ||
display logbuffer | display logbuffer | ||
| Line 138: | Line 138: | ||
=== Stack === | === Stack === | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Display basic stack configuration | # Display basic stack configuration | ||
display stack | display stack | ||
| Line 153: | Line 153: | ||
=== Network === | === Network === | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Ping IP 8.8.8.8 | # Ping IP 8.8.8.8 | ||
ping 8.8.8.8 | ping 8.8.8.8 | ||
| Line 162: | Line 162: | ||
==== VLANs ==== | ==== VLANs ==== | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Display all VLANs and the interfaces they're used on | # Display all VLANs and the interfaces they're used on | ||
display vlan | display vlan | ||
| Line 171: | Line 171: | ||
==== Interfaces ==== | ==== Interfaces ==== | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Show shorthand summary of switchport-state, down/up status, utilization and errors | # Show shorthand summary of switchport-state, down/up status, utilization and errors | ||
display interface brief | display interface brief | ||
| Line 202: | Line 202: | ||
== Configuration == | == Configuration == | ||
=== Common === | === Common === | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Save the switches' configuration (user view) | # Save the switches' configuration (user view) | ||
save | save | ||
| Line 221: | Line 221: | ||
=== Banner === | === Banner === | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
header login information % | header login information % | ||
*************************************************************\ | *************************************************************\ | ||
| Line 234: | Line 234: | ||
=== Network === | === Network === | ||
==== VLAN creation ==== | ==== VLAN creation ==== | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Create vlan 101 and name it Hotcakes | # Create vlan 101 and name it Hotcakes | ||
vlan 101 | vlan 101 | ||
| Line 244: | Line 244: | ||
==== Spanning Tree ==== | ==== Spanning Tree ==== | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Make a switch root bridge for VLAN 27 | # Make a switch root bridge for VLAN 27 | ||
stp vlan 27 root | stp vlan 27 root | ||
| Line 255: | Line 255: | ||
https://support.huawei.com/enterprise/en/doc/EDOC1000060766/3a410bc/how-do-i-configure-the-link-type-of-an-interface | https://support.huawei.com/enterprise/en/doc/EDOC1000060766/3a410bc/how-do-i-configure-the-link-type-of-an-interface | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
# Save an interfaces' configuration | # Save an interfaces' configuration | ||
commit | commit | ||
| Line 269: | Line 269: | ||
https://support.huawei.com/enterprise/en/doc/EDOC1100137939/a3112b12/configuring-meth-management-interface-attributes | https://support.huawei.com/enterprise/en/doc/EDOC1100137939/a3112b12/configuring-meth-management-interface-attributes | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
interface MEth0/0/0 | interface MEth0/0/0 | ||
description Core: TheConnectedDevice01 FastEthernet0/0 [xxxMbit] {CIRCUIT-ID} (Put any note in here, for example a PROVIDER and PROVIDER-CID) | description Core: TheConnectedDevice01 FastEthernet0/0 [xxxMbit] {CIRCUIT-ID} (Put any note in here, for example a PROVIDER and PROVIDER-CID) | ||
| Line 286: | Line 286: | ||
==== sw1 ==== | ==== sw1 ==== | ||
Define stack domain, membership status and priority (higher = more primary) | Define stack domain, membership status and priority (higher = more primary) | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
stack | stack | ||
stack member 1 priority 150 | stack member 1 priority 150 | ||
| Line 295: | Line 295: | ||
Shutdown the stack-ports. Value left of the / is the stack ID of your switch | Shutdown the stack-ports. Value left of the / is the stack ID of your switch | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
interface stack-port 1/1 | interface stack-port 1/1 | ||
shutdown | shutdown | ||
| Line 304: | Line 304: | ||
Associate physical interfaces with the stack | Associate physical interfaces with the stack | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
interface 10GE1/0/47 | interface 10GE1/0/47 | ||
description Core: sw2 10GE1/0/47 [10Gbps] | description Core: sw2 10GE1/0/47 [10Gbps] | ||
| Line 311: | Line 311: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
interface 10GE1/0/48 | interface 10GE1/0/48 | ||
description Core: sw2 10GE1/0/48 [10Gbps] | description Core: sw2 10GE1/0/48 [10Gbps] | ||
| Line 320: | Line 320: | ||
On the primary (sw1) bring up the switchports in use for stacking in sw2 | On the primary (sw1) bring up the switchports in use for stacking in sw2 | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
interface 10GE2/0/47 | interface 10GE2/0/47 | ||
undo shutdown | undo shutdown | ||
| Line 329: | Line 329: | ||
Commit the changes, save config and reboot! | Commit the changes, save config and reboot! | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
commit | commit | ||
return | return | ||
| Line 339: | Line 339: | ||
Define stack domainID , membership status and priority (higher = more primary). </br> | Define stack domainID , membership status and priority (higher = more primary). </br> | ||
Turn member ID from default of 1 into 2. Inherit config of the master as soon as a stack is formed. | Turn member ID from default of 1 into 2. Inherit config of the master as soon as a stack is formed. | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
stack | stack | ||
stack member 1 priority 140 | stack member 1 priority 140 | ||
| Line 349: | Line 349: | ||
Associate physical interfaces with the stack. | Associate physical interfaces with the stack. | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
interface 10GE2/0/47 | interface 10GE2/0/47 | ||
description Core: sw1 10GE1/0/47 [10Gbps] | description Core: sw1 10GE1/0/47 [10Gbps] | ||
| Line 356: | Line 356: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
interface 10GE2/0/48 | interface 10GE2/0/48 | ||
description Core: sw1 10GE1/0/48 [10Gbps] | description Core: sw1 10GE1/0/48 [10Gbps] | ||
| Line 363: | Line 363: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
commit | commit | ||
return | return | ||
| Line 371: | Line 371: | ||
On boot you should see something like: | On boot you should see something like: | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
Initializing stack ........................................... DONE | Initializing stack ........................................... DONE | ||
Stack member ID .............................................. 2 | Stack member ID .............................................. 2 | ||
| Line 384: | Line 384: | ||
After sw2 reboot, connect the cables between the physical interfaces of sw1 & sw2. </br> | After sw2 reboot, connect the cables between the physical interfaces of sw1 & sw2. </br> | ||
Bring up the shutdown stack-ports on sw1. | Bring up the shutdown stack-ports on sw1. | ||
<syntaxhighlight> | <syntaxhighlight lang="bash"> | ||
interface stack-port 1/1 | interface stack-port 1/1 | ||
undo shutdown | undo shutdown | ||
Revision as of 08:33, 5 April 2024
Versatile Routing Platform for Huawei network devices.
Basics
Connecting via Console [Windows]
- Plug a Console cable into the Cisco switch and connect the cable to your laptop/whatever. Best type of cable to use is USB to Console;
- Check Windows "Device Manager" - "Ports (COM & LPT)" to view what COM port is in use;
- Use a Serial client (such as Putty) to connect to the switch by filling in the correct COM port;
- In the opened CLI, you may have to press Enter to see the first CLI output.
You may have to modify the Serial interface settings in your Serial client depending on the switch you're connecting with.
https://support.huawei.com/enterprise/en/doc/EDOC1100137934/f86aae6a/logging-in-through-a-console-port Cloud Engine switches/routers need: - 9600 baud - 8 data bits - 1 stop bit - no parity - no flow control
Commandline
# Quit the current view or quit the session if in User view quit # Enter System view from User view mode to perform switch configuration system-view # Enter Interface view for interface 10GE1/0/40 interface 10GE1/0/40 # Enter user view mode from any other mode return # Shutdown a port shutdown # Bring up a shutdown interface undo shutdown # Use the "run" command to execute a User view command within System view mode run display version # Display the configuration of the current view (can be used in any view, including Interface view) display this # Enter diagnose view from system-view [DANGER] diagnose # Use "?" to list all available commands in any EXEC mode ? # Also use the "?" key to show available parameters to any command display current-configuration ?
Use the TAB key for command auto-completion when you have typed in sufficient keys. Use the UP and DOWN keys to 'scroll' through any previous commands you've executed. Ctrl + W = Delete word on the left Alt + D = Delete word on the right Ctrl + U = Delete the entire line you've typed
Checks
Common
# Show basic system information (User view) display version # Show the time display clock # Display latest 10 commands entered during current session display history-command # Display security risks and recommended actions display security risk # Display all MAC addresses traversing Eth-Trunk27 display mac-address int Eth-Trunk27 # Display found IP-addresses associated with their MAC addresses display arp
Hardware
# Display hardware modules and current status display health
Configuration
# Show the switches' current configuration display current-configuration # Show more of switches' current configuration display current-configuration all # Show the configuration that will be used for the next reboot display saved-configuration # Compare the saved configuration to the current configuration (User view) compare configuration # Show the current configuration for interface 10GE1/0/1 display current-configuration interface 10GE1/0/1 # Display all interface configurations display current-configuration interface
Logs
# Display logs display logbuffer # Display logs starting from a specific date display logbuffer starttime 2023/10/02,10:27:00 # Display logs for a specific log severity level display logbuffer level 4 # Display 10 logs display logbuffer size 10 # Combine parameters to filter for logs display logbuffer level 4 size 10
Stack
# Display basic stack configuration display stack # Display stack configuration of any operational domains display stack configuration # Display stack configuration of all domain (all member ports) display stack configuration all # Display errors and issues relating to stack merging display stack troubleshooting
Network
# Ping IP 8.8.8.8 ping 8.8.8.8 # Ping an IP using the MGMT vpn-instance ping -vpn-instance MGMT 192.168.20.120
VLANs
# Display all VLANs and the interfaces they're used on display vlan # Show all defined VLANs display vlan summary
Interfaces
# Show shorthand summary of switchport-state, down/up status, utilization and errors display interface brief # Show detailed interface information such as input/output packets, CRC errors, discards and more display interface # Display detailed information for interface 10GE1/0/48 such as input output, CRC errors, discards and more display interface 10GE1/0/48 # Show brief interface information and status for all Ethernet interface display interface Ethernet brief # Show the recovery status of an interface in an error/down state display error-down recovery # Show counter information for all interfaces display counters # Show counters for a specific interface display counters interface 10GE1/0/20 # Show an interfaces' configuration, but also include default configurations (INTERFACE VIEW) display current-configuration interface 10GE1/0/11 include-default # Display interfaces which are members of eth-trunk 44 display eth-trunk membership 44
Configuration
Common
# Save the switches' configuration (user view) save # Change the system name to sw02 sysname sw02 # Configure the switches' domain dns domain brammerloo.nl # Configure Dutch time-zone clock timezone CEST add 01:00:00 clock daylight-saving-time CEST repeating 02:00 last Sun Mar 02:00 last Sun Oct 01:00 # Disable logs, traps and debugs from being output directly to your terminal undo terminal monitor
Banner
header login information % *************************************************************\ *========================= COMPANY =========================*\ * *\ * UNAUTHORISED ACCESS PROHIBITED ! *\ * *\ * *\ **************************************************************%
Network
VLAN creation
# Create vlan 101 and name it Hotcakes vlan 101 name Hotcakes # Create multiple VLANs and VLAN ranges vlan batch 102 103 103 105 200 to 210 315
Spanning Tree
# Make a switch root bridge for VLAN 27 stp vlan 27 root # Make a switch secondary in case the root bridge fails for VLAN 27 stp vlan 27 secondary
Interfaces
# Save an interfaces' configuration commit # Clear the configuration for interface 10GE1/0/48 clear configuration interface 10GE1/0/48 # Select interface range 10GE1/0/33 to 10GE1/0/48 interface range 10GE1/0/33 to 10GE1/0/48
MGMT VLAN
interface MEth0/0/0
description Core: TheConnectedDevice01 FastEthernet0/0 [xxxMbit] {CIRCUIT-ID} (Put any note in here, for example a PROVIDER and PROVIDER-CID)
ip address 192.168.99.11 255.255.255.0
port link-type access
port default vlan 99
Switch-stack
- https://support.huawei.com/enterprise/en/doc/EDOC1100137947/cb36698d/example-for-establishing-a-stack-of-two-switches-connecting-cables-and-then-configuring-software
- https://support.huawei.com/enterprise/tr/doc/EDOC1000060766/e9dd7d04/how-do-i-troubleshoot-a-stack-setup-failure
- Prerequisite: Clear configuration for offline interfaces in any stack-port. They may cause conflicts
sw1
Define stack domain, membership status and priority (higher = more primary)
stack stack member 1 priority 150 stack member 1 domain 10 quit commit
Shutdown the stack-ports. Value left of the / is the stack ID of your switch
interface stack-port 1/1 shutdown interface stack-port 1/2 shutdown
Associate physical interfaces with the stack
interface 10GE1/0/47 description Core: sw2 10GE1/0/47 [10Gbps] port mode stack stack-port 1/1
interface 10GE1/0/48 description Core: sw2 10GE1/0/48 [10Gbps] port mode stack stack-port 1/2
On the primary (sw1) bring up the switchports in use for stacking in sw2
interface 10GE2/0/47 undo shutdown interface 10GE2/0/48 undo shutdown
Commit the changes, save config and reboot!
commit return save reboot
sw2
Define stack domainID , membership status and priority (higher = more primary).
Turn member ID from default of 1 into 2. Inherit config of the master as soon as a stack is formed.
stack stack member 1 priority 140 stack member 1 domain 10 stack member 1 renumber 2 inherit-config quit commit
Associate physical interfaces with the stack.
interface 10GE2/0/47 description Core: sw1 10GE1/0/47 [10Gbps] port mode stack stack-port 2/1
interface 10GE2/0/48 description Core: sw1 10GE1/0/48 [10Gbps] port mode stack stack-port 2/2
commit return save reboot
On boot you should see something like:
Initializing stack ........................................... DONE Stack member ID .............................................. 2 Stack domain ID .............................................. 10 Stack priority ............................................... 120 Default MAC .................................................. xx-xx-xx-xx-xx-xx Competing with other devices in the stack .................... DONE Stack role ................................................... MASTER
sw1/sw2
After sw2 reboot, connect the cables between the physical interfaces of sw1 & sw2.
Bring up the shutdown stack-ports on sw1.
interface stack-port 1/1 undo shutdown interface stack-port 1/2 undo shutdown
The merge-process will begin causing sw2 to reboot.