Specifications
7-34 IP Services Commands
set ip route
AddsastaticroutetotheIProutetable.
Syntax
set ip route {default | ip-addr mask | ip-addr/mask-length} default-router
metric
Parameters
Defaults
None.
Mode
Enabled.
Usage
MSScanuseastaticrouteonlyifadirectrouteinthe routetableresolvesthestaticroute.MSS
addsrouteswithnext‐hoptypesLocalandDirectwhenyouadd anIPinterfa c e toaVLAN,ifthe
VLANisup.Ifoneoftheseaddedroutescanresolve
thestaticroute,MSScanusethestaticroute.
Beforeyouaddastaticroute,usetheshowinterfacecommandtoverifythattheswitchhasanIP
interfaceinthesamesubnetastheroute’snext‐hoprouter.Ifnot,theVLAN:Interfacefieldofthe
showiproutecommandoutput
showsthattherouteisdown.
Youcanconfigureamaximumof4routesperdestination.Thisincludesdefaultroutes,which
havedestination0.0.0.0/0.Eachroutetoagivendestinationmusthaveauniquerouteraddress.
Whentheroutetablecontainsmultipledefaultorexplicitroutestothesamedestination,MSS
uses
theroutewiththelowestcost.Iftwoormoreroutestothesamedestinationhavethelowestcost,
MSSselectsthefirstrouteintheroutetable.
Whenyouaddmultipleroutestothesamedestination,MSSgroupstheroutesandordersthem
fromlowestcostatthe
topofthegrouptohighestcostatthebottomofthegroup.Ifyouadda
newroutethathasthesamedest inationandcostasaroutealreadyinthetable,MSSplacesthe
newrouteatthetopofthegroupofrouteswiththesamecost.
default
Defaultroute.ARoamAboutswitchusesthedefaultrouteifan
explicitrouteisnotavailableforthedestination.
Note: default is an alias for IP address 0.0.0.0/0.
ip‐addrmask IPaddressandsubnetmaskfortheroutedestination,indotted
decimalnotation(forexample,10.10.10.10255.255.255.0).
ip‐addr/mask‐length IPaddressandsubnetmasklengthinCIDRformat(forexample,
10.10.10.10/24).
default‐router IPaddress,DNShostname,oraliasofthenext‐hoprouter.
metric Costforusingthe
route.Youcanspecifyavaluefrom0 through
2,147,483,647.Lower‐costroutesarepreferredoverhigher‐cost
routes.