Find the answer to your Linux question:
Results 1 to 2 of 2
I am trying to setup nfs and I am confused if I am using UDP or TCP. When I run rpcinfo -p on the server the output is below. Both ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    26

    NFS Confused Am I Using TCP or UDP


    I am trying to setup nfs and I am confused if I am using UDP or TCP. When I run rpcinfo -p on the server the output is below. Both UDP and TCP are listed, so how do I know which protcol I am using?

    program vers proto port
    100000 2 tcp 111 portmapper
    100000 2 udp 111 portmapper
    100005 1 udp 42891 mountd
    100005 1 tcp 60165 mountd
    100005 2 udp 42891 mountd
    100005 2 tcp 60165 mountd
    100005 3 udp 42891 mountd
    100005 3 tcp 60165 mountd
    100003 2 udp 2049 nfs
    100003 3 udp 2049 nfs
    100003 4 udp 2049 nfs
    100021 1 udp 42440 nlockmgr
    100021 3 udp 42440 nlockmgr
    100021 4 udp 42440 nlockmgr
    100021 1 tcp 36005 nlockmgr
    100021 3 tcp 36005 nlockmgr
    100021 4 tcp 36005 nlockmgr
    100003 2 tcp 2049 nfs
    100003 3 tcp 2049 nfs
    100003 4 tcp 2049 nfs
    100024 1 udp 40877 status
    100024 1 tcp 49146 status

  2. #2
    Linux User Manko10's Avatar
    Join Date
    Sep 2010
    Posts
    250
    The server listens to both. Whether you use TCP or UDP is specified when mounting the share. Either write
    Code:
    mount -o tcp 127.0.0.1:/foo /mnt/bar
    or
    Code:
    mount -o udp 127.0.0.1:/foo /mnt/bar
    If you don't specify the protocol the default should be TCP in NFSv4 but if you are unsure just specify that option explicitly.

    EDIT:
    To see how your share is currently mounted on your system look in /proc/mounts
    Refining Linux Advent calendar: 24 Outstanding ZSH Gems

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •