Common commands for Foundry switches and load balancers

General Commands

  • show run – shows the current (running) configuration
  • show config – shows the saved (startup) configuration
  • show int bri – quick status of all interfaces
  • show int eth 18 – detailed information on interface ethernet 18
  • show vlan – shows VLAN information and port association
  • show log – shows the log
  • show mac-address – shows the mac addresses
  • exit – leave the current mode

Configuration commands

  • enable – needed to make changes
  • conf t – go from exec to configuration mode
    • int eth 18 – go into interface editing mode for ethernet 18
    • port-name – set port name for a port
    • no port-name – erase the port’s name
    • enable – enable the interface
    • disable – disable the interface
  • vlan 902 – go into vlan editing mode for vlan 902
    • untag eth 18 – add interface 18 to this vlan as an untagged port
    • tag eth 18 – add interface 18 to this vlan as a tagged port
    • no untag eth 18 – remove interface 18 from this vlan when it was an untagged port
  • write mem – write the current configuration to flash

Creating a VLAN
vlan <vlan #> name <name of vlan> by port

  • vlan 666 name cursed-vlan by port

Adding ports to a VLAN
First edit the vlan, with vlan 666

  • enable
  • conf t
    • vlan 666
    • untagged ethe 25 to 28 – this would add ports 25 through 28 inclusive to vlan numbered 666

Misc things

  • how to grep for something

| include

example to output lines in the config containing “mail”. Note this doesn’t seem to be available in older code versions.

sh run | include mail

  • find which vlan’s your port is using

show vlan eth 0/1/16

Load balancer commands

  • show server real – shows state and stats of real servers
  • show server virtual – shows state and stats of virtual servers
  • show server – shows quick status of all virtual and real servers

Load balancer configuration

  • server real host1 – go into real server editing mode for real server host1
    • port smtp – add smtp port on this host
    • port smtp disable – remove smtp port from this host
  • server virtual virtualhost – go into virtual server editing mode for virtual server virtualhost
    • bind smtp host1 smtp – bind the smtp port on real host host1 to this virtual server
    • no bind smtp host1 smtp – unbind the smtp port on real host host1 from this virtual server

Deleting servers and virtual servers

  • no server real foo – deletes server foo
  • no server virtual foo – deletes VIP foo

Example load balancer configuration
First add the real hosts. We’ll use real hosts mailhost1 and mailhost2 and a proto of smtp in this example:

server real mailhost1 1.2.3.3
 port default disable
 port smtp
 port smtp keepalive
 
server real mailhost2 1.2.3.4
 port default disable
 port smtp
 port smtp keepalive

 

Then add the virtual host(s):

server virtual mailhost 1.2.3.5
 predictor least-conn
 port default disable
 port smtp
 bind smtp mailhost1 smtp mailhost2 smtp

This creates a virtual server called mailhost listening on IP address 1.2.3.5. The VIP listens on the SMTP port and passes SMTP traffic to the real servers, mailhost1 and mailhost2.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.