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
Enable IP routing functionality. Run:
switch
(config)# ip routingEnable the desired VLAN. Run:
switch
(config)# vlan20
switch
(config vlan20
)#WarningThe VLAN cannot be the same one configured for the MLAG IPL, if MLAG is used.
Add this VLAN to the desired interface. Run:
switch
(config)#interface
ethernet1
/1
switch
(configinterface
ethernet1
/1
)# switchport access vlan20
Create a VLAN interface. Run:
switch
(config)#interface
vlan20
switch
(configinterface
vlan20
)#Set an IP address to the VLAN interface.
For IPv4, run:
switch
(configinterface
vlan20
)# ip address11.11
.11.11
/8
For IPv6, run:
switch
(configinterface
vlan20
)# ip address2001
::11
/64
Enable the interface.
switch
(configinterface
vlan20
)# no shutdown
Configuring MAGP
Enable MAGP protocol globally. Run:
switch
(config)# protocol magpCreate a virtual router group for an IP interface. Run:
switch
(configinterface
vlan20
)# magp100
WarningUp to 255 MAGP IDs are supported.
Set a virtual router primary IP address.
For IPv4, run:
switch
(configinterface
vlan20
magp100
)# ip virtual-router address11.11
.11.254
For IPv6, run:
switch
(configinterface
vlan20
magp100
)# ip virtual-router address2001
::254
WarningOnly a virtual IP from the primary subnet can be configured for MAGP.
Set a virtual router primary MAC address. Run:
switch
(configinterface
vlan20
magp100
)# ip virtual-router mac-address aa:bb:cc:dd:ee:ffWarningTo obtain the virtual router’s MAC address, please run the command “show vrrp detail”.
Verifying MAGP
To verify the MAGP configuration, run:
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
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 Enables MAGP globally and unhides 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> Creates an MAGP instance on this interface and enters a new configuration mode. | ||
Syntax Description | instance | MAGP instance number |
Default | Disabled | |
Configuration Mode | config interface vlan | |
History | 3.3.4500 | |
3.7.1100 | Updated notes | |
Example | switch (config interface vlan 20)# magp 100 | |
Related Commands | ||
Notes |
|
shutdown
shutdown Enables 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] Sets MAGP virtual IP address. | ||
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 |
|
ip virtual-router mac-address
ip virtual-router mac-address <mac-address> Sets MAGP virtual MAC address. | ||
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 |
|
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 |
|
show magp
show magp [<instance>] Displays the MAGP configuration. | ||
Syntax Description | instance | Displays configuration of a specific MAGP instance |
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: Associated IP Addresses: Associated IPv6 Addresses: | |
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 |
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: Associated IP Addresses: Associated IPv6 Addresses: | |
Related Commands | ||
Notes |