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


Ignore:
Timestamp:
Jan 24, 2010, 5:35:47 PM (15 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/CLISetup

    v24 v25  
    286286If you are unfamiliar with "smart" switches or how to configure them, this is the place to start. This section covers the following:
    287287 
    288  * Logging in for the first time (serial connection)
    289   * troubleshooting the connection
     288 * Using the serial connection to log in
     289  * troubleshooting
    290290 * User modes and contexts
     291  * available commands / help pages
     292  * switching contexts and autocompletion (a remark)
    291293 * Creating and configuring VLANs and VLAN interfaces
    292294 * Setting up Telnet
     295  * Using it
     296  * troubleshooting
    293297 
    294298----
    295299== Logging into the switch for the first time. ==
    296300
    297 Out 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.
     301Out of the box, the switches are not configured for Telnet. In this case, you need to log into the switch using the serial 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.
    298302
    2993031. '''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.
     
    346350 * Make sure you are root when you start up kermit.
    347351
    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.     
     352 * 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.     
    349353
    350354 * If you get a message like this with the one-liner of `kermit -l /dev/ttyS0`. :
     
    364368
    365369 * If, for some reason, you can't use kermit or have to configure the settings for your serial connection, use the following settings:
    366 
     370{{{
    367371  * speed: 9600
    368372  * data bits: 8
     
    370374  * Flow control: none
    371375  * Parity: none
    372 
     376}}}
    373377 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!   
    374378
     
    392396
    393397Here, 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 
     398{{{
     399 - `vlan n` - create/configure standard VLANs, n being the VLAN ID (some number)
     400 - `interface vlan n` - create/ configure a virtual interface with both Layer 2 and 3 characteristics
     401 - `interface gigabitethernet 0/n` - configure specific port, n being number between 1 and 48
     402 - `line <vty|console> vtyrange<0-b>` - configure telnet or console parameters, respectively
     403}}}
    400404Don't worry even if these don't make sense now - The meanings of the contexts will be explained as we introduce each context. 
    401405
    402 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.
     406As 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. If you forget where you were, typing "show" will display all of the configurations saved for that specific context (hopefully giving you enough information to let you recall what you were trying to do).
    403407{{{
    404408(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 
     409!(config-if)#
     410!(config-if)# interface gi 0/3           <<---switch to 'interface gigabitethernet' context
     411!(config-if)#                            <<---note how prompt still shows up as "config-if"
     412}}}
     413
     414As you can see above, when you make changes to the configurations (e.g. create vlan interfaces as in this example), you will see a "!" before the prompt. This is there to remind you that you've made changes that must be saved if you want them to survie a reboot. The command "save" intuitively saves the settings.
     415 
    410416The 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]]
     417{{{
     418!(config-if)# save
     419(config-if)# exit
     420(config)# exit
     421#
     422}}}
     423
     424=== Available commands / help pages ===
     425Like with Cisco switches, typing `?` at the prompt will list the available commands along with a brief summary. If you are in a certain context, typing `?` will show you configuration options available for that context.   
     426
     427=== switching contexts and autocompletion ===
     428From the intitial configuration prompt, you can let the switch autocomplete contexts. For example:
     429{{{
     430sw-sb09(config)# int gi 0/34     <<-- instead of "interface gigabitethernet 0/34"
     431sw-sb09(config-if)#
     432}}}
     433
     434However, if you are already in a context, and you want to switch to another context, you must type the first word in full, else the switch will throw an error:
     435{{{
     436sw-sb09(config-if)# int gi 0/35
     437int gi 0/35
     438 ^
     439% illegal parameter at '^' marker
     440sw-sb09(config-if)# interface gi 0/35
     441sw-sb09(config-if)#         
     442}}}
     443
    418444----
    419445== Setting up Telnet ==
     
    444470}}}
    445471
     472=== Using Telnet ===
     473Once you've set up telnet on your switch, you can access the switch with the IP address you've assigned it during step 2 above. So for this switch you would issue the following command from your terminal:
     474{{{
     475$ telnet 192.168.10.1
     476}}}
     477
     478The username and password are the same for this prompt once you connect.
     479
     480=== Troubleshooting ===
     481 ...coming soon, if ever
     482
     483----
     484== Creating and configuring VLANs and VLAN interfaces ==
    446485
    447486