image image image image image

On This Page

{ip | ipv6} default-gateway


{ip | ipv6} default-gateway {<ip-address> | <ifname>}
no {ip | ipv6} default-gateway

Sets a static default gateway.
The no form of the command deletes the default gateway.

Syntax Descriptionip-addressThe default gateway IP address
ifnameName of the interface interface name (e.g. eth0, eth1).
DefaultN/A
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # ip default-gateway 172.30.0.1
Related Commands

show {ip | ipv6} default-gateway
show {ip | ipv6} route

Notes
  • The configured default gateway will not be used if DHCP is enabled
  • In order to configure ipv4 default-gateway use "ip route" command

show {ip | ipv6} default-gateway


show {ip | ipv6} default-gateway [static]

Displays the default gateway.

Syntax DescriptionstaticDisplays the static configuration of the default
gateway
DefaultN/A
Configuration ModeAny configuration mode
History1.5
Example
ufmapl [ mgmt-sa ] (config) # show ip default-gateway
Active default gateways:
172.30.0.1 (interface: eth0)
Related Commands

{ip | ipv6} default-gateway

Notes

{ip | ipv6} route


{ip | ipv6} route {<network-prefix> <netmask> | <network-prefix>/<masklen>} <next-hop>
no ip route {<network-prefix> <netmask> | <network-prefix>/<masklen>} <next-hop>

Sets a static route for a given IP.
The no form of the command deletes the static route.

Syntax Descriptionnetwork-prefixIPv4 or IPv6 network prefix
netmaskIPv4 netmask formats are:
  • /24
  • 255.255.255.0

IPv6 netmask format is:

  • /48 (as a part of the network prefix)
nexthop-addressIPv4 or IPv6 address of the next hop router for this route
ifnameInterface name (e.g. eth0, eth1)
DefaultN/A
Configuration Modeconfig
History4.1.0
Example
ufmapl [ mgmt-sa ] (config) # ip route 20.20.20.0 255.255.255.0 eth0
Related Commands

show ip route

Notes

show {ip | ipv6} route


show {ip | ipv6} route [static]

Displays the routing table in the system.

Syntax DescriptionstaticFilters the table with the static route entries
DefaultN/A
Configuration ModeAny configuration mode
History4.1.0
Example
ufmapl [ mgmt-sa ] (config) # show ip route
Destination       Mask              Gateway           Interface   Source
default           0.0.0.0           172.30.0.1        eth0        DHCP
10.10.10.10       255.255.255.255   0.0.0.0           eth0        static
20.10.10.10       255.255.255.255   172.30.0.1        eth0        static
20.20.20.0        255.255.255.0     0.0.0.0           eth0        static
172.30.0.0        255.255.0.0       0.0.0.0           eth0        interface
Related Commands

{ip | ipv6} route

Notes