default-ipv6-gateway
VLAN configuration mode
A device should have a default gateway, for the following reasons:
- Although IPv6 discovers neighbors and routes dynamically, in some cases Router Advertisement (RA) and Router Solicitation (RS) operations are disabled and a default gateway is required to send traffic. RA and RS are not suppressed if a default gateway is configured.
- Management devices (for example, TFTP servers, Telnet or SSH clients) are not members of the same subnet as the management IPv6 address.
If a management VLAN is not configured, the device can have only one IPv6 default gateway in the global configuration.
If a management VLAN is configured, the device can have a maximum of 5 IPv6 default gateways, with an optional metric (1 through 5), under the management VLAN. Multiple gateways can have the same metric value.
Configured gateway addresses and the default gateway address must be in same subnet.
The best default gateway is first chosen as the device whose neighbors are reachable (in the REACH state), in the sequence of metric values. Otherwise, the gateway with the highest priority (the lowest metric value) is chosen.
If a static default gateway is configured, that gateway takes precedence over the best default gateway configured by means of RA. If the static default-gateway configuration is removed, the best default gateway learned by RA is restored.
Use the
no form of the command to remove the IPv6 address and disable the default gateway.
Selection of the best default router among configured IPv6 routers occurs under the following conditions:
- Disabling an interface
- Processing of an NA message receipt
- Adding or deleting an IPv6 neighbor to or from the neighbor list
- Configuring the IPv6 static default gateway by means of the CLI
The process of resolving the link layer for the IPv6 default gateway by sending NS occurs during the following conditions:
The following example configures the maximum of 5 IPv6 default gateways with the management VLAN configuration, and specifies metrics for each.
device# configure terminal device(config)# vlan 66 device(config-vlan-66)# default-ipv6-gateway 2620:100:c:fe23:10:37:65:129 3 device(config-vlan-66)# default-ipv6-gateway 2620:100:c:fe23:10:37:65:129 2 device(config-vlan-66)# default-ipv6-gateway 2620:100:c:fe23:10:37:65:130 2 device(config-vlan-66)# default-ipv6-gateway 2620:100:c:fe23:10:37:65:131 1 device(config-vlan-66)# default-ipv6-gateway 2620:100:c:fe23:10:37:65:132 5
Use the
show ipv6 command to confirm the configuration and view the best default gateway (router).
device(config)# show ipv6
Global Settings
IPv6 is enabled
Link-local address(es):
fe80::768e:f8ff:fef9:6d80 [Preferred]
Global unicast address(es):
2620:100:c:fe23:768e:f8ff:fef9:6d80 [Preferred], subnet is 2620:100:c:fe23::/64
Joined group address(es):
ff02::1:fff9:6d80
ff02::1
Best Default Router : 2620:100:c:fe23:10:37:65:129 PMTUS : 0
MTU is 1500 bytes
ND DAD is enabled, number of DAD attempts: 3
ND reachable time is 30000 miliseconds
ND retransmit interval is 1000 miliseconds
Current Hop Limit is 64
Hosts use stateless autoconfig for addresses
No Inbound Access List Set
No Outbound Access List Set
No IPv6 Domain Name Set
No IPv6 DNS Server Address set
| Release version | Command history |
|---|---|
| 08.0.50 | This command was introduced. |