From owner-freebsd-questions@FreeBSD.ORG Wed Jun 3 21:07:13 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B73F3106568B for ; Wed, 3 Jun 2009 21:07:13 +0000 (UTC) (envelope-from fbsdq@peterk.org) Received: from poshta.pknet.net (poshta.pknet.net [216.241.167.213]) by mx1.freebsd.org (Postfix) with SMTP id 6CA698FC22 for ; Wed, 3 Jun 2009 21:07:13 +0000 (UTC) (envelope-from fbsdq@peterk.org) Received: (qmail 76106 invoked from network); 3 Jun 2009 21:07:12 -0000 Received: from poshta.pknet.net (HELO pop.pknet.net) (216.241.167.213) by poshta.pknet.net with SMTP; 3 Jun 2009 21:07:12 -0000 Received: from 216.241.167.212 (SquirrelMail authenticated user fbsdq@peterk.org) by webmail.pknet.net with HTTP; Wed, 3 Jun 2009 15:07:12 -0600 (MDT) Message-ID: <07c5daf976003376fe3679b7a872c0a5.squirrel@webmail.pknet.net> Date: Wed, 3 Jun 2009 15:07:12 -0600 (MDT) From: "Peter" To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.17 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: nfs / showmount using wrong IP -> nfs weirdness X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 21:07:14 -0000 Setting up a test lab and ran into a weird NFS mounting problem: [7.2-STABLE FreeBSD 7.2-STABLE #0: Tue Jun 2 12:02:57 MDT 2009] denver:#ifconfig fxp0|grep inet inet 172.20.6.15 netmask 0xffffff00 broadcast 172.20.6.255 inet 116.123.45.215 netmask 0xffffff00 broadcast 116.123.45.255 denver:#grep cherno /etc/hosts 172.20.6.210 cherno 116.123.45.210 cherno denver:#ping -c1 cherno PING cherno (172.20.6.210): 56 data bytes 64 bytes from 172.20.6.210: icmp_seq=0 ttl=64 time=0.363 ms denver:#showmount -e 172.20.6.210|wc -l 8 denver:#showmount cherno|wc -l ^Cdenver:# it fails to 'showmount' via hostname. On the NFS Server/on cherno:: 10. 014455 00:02:b3:89:82:6e > 00:b0:d0:79:f0:e0, ethertype IPv4 (0x0800), length 98: 116.123.45.215.994 > 116.123.45.210.111: UDP, length 56 Why is it trying to use the other IP/entry from the hosts file? Now, if I remove the "public" ip from the interface: denver:#ifconfig fxp0 -alias 116.123.45.215 denver:#showmount -e cherno|wc -l 8 Then if I add another subnet to fxp0 it still works: denver:#ifconfig fxp0 alias 116.123.45.15/24 denver:#showmount -e cherno|wc -l 8 Then it fails again: denver:#ifconfig fxp0 -alias 116.123.45.15 denver:#ifconfig fxp0 alias 116.123.45.215/24 denver:#showmount -e cherno|wc -l ^Cdenver:# Now uncomment the public IP from /etc/hosts: denver:#grep cherno /etc/hosts 172.20.6.210 cherno #116.123.45.210 cherno it still has the 'evil' public ip: denver:#ifconfig fxp0|grep inet inet 172.20.6.15 netmask 0xffffff00 broadcast 172.20.6.255 inet 116.123.45.215 netmask 0xffffff00 broadcast 116.123.45.255 denver:#showmount -e cherno|wc -l 8 denver:#netstat -rna Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 522 lo0 172.20.6.0/24 link#2 UC 0 0 fxp0 172.20.6.210 00:b0:d0:79:f0:e0 UHLW 1 31 fxp0 569 172.20.6.213 00:03:47:e8:4e:11 UHLW 1 1264 fxp0 91 116.123.45.0/24 link#2 UC 0 0 fxp0 116.123.45.210 00:b0:d0:79:f0:e0 UHLW 1 1 fxp0 1136 It seems if the alias IP on fxp0 is from 116.123.45.192 -> 223 it fails, and does not even try to use the 172.20.6.X... ssh/ping/file server/ftp/etc - Everything else works fine using /etc/hosts and from there it is using the 172.20.6.X network, only NFS wants to use the 116 network....