Networking

Re: NFS mounting and routing question

 
Hanry Zhou
Super Advisor

NFS mounting and routing question

I need to mount NFS through a static route, not through a default one. To achieve that, can this static route be created on NFS server, not on the NFS client? because if it has to be done on Client sdie, then there would be too many clients need to be changed.

Will the static route on NFS server be only efflecting the traffic going out of NFS server, will data traffic from NFS client be also controlled by this setting on the server? 

Thanks!

none
11 REPLIES 11
Steven Schweda
Honored Contributor

Re: NFS mounting and routing question

> I need to mount NFS through a static route, not through a default one.

   Why?  Is there some actual problem which you are trying to solve?  As
usual, describing the actual problem can be more helpful than asking how
to implement some particular "solution" (which may or may not make any
sense).

> [...] can this static route be created on NFS server, not on the NFS
> client? [...]

   Generally speaking, I'd expect a route to be chosen by whoever is
sending the data.  When data go both ways, I'd expect each side to
choose a route (because each side needs to have a route to the other
side).  So, no, specifying a route on one system does not specify a
route on another system.

Hanry Zhou
Super Advisor

Re: NFS mounting and routing question

1.  We are experiencing a slwoness, and the suspected issue could be caused by routing,

2. If I set up the static route on NFS server, then going out traffic will go through the router. So, the question is how the returning route will be choosen? the same question if the static route on NFS client is set up, and data traffic initiated on the client, then how the returning route will be choosen when the traffic back to the client?

 

Thanks you!

none
Steven Schweda
Honored Contributor

Re: NFS mounting and routing question

> 1. We are experiencing a slwoness, and the suspected issue could be
> caused by routing,

   How did you decide that the slowness is related to network speed, and
not to something like, say, a slow NFS server?  And how did you decide
that a different route would help?  (And if a different route would be
better, then why is that not already the default route?)

> 2. If I set up the static route on NFS server, then going out traffic
> will go through the router. [...]

   You seem to know more about your network configuration than I do.
For example, I know nothing about your "the router", or what the routing
alternatives might be.

> [...] So, the question is how the returning route will be choosen?

   As I said before, as I understand it, the system which sends the data
will choose the route (or, at least, the first gateway/router along the
route).

> [...] then how the returning route will be choosen when the traffic
> back to the client?

   As I said before, as I understand it, the system which sends the data
will choose the route (or, at least, the first gateway/router along the
route).

   So, if you want both systems to use a particular route to talk to
each other, then both systems need to be told what to do.

   For more information about what's happening on your systems:

      man traceroute

   If the best symptom you have is a vague slowness (for NFS?), then I'd
want better evidence to determine where the problem lies.  And, knowing
nothing about your network configuration, I would not bet on bad routes
being the cause of anything.  On the other hand, adding an explicit
(static) route to a couple of systems should be relatively quick and
easy, so running the experiment might make some sense.

Hanry Zhou
Super Advisor

Re: NFS mounting and routing question

I am asking a generic question about sending and receiving packets within the same transaction,  for example, there will be inquiry and response, suppose the transaction is initiated from NFS server, it starts the conversation by  making an inquiry, the packet will go through the static router since it is already specified in routing table. What about the response to the inquiry fron the client? , what returning routes of this response packets will be choosen, or based on what rules to determine the returning routes back to the NFS server ?

none
Dave Olker
HPE Pro

Re: NFS mounting and routing question

> suppose the transaction is initiated from NFS server

I'm struggling to think of an NFS transaction that is initiated from the NFS server.  Can you give me an example of an NFS transaction that the server initiates?

I'm used to dealing with multi-homed NFS clients and servers, where each system has multiple NICs each on different subnets.  Is this what you're referring to?  For example, I have an NFS setup like this:

CLIENT IP-1: 15.200.20.20
CLIENT IP-2: 192.200.20.20

SERVER IP-1: 15.200.20.21
SERVER IP-2: 192.200.20.21

In this situation the decision made by each system as to which interface is used will depend entirely on the IP address used when the NFS client mounted the filesystem from the server.  If the client mounted as: 192.200.20.21:/home then it will send requests to the NFS server using the 192 interface and the server will reply using that interface since it should resolve the path back to the client using the 192 subnet.  All of this assumes both NFS client and server have their hostname resolution policies configured appropriately so that both systems resolve their respective IP addresses correctly.

If your environment involves something completely different then explaining as much about your environment as possible will be helpful.

Dave

I work for HPE
Hanry Zhou
Super Advisor

Re: NFS mounting and routing question

Thanks Dave to layout the situation well. The example I gave out was not appropriate. I should say, NFS client initiate the transaction, not NFS server. Let's using your example to explain my question.
CLIENT IP-1: 15.200.20.20
SERVER IP-1: 15.200.20.21

Normally on the client side, the packets will be sent out through the default GW, let's say 15.200.20.1. However, now people here doesn't want to use the GW, they want to set up a static route, and then packets will go through the other router (ex, 15.200.10.1). That could be achieved by modifying routing table on clients.

The question is, instead of creating static route on clients, if we can achieve the same by setting up a static route on NFS server? If yes, we can then make the change on only NFS server not on all clients.

Thanks for your time.

none
Dave Olker
HPE Pro

Re: NFS mounting and routing question

Routing decisions are made on each system individually based on their own specific routing table.  Just because the server sends its packets via a different route, that doesn't mean the client will automatically change it's routing table.  The client will evaluate the remote address it needs to send the packet to, look at its routing table and make the decision.

My expectation is if you want the NFS client to send packets via a different route, you need to modify the client's routing table.

Dave

I work for HPE
Hanry Zhou
Super Advisor

Re: NFS mounting and routing question

OK. thanks!

So, the routing table on the server or client will determine the route for packets going out on it's own side, and has no impact on routing on the other side. Right?

A follow-up.
In general, when the client sends out packets through a specified route, what about the returning packets from the server, what routes would these packets go through, or what rules to determine routes these packets will go through?

none
Dave Olker
HPE Pro

Re: NFS mounting and routing question

The server extracts the client's IP address from the NFS request, looks at its routing table, and selects the most appropriate route.  This is why if the NFS client sent the request via the 192 subnet, the server would send the reply back via its 192 interface, assuming it has one.

Dave

 

I work for HPE