ONTAP Discussions

Can I also add especific interface when will add new route?

umonteiro
5,582 Views

In windows we have sintax :

route -p add 0.0.0.0 mask 0.0.0.0 192.168.1.1 metric 1 if 0x20003

In Linux we have sintax:

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

How i can add interface in route command with Data ONTAP ?

1 REPLY 1

soffa
5,479 Views

To add a route for a host (say 192.168.42.10) vi gateway (say 10.1.1.1);

route add host 192.168.42.10 10.1.1.1 1

To add a route for a network (say 192.168.42/24) vi gateway (say 10.1.1.1);

route add net 192.168.42/24 10.1.1.1 1

To add a route for host (say 192.168.42.10) vi direct interface with i.p. 192.168.42.11

route add host 192.168.42.10 192.168.42.11 0

Make sure you also add the entry to /etc/rc so it survives a reboot

Sam

Public