Changes between Version 26 and Version 27 of Internal/OpenFlow/CLISetup


Ignore:
Timestamp:
Jan 27, 2010, 8:07:50 AM (14 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/CLISetup

    v26 v27  
    383383== User modes and contexts ==
    384384
     385'''Super user mode.'''
    385386As 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".
    386387
    387388{{{
    388 > ena     <<---whole command is 'enable'
     389> ena     <<---whole command is 'enable' -- the switch autocompletes commands.
    389390#
    390391}}}
    391392
    392 Note 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 :
     393
     394'''Configuration mode and Contexts.'''
     395All configurations, from port speed to the MoTD banner, are done from the configuration prompt. The command "configure" brings you to the prompt, which looks like this :
    393396{{{
    394397# config         
     
    396399}}}
    397400
    398 All configurations, from port speed to the MoTD banner, are done from here.
    399 
    400401Here, 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:
    401 {{{
    402  - `vlan n` - create/configure standard VLANs, n being the VLAN ID (some number)
    403  - `interface vlan n` - create/ configure a virtual interface with both Layer 2 and 3 characteristics
    404  - `interface gigabitethernet 0/n` - configure specific port, n being number between 1 and 48
    405  - `line <vty|console> vtyrange<0-b>` - configure telnet or console parameters, respectively
    406 }}}
     402
     403 * `vlan n` - create/configure standard VLANs, n being the VLAN ID (some number)
     404 * `interface vlan n` - create/ configure a virtual interface with both Layer 2 and 3 characteristics
     405 * `interface gigabitethernet 0/n` - configure specific port, n being number between 1 and 48
     406 * `line <vty|console> vtyrange<0-b>` - configure telnet or console parameters, respectively
     407
    407408Don't worry even if these don't make sense now - The meanings of the contexts will be explained as we introduce each context. 
    408409
    409 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. 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).
     410As you can see, when you enter a context, the prompt becomes "(config-if)#." Note, however, this prompt doesn't indicate what context you are using (i.e. which port you are setting up, what VLAN, ect); you just have to keep track of what you are doing.
     411
    410412{{{
    411413(config)# interface vlan 8              <<---start by entering the 'interface vlan' context             
     
    415417}}}
    416418
    417 As 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.
    418  
     419If you forget where you were in a context (i.e. which vlan you were configuring, ect.), 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 configure).
     420{{{
     421(config-if)# show
     422interface gigabitethernet 0/27
     423  switchport mode access
     424  switchport access vlan 4
     425!
     426}}}
     427
     428When 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.
     429
     430'''exiting/ logging off.'''
    419431The 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.
    420432{{{
     
    425437}}}
    426438
    427 === Available commands / help pages ===
     439=== Finding help/ Some tips. ===
     440'''Using the built-in help functionalities.'''
    428441Like 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.   
    429442
    430 === switching contexts and autocompletion ===
     443
     444
     445==== switching contexts and autocompletion ====
    431446From the initial configuration prompt, you can let the switch autocomplete contexts. For example:
    432447{{{
     
    456471!(config)#
    457472}}}
    458  2. Assign an IP address to the VLAN. By entering the "interface vlan" context you automatically turn VLAN 4 into a VLAN interface.    
     473 2. Assign an IP address to the VLAN.    
    459474{{{
    460475!(config)# interface vlan 4
     
    488503 * classic VLANs - http://en.wikipedia.org/wiki/Virtual_LAN
    489504 * tagging/trunking - http://en.wikipedia.org/wiki/IEEE_802.1Q
     505 * native VLANs -
    490506 
    491507==== VLANs ====
     
    520536Interface VLANs are also important because it provides a means to interact with a Layer 2 device (the switch) using Layer 3 means (IP). This is why we have to configure an interface VLAN in order to set up telnet.
    521537
    522 === Creating/ Configuring VLANs and Interface VLANs ===
     538=== Creating/ Using VLANs and Interface VLANs ===
    523539
    524540The following steps outline the general configuration of VLANs and interface VLANs through the CLI.
     
    537553}}}
    538554
    539 
    540 This cannot be done with interface VLANs (although you can configure multiple interface VLANs at once, if they exist, using context "interface range vlan <range>"). Hence when we need to generate many VLANs, we'd first create them with "vlan 1-n", then configure the VLANs as interface VLANs later. 
    541 
    542 
    543 
    544 2. '''Asssociate Ports.'''
    545 
    546  There are also contexts that support ranges of interfaces/ports/VLANs. For example, to configure ports 1-4 and 30 at once:
     555This cannot be done with interface VLANs (see step 3 for details and caveats)
     556
     5572. '''Associate Ports.''' A VLAN is fairly useless without hosts. Hosts become part of a VLAN if they are connected to a port associated with it. By default, all ports on the IP8800 are associated to VLAN 1,so you must specify which ports are associated with which VLAN manually. Here we associate port 0/25 with the VLAN we just created.
     558{{{
     559(config)# int gi 0/25
     560(config-if)# switchport mode access
     561(config-if)# swi acc vlan 3           <<-- full command is "switchport access vlan 3"   
     562(config-if)# exit
     563}}}
     564
     565 * "switchport mode access" means that the port only has access to the VLAN 3 that exists on the local switch (no trunking - see next section )
     566 * "switchport access vlan 3" means that this port has access to VLAN 3
     567
     568As with the VLANs, we can configure more than one port at a time using the "interface range" context. For example, to configure ports 1-4 and 30 at once:
    547569{{{
    548570 sw-sb09(config)# int range gigabitethernet 0/1-4, gigabitethernet 0/30
    549571 sw-sb09(config-if-range)#
    550572}}}
    551 Note how the prompt becomes "(config-if-range)" in this case.
    552 
     573Note how the prompt becomes "(config-if-range)" in this case. The exact same sets of commands apply to this context as for the single-port context.
     574
     5753. '''Configure the interface VLAN.''' If we need an IP address or some other higher-layer characteristic associated with our VLAN, we create an interface VLAN of the same VLAN ID (number) as the VLAN, and configure it. So, to assign an IP address to VLAN 3:
     576{{{
     577(config)# interface vlan 3
     578!(config-if)# ip address 172.16.100.10 255.255.255.0
     579!(config-if)# exit
     580!(config)#
     581}}} 
     582
     583When the "interface vlan" context is entered for a VLAN ID that the switch doesn't know about, a new interface VLAN and VLAN of that ID are created automatically. But, as stated before, the "interface range vlan" context cannot be used to create multiple interface VLANs at once. This range context is used when configuring multiple interface VLANs at once, ''given'' that the range of VLAN IDs exist on the switch. Hence, if we want to configure multiple interface VLANs at once, we must first create the VLANs using the "VLAN <range>" context.   
     584
     585=== Configuring Trunking ===
    553586
    554587