Tag Archives: access gateway mode

Configuring a Brocade Switch for Access Gateway (AG) Mode

What is Access Gateway Mode?

Access Gateway mode is useful when you need to add more ports to your fabric without the additional complexity of using additional zoning configurations or additional domains.  It allows us to configure an F port as N port.

Other Useful Brocade related posts

FOS CLI Reference Guide
Automating Config Zone Backups
Scripting Alias and Zone Creation
Switch Type Matrix
Disabling Telnet

Verify NPIV is enabled on the Upstream Switch

We first need to ensure that the upstream switch that the access gateway (AG) switch will connect to has NPIV enabled.  Log in to the upstream switch to verify.

  1. Verify NPIV is enabled by running ‘portcfgshow’.
  2. If it is not enabled, enable it by running ‘portcfgnpivport’.

Steps to Configure and Enable AG Mode

Below are the steps for placing a switch in Access Gateway Mode.  Note that all zoning information on the switch that you’re enabling it on will be lost.  In addition, it’s important to note that Access Gateway mode changes other standard behaviors of the switch as well.  I encourage you to review the Brocade Access Gateway Administrator’s Guide if you have any doubts. In addition to zoning, the following servers are also not available in AG mode:  FCAL, Fabric Manager, FICON, IP over FC, ISL Trunking, Extended Fabrics, Management Platform services, Name services (SNS), Port Mirroring, and SMI-S.

  1. Backing up your current configuration is important, and should be done first. I’ve automated this in my environment, you can view my post on automating configuration and zone backups here.  The basic command for backing up your configuration manually is below.
  1. Next you should verify that the switch is in native mode. This can be verified by running ‘switchshow’ and checking the mode, it should be set to 0 (zero).  To change it to zero, use the ‘interopmode’ command.
interopmode 0
  1. Next we disable the switch, run the ‘switchdisable’ command for this step.
  1. Next we enable access gateway mode on the switch with the ‘ag –modeenable’ command. Enabling agmode will remove all the configuration data on the switch, including your zoning configuration and security database.  Make sure you backup your configuration using configupload before performing this step.  After running the command, you will be prompted to reboot the switch.
ag –modeenable

Verify AG Mode is enabled

  1. After the switch has rebooted, log in and verify that access gateway mode is enabled. This is done with the “modeshow” switch on the ag command.
ag --modeshow

Access Gateway mode is enabled
  1. In order to view how the automatic port mapping has been configured on the switch, use the “ag –mapshow” command.
ag --mapshow



0   13;14    None           None             1       1         0   pg0

1   1;2      None           None             1       1         0   pg0

2   9;10     None           None             1       1         0   pg0

3   7;8      None           None             1       1         0   pg0

4   11;12    None           None             1       1         0   pg0

5   5;6      None           None             1       1         0   pg0

6   15;16    None           None             1       1         0   pg0

7   3;4      None           None             1       1         0   pg0

Modifying AG Port Mappings

It is possible to change the port mappings after the initial configuration if modifications are necessary.  Below are the steps to do so.

  1. A port’s existing mapping bust be removed before it can be modified. Delete the configuration with the “ag –mapdel” command, as shown below.
ag --mapdel N_Port “fport1;fport2”

ag --mapdel 0 "13;14"

F_Port to N_Port mapping has been updated successfully
  1. Now that the original mapping has been removed, the new port mapping can be created.
ag --mapadd n_portnumber fport1;fport2

ag --mapadd 13 "1;2;5;6"

Sample Output:

WARNING: Mapping F_Port(s) to this N_Port may cause the F_Port(s) to be disabled

F_Port to N_Port mapping has been updated successfully