MAGP

Multi-active gateway protocol (MAGP) is aimed to solve the default gateway problem when a host is connected to a set of switch routers (SRs) via MLAG.

The network functionality in that case requires that each SR is an active default gateway router to the host, thus reducing hops between the SRs and directly forwarding IP traffic to the L3 cloud regardless which SR traffic comes through.

Prerequisites

  1. Enable IP routing functionality. Run:

    Copy
    Copied!
                

    switch (config)# ip routing

  2. Enable the desired VLAN. Run:

    Copy
    Copied!
                

    switch (config)# vlan 20 switch (config vlan 20)#

    Warning

    The VLAN cannot be the same one configured for the MLAG IPL, if MLAG is used.

  3. Add this VLAN to the desired interface. Run:

    Copy
    Copied!
                

    switch (config)# interface ethernet 1/1 switch (config interface ethernet 1/1)# switchport access vlan 20

  4. Create a VLAN interface. Run:

    Copy
    Copied!
                

    switch (config)# interface vlan 20 switch (config interface vlan 20)#

  5. Set an IP address to the VLAN interface.

    1. For IPv4, run:

      Copy
      Copied!
                  

      switch (config interface vlan 20)# ip address 11.11.11.11 /8

    2. For IPv6, run:

      Copy
      Copied!
                  

      switch (config interface vlan 20)# ip address 2001::11 /64

  6. Enable the interface.

    Copy
    Copied!
                

    switch (config interface vlan 20)# no shutdown

Configuring MAGP

  1. Enable MAGP protocol globally. Run:

    Copy
    Copied!
                

    switch (config)# protocol magp

  2. Create a virtual router group for an IP interface. Run:

    Copy
    Copied!
                

    switch (config interface vlan 20)# magp 100

    Warning

    Up to 255 MAGP IDs are supported.

  3. Set a virtual router primary IP address.

    1. For IPv4, run:

      Copy
      Copied!
                  

      switch (config interface vlan 20 magp 100)# ip virtual-router address 11.11.11.254

    2. For IPv6, run:

      Copy
      Copied!
                  

      switch (config interface vlan 20 magp 100)# ip virtual-router address 2001::254

    Warning

    Only a virtual IP from the primary subnet can be configured for MAGP.

  4. Set a virtual router primary MAC address. Run:

    Copy
    Copied!
                

    switch (config interface vlan 20 magp 100)# ip virtual-router mac-address aa:bb:cc:dd:ee:ff

    Warning

    To obtain the virtual router’s MAC address, please run the command “show vrrp detail”.

Verifying MAGP

To verify the MAGP configuration, run:

Copy
Copied!
            

switch (config) # show magp   MAGP 100: Interface vlan: 20 Admin state : Enabled State : Master Virtual IP : 11.11.11.254 V6 State : Master Virtual IPv6 : 2001::254 Virtual MAC : aa:bb:cc:dd:ee:ff

Warning

This output is to be expected in both MAGP switches.

For more information about this feature and its potential applications, please refer to the following community post:

protocol magp

protocol magp
no protocol magp

Enables MAGP globally and unhides MAGP commands.
The no form of the command deletes all the MAGP configuration and hides MAGP commands.

Syntax Description

N/A

Default

Disabled

Configuration Mode

config

History

3.3.4500

Example

switch (config)# protocol magp

Related Commands

Notes

IP routing must be enabled to enable MAGP.

magp

magp <instance>
no magp <instance>

Creates an MAGP instance on this interface and enters a new configuration mode.
The no form of the command deletes the MAGP instance.

Syntax Description

instance

MAGP instance number
Range: 1-255

Default

Disabled

Configuration Mode

config interface vlan

History

3.3.4500

3.7.1100

Updated notes

Example

switch (config interface vlan 20)# magp 100
switch (config interface vlan 20 magp 100)#

Related Commands

Notes

  • Only one MAGP instance can be created on an interface

  • Different interfaces cannot share an MAGP instance

  • MAGP and VRRP are mutually exclusive

  • A maximum total of 64 MAGP instances are supported per switch system

shutdown

shutdown
no shutdown

Enables MAGP instance.
The no form of the command disables the MAGP instance.

Syntax Description

N/A

Default

Disabled

Configuration Mode

config interface vlan magp

History

3.3.4500

Example

switch (config interface vlan 10 magp 1)# shutdown

Related Commands

Notes

ip virtual-router address

ip virtual-router address <ip-address> [secondary]
no ip virtual-router address <ip-address> [secondary]

Sets MAGP virtual IP address.
The no form of the command resets this parameter to its default.

Syntax Description

ip-address

The virtual router IP address

secondary

Adds secondary virtual router address

Default

N/A

Configuration Mode

config interface vlan magp

History

3.3.4500

3.6.8100

Added “secondary” parameter

3.9.1000

Added support for MAGP IPv6 instance

Example

switch (config interface vlan 10 magp 1)# ip virtual-router address 10.10.10.10
switch (config interface vlan 20 magp 100) # ip virtual-router address 2001::254

Related Commands

Notes

  • The MAGP virtual IP address must be different from the interface IP address

  • In a single MAGP instance, IPv4 and IPv6 addresses are both allowed

ip virtual-router mac-address

ip virtual-router mac-address <mac-address>
no ip virtual-router mac-address

Sets MAGP virtual MAC address.
The no form of the command resets the MAC address to its default.

Syntax Description

mac-address

MAC address (format: aa:bb:cc:dd:ee:ff)

Default

00:00:5E:00:01-<magp instance>

Configuration Mode

config interface vlan magp

History

3.3.4500

3.9.1000

Added note about MAGP IPv6

3.9.3000

Updated MAC address to be lowercase

Example

switch (config interface vlan 10 magp 1)# ip virtual-router mac-address aa:bb:cc:dd:ee:ff

Related Commands

Notes

  • If not defined, "ip virtual-router mac-address <address>" address is used

  • If the "ip virtual-router mac-address <address>" is not defined, the default is used

  • In a single MAGP instance, IPv4 and IPv6 use a single virtual MAC

ip virtual-router mac-address

ip virtual-router mac-address <address>

Sets a global virtual router MAC address.

Syntax Description

address

MAC address (format: aa:bb:cc:dd:ee:ff)

Default

N/A

Configuration Mode

config

History

3.9.0500

Example

switch (config)# ip virtual-router mac-address 00:00:5E:00:11:22

Related Commands

show ip routing

Notes

  • The system can have only one MAC address

  • If this address is in use, it cannot be changed or removed

show magp

show magp [<instance>]

Displays the MAGP configuration.

Syntax Description

instance

Displays configuration of a specific MAGP instance
Range: 1-255

Default

N/A

Configuration Mode

Any command mode

History

3.3.4500

3.6.5000

Updated example

3.6.8100

Updated example

3.9.1000

Updated example

Example

switch (config) # show magp
MAGP 100:
Interface vlan: 20
Admin state : Enabled
State : Master
Virtual IP : 11.11.11.200
V6 State : Master
Virtual IPv6 : 2001::254
Virtual MAC : aa:bb:cc:dd:ee:ff
 Associated IP Addresses:
11.11.11.254
 Associated IPv6 Addresses:
2001::200

Related Commands

Note

show magp interface vlan

show magp interface vlan <id>

Displays the configuration of a specific MAGP instance.

Syntax Description

instance

MAGP instance number
Range: 1-255

Default

N/A

Configuration Mode

Any command mode

History

3.3.4500

3.6.5000

Updated example

3.6.8100

Updated example

3.9.1000

Updated example

Example

switch (config) # show magp interface vlan 20
MAGP 100:
Interface vlan: 20
Admin state : Enabled
State : Master
Virtual IP : 11.11.11.200
V6 State : Master
Virtual IPv6 : 2001::254
Virtual MAC : aa:bb:cc:dd:ee:ff
 Associated IP Addresses:
11.11.11.254
 Associated IPv6 Addresses:
2001::200

Related Commands

Notes

© Copyright 2023, NVIDIA. Last updated on May 23, 2023.