ONTAP Hardware

How to define a route out of a specific interface?

cgeck0000
11,782 Views

We have multiple multimode VIFs within our 3270 series.  When I add a route the controller automatically assigns the route to an interface which is not correct.  How to I say use vif03-20 when adding a network?

I want to achieve this:

route add net 10.4.0.0/24 vif03-20 1

Thanks!

4 REPLIES 4

JCASON
11,638 Views

I haven't seen where you can specify an interface, but if you specify a gateway it should choose the correct interface.  E.g. if I want to contact 192.16.36.0 out of interface using 192.26.36.1 as gw:

route add inet net 192.16.36/24 192.26.36.1 1

(note that the network does not include the last .0)

This is assuming that your multiple VIFs aren't on the same subnet, using the same gateway. 

aborzenkov
11,638 Views

Could you describe in more details what you try to achieve? Do you have multiple interfaces on the same network and want to force traffic to this network via specific interface?

yannbizeul
11,638 Views

I do not have  a direct answer, but it can be useful to remind that by default, OnTap does reply to connections by the interface that received it.

So if you have a 10GBE vif and a 1GB ethernet on the same subnet, servers connecting to storage using 10GBE IP address should stay on that link.

columbus_admin
11,638 Views

Most of this is based off of standard routing rules.

So if an interface is the default route, and there is no defined interface on that subnet, it will go out the default interface.

i.e.  You have three subnets 10.1.1.x(filer ip is 10.1.1.100)     185.15.1.x(filer ip is 185.15.1.100)   and   202.134.1.x

If the filer has 10.1.1.x as the default, and 185.15.1.x is directly trunked to the filer, but 202.134.1.x is not, traffic for 185.15.1.x will go out the interface defined as 185.15.1.100(unless the host contacts it over the default interface.)  Filers will reply on the interface they are contacted on, so routing is very important.

Now suppose you want hosts on 202.134.1.x to have access, they will go over 10.1.1.100, because there is no 202.134.1.x interface.  If for some reason you wanted to contact 202.134.1.x over 185.15.1.100, you would have to tell the filer what router on the 185 network can access 202.  Without a router, the traffic will not be able to get off of the 185 network and the filer knows that it can only directly access 185, so you have to specifiy what provides the next "hop".

I think you can specify an interface instead of the router on some boxes, but to my knowledge it is not a good thing as it leads to other issues.

It is possible on the filer, but USE BELOW AT YOUR OWN RISK, it may not be supported:

Filername: filerA

VIF name: VIF0

VLAN: 400

IP address of interface on filer: 192.168.1.100

make sure the interface is defined in /etc/hosts with a vaild name for that interface filerA-vif0-400 assuming filername-vif_name-vlan_number

if the filer resolves this to your ip address - route add net(or host if only one system) xxx.xxx.xxx.xxx filerA-vif0-400 1

You can also just use the ip address of the VIF in question - route add net xxx.xxx.xxx.xxx 192.168.1.100 1

- Scott

Public