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


Ignore:
Timestamp:
Jan 21, 2010, 7:45:42 AM (14 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/CLISetup

    v22 v23  
    273273== Elucidation (Or, How-TO's) ==
    274274
    275 As of now, this is just a conglomeration of facts and hints on how to configure the IP8800. Before we begin, here are the assumptions that are made throughout these pages:
    276 
    277  * You are running Linux (We are, for the most part, using Ubuntu unless specified)
     275The IP8800/S3640-48T2XW and IP8800/S3640-24T2XW are the two models of NEC switch that support !OpenFlow. "Smart" switches like the IP8800 must be configured via a command line before they can be used.
     276
     277As of now, this is just a conglomeration of facts and hints on how to configure the 48-port IP8800/S3640-48T2XW. Before we begin, here are the assumptions that are made throughout these pages:
     278
     279 * You are running/know how to get around Linux (We are, for the most part, using Ubuntu unless specified)
    278280 * You are using the NEC IP8800/S3640-48T2XW switch.   
     281 * You know network models (e.g. TCP/IP, OSI)
    279282
    280283== Section 1: The Basics ==
    281284
    282 "Smart" switches like the IP8800 must be configured via a command line before they can be used. If you are unfamiliar with "smart" switches and how to configure them, this is the place to start. This section coveres the following:
     285If you are unfamiliar with "smart" switches or how to configure them, this is the place to start. This section covers the following:
    283286 
    284287 * Logging in for the first time (through serial)
    285  * Admin modes and intro to contexts
    286  * VLANs and ports
     288 * VLANs, VLAN interfaces, and ports
     289 * User modes and contexts
    287290   
    288291
    289292=== Logging into the switch for the first time. ===
    290293
    291 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. If not already installed on your box, the Debian package for kermit is ckermit.   
    292 
    293 1. 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.
    294 
    295 2. Connect via serial using the following commands at the console (Make sure you are root):
     294Out 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.
     295
     2961. '''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.
     297
     2982. '''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     
     301
     3023. '''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:
    296303{{{
    297304 /$ kermit
     
    334341`Ctrl-\ q` ends the kermit session.
    335342
    336 
    337 === Admin modes, contexts ===
    338 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 does autocompletion; you don't need to type the whole command:
    339 
    340 {{{
    341 > ena     <<---whole command is 'enable'
    342 #
    343 }}}
    344 
    345 
    346 "configure" brings you to the configuration prompt, which looks like this :
    347 {{{
    348 # config         
    349 (config)#
    350 }}}
    351 
    352 All configurations, from port speed to the MoTD banner, are done from here.
    353 
    354 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 throughout these pages are:
    355 
    356  * `vlan n` - create/configure standard VLANs, n being the VLAN ID (some number)
    357  * `interface vlan n` - create/ configure a virtual interface with both Layer 2 and 3 characteristics
    358  * `interface gigabitethernet 0/n` - configure specific port, n being number between 1 and 48
    359  * `line <vty|console>` - configure telnet or console parameters, respectively
    360 
    361 Don't worry even if these don't make sense now - The meanings of the contexts will be explained as they are introduced. 
    362 
    363 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.
    364 {{{
    365 (config)# interface vlan 8              <<---start by entering the 'interface vlan' context             
    366 (config-if)#
    367 (config-if)# interface gi 0/3           <<---switch to 'interface gigabitethernet' context
    368 (config-if)#                            <<---note how prompt still shows up as "config-if"
    369 }}}
    370 
    371 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:
    372 {{{
    373  sw-sb09(config)# int range gigabitethernet 0/1-4, gigabitethernet 0/30
    374  sw-sb09(config-if-range)#
    375 }}}
    376 Note how the prompt becomes "(config-if-range)" in this case.
    377 
    378 === VLANs and ports. ===
     343==== Troubleshooting ====
     344
     345Make sure you are root when you start up kermit.
     346
     347Kermit 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
     349If, 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
     357Note, we have found that minicom doesn't seem to work too well with the switches. If you get it to work, please note it!   
     358
     359
     360=== Ports, VLANs, VLAN interfaces ===
     361
     362Before we get to configuring things, we cover a few basics about ports and VLANs in terms of these switches. You should be familiar with the following before going through this section or on to configuration:
     363
     364 * classic VLANs - http://en.wikipedia.org/wiki/Virtual_LAN
     365 * tagging/trunking - http://en.wikipedia.org/wiki/IEEE_802.1Q
     366 
    379367==== ports ====
    380 There are 48 RJ-45 1 GBps ports and two sockets for GBICs (10GBps fiber links) on the switch. The switch identifies the ports by giving them unique names based on their speed and location. The command "show port status" can be used to look at this:
     368
     369By configuring the ports, you can control physical layer properties of the switch e.g. port speed, whether it is full or half duplex, and whether the port is up or down.         
     370
     371There are 48 RJ-45 (Ethernet) 1GBps ports and two sockets for GBICs (10GBps fiber links) on the switch. The switch identifies the ports by giving them unique names based on their speed and location. RJ45 ports are geth0/1 through geth0/48, and the GBICs, tengeth0/49 and 0/50.
     372
     373The command "show port status" can be used to see this:
    381374{{{
    382375sw-sb09> sh po st
     
    390383 0/ 3 geth0/3        up     Tx        948982         581      437194           0
    391384                            Rx         81584           0        2294           2
    392  0/ 4 geth0/4        down   Tx             0           0           0           0
     385 ...
     386 
     387 0/47 geth0/47       down   Tx             0           0           0           0
    393388                            Rx             0           0           0           0
    394  0/ 5 geth0/5        down   Tx             0           0           0           0
    395                             Rx             0           0           0           0
    396 ...
    397 
     389 0/48 geth0/48       up     Tx        281248          10        6975           0
     390                            Rx       4358554     3135424      481238           0
    398391 0/49 tengeth0/49    down   Tx             0           0           0           0               
    399392                            Rx             0           0           0           0
     
    401394                            Rx             0           0           0           0
    402395}}}
    403 'geth' refers to the 1GBps RJ-45 ports, and 'tengeth' refers to the GBIC sockets. The numbers following the 'geth' or 'tengeth' denote which blade and where on the blade the port is located using the convention <blade/location>. The port locations are counted beginning the top left RJ-45 port, and end at the GBICs (ports 0/49 and 0/50).       
     396
     397The ports are counted beginning the top left RJ-45 at 0/1 and end at the lower right port at 0/48. If you look at the front of the switch you can see that they are labeled above the link lights of each of the pairs of ports.
     398
     399==== VLANs ====
     400
     401In the context of switching, VLANs tie Layer 1 with Layer 2 by assigning each port a VLAN. A host connected to a port assigned to VLAN n will become a member of that VLAN. The VLANs on a switch can be seen with the command `show vlan` under enabled (super user) mode:
     402{{{
     403sw-sb09# sh vlan
     404Date 2010/01/20 03:12:01 UTC
     405VLAN counts:6   VLAN tunneling enabled               
     406VLAN ID:1     Type:Port based      Status:Up
     407  Learning:On            Tag-Translation:
     408  BPDU Forwarding:       EAPOL Forwarding:
     409  Router Interface Name:VLAN0001
     410  IP Address:172.16.19.253/16                         <<---IP address of VLAN interface
     411  Source MAC address: 0012.e2c8.1f9c(System)
     412  Description:Network
     413  Spanning Tree:                                     
     414  AXRP RING ID:      AXRP VLAN group:
     415  GSRP ID:      GSRP VLAN group:    L3:
     416  IGMP snooping:     MLD snooping:
     417  Untagged(10)  :0/39-48
     418VLAN ID:3     Type:Port based      Status:Up
     419  Learning:On            Tag-Translation:
     420  BPDU Forwarding:       EAPOL Forwarding:
     421  Router Interface Name:VLAN0003
     422  IP Address:
     423  Source MAC address: 0012.e2c8.1f9c(System)
     424  Description:CM
     425  Spanning Tree:
     426  AXRP RING ID:      AXRP VLAN group:
     427
     428...
     429
     430}}}
     431Rest assured, there are many details in this output that you don't have to worry about.
    404432   
    405 ==== VLANs ====
    406 These can become confusing quickly because based on different contexts, the switch handles them differently.
     433==== VLAN interfaces ====
     434
     435In addition to the classic VLANs, the IP8800 also allows you to assign IP addresses and subnets to VLANs as if they are IP Layer constructs. These L2/L3 conglomerates are referred to as "VLAN interfaces", and give the switch extra functionality that would otherwise only be found in higher-layer devices.
     436
     437VLAN interfaces are also important because it provides a means to interact with a Layer 2 device (the switch) using Layer 3 means (IP). Hence, you will need to deal with VLAN interfaces if you want to, say, use telnet to communicate with the switch.
     438
     439Otherwise, VLAN interfaces are handled like any other VLAN.
     440
     441=== User modes and contexts ===
     442
     443
     444
     445As 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
     459All configurations, from port speed to the MoTD banner, are done from here.
     460
     461Here, 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
     468Don't worry even if these don't make sense now - The meanings of the contexts will be explained as they are introduced. 
     469
     470As 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
     478The 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}}}
     483Note how the prompt becomes "(config-if-range)" in this case.
    407484
    408485 * 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).