freebsd 13.1 nfs server connection timeout.

hello, community.

I want to setup NFS server on FreeBSD 13.1, the NFS client are linux, but linux nfs client failed to connect to FreeBSD nfs server.

I deploy nfs on FreeBSD 13.1 and config as:

Code:
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
mountd_enable="YES"
mountd_flags="-r"
rpcbind_enable="YES"
started it

doas service nfsd start


Notes: rpcbind and mountd will automatically started by nfsd

create a zfs dataset and set sharenfs is on as:

doas zfs set sharenfs="-alldirs,-maproot=root,-network 192.168.9.0/24" tank/nfs_root

here are the nfsd related process:

Code:
freebsd /v/log> doas ps -aux | egrep 'rpcbind|mountd|nfsd'
root    2282   0.0  0.0  12952   2652  -  Is   16:57     0:00.01 /usr/sbin/rpcbind
root    2299   0.0  0.0  15568   2728  -  Ss   16:57     0:00.14 /usr/sbin/mountd -r /etc/exports /etc/zfs/exports
root    2301   0.0  0.0  15440   2576  -  Is   16:57     0:00.02 nfsd: master (nfsd)
root    2302   0.0  0.0  12760   2228  -  S    16:57     0:00.00 nfsd: server (nfsd)
rui     2597   0.0  0.0  12844   2380  2  S+   17:19     0:00.00 egrep rpcbind|mountd|nfsd
freebsd /v/log>

The client is a ubuntu 22.04

Code:
sudo mount -t nfs -o vers=3 fbn54l:/tank/nfs_root /mnt/nfs
mount.nfs: Connection timed out
Tried with rpcinfo

Code:
rpcinfo -p fbn54l
mount.nfs: Connection timed out

The client's journal log

Code:
linux> journalctl -f

Sep 10 17:11:03 xu4322830 kernel: NFS: nfs mount opts='addr=192.168.9.238,vers=3,proto=tcp,mountvers=3,mountproto=udp,mountport=903'
Sep 10 17:11:03 xu4322830 kernel: NFS:   parsing nfs mount option 'addr=192.168.9.238'
Sep 10 17:11:03 xu4322830 kernel: NFS:   parsing nfs mount option 'vers=3'
Sep 10 17:11:03 xu4322830 kernel: NFS:   parsing nfs mount option 'proto=tcp'
Sep 10 17:11:03 xu4322830 kernel: NFS:   parsing nfs mount option 'mountvers=3'
Sep 10 17:11:03 xu4322830 kernel: NFS:   parsing nfs mount option 'mountproto=udp'
Sep 10 17:11:03 xu4322830 kernel: NFS:   parsing nfs mount option 'mountport=903'
Sep 10 17:11:03 xu4322830 kernel: NFS: MNTPATH: '/tank/nfs_root'
Sep 10 17:11:03 xu4322830 kernel: NFS: sending MNT request for fbn54l.jike.lan:/tank/nfs_root
Sep 10 17:11:03 xu4322830 kernel: NFS: received 1 auth flavors
Sep 10 17:11:03 xu4322830 kernel: NFS:   auth flavor[0]: 1
Sep 10 17:11:03 xu4322830 kernel: NFS: MNT request succeeded
Sep 10 17:11:03 xu4322830 kernel: NFS: attempting to use auth flavor 1
Sep 10 17:11:03 xu4322830 kernel: NFS: get client cookie (0xcdf04381/0x8c51abf9)

and I tried to retrieve FreeBSD's log but emited nothing

Code:
freebsd > doas tail -f /var/log/messages | grep nfs

any idea?
 
Well, after digging couple hours, I find out the reason for connection timeout is cisco sg200-08, which drop tcp syn packet with privileged port.
Update the new firmware fix this problem.
 
Back
Top