wiki:Internal/OpenFlow/SwitchConfiguration

Version 12 (modified by akoshibe, 14 years ago) ( diff )

Miscellaneous Configurations

This is a compilation of notes/ remarks on configuration commands that were involved in trying to configure the IP8800 to work with the ORBIT network. A majority of configurations steps described here were never done, temporary, or undone after better configuration options were found. Nevertheless, since most of the documentations regarding the IP8800 is in Japanese, it seemed smart to keep an English record of these commands.

Topics covered here

  • Undoing configurations - some error messages
    • deleting VLANs
    • undoing static IP assignments
  • Updating firmware - command ppupdate
  • DHCP/BootP relay agent and the IP Helper
  • Port mirroring

Undoing Configurations - And errors encountered

Most of the time, just adding the command no to the beginning of what you see when you do the command show configuration will suffice for undoing configurations, but occasionally you get some message that can be a tad cryptic.

getting rid of telnet VLAN 4

VLAN 4 was the result of initial telnet configs until we realized we wanted to use Network VLAN 1 for telnet purposes. In the old setup port 0/27 was assigned to VLAN 4 so you can telnet using 0/27. You get this error if you try to remove VLAN 4 straight up:

(config)# no vlan 4
vlan : Can't delete this configuration referred by other configuration.

You basically need to undo any configs that have to do with VLAN4 before you can get rid of it. That meant undoing configs on port 0/27. After that, the switch didn't balk about it.

!(config)# int gi 0/27
!(config-if)# no sw acc vlan 4
!(config-if)# exit
!(config)# no vlan 4
!(config)# save

undoing static IP assignments to virtual interfaces

When you have Ip-helpers configured, you want to type "no ip helper-address" at the CLI before trying to remove the IP address or else you get this warning:

interface vlan 3
  ip address 192.168.5.5 255.255.255.0
  ip helper-address 192.168.5.1
!
(config-if)# no  ip address 192.168.5.5 255.255.255.0
interface : IP interface is not defined.

The switch as DHCP server (6/12)

It can be made so the switch can provide DHCP services to the hosts on specific VLANs. The commands here make it so there is DHCP service for hosts on VLAN 1. The hosts connected to this VLAN would be made part of group "Test1," whose members are given an address out of a pool of IP addresses from the block 192.168.11.0/24. The lease time for the addresses is 10 minutes.

!(config)# service dhcp vlan 1
!(config)# ip dhcp excluded-address 192.168.10.1
!(config)# ip dhcp pool Test1
!(dhcp-config)# network 192.168.11.0 255.255.255.0
!(dhcp-config)# lease 0 0 10 

Command ppupdate for updating firmware, not actually needed (6/15)

The manual specified the command ppupdate for updating the firmware. This command copies new firmware (i.e. downloaded with ftp) on to the switch's flash memory. parameters usable:

ppupdate [test][no-display][-f][no-reload]<file name>

  • test - only tests firmware, but doesn't update the firmware
  • no-display - does not show status messages while firmware is being updated
  • -f - update without confirmation
  • no-reload - does not reboot switch after update, so changes take place after next restart
  • file-name - the firmware, usually named k.img

This command would be useful if you were updating the built-in operating system of the switch, but not for the OpenFlow where the switch is booted from an image saved onto removable media (SD card).

DHCP/BootP relay agent/IP helper (6/28)

This is a translation from the online NEC guide.

  1. set up VLAN and associated port. Assign static IP address to port. This is the vlan on which the DHCP clients live.
    (config)# vlan 2
    (config-vlan)# exit
    (config)# interface gigabitethernet 0/5
    (config-if)# switchport mode access
    (config-if)# switchport access vlan 2
    (config-if)# exit
    (config)# interface vlan 2
    (config-if)# ip address 10.1.0.1 255.255.0.0
    (config-if)# exit
    
  1. Next, set up the VLAN and interface connected to the DHCP server.
    (config)# vlan 3
    (config-vlan)# exit
    (config)# interface gigabitethernet 0/7
    (config-if)# switchport mode access
    (config-if)# switchport access vlan 3
    (config-if)# exit
    (config)# interface vlan 3
    (config-if)# ip address 20.1.0.1 255.255.0.0
    (config-if)# exit
    
  1. set the DHCP server's address as the helper address.
    (config)# interface vlan 2
    (config-if)# ip helper-address 20.1.0.10
    (config-if)# exit
    

port mirroring (2/21)

Say that you want to monitor the traffic to/from a certain port. The switch can act as a network tap if you configure port mirroring. When configured to port mirror, the switch would send a copy of the frames it receives from certain ports to another port where you'd, say, connect a network analyzer.

We needed to set up port mirroring to diagnose what was going wrong with the L2TP tunneling between the netFPGA hosts.

Syntax

monitor session [session no.] source interface gigabitethernet [src port no.] [tx|rx|both] destination interface gigabitethernet [mirror port no.]
  • [session no.] - a number between 1-4 uniquely identifying the mirroring session. the switch can do a maximum of 4 sessions at once.
  • [src port no.] - the port number(s) of the port(s) you're trying to monitor. Can be a range of ports e.g. 0/5-6,27.
  • [tx|rx|both] - mirror incoming, outgoing, or both traffics, respectively. "tx" and "rx" are with respect t the host connected to the port.
  • [mirror port no.] - this is the port connected to the analyzer.

Errors
Rebooting the switch without reload stop sometimes corrupts the monitor configs. When this happens the monitor session will show up in your configurations but will not actually be there; Trying to delete it will result in this error:

(config)# no monitor session 1
monitor : Can not delete it because data is not corresponding.

Instantiating the same session again should fix things should this happen.

Note: See TracWiki for help on using the wiki.