Saturday, July 2, 2011

H3C - Basic router commands

 

H3C Series Routers support:

·         SNMP
·         Telnet
·         SSH (V1.5 and V2.0)
·         Remote access using the auxiliary port and a modem
·         Local access using the console port (only access with a default configuration router)

Authentication Modes

·         None: the prompt appears immediately after connecting
·         Password: prompts for a common password
·         Scheme (with local or remote authentication):  requires the use of User Name and Password
o    for local authentication a Local User must be created
o    for Radius authentication, the radius configuration must be completed

CLI Command Privilege Levels - classified into 4 privilege levels

·         Visit 0
·         Monitor 1
·         Configuration 2
·         Administrator 3
User privileges increase with level.


Contexts
 LoginàUseràSystemà*
·         User interface aux 0
·         User-interface vty 0-3
·         Local-user name
·         Interface Ethernet slot/port
·         Rip, ospf
·         Acl
·         Vlan
·         Etc.

H3C Configure Console access

# Set an administration Level 3 password
<R> system-view
[R]super password level 3 cipher secret12

# Set a password for console access
[R]user-interface console 0
[R-ui-con0]authentication-mode password
[R-ui-con0] set authentication password cipher secret23

# Set a password for auxiliary port
[R]user-interface aux0
[R-ui-con0]authentication-mode password
[R-ui-con0] set authentication password cipher secret34

H3C Configure Telnet access

<R> system-view

# Enable ssh and telnet servers
[R]telnet server enable

# Set username, associated password and allowed access
[R]local-user admin1
service-type telnet
password cipher 3com

# Set user/password authenticated access for telnet
[R]user-interface vty0 4
[R-ui-vty0-4] authentication-mode scheme
[R-ui-vty0-4] protocol inbound telnet

# User with right user/password will access with level 3 privilege
[R-ui-vty0-4] user privilege level 3


H3C Configure SSH access

# Enable ssh servers
[R] ssh server enable

# Generate public key for ssh
[R] public-key local create dsa
[R] public-key local create rsa

# Set username, associated password and allowed access
[R] local-user admin1
      service-type ssh
      password cipher 3com

# Set authenticated access for ssh
[R] user-interface vty 0 4
      authentication-mode scheme
      protocol inbound ssh

# User with right user/password will access with level 3 privilege
user privilege level 3


Quickly setup switch for vty access


[R]user-interface vty0 4
[R-ui-vty0-4] authentication-mode none
[R-ui-vty0-4] protocol inbound telnet
[R-ui-vty0-4] user privilege level 3
(not usually necessary to just get up and running)



Save the current (running) configuration
<Router>save

Delete the saved (startup) configuration
<Router>reset saved-configuration

H3C/3Com
Cisco
Description
save
write memory
Set the startup configuration file.
reset saved-configuration (user view)
erase startup-config
Clear the startup configuration file.
display version
show version
Display the VRBD number.


Upgrade Methods
·         USB Flash Drive
·         TFTP/FTP
·         Boot Menu
·         XModem

Upgrade in FTP Mode - There are 2 versions of code
·         Basic = all feature set except MPLS, SNA
·         Standard= full feature set

Recycle Bin allows deletion to be temporary or permanent

Boot Menu – File Control
The BootROM menu is displayed.
==========<EXTEND-BOOTROM MENU>=======
| <1> Boot From CF Card              |
| <2> Enter Serial SubMenu           |
| <3> Enter Ethernet SubMenu         |
| <4> File Control                   |
| <5> Modify Bootrom Password        |
| <6> Ignore System Configuration    |
| <7> Boot Rom Operation Menu        |
| <8> Clear Super Password           |
| <9> Device Operation               |
| <a> Reboot                         |
======================================
Enter your choice(1-a): 4

Once the download is complete, make sure to specify the startup version:
<Router>boot-loader file CF:/****.bin main
<Router>Reboot
Start to check configuration with next startup configuration file, please wait...
This command will reboot the device. Current configuration may be lost in next startup if you continue. Continue? [Y/N]: Y

Once the system reboots, use the following command below to verify the upgrade:
<Router>display version

File control submenu:
=======================<File CONTROL>==================
|Note: the operating device is CF Card                |
| <1> Display All File                                |
| <2> Set Application File type                       |
| <3> Set Configuration File type                     |
| <4> Delete File                                     |
| <5> Exit To Main Menu                               |
=======================================================
Enter your choice(1-5): 2




Specify the startup file, with the file name including the absolute path.

Please set application file type in cf:
M=MAIN B=BACKUP S=SECURE N=NOTYPE
****************************************************
NO. Size(B) Time Type Name
0 14323376 Mar-23-2006 11:47 M cf:/main.bin
1 14144592 Mar-17-2006 19:39 B cf:/d13.bin
2 14323456 Mar-25-2006 10:38 S cf:/secure.bin
****************************************************
Enter File Name: cf:/main.bin

Enter “cf:/main.bin”.

The file attribute operation submenu is displayed after step 4.
Enter File Name:cf:/main.bin
Modify this file Attribute:
1. +Main
2. -Main
3. +Backup
4. -Backup
5. Exit
Enter your choice(1-5): 1
Enter your choice(1-5): 5

==========<EXTEND-BOOTROM MENU>=======
| <1> Boot From CF Card              |
| <2> Enter Serial SubMenu           |
| <3> Enter Ethernet SubMenu         |
| <4> File Control                   |
| <5> Modify Bootrom Password        |
| <6> Ignore System Configuration    |
| <7> Boot Rom Operation Menu        |
| <8> Clear Super Password           |
| <9> Device Operation               |
| <a> Reboot                         |
======================================
Enter your choice(1-a): a

Set the current date and time
[Router]clock datetime HH:MM:SS {YYYY/MM/DD | MM/DD/YYYY }

Set the time zone
[Router]clock timezone zone-name { add | minus } HH:MM:SS

Set the system name of the device
[Router]sysname sysname

Configuring Interface IP
[Router]interface GigabitEthernet 0/0
[Router-GigabitGigabitEthernet0/0]ip address 10.1.1.1 24

Enable Telnet server.
[Router]telnet server enable

Debug commands
<Router>debugging module-name [ debugging-option ]
<Router>terminal debugging

Ping and tracert commands
[Router]ping [ -a ip-address ]
[Router]tracert [ -a source-ip ]



Reference

Command                                        Description
display reboot-type          Display the current startup.
Backup (user view)           Backup startup to a TFTP server.
restore (user view)          Restore startup from TFTP server.
startup saved user view)     Set the startup configuration file.
reset saved(user view)       Clear the startup config file.

display version              Display the VRBD number.
display diagnostic-info      Display the diagnostic info.
reboot                       Reboot the system/board.
configure-user count         Set number of concurrent cfg users.

               (system view)
remove slot                  Plug and unplug a board.
display users                Display the end user.
display startup              Display startup config file.
display boot-loader          Display info of the startup file.


H3C and Cisco CLI Equivalents

H3C/3Com                                                 Cisco
display                            show
undo                               no
local-user                         user
return                             end
quit                               exit
save                               write
delete                             erase
save                               write
sysname                            hostname
rip                                router rip
ospf                               router ospf
bgp                                router bgp
ip route-static                    ip route
acl                                access-list
user-interface vty0 4              Line vty0 4
screen-length disable              Terminal length 0
Terminal monitor                   Terminal monitor
Terminal logging
Terminal debugging                 Logging console level
display current-configuration      show run
display save-configuration         Show start
display diagnostic-information     show tech-support
display brief interfaces           show interfaces status
display ip int brief               show ip int brief
display ip routing-table           show ip route
display info-center                show logging
display version                    show version
save                               write memory
reset saved(user view)             erase startup-config
display version                    show version



H3C command alias
command-alias enable
command-alias mapping display show
command-alias mapping undo no
command-alias mapping return end
command-alias mapping quit exit
command-alias mapping sysname hostname
command-alias mapping acl access-list
command-alias mapping save write
command-alias mapping delete erase
command-alias mapping info-center logging

Search Duke

About the Author

My photo
Central Florida, United States