Mellanox MLNX-OS®Command Reference Guide for SX1018HP Ethernet Managed Blade Switch
Rev 1.6.2
Mellanox Technologies
403
4.1.4 Routing and ECMP
Sets a static route.
The no form of the command deletes the static route
IP address IPv4 address
netmask There are two possible ways to the mask:
• /length (i.e. /24)
• Network address (i.e. 255.255.255.0)
next hop IP address IPv4 address of the next hop.
N/A
Config
3.1.0000
admin
switch (config) # ip route 10.10.10.0 /24 172.28.2.4
switch (config) # show ip route
Destination Mask Gateway Interface Source
default 0.0.0.0 172.28.0.1 mgmt0 DHCP
10.10.10.0 255.255.255.0 172.28.2.4 mgmt0 static
172.28.0.0 255.255.0.0 0.0.0.0 mgmt0 direct
1.0.0.0 255.255.255.0 0.0.0.0 Vlan11 direct
2.0.0.0 255.255.255.0 0.0.0.0 Vlan12 direct
3.0.0.0 255.255.255.0 0.0.0.0 Vlan13 direct
4.0.0.0 255.255.255.0 0.0.0.0 Vlan14 direct
8.8.8.0 255.255.255.0 0.0.0.0 Vlan1 direct
7.7.7.0 255.255.255.0 1.0.0.2 Vlan11 static
2.0.0.2 Vlan12 static
4.0.0.2 Vlan14 static
3.0.0.2 Vlan13 static
switch (config) #
The IP prefix and the network mask must be aligned in the LSB mask, (for example
192.168.0.0 /16 or 192.168.10.0 /24, or 192.168.10.10 /32)
Related Commands
Note
•
ip route
ip route <IP prefix> <netmask> <next hop IP address>
no ip route <IP prefix> <netmask> <next hop IP address>
Syntax Description
Default
Modes/Context
History
Role
Example
Related Commands interface vlan
ip load sharing
show ip route
Note