NFS mount by IP is fine but can't mount by domain name

6,675

I found out the problem after flushing the whole db file of bind9 and retyped it. If you look at my nslookup there, the resolved IP is 192.168.0.107 instead of 192.168.1.107.

After retyped the bind9 db file for the zone, It works, I guess the old file's Record of the zone nfs.student.co.uk was wrong.

Share:
6,675

Related videos on Youtube

TheCyberliem
Author by

TheCyberliem

Updated on September 18, 2022

Comments

  • TheCyberliem
    TheCyberliem over 1 year

    I'm trying to setup a local NFS on 2 VM. Basically the first VM will run NFS-server to act as server and the 2nd one run NFS-common to act as client.

    The Server's IP is 192.168.1.107. The Client's IP is 192.168.1.74.

    I set up a bind9 service on server to translate nfs.student.co.uk to 192.168.1.107 and set the DNS of client to the address of 192.168.1.107. An nslookup command on the Client gave:

    $nslookup nfs.student.co.uk
    Server:         192.168.1.107 
    Address:    192.168.1.107#53
    
    Name:   nfs.student.co.uk Address: 196.168.0.107
    

    Now when I mount it by the command

    sudo mount 192.168.1.107:/etc/content mntTest
    

    The mount success.

    However, when I mount it by the domain name:

    ~$ sudo mount nfs.student.co.uk:/etc/content mntTest
    mount.nfs: Connection timed out
    

    The mount fail. I'm not sure why. Anyone can help me with this? It's not a domain translation problem, since if I tried to mount from a gibberish domain name it will straight away tell me :

    ~$ sudo mount nfss.student.co.uk:/etc/content mntTest
    mount.nfs: Failed to resolve server nfss.student.co.uk: Name or service not known
    
    • George Udosen
      George Udosen about 7 years
      Not an expert on this, but if I may ask is 192.168.1.107 nfs.student.co.uk in the servers /etc/hosts file?
    • TheCyberliem
      TheCyberliem about 7 years
      It is not, however there is a bind9 service installed on 192.168.1.107 to do the translation for the whole system.