Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

restricting rpc calls to use tcp only

50 views
Skip to first unread message

Geremy Cohen

unread,
May 12, 2000, 3:00:00 AM5/12/00
to
on solaris (or any unix), is there a way to restrict rpc calls
to use tcp only?

if i do a snoop now, it shows all rpc calls from client to
server are done via udp.

thanks,
geremy

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!


Barry Margolin

unread,
May 13, 2000, 3:00:00 AM5/13/00
to
In article <03218f38...@usw-ex0106-047.remarq.com>,

Geremy Cohen <gcohenN...@resonate.com.invalid> wrote:
>on solaris (or any unix), is there a way to restrict rpc calls
>to use tcp only?
>
>if i do a snoop now, it shows all rpc calls from client to
>server are done via udp.

The programmer of the client application decides whether to use TCP or
UDP. Unless a specific application has a configuration option that lets
you control it, you're stuck with whatever he chose. Most RPC applications
use UDP, but NFS v3 will use TCP if the server supports it.

--
Barry Margolin, bar...@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

Geremy Cohen

unread,
May 13, 2000, 3:00:00 AM5/13/00
to
i can get nfs3 to use tcp, no problem, it is just the
intermediate steps that are using udp . . . i cant seem to get
mount to use tcp for the portmap (rpc) calls, then after the rpc
call, mount uses udp to connect to mountd it seems.

this whole rpc thing is a little new to me, so forgive me if i
have mixed my words . . .

Geremy Cohen

unread,
May 13, 2000, 3:00:00 AM5/13/00
to
what i dont understand, is if i do an rpcinfo and netstat, it
shows that all the needed services are listening on tcp
(rpcbind, mountd, portmap).

yet i cannot seem to explicity use those transports to
connect . . .

geremy

In article <0imT4.15$ej7.246@burlma1-snr2>, Barry Margolin
<bar...@genuity.net> wrote:
>In article <055ddfea...@usw-ex0101-008.remarq.com>,


>Geremy Cohen <gcohenN...@resonate.com.invalid> wrote:
>>i can get nfs3 to use tcp, no problem, it is just the
>>intermediate steps that are using udp . . . i cant seem to get
>>mount to use tcp for the portmap (rpc) calls, then after the
rpc
>>call, mount uses udp to connect to mountd it seems.
>>
>>this whole rpc thing is a little new to me, so forgive me if i
>>have mixed my words . . .
>

>In general, applications usually use UDP for simple one-shot
operations
>like portmap and mount. TCP is only used for operations that
transfer
>large amounts of data, such as the NFS protocol itself.


>
>--
>Barry Margolin, bar...@genuity.net
>Genuity, Burlington, MA
>*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to
newsgroups.
>Please DON'T copy followups to me -- I'll assume it wasn't
posted to the group.
>
>

Geremy Cohen

unread,
May 13, 2000, 3:00:00 AM5/13/00
to
can i remove the udp registrations from the server's rpc config
to force the tcp behaviour?

geremy

In article <O9pT4.21$ej7.303@burlma1-snr2>, Barry Margolin
<bar...@genuity.net> wrote:
>In article <0517c4ea...@usw-ex0101-008.remarq.com>,


>Geremy Cohen <gcohenN...@resonate.com.invalid> wrote:
>>what i dont understand, is if i do an rpcinfo and netstat, it
>>shows that all the needed services are listening on tcp
>>(rpcbind, mountd, portmap).
>>
>>yet i cannot seem to explicity use those transports to
>>connect . . .
>

>In order to use a particular transport, both the client and
server have to
>support it. In most cases, the client only supports UDP.

Barry Margolin

unread,
May 14, 2000, 3:00:00 AM5/14/00
to
In article <055ddfea...@usw-ex0101-008.remarq.com>,

Geremy Cohen <gcohenN...@resonate.com.invalid> wrote:
>i can get nfs3 to use tcp, no problem, it is just the
>intermediate steps that are using udp . . . i cant seem to get
>mount to use tcp for the portmap (rpc) calls, then after the rpc
>call, mount uses udp to connect to mountd it seems.
>
>this whole rpc thing is a little new to me, so forgive me if i
>have mixed my words . . .

In general, applications usually use UDP for simple one-shot operations
like portmap and mount. TCP is only used for operations that transfer
large amounts of data, such as the NFS protocol itself.

--

Barry Margolin

unread,
May 14, 2000, 3:00:00 AM5/14/00
to
In article <0517c4ea...@usw-ex0101-008.remarq.com>,

Geremy Cohen <gcohenN...@resonate.com.invalid> wrote:
>what i dont understand, is if i do an rpcinfo and netstat, it
>shows that all the needed services are listening on tcp
>(rpcbind, mountd, portmap).
>
>yet i cannot seem to explicity use those transports to
>connect . . .

In order to use a particular transport, both the client and server have to
support it. In most cases, the client only supports UDP.

--

Barry Margolin

unread,
May 14, 2000, 3:00:00 AM5/14/00
to
In article <17c36466...@usw-ex0101-008.remarq.com>,

Geremy Cohen <gcohenN...@resonate.com.invalid> wrote:
>can i remove the udp registrations from the server's rpc config
>to force the tcp behaviour?

No. How many times must I say it: the client chooses the transport
protocol. If the client and server don't both support the same transport,
the connection can't be made. Most clients *only* support UDP.

The only case I know of where the client will try both is NFS. Older
servers only support UDP, so new clients will first try TCP and then try
UDP if it fails.

Thomas Maslen

unread,
May 14, 2000, 3:00:00 AM5/14/00
to
In <aDrT4.25$ej7.96@burlma1-snr2> Barry Margolin <bar...@genuity.net> writes:
[...]

>No. How many times must I say it: the client chooses the transport
>protocol. If the client and server don't both support the same transport,
>the connection can't be made. Most clients *only* support UDP.
>
>The only case I know of where the client will try both is NFS. Older
>servers only support UDP, so new clients will first try TCP and then try
>UDP if it fails.

Yes and no. If it's a pre TI-RPC client that uses clntudp_create() or
clnttcp_create(), then yes, the transport choice is wired into the client.
Ditto if it's a TI-RPC client that uses clnt_dg_create() or clnt_vc_create().

However, if it's the mythical TI-RPC client that follows the party line and
uses clnt_create() with a nettype of NULL or "netpath" or "visible", then the
man pages would have me believe that it will try a list of transports in an
order determined by

(1) an environment variable called NETPATH

(2) the order of the entries in /etc/netconfig

"/usr/ccs/bin/nm -D /usr/lib/fs/nfs/mount | grep UNDEF" suggests that the NFS
mount command *might* be a good little TI-RPC client, though there are a few
surprising symbols in there too. (I don't have root on these machines, so I
haven't actually tried setting a NETPATH or swapping the first two entries in
/etc/netconfig).

Thomas Maslen
mas...@pobox.com

0 new messages