On Fri, Dec 02 2016, Joachim Banzhaf wrote: > Hi list, > > my problem is, rpcbind gave a tcp port to nlockmgr where I assumed > this port is reserved. That isn't how it works. rpcbind doesn't give ports to anyone. lockd chooses a port, and asks rpcbind to register it against the nlockmgr service. If lockd is choosing a port that you don't want it to, you need to get lockd to change its behavior. One way is to explicitly tell lockd what port to use. The "--nlm-port" option to rpc.statd can do this. By default, a number will be chosen from the range given in /proc/sys/net/ipv4/ip_local_port_range You can change that range, and that will affect all sockets which don't ask for an explicit port. NeilBrown > > Now, I didn't find the spec that says which ports rpcbind is allowed > to use, but I thought it is the ephemeral ports, on linux defined with > the range in kernel configuration net.ipv4.ip_local_reserved_ports > minus exclusions from net.ipv4.ip_local_reserved_ports. > > So, my questions are > 1) Is my assumption about allowed ports correct? > 2) If not: how can I define that range? > 3) If yes: was there a fix for that since my rather old SLES 12 > version rpcbind-0.2.1_rc4 (kernel 3.12.55)? I didn't find something > obvious to me in the changelog. > > Bonus question: would it have been safe/possible to free up the port, > e.g. with rpcbind -d? I only found out about that option after a > reboot... > > BR, > Joachim > > (please keep me in cc) > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html
Attachment:
signature.asc
Description: PGP signature