HP Logo It is possible to configure the HP v1910 via the command line using a console connection. This comes in handy if you are provisioning switches that are not available on your current net work or if you just prefer to do things the old fashion way. The commandline interface is available via the hidden _cmdline-mode option available for HP engineers.

This post is part of a bigger post that will later connect with OpenBSD to use as the routing engine to provide the switch internet access. In this post I will cover setting up vlan access ports and a trunk port connecting to the OpenBSD router.

The HP switch is an access model to be used in the office. It is available cheaply on ebay or your favorite flea market. I will use the JE006A model that provides 24 Gigabit Ethernet ports and 4 Fiber Channel ports.

Connecting to the Switch via the Console

I will be using my Fedora workstation to connect to the switch. First we need to change some settings to our Gnome Terminal Program so that the keyboard is understood correctly from the switch.

First create a new gnome terminal profile as shown in the image below.

Gnome Terminal Profile

And then set the Compatability options so they appear as below.

Gnome Terminal Settings

With that taken care of let’s open the new HP V1910 terminal profile and plug in the PL2303 USB-Serial Controller. Verify the system has acknowledged this via the dmesg` command.

$ dmesg |tail
[584900.391346] usb 1-1.2.3: new full-speed USB device number 32 using ehci-pci
[584900.482613] usb 1-1.2.3: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 3.00
[584900.482617] usb 1-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[584900.482620] usb 1-1.2.3: Product: USB-Serial Controller
[584900.482622] usb 1-1.2.3: Manufacturer: Prolific Technology Inc.
[584900.483050] pl2303 1-1.2.3:1.0: pl2303 converter detected
[584900.485870] usb 1-1.2.3: pl2303 converter now attached to ttyUSB0

Next we need to install the callup program so I can connect with my PL2302 Serial/USB adaptor. After installing cu via the uucp rpm, the user needs to be added to the dialout group. This will require a re-login so that the user can access these added group privileges.

dnf install uucp
usermod -a -G dialout philip

To connect to the switch execute the following command.

cu -l /dev/ttyUSB0 -s 38400

If you recieve an error Line is in use, either logout and try again, or su - into your user and your group membership to dialout will be available.

Factory Reset HP V1910

If you do not have the password to login you will need to factory reset the switch. Power cycle the switch and follow the output below to factory reset the switch.

Press Ctrl-B to enter Extended Boot menu...0
Please input BootRom password:

   BOOT MENU
    
1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify BootRom password
6. Enter BootRom upgrade menu
7. Skip current system configuration
8. Set BootRom password recovery
9. Set switch startup mode
0. Reboot

Enter your choice(0-9): 7
The current setting will run with current configuration file when reboot.
Are you sure you want to skip current configuration file when reboot? Yes or No
(Y/N):Y
Setting...Done!

   BOOT MENU

1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify BootRom password
6. Enter BootRom upgrade menu
7. Skip current system configuration
8. Set BootRom password recovery
9. Set switch startup mode
0. Reboot

Enter your choice(0-9):0 
Starting......
********************************************************************************
*                                                                              *
*                   HP V1910-24G Switch BOOTROM, Version 155                   *
*                                                                              *
********************************************************************************
Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.

Creation Date       : Jun 18 2012
CPU L1 Cache        : 32KB
CPU Clock Speed     : 333MHz
Memory Size         : 128MB
Flash Size          : 128MB
CPLD Version        : 002
PCB Version         : Ver.B
Mac Address         : CC3E5F845729


Press Ctrl-B to enter Extended Boot menu...0
Starting to get the main application file--flash:/V1910-CMW520-R1111P02.bin!....
.............................................................................
The main application file is self-decompressing.................................
................................................................................
............................Done!
System is starting...
Configuration file is skipped.
User interface aux0 is available.

Press ENTER to get started.

Hitting Enter we can view a summary of the system and then initialize the system so we have a clean system to start.

<HP V1910 Switch>
#Apr 26 12:00:30:544 2000 HP V1910 Switch SHELL/4/LOGIN:
 Trap 1.3.6.1.4.1.25506.2.2.1.1.3.0.1: login from Console
%Apr 26 12:00:30:683 2000 HP V1910 Switch SHELL/4/LOGIN: Console login from aux0
<HP V1910 Switch>
<HP V1910 Switch>summary 
Select menu option:             Summary
IP Method:
IP address:
Subnet mask:
Default gateway:

Current boot app is: flash:/V1910-CMW520-R1111P02.bin
Next main boot app is: flash:/v1910-cmw520-r1111p02.bin
Next backup boot app is: NULL

HP Comware Platform Software
Comware Software, Version 5.20 Release 1111P02, 
Copyright (c) 2004-2012 Hewlett-Packard Development Company, L.P.
HP V1910-24G Switch uptime is 0 week, 0 day, 0 hour, 0 minute

HP V1910-24G Switch
128M    bytes DRAM
128M    bytes Nand Flash Memory
Config Register points to Nand Flash

Hardware Version is REV.B
CPLD Version is 002
Bootrom Version is 155
[SubSlot 0] 24GE+4SFP Hardware Version is REV.B

<HP V1910 Switch>initialize 
 The startup configuration file will be deleted and the system will be rebooted. Continue? [Y/N]:y
 Please wait...
#Apr 26 12:04:21:932 2000 HP V1910 Switch DEV/1/REBOOT:
 Reboot device by command. 

%Apr 26 12:04:22:34 2000 HP V1910 Switch DEV/4/SYSTEM REBOOT:
 System is rebooting now.

HP V1910 Configuration

When the switch has rebooted you can login. with the following credentials. We will also look at what commands are available to us.

Username: admin
Password: blank
<HP V1910 Switch>
#Apr 26 12:16:52:944 2000 HP V1910 Switch SHELL/4/LOGIN:
 Trap 1.3.6.1.4.1.25506.2.2.1.1.3.0.1:admin login from Console
%Apr 26 12:16:53:94 2000 HP V1910 Switch SHELL/4/LOGIN: admin login from aux0
<HP V1910 Switch>?
User view commands:
  initialize  Delete the startup configuration file and reboot system
  ipsetup     Specify the IP address of the VLAN interface 1 
  password    Specify password of local user
  ping        Ping function 
  quit        Exit from current command view
  reboot      Reboot system
  summary     Display summary information of the device.
  upgrade     Upgrade the system boot file or the Boot ROM program 

<HP V1910 Switch>

Set Password

<HP V1910 Switch>password
Change password for user: admin
Old password: blank
Enter new password: ********
Retype password: ********
The password has been successfully changed.
<HP V1910 Switch>

Set IP Address for Switch

<HP V1910 Switch>ipset ip-address 192.168.1.253 24
<HP V1910 Switch>

Enter Extended CLI

Here is where we access the HP Engineer command line. Notice the password “512900”, that has to be entered.

The ? command will show the new commands we have available.

<HP V1910 Switch>_cmdline-mode on
All commands can be displayed and executed. Continue? [Y/N]y
Please input password:512900
Warning: Now you enter an all-command mode for developer's testing, some commands may affect operation by wrong use, please carefully use it with our engineer's direction.
<HP V1910 Switch>
<HP V1910 Switch>?
User view commands:
  archive        Specify archive settings
  backup         Backup next startup-configuration file to TFTP server
  boot-loader    Set boot loader
  bootrom        Update/read/backup/restore bootrom
  cd             Change current directory 
  clock          Specify the system clock
  cluster        Run cluster command
  copy           Copy from one file to another 
  debugging      Enable system debugging functions
  delete         Delete a file 
  dir            List files on a file system 
  display        Display current system information
  fixdisk        Recover lost chains in storage device
  format         Format the device
  free           Clear user terminal interface
  ftp            Open FTP connection 
  initialize     Delete the startup configuration file and reboot system
  ipsetup        Specify the IP address of the VLAN interface 1 
  lock           Lock current user terminal interface
  logfile        Specify log file configuration
  mkdir          Create a new directory 
  more           Display the contents of a file 
  move           Move the file 
  ntdp           Run NTDP commands
  password       Specify password of local user
  ping           Ping function 
  pwd            Display current working directory 
  quit           Exit from current command view
  reboot         Reboot system
  rename         Rename a file or directory 
  reset          Reset operation
  restore        Restore next startup-configuration file from TFTP server 
  rmdir          Remove an existing directory 
  save           Save current configuration
  schedule       Schedule system task
  screen-length  Specify the lines displayed on one screen
  send           Send information to other user terminal interface
  sftp           Establish one SFTP connection 
  ssh2           Establish a secure shell client connection 
  stack          Switch stack system
  startup        Specify system startup parameters 
  summary        Display summary information of the device.
  super          Set the current user priority level 
  system-view    Enter the System View
  telnet         Establish one TELNET connection 
  terminal       Set the terminal line characteristics 
  tftp           Open TFTP connection 
  tracert        Trace route function 
  undelete       Recover a deleted file 
  undo           Cancel current setting
  upgrade        Upgrade the system boot file or the Boot ROM program 

Enter system-view

The system-view is where we will create our vlans.

<HP V1910 Switch>system-view 
System View: return to User View with Ctrl+Z.
[HP V1910 Switch]?
System view commands:
  aaa                      Specify AAA configuration
  acl                      Specify acl configuration information
  archive                  Specify archive settings
  arp                      Specify ARP configuration information 
  bootrom-update           bootrom update
  clock                    Specify the system clock
  cluster                  Specify cluster configuration information
  command-privilege        Specify the command level 
  configuration            Specify configuration settings
  copyright-info           Copyright information configuration
  cut                      Cut connection
  delete                   Delete function
  dhcp                     DHCP configuration subcommands 
  dhcp-snooping            DHCP Snooping
  display                  Display current system information
  domain                   Add domain or modify domain attributes
  dot1x                    Specify 802.1X configuration information 
  execute                  Batch Command
  file                     Specify file system configuration information 
  ftp                      Specify FTP configuration information 
  gratuitous-arp-learning  Gratuitous Arp learning function 
  gratuitous-arp-sending   Sending gratuitous-arp packet when receiving
                           different sub-network arp packet function 
  habp                     Specify HABP configuration information
  header                   Specify the login banner 
  hotkey                   Specify hotkey configuration information 
  igmp-snooping            IGMP snooping
  info-center              Specify information center configuration information
  interface                Specify the interface configuration view 
  ip                       Specify IP configurations for the system
  job                      Schedule a system task
  jumboframe               Jumboframe command
  lacp                     Configure LACP Protocol
  lldp                     Link Layer Discovery Protocol(802.1ab) 
  local-user               Specify local user configuration information
  logfile                  Specify log file configuration
  loopback-detection       Detect if loopback exists
  mac-address              Configure MAC address
  mirroring-group          Specify mirroring-group
  multicast-vlan           Multicast VLAN
  ndp                      Neighbor discovery protocol
  ntdp                     Specify NTDP configuration information
  ntp-service              Specify NTP(Network Time Protocol) configuration
                           information
  ping                     Ping function 
  pki                      Specify PKI module configuration information
  port-group               Port group 
  public-key               Specify public-key module configuration information
  qos                      Command of QoS(Quality of Service)
  quit                     Exit from current command view
  radius                   Specify RADIUS configuration information
  return                   Exit to User View 
  rmon                     Specify RMON
  save                     Save current configuration
  sftp                     Specify SFTP service attribute
  snmp-agent               Specify SNMP(Simple Network Management Protocol)
                           configuration information
  ssh                      Specify SSH (secure shell) configuration information
  ssl                      Specify SSL (Secure Socket Layer) configuration
                           information
  stack                    Switch stack system
  storm-constrain          Port storm-constrain
  stp                      Spanning tree protocol
  super                    Modify super password parameters
  sysname                  Specify the host name 
  system-failure           System failure handling method 
  system-guard             System guard function 
  tcp                      Specify TCP(Transmission Control Protocol)
                           configuration information 
  telnet                   Specify TELNET configuration information
  temperature-limit        Set temperature limit
  tftp                     Specify TFTP configuration information
  tftp-server              TFTP Server 
  time-range               Specify time-range configuration information
  tracert                  Trace route function 
  traffic                  Specify traffic configuration information
  undo                     Cancel current setting
  user-group               Specify user group configuration information
  user-interface           Configure the user terminal interface 
  vlan                     Configure VLAN
  voice                    Specify voice VLAN
  web                      Web configuration 

Create VLANs

From here we create our vlans.

[HP V1910 Switch]vlan 2
[HP V1910 Switch-vlan3]description public
[HP V1910 Switch-vlan3]quit

[HP V1910 Switch]vlan 3
[HP V1910 Switch-vlan3]description servers
[HP V1910 Switch-vlan3]quit

[HP V1910 Switch]vlan 4
[HP V1910 Switch-vlan3]description un-used
[HP V1910 Switch-vlan3]quit

Verify VLAN creation.

[HP V1910 Switch]display vlan 
 Total 4 VLAN exist(s).
 The following VLANs exist:
  1(default), 2-4 

Verify detail of VLAN 3.

[HP V1910 Switch]display vlan 3
 VLAN ID: 3
 VLAN Type: static
 Route Interface: not configured
 Description: servers
 Name: VLAN 0003
 Tagged   Ports: none
 Untagged Ports: none

Here we configure vlan ports as access ports for the specified vlan. I have just shown the 1st port of each VLAN, you will want to create these for all ports. Unmodified ports will stay in VLAN 1.

[HP V1910 Switch]interface GigabitEthernet 1/0/6
[HP V1910 Switch-GigabitEthernet1/0/12]port link-type access           
[HP V1910 Switch-GigabitEthernet1/0/12]port access vlan 2              
[HP V1910 Switch-GigabitEthernet1/0/12]quit                            

[HP V1910 Switch]interface GigabitEthernet 1/0/13
[HP V1910 Switch-GigabitEthernet1/0/12]port link-type access           
[HP V1910 Switch-GigabitEthernet1/0/12]port access vlan 3              
[HP V1910 Switch-GigabitEthernet1/0/12]quit     

[HP V1910 Switch]interface GigabitEthernet 1/0/19
[HP V1910 Switch-GigabitEthernet1/0/12]port link-type access           
[HP V1910 Switch-GigabitEthernet1/0/12]port access vlan 4              
[HP V1910 Switch-GigabitEthernet1/0/12]quit 

Verify creation of access points.

[HP V1910 Switch]display vlan all
 VLAN ID: 1
 VLAN Type: static
 Route Interface: configured
 IP Address: 192.168.1.253
 Subnet Mask: 255.255.255.0
 Description: VLAN 0001
 Name: VLAN 0001
 Tagged   Ports: none
 Untagged Ports: 
    GigabitEthernet1/0/1     GigabitEthernet1/0/2     GigabitEthernet1/0/3     
    GigabitEthernet1/0/4     GigabitEthernet1/0/5     GigabitEthernet1/0/6     
    GigabitEthernet1/0/25    GigabitEthernet1/0/26    GigabitEthernet1/0/27    
    GigabitEthernet1/0/28    

 VLAN ID: 2
 VLAN Type: static
 Route Interface: not configured
 Description: public
 Name: VLAN 0002
 Tagged   Ports: none
 Untagged Ports: 
    GigabitEthernet1/0/7     GigabitEthernet1/0/8     GigabitEthernet1/0/9     
    GigabitEthernet1/0/10    GigabitEthernet1/0/11    GigabitEthernet1/0/12    
                
 VLAN ID: 3
 VLAN Type: static
 Route Interface: not configured
 Description: servers
 Name: VLAN 0003
 Tagged   Ports: none
 Untagged Ports: 
    GigabitEthernet1/0/13    GigabitEthernet1/0/14    GigabitEthernet1/0/15    
    GigabitEthernet1/0/16    GigabitEthernet1/0/17    GigabitEthernet1/0/18    

 VLAN ID: 4
 VLAN Type: static
 Route Interface: not configured
 Description: un-used
 Name: VLAN 0004
 Tagged   Ports: none
 Untagged Ports: 
    GigabitEthernet1/0/19    GigabitEthernet1/0/20    GigabitEthernet1/0/21    
    GigabitEthernet1/0/22    GigabitEthernet1/0/23    GigabitEthernet1/0/24    

Configure VLAN Port Trunk

This is the trunk port that will connect to the OpenBSD Router.

[HP V1910 Switch]interface GigabitEthernet 1/0/1
[HP V1910 Switch-GigabitEthernet1/0/1]port link-type trunk
[HP V1910 Switch-GigabitEthernet1/0/1]port trunk pvid vlan 1
[HP V1910 Switch-GigabitEthernet1/0/1]port trunk permit vlan 1 2 3 4
 Please wait... Done.
[HP V1910 Switch-GigabitEthernet1/0/1]quit
[HP V1910 Switch]

Verify Trunk Port. Making sure everything went well.

[HP V1910 Switch]display port trunk
Interface            PVID  VLAN passing
GE1/0/1                  1     1-4  
[HP V1910 Switch]

Enable SSH Server

We can now set up access via ssh.

[HP V1910 Switch]
[HP V1910 Switch]ssh server enable
Info: SSH server has been enabled.
[HP V1910 Switch]display ssh server status
 SSH server: Enable
 SSH version : 1.99 
 SSH authentication-timeout : 60 second(s)
 SSH server key generating interval : 0 hour(s)
 SSH authentication retries : 3 time(s)
 SFTP server: Disable
 SFTP server Idle-Timeout: 10 minute(s)

Save Configuration

Make sure you save as all this work will not survive a reboot.

[HP V1910 Switch]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
 Validating file. Please wait....
 Configuration is saved to device successfully.

Verify Configuration via Web Interface

We can now verify the Web User Interface, that all our changes have been made as we anticipated.

HP WUI

Conclusion

OK, now that is all confirmed working, that is the end of Part 1. It leaves us ready to configure our OpenBSD Router, which we will do in the next post. You can jump to it here.