wiki:Internal/OpenFlow/CLISetup

Version 6 (modified by akoshibe, 15 years ago) ( diff )

NEC switch configuration through command line interface (CLI)

The IP8800/S3640-48T2XW and IP8800/S3640-24T2XW are the two models of NEC switch that support OpenFlow. This page explains how to configure the IP8800/S3640-48T2XW NEC switch through the CLI.

Connecting to the switch

The switch must be configured through the console port before telnet can be used.
The settings for the serial connection are the following:

  • speed: 9600
  • data bits: 8
  • stop bits: 1
  • Flow control: none
  • Parity: none

Kermit was used to connect to the switch because default settings can be used directly and no changes need to be made. HyperTerminal should work, minicom doesn't seem to despite using the right settings. After installation (The Debian package is ckermit), use the following commands:

 C-Kermit>set line /dev/ttyS0
 C-Kermit>set carrier-watch off
 C-Kermit>connect

If the login prompt doesn't show up, pressing enter a couple of times should do the trick. The default username is operator, and the password, blank.

Making configuration changes through CLI

Changes to the configurations can only be done in privileged mode. to do this, type enable in the prompt. The '>' should become a '#'.

> ena
# 

Note that the shorthand of a command may be used. The switch also does command completions when you hit tab. A full list of commands can be seen by typing ? at the prompt - this will produce a sizeable list and will not be shown here. Commands are often used in compound; a ? can be used at any time to see what options are available:

# show interface ?
  gigabitethernet     The type of a port is specified in
                      10BASE-T/100BASE-TX/1000BASE-T/1000BASE-X line
  tengigabitethernet  The type of a port is specified in 10GBASE-R line

To actually configure the switch, you need to be in configuration mode. Type configure to enter configuration mode:

# configure      
(config)# 

Configuration Examples

The following configurations demonstrate the use of basic configuration commands. For people literate in Japanese, a complete set of configuration guides may be found in the documents section of the NEC website.

If, at any time, you get confused as to which interface or what you are even configuring, command show will output the name of the interface and the configuration changes made to it so far:

(config-if)# show
interface gigabitethernet 0/27
  switchport mode access
  switchport access vlan 4
!

Configuration: Telnet access to the switch

To telnet to a switch, you need to set up an IP address for the interface on the switch that a remote host may connect to. To do this, you need to not only set up a vlan interface to which the IP address belongs, but also permit telnet access.

  1. After entering configuration mode, create a vlan (arbitrarily 4 in this case). Give it a name if you feel like it.
    The '!' before the prompt indicates that a change has been made, and you must use the command 'save' before exiting out of config mode to have the configuration changes apply.
    (config)# vlan 4
    !(config-vlan)# name "telnet"
    !(config-vlan)# exit
    !(config)# 
    
  1. Assign the port that is to be used for remote access the vlan you just created. the range of ports available save the 10GBe interfaces are 0/1-0/48.
    !(config)# interface gigabitethernet 0/27
    !(config-if)# switchport mode access 
    !(config-if)# swi acc vlan 4         
    !(config-if)# exit
    
  1. Assign an IP address and subnet mask to the vlan's interface:
    !(config)# interface vlan 4
    !(config-if)# ip address 192.168.1.1 255.255.255.0
    !(config-if)# exit
    !(config)#
    

 

  1. Allow login via telnet. This example will limit the number of maximum simultaneous telnet connections to 3.
    !(config)# line vty 0 2
    !(config-line)# exit
    !(config)#   
    

  1. Save the configuration changes to allow it to survive a reboot, and to get rid of the annoying !'s.
    !(config)# save
    (config)# exit
    # 
    

Go back to OpenFlow index

Note: See TracWiki for help on using the wiki.