MLNX-GW—Management Interface Commands
ip address
ip address <IP address> <netmask> Sets the IP address and netmask of this interface. | ||
Syntax Description | IP address | IPv4 address. |
netmask | Subnet mask of IP address. | |
Default | 0.0.0.0/0 | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# ip address 10.10.10.10 255.255.255.0 | |
Related Commands | show interfaces <ifname> | |
Notes | If DHCP is enabled on the specified interface, then the DHCP IP assignment will hold until DHCP is disabled |
ip default-gateway
ip default-gateway <next-hop-IP-address> <interface-name> Configures a default route. | ||
Syntax Description | next hop IP address | Gateway IP address. |
interface name | Default gateway interface name. | |
Default | N/A | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# ip default-gateway mgmt1 | |
Related Commands | ||
Notes |
alias
alias <index> ip address < IP address> <netmask> Adds an additional IP address to the specified interface. The secondary address will appear in the output of “show interface” under the data of the primary interface along with the alias. | ||
Syntax Description | index | A number that is to be aliased to (associated with) the secondary IP. |
IP address | Additional IP address. | |
netmask | Subnet mask of the IP address. | |
Default | N/A | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# alias 2 ip address 9.9.9.9 255.255.255.255 | |
Related Commands | show interfaces <ifname> | |
Notes |
|
mtu
mtu <bytes> Sets the Maximum Transmission Unit (MTU) of this interface. | ||
Syntax Description | bytes | The entry range is 68-1500. |
Default | 1500 | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# mtu 1500 | |
Related Commands | show interfaces <ifname> | |
Notes |
duplex
duplex <duplex> Sets the interface duplex. | ||
Syntax Description | duplex | Sets the duplex mode of the interface.
|
Default | auto | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# duplex auto | |
Related Commands | show interfaces <ifname> | |
Notes |
|
speed
speed <speed> Sets the interface speed. | ||
Syntax Description | speed | Sets the speed of the interface. The following are the possible values:
|
Default | auto | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# speed auto | |
Related Commands | show interfaces <ifname> | |
Notes |
|
dhcp
dhcp [renew] Enables DHCP on the specified interface. | ||
Syntax Description | renew | Forces a renewal of the IP address. A restart on the DHCP client for the specified interface will be issued. |
Default | N/A | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# dhcp | |
Related Commands | show interfaces <ifname> configured | |
Notes |
|
dhcp hostname
dhcp hostname Enables fetching the hostname from DHCP for this interface. | ||
Syntax Description | N/A | |
Default | Enabled | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# dhcp hostname | |
Related Commands | hostname <hostname> | |
Notes | If a hostname is configured manually by the user, that configuration will override the “dhcp hostname” configuration. |
shutdown
shutdown Disables the specified interface. | ||
Syntax Description | N/A | |
Default | no shutdown | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# no shutdown | |
Related Commands | show interfaces <ifname> configured | |
Notes |
zeroconf
zeroconf Enables zeroconf on the specified interface. It randomly chooses a unique link-local IPv4 address from the 169.254.0.0/16 block. This command is an alternative to DHCP. | ||
Syntax Description | N/A | |
Default | no zeroconf | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# zeroconf | |
Related Commands | show interfaces <ifname> configured | |
Notes | Enabling zeroconf disables DHCP and vice versa. |
comment
comment <comment> Adds a comment for an interface. | ||
Syntax Description | comment | A free-form string that has no semantics other than being displayed when the interface records are listed. |
Default | no comment | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# comment my-interface | |
Related Commands | ||
Notes |
show interfaces mgmt0
show interface mgmt0 Displays information on the management interface configuration and status. | ||
Syntax Description | N/A | |
Default | N/A | |
Configuration Mode | Any command mode | |
History | 8.0.0100 | |
Example |
| |
Related Commands | ||
Notes |
show interfaces mgmt0 brief
show interface mgmt0 brief Displays brief information on the management interface configuration and status. | ||
Syntax Description | N/A | |
Default | N/A | |
Configuration Mode | Any command mode | |
History | 8.0.0100 | |
Example |
| |
Related Commands | ||
Notes |
show interfaces mgmt0 configured
show interface mgmt0 configured Displays configuration information about the specified interface. | ||
Syntax Description | N/A | |
Default | N/A | |
Configuration Mode | Any command mode | |
History | 8.0.0100 | |
Example |
| |
Related Commands | ||
Notes |
hostname
hostname <hostname> Sets a static system hostname. | ||
Syntax Description | hostname | A free-form string |
Default | Default hostname | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | gateway (config)# hostname my-gateway-hostname | |
Related Commands | show hosts | |
Notes |
|
ip name-server
ip name-server <IPv4 address> Sets the static name server. | ||
Syntax Description | IPv4 address | IPv4 address. |
Default | No server name | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | gateway (config)# ip name-server 9.9.9.9 | |
Related Commands | show hosts | |
Notes |
ip domain-list
ip domain-list <domain-name> Sets the static domain name. | ||
Syntax Description | domain-name | The domain name in a string form. |
Default | No static domain name | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | gateway (config)# ip domain-list mydomain.com | |
Related Commands | show hosts | |
Notes |
show hosts
show hosts Displays hostname, DNS configuration, and static host mappings. | |||
Syntax Description | N/A | ||
Default | N/A | ||
Configuration Mode | Any command mode | ||
History | 8.0.0100 | ||
Example |
| ||
Related Commands | |||
Notes |
ip route
ip route{<network-prefix> <netmask> | <network-prefix>/<masklen>} <next-hop> Sets a static route for a given IP. | ||
Syntax Description | network-prefix | IPv4 network prefix |
netmask | IPv4 netmask formats are:
| |
nexthop-address | The IPv4 address of the next hop router for this route. | |
ifname | The interface name (e.g., mgmt0, mgmt1). | |
Default | N/A | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | gateway (config)# ip route 20.20.20.0 255.255.255.0 mgmt0 | |
Related Commands | show ip route | |
Notes |
IPv4 network use Address Resolution Protocol (ARP) to resolve IP address to MAC address.
arp
arp <ip-address> <mac-address> Sets a static ARP entry. | ||
Syntax Description | ip-address | IPv4 address. |
mac-address | MAC address. | |
Default | N/A | |
Configuration Mode | config interface management | |
History | 8.0.0100 | |
Example | gateway (config interface mgmt0)# arp 20.20.20.20 aa:aa:aa:aa:aa:aa | |
Related Commands | show arp | |
Notes |
clear arp-cache
clear arp-cache Clears the dynamic entries from the ARP cache. | ||
Syntax Description | N/A | |
Default | N/A | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | switch (config) # clear arp-cache | |
Related Commands | show arp | |
Notes |
show arp
show arp [static] Displays ARP table. | ||
Syntax Description | static | Displays all statically-configured ARP entries |
Default | N/A | |
Configuration Mode | Any command mode | |
History | 8.0.0100 | |
Example | ||
| ||
Related Commands | ||
Notes |
ip dhcp
ip dhcp {default-gateway yield-to-static | hostname <hostname>| primary-intf <ifname> | send-hostname} Sets global DHCP configuration. | ||
Syntax Description | yield-to-static | Does not allow you to install a default gateway from DHCP if there is already a statically configured one. |
hostname | Specifies the hostname to be sent during DHCP client negotiation if send-hostname is enabled. | |
primary-intf <ifname> | Sets the interface from which a non-interface-specific configuration (resolver and routes) will be accepted via DHCP. | |
send-hostname | Enables the DHCP client to send a hostname during negotiation. | |
Default | no ip dhcp yield-to-static | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | gateway (config)# ip dhcp default-gateway yield-to-static | |
Related Commands | show ip dhcp | |
Notes | DHCP is supported for IPv4 networks only. |
show ip dhcp
show ip dhcp Displays the DHCP configuration and status. | ||
Syntax Description | N/A | |
Default | N/A | |
Configuration Mode | Any command mode | |
History | 8.0.0100 | |
Example |
| |
Related Commands | ip dhcp | |
Notes |
ping
ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline] [-p pattern] [-s packetsize] [-t ttl] [-I interface or address] [-M mtu discovery hint] [-S sndbuf] [-T timestamp option ] [-Q tos ] [hop1 ...] destination Sends ICMP echo requests to a specified host. | ||
Syntax Description | Linux Ping options | |
Default | N/A | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | gateway (config)# ping 172.30.2.2 | |
Related Commands | traceroutes | |
Notes |
traceroute
traceroute [-46dFITUnrAV] [-f first_ttl] [-g gate,...] [-i device] [-m max_ttl] [-N squeries] [-p port] [-t tos] [-l flow_label] [-w waittime] [-q nqueries] [-s src_addr] [-z sendwait] host [packetlen] Traces the route packets take to a destination. | ||
Syntax Description | -4 | Uses IPv4. |
-d | Enables socket level debugging. | |
-F | Sets DF (do not fragment bit) on. | |
-I | Uses ICMP ECHO for tracerouting. | |
-T | Uses TCP SYN for tracerouting. | |
-U | Uses UDP datagram (default) for tracerouting. | |
-n | Does not resolve IP addresses to their domain names. | |
-r | Bypasses the normal routing and send directly to a host on an attached network. | |
-A | Performs AS path lookups in routing registries and print results directly after the corresponding addresses. | |
-V | Prints version info and exit. | |
-f | Starts from the first_ttl hop (instead from 1). | |
-g | Routes packets through the specified gateway (maximum 8 for IPv4 and 127 for IPv6). | |
-i | Specifies a network interface with which to operate. | |
-m | Sets the max number of hops (max TTL to be reached). Default is 30. | |
-N | Sets the number of probes to be tried simultaneously (default is 16). | |
-p | Uses destination port. It is an initial value for the UDP destination port (incremented by each probe, default is 33434), for the ICMP seq number (incremented as well, default from 1), and the constant destination port for TCP tries (default is 80). | |
-t | Sets the TOS (IPv4 type of service) or TC (IPv6 traffic class) value for outgoing packets. | |
-l | Uses specified flow_label for IPv6 packets. | |
-w | Sets the number of seconds to wait for response to a probe (default is 5.0). Non-integer (float point) values allowed too. | |
-s | Uses source src_addr for outgoing packets. | |
-q | Sets the number of probes per each hop. Default is 3. | |
-z | Sets minimal time interval between probes (default is 0). If the value is more than 10, then it specifies a number in milliseconds, else it is a number of seconds (float point values allowed too). | |
Default | N/A | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | ||
gateway (config)# traceroute 192.168.10.70 traceroute to 192.168.10.70 (192.168.10.70), 30 hops max, 40 byte packets | ||
Related Commands | ping | |
Notes |
tcpdump
tcpdump [-aAdDeflLnNOpqRStuUvxX] [-c count] [-C file_size] [-E algo:secret] [-F file] [-i interface] [-M secret] [-r file] [-s snaplen] [-T type] [-w file] [-W filecount] [-y datalinktype] [-Z user] [-D list possible interfaces] [expression] Invokes standard binary, passing command line parameters straight through. Runs in foreground, printing packets as they arrive, until the user hits Ctrl+C. | ||
Syntax Description | N/A | |
Default | N/A | |
Configuration Mode | config | |
History | 8.0.0100 | |
Example | gateway (config)# tcpdump | |
Related Commands | ||
Notes |