No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S12700 V200R013C00 Configuration Guide - Basic Configuration

This document describes the configurations of Basic, including CLI Overview, EasyDeploy Configuration, USB-based Deployment Configuration, Logging In to a Device for the First Time, CLI Login Configuration, Web System Login Configuration, File Management, Configuring System Startup, ISSU Configuration, BootLoad Menu Operation.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring System Information

Configuring System Information

Context

This section describes how to set basic system parameters of a switch. The following tasks may be involved after the first login:
  1. Set the name of the switch.
  2. Set the date and time of the switch.
  3. Set the location and time zone of the switch.
  4. View the date and time of the switch.
  5. Set the management IP address and default gateway of the switch.
  6. View the IP routing information.
  7. Configure login through STelnet.
  8. View configuration information about the current switch.

Procedure

  1. Run the sysname host-name command to set the name of the switch.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] undo sysname    //Restore the default host name.
    [HUAWEI] quit

  2. Run the clock datetime command to set the current time and date.

    <HUAWEI> clock datetime 08:00:00 2018-12-01 
    

  3. Run the clock timezone command t set the location and time zone of the switch. Run the clock datetime command to set the current time and date.

    <HUAWEI> system-view
    [HUAWEI] clock timezone Beijing add 08:00:00

  4. Run the display clock command to view the current system date and clock.

    [HUAWEI] display clock
    2018-12-01 08:02:30+08:00                                                       
    Saturday                                                                        
    Time Zone(Beijing) : UTC+08:00 
    

  5. Run the ip address command to set the management IP address of the switch. Run the ip route-static command to set the default gateway of the switch.

    • For a switch with the management interface, configure a management IP address for the management interface.

      [HUAWEI] interface Ethernet 0/0/0
      [HUAWEI] interface Ethernet 0/0/0
      [HUAWEI-Ethernet0/0/0] ip address 10.10.10.2 255.255.255.0    //Management IP address for the switch
      [HUAWEI-Ethernet0/0/0] quit 
      [HUAWEI] ip route-static 0.0.0.0 0 10.10.10.1    //Default gateway for the switch
    • For a switch without the management interface, configure a management IP address for the Vlanif interface.

      [HUAWEI] interface Vlanif 10
      [HUAWEI-Vlanif10] ip address 10.10.10.2 255.255.255.0    //IP Management IP address for the switch
      [HUAWEI-Vlanif10] quit 
      [HUAWEI] ip route-static 0.0.0.0 0 10.10.10.1    //Default gateway for the switch

  6. Run the display ip interface brief command to view brief information about the interface IP address. Run the display ip routing-table command to view the IP routing information.

    [HUAWEI] display ip interface brief
    *down: administratively down                                                    
    ^down: standby                                                                  
    (l): loopback                                                                   
    (s): spoofing                                                                   
    (E): E-Trunk down                                                               
    The number of interface that is UP in Physical is 2                             
    The number of interface that is DOWN in Physical is 1                           
    The number of interface that is UP in Protocol is 2                             
    The number of interface that is DOWN in Protocol is 1                           
                                                                                    
    Interface                         IP Address/Mask      Physical   Protocol      
    NULL0                             unassigned           up         up(s)         
    Vlanif10                          10.10.10.2/24        up         up            
                                                                                    
    [HUAWEI] display ip routing-table
    Route Flags: R - relay, D - download to fib                                     
    ------------------------------------------------------------------------------  
    Routing Tables: Public                                                          
             Destinations : 5        Routes : 5                                     
                                                                                    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface      
                                                                                    
            0.0.0.0/0   Static  60   0          RD   10.10.10.1      Vlanif10     
           10.0.0.0/8   Direct  0    0           D   10.0.0.1        InLoopBack0    
           10.0.0.1/32  Direct  0    0           D   10.0.0.1        InLoopBack0    
         10.10.10.0/24  Direct  0    0           D   10.10.10.2      Vlanif10     
         10.10.10.2/32  Direct  0    0           D   10.0.0.1        Vlanif10     
                                                                                    

  7. Run the ssh user command to configure SSH user-related parameters. Run the local-user command to configure local user-related parameters. In this case, login to a switch through SSH is implemented.

    <HUAWEI> system-view
    [HUAWEI] user-interface vty 0 4
    [HUAWEI-ui-vty0-4] authentication-mode aaa    //Set the authentication mode of the VTY user to AAA authentication.
    [HUAWEI-ui-vty0-4] protocol inbound ssh    //By default, the VTY UI supports SSH.
    [HUAWEI-ui-vty0-4] quit
    [HUAWEI] aaa
    [HUAWEI-aaa] local-user admin password irreversible-cipher admin@123    //Create a local user with the same user name as the SSH user and set a login password for the local user.
    [HUAWEI-aaa] local-user admin service-type ssh terminal    //Set a service type for the local user.
    [HUAWEI-aaa] local-user admin privilege level 15    //Set the local user level.
    [HUAWEI-aaa] quit
    [HUAWEI] ssh user admin    //Create an SSH user.
    [HUAWEI] ssh user admin authentication-type password    //Set the authentication mode of the SSH user to password authentication.
    [HUAWEI] ssh user admin service-type stelnet    //Set a service type for the SSH user.
    [HUAWEI] stelnet server enable    //Enable the STelnet server function on the switch.
    
    NOTE:

    Ensure that the name of the SSH user is the same as that of the local user.

    This section describes only how to use password authentication to implement login to a switch through STelnet. For more detailed operations about how to implement remote login through Telnet or STelnet, see Configuring Telnet Login or Configuring STelnet Login.

  8. Run the display current-configuration command to view the current configuration of the switch.

    <HUAWEI> system-view
    [HUAWEI] display current-configuration | include ip
     ip address 10.10.10.2 255.255.255.0                                           
    ip route-static 0.0.0.0 0.0.0.0 10.10.10.1                                      

Commands for Viewing System Information

You can use the following commands to view system information:

  • View the system configuration using the display current-configuration command.
  • View the brief interface information using the display interface brief command.
  • View the current system date and clock using the display clock command.
  • View brief information about the interface IP address using the display ip interface brief command.
  • View the system routing information using the display ip routing-table command.
  • View the physical attributes and configurations about the UI using the display user-interface command.
  • View the local user list using the display local-user command.
  • View SSH user information on the SSH server using the display ssh user-information command.
  • View the global configuration information about the SSH server using the display ssh server status command.
  • View information about the session connected to the SSH client using the display ssh server session command.
Translation
Download
Updated: 2019-04-08

Document ID: EDOC1100065643

Views: 11714

Downloads: 41

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next