Changes between Version 23 and Version 24 of Internal/OpenFlow/CLISetup


Ignore:
Timestamp:
Jan 24, 2010, 4:39:41 PM (15 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/CLISetup

    v23 v24  
    1 = Configuring the switch through command line interface (CLI) =
     1= Configuring the switch through command line interface (CLI) = 
    22
    33The IP8800/S3640-48T2XW and IP8800/S3640-24T2XW are the two models of NEC switch that support !OpenFlow. This page is a how-to/log on configuring the IP8800/S3640-48T2XW NEC switch through the CLI. 
     
    281281 * You know network models (e.g. TCP/IP, OSI)
    282282
     283----
    283284== Section 1: The Basics ==
    284285
    285286If you are unfamiliar with "smart" switches or how to configure them, this is the place to start. This section covers the following:
    286287 
    287  * Logging in for the first time (through serial)
    288  * VLANs, VLAN interfaces, and ports
     288 * Logging in for the first time (serial connection)
     289  * troubleshooting the connection
    289290 * User modes and contexts
    290    
    291 
    292 === Logging into the switch for the first time. ===
     291 * Creating and configuring VLANs and VLAN interfaces
     292 * Setting up Telnet
     293 
     294----
     295== Logging into the switch for the first time. ==
    293296
    294297Out of the box, the switches are not configured for Telnet. In this case, you need to make configuration changes by logging into the switch via the console port, which uses a standard RS-232 cable. You'll also need to have software installed on your PC to be able to establish a serial connection. Kermit is the recommended choice - it's default settings allow you to connect without changing anything.
     
    2962991. '''Name your switch.''' People names are easier to remember than IP addresses or machine-like names i.e. as01-hh-alex, and are easier to use in discussion if everyone agrees on names. Note, the names Bob, Nancy, and Andy are already taken.
    297300
    298 2. '''Install kermit.''' If not already installed on your box, the Debian package for kermit is ckermit, and can be easily installed with the command:
    299 
    300  sudo apt-get install ckermit     
     3012. '''Install kermit.''' If not already installed on your box, the Debian package for kermit is ckermit, and can be easily installed with apt-get.
    301302
    3023033. '''Establish a connection.''' Connect your PC to the port labeled "console" on the switch using the RS-232 cable, and issue the following commands as root:
     
    308309}}}
    309310
    310 Or, you can use the shorthand for the above:
     311Or, you can use the shorthand one-liner:
    311312{{{
    312313 kermit -l /dev/ttyS0
     
    339340}}}     
    340341
    341 `Ctrl-\ q` ends the kermit session.
    342 
    343 ==== Troubleshooting ====
    344 
    345 Make sure you are root when you start up kermit.
    346 
    347 Kermit will balk if you try to log in while there is a session going on. Make sure that no one else is logged in via serial, and that you haven't forgotten to log out during a previous session.     
    348 
    349 If, for some reason, you can't use kermit or have to configure the settings for your serial connection, use the following settings:
    350 
    351  * speed: 9600
    352  * data bits: 8
    353  * stop bits: 1
    354  * Flow control: none
    355  * Parity: none
    356 
    357 Note, we have found that minicom doesn't seem to work too well with the switches. If you get it to work, please note it!   
     3424. '''exiting.''' `Ctrl-\ q` ends the kermit session. The command `exit` or  `logout` will just log you out of the switch, but will not end the session.   
     343
     344==== Troubleshooting serial connections ====
     345
     346 * Make sure you are root when you start up kermit.
     347
     348 *Kermit will balk if you try to log in while there is a session going on. Make sure that no one else is logged in via serial, and that you haven't forgotten to log out during a previous session.     
     349
     350 * If you get a message like this with the one-liner of `kermit -l /dev/ttyS0`. :
     351{{{
     352?Carrier required but not detected.
     353***********************************
     354 Hint: To CONNECT to a serial device that
     355 is not presenting the Carrier Detect signal,
     356 first tell C-Kermit to:
     357
     358   SET CARRIER-WATCH OFF
     359
     360***********************************
     361
     362}}}
     363 type the commands given above in lowercase. 
     364
     365 * If, for some reason, you can't use kermit or have to configure the settings for your serial connection, use the following settings:
     366
     367  * speed: 9600
     368  * data bits: 8
     369  * stop bits: 1
     370  * Flow control: none
     371  * Parity: none
     372
     373 Note, we have found that minicom doesn't seem to work too well with the switches. If you get it to work, please note it!   
     374
     375----
     376== User modes and contexts ==
     377
     378As with Cisco switches, you must be in privileged mode to make any configuration changes on the switch (or see the full list of commands). The magic word is "enable".
     379
     380{{{
     381> ena     <<---whole command is 'enable'
     382#
     383}}}
     384
     385Note how the switch autocompletes commands; you don't need to type the whole command. "configure" brings you to the configuration prompt, which looks like this :
     386{{{
     387# config         
     388(config)#
     389}}}
     390
     391All configurations, from port speed to the MoTD banner, are done from here.
     392
     393Here, typing different sets of commands bring you to different configuration modes specific to the feature you are trying to modify. the commands that bring you to the specialized modes are called "contexts," and typing them are called "entering a context." Some contexts we want to focus on are:
     394
     395 * `vlan n` - create/configure standard VLANs, n being the VLAN ID (some number)
     396 * `interface vlan n` - create/ configure a virtual interface with both Layer 2 and 3 characteristics
     397 * `interface gigabitethernet 0/n` - configure specific port, n being number between 1 and 48
     398 * `line <vty|console>` - configure telnet or console parameters, respectively
     399
     400Don't worry even if these don't make sense now - The meanings of the contexts will be explained as we introduce each context. 
     401
     402As you can see, when you enter a context, the prompt becomes "(config-if)#." However, this prompt doesn't indicate what context you are using; you just have to remember what you are doing.
     403{{{
     404(config)# interface vlan 8              <<---start by entering the 'interface vlan' context             
     405(config-if)#
     406(config-if)# interface gi 0/3           <<---switch to 'interface gigabitethernet' context
     407(config-if)#                            <<---note how prompt still shows up as "config-if"
     408}}}
     409
     410The command `exit` lets you exit from contexts and enabled mode, or lets you log out of the switch if you were just in user mode.
     411
     412[[BR]]
     413----
     414== Creating and configuring VLANs and VLAN interfaces ==
     415
     416
     417[[BR]]
     418----
     419== Setting up Telnet ==
     420Setting up telnet on the switch requires several steps that involve a few contexts. The steps can be outlined as the following:
     421 
     422 1. Create a VLAN for telnet via the "vlan" context. For clarity (and good practice), we name our VLAN "telnet" so we know what it's used for.
     423{{{
     424(config)# vlan 4
     425!(config-vlan)# name "telnet"
     426!(config-vlan)# exit
     427!(config)#
     428}}}
     429 2. Assign an IP address to the VLAN. By entering the "interface vlan" context you automatically turn VLAN 4 into a VLAN interface.     
     430{{{
     431!(config)# interface vlan 4
     432!(config-if)# ip address 192.168.10.1 255.255.255.0
     433!(config-if)# exit
     434!(config)#
     435}}}
     436 3. Enable telnet logins to the switch. The "line vty" context allows you to do this. The numbers following the context denote which virtual terminals users can use to access the switch via telnet. Here, vty 0-2 can be used, meaning 3 users can simultaneously telnet into the switch.   
     437{{{
     438!(config)# line vty 0 2
     439!(config-line)# exit
     440!(config)#   
     441!(config)# save
     442(config)# exit
     443#
     444}}}
     445
     446
     447
     448
     449
     450 There are also contexts that support ranges of interfaces/ports/VLANs. For example, to configure ports 1-4 and 30 at once:
     451{{{
     452 sw-sb09(config)# int range gigabitethernet 0/1-4, gigabitethernet 0/30
     453 sw-sb09(config-if-range)#
     454}}}
     455Note how the prompt becomes "(config-if-range)" in this case.
    358456
    359457
     
    439537Otherwise, VLAN interfaces are handled like any other VLAN.
    440538
    441 === User modes and contexts ===
    442 
    443 
    444 
    445 As with Cisco switches, you must be in privileged mode to make any configuration changes on the switch (or see the full list of commands). The magic word is "enable". Note how the switch autocompletes; you don't need to type the whole command:
    446 
    447 {{{
    448 > ena     <<---whole command is 'enable'
    449 #
    450 }}}
    451 
    452 
    453 "configure" brings you to the configuration prompt, which looks like this :
    454 {{{
    455 # config         
    456 (config)#
    457 }}}
    458 
    459 All configurations, from port speed to the MoTD banner, are done from here.
    460 
    461 Here, typing different sets of commands bring you to different configuration modes specific to the feature you are trying to modify. the commands that bring you to the specialized modes are called "contexts," and typing them are called "entering a context." Some contexts we want to focus on are:
    462 
    463  * `vlan n` - create/configure standard VLANs, n being the VLAN ID (some number)
    464  * `interface vlan n` - create/ configure a virtual interface with both Layer 2 and 3 characteristics
    465  * `interface gigabitethernet 0/n` - configure specific port, n being number between 1 and 48
    466  * `line <vty|console>` - configure telnet or console parameters, respectively
    467 
    468 Don't worry even if these don't make sense now - The meanings of the contexts will be explained as they are introduced. 
    469 
    470 As you can see, when you enter a context, the prompt becomes "(config-if)#." However, this prompt doesn't indicate what context you are using; you just have to remember what you are doing.
    471 {{{
    472 (config)# interface vlan 8              <<---start by entering the 'interface vlan' context             
    473 (config-if)#
    474 (config-if)# interface gi 0/3           <<---switch to 'interface gigabitethernet' context
    475 (config-if)#                            <<---note how prompt still shows up as "config-if"
    476 }}}
    477 
    478 The command `exit` lets you exit from contexts and enabled mode, or lets you log out of the switch if you were just in user mode. There are also contexts that support ranges of interfaces/ports/VLANs. For example, to configure ports 1-4 and 30 at once:
    479 {{{
    480  sw-sb09(config)# int range gigabitethernet 0/1-4, gigabitethernet 0/30
    481  sw-sb09(config-if-range)#
    482 }}}
    483 Note how the prompt becomes "(config-if-range)" in this case.
    484 
    485539 * Virtual interfaces - Also called "VLANs" by the switch. They do function as VLANs in the traditional sense, but in this case, are also associated with IP addresses used by the switch (i.e. the IP address used when telnetting).
    486540