From owner-freebsd-current@FreeBSD.ORG Tue Oct 11 19:18:23 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B373106566C for ; Tue, 11 Oct 2011 19:18:23 +0000 (UTC) (envelope-from admin@lissyara.su) Received: from mx.lissyara.su (mx.lissyara.su [91.227.18.11]) by mx1.freebsd.org (Postfix) with ESMTP id 053288FC16 for ; Tue, 11 Oct 2011 19:18:22 +0000 (UTC) Received: from [77.73.27.98] (port=46651 helo=lissyara-gp.grand-prix) by mx.lissyara.su with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1RDhZY-000LHX-78 for freebsd-current@FreeBSD.org; Tue, 11 Oct 2011 23:01:04 +0400 Message-ID: <4E94926D.1040002@lissyara.su> Date: Tue, 11 Oct 2011 23:01:01 +0400 From: Alex Keda User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; ru-RU; rv:1.8.1.23) Gecko/20091202 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Description: if spam count > 60 - this is spam X-Spam-Count: 0 X-Spam-Description: if spam count > 60 - this is spam X-Spam-Count: 0 X-Descriptions: powered by www.lissyara.su X-Bounce-ID: mx.lissyara.su Cc: Subject: 9.0-BETA3 - network scripts problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2011 19:18:23 -0000 I install 9.0-BETA3 i386, set next rc.conf configurations: mail# grep -E "hostname|ifconfig" /etc/rc.conf ifconfig_em0="inet 91.227.17.15 netmask 255.255.255.0" hostname="mail.AeroStarContract.ru" mail# after reboot with plugged LAN cable, I have this strange network configuration: lo0: flags=8049 metric 0 mtu 16384 options=3 inet 127.0.0.1 netmask 0xff000000 em0: flags=8843 metric 0 mtu 1500 options=209b ether 00:30:48:71:11:a4 inet 91.227.16.17 netmask 0xff000000 broadcast 91.227.16.17 media: Ethernet autoselect (1000baseT ) status: active em1: flags=8843 metric 0 mtu 1500 options=209b ether 00:30:48:71:11:a5 inet 91.227.16.17 netmask 0xff000000 broadcast 91.227.16.17 media: Ethernet autoselect status: no carrier ipfw0: flags=8801 metric 0 mtu 65536 if I unplug network cable and reboot - network configurations is correct: em0: flags=8843 metric 0 mtu 1500 options=209b ether 00:30:48:71:11:a4 inet 91.227.17.15 netmask 0xffffff00 broadcast 91.227.17.255 media: Ethernet autoselect (1000baseT ) status: active em1: flags=8802 metric 0 mtu 1500 options=209b ether 00:30:48:71:11:a5 media: Ethernet autoselect status: no carrier ipfw0: flags=8801 metric 0 mtu 65536 lo0: flags=8049 metric 0 mtu 16384 options=3 inet 127.0.0.1 netmask 0xff000000 91.227.16.17 - is IP for DNS A record for mail.AeroStarContract.ru if I run /etc/rc.d/netif start with plugged cable - network configurations reset to first listing. If cable unplugged - to second. if I change hostname to non-existent: mail# grep -E "hostname|ifconfig" /etc/rc.conf ifconfig_em0="inet 91.227.17.15 netmask 255.255.255.0" hostname="mail.AeroStarContract-bad.ru" mail# reboot with/without LAN cable get good network configurations. change A DNS record for "mail.AeroStarContract.ru" from 91.227.16.17 to 91.227.16.27 get this configurations, with plugged cable: lo0: flags=8049 metric 0 mtu 16384 options=3 inet 127.0.0.1 netmask 0xff000000 em0: flags=8843 metric 0 mtu 1500 options=209b ether 00:30:48:71:11:a4 inet 91.227.16.27 netmask 0xff000000 broadcast 91.227.16.27 media: Ethernet autoselect (1000baseT ) status: active em1: flags=8843 metric 0 mtu 1500 options=209b ether 00:30:48:71:11:a5 inet 91.227.16.27 netmask 0xff000000 broadcast 91.227.16.27 media: Ethernet autoselect status: no carrier ipfw0: flags=8801 metric 0 mtu 65536 with unplugged - all correct. setting A record to 91.227.17.15 (as in rc.conf) get this, with plugged cable: lo0: flags=8049 metric 0 mtu 16384 options=3 inet 127.0.0.1 netmask 0xff000000 em0: flags=8843 metric 0 mtu 1500 options=209b ether 00:30:48:71:11:a4 inet 91.227.17.15 netmask 0xff000000 broadcast 91.227.17.15 media: Ethernet autoselect (1000baseT ) status: active em1: flags=8843 metric 0 mtu 1500 options=209b ether 00:30:48:71:11:a5 inet 91.227.17.15 netmask 0xff000000 broadcast 91.227.17.15 media: Ethernet autoselect status: no carrier ipfw0: flags=8801 metric 0 mtu 65536 with unplugged - all correct. ============= DNS zone AeroStarContract.ru use our DNS servers, used in resolv.conf: mail# more /etc/resolv.conf nameserver 91.227.16.10 nameserver 91.227.17.11 mail# I think, it try find hostname in DNS (DNS server in some network with server) and use finded IP to set all interfaces. It's serious mistake, because I find it when server first booting and set to interface IP used in another server =)) All names, IP addresses and another information - is real.