9.0-BETA3 - network scripts problem

From: Alex Keda <admin_at_lissyara.su>
Date: Tue, 11 Oct 2011 23:01:01 +0400
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<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         inet 127.0.0.1 netmask 0xff000000
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
         ether 00:30:48:71:11:a4
         inet 91.227.16.17 netmask 0xff000000 broadcast 91.227.16.17
         media: Ethernet autoselect (1000baseT <full-duplex>)
         status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
         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<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536

if I unplug network cable and reboot - network configurations is correct:

em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
         ether 00:30:48:71:11:a4
         inet 91.227.17.15 netmask 0xffffff00 broadcast 91.227.17.255
         media: Ethernet autoselect (1000baseT <full-duplex>)
         status: active
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
         
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
         ether 00:30:48:71:11:a5
         media: Ethernet autoselect
         status: no carrier
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         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<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         inet 127.0.0.1 netmask 0xff000000
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
         ether 00:30:48:71:11:a4
         inet 91.227.16.27 netmask 0xff000000 broadcast 91.227.16.27
         media: Ethernet autoselect (1000baseT <full-duplex>)
         status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
         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<UP,SIMPLEX,MULTICAST> 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<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         inet 127.0.0.1 netmask 0xff000000
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
         ether 00:30:48:71:11:a4
         inet 91.227.17.15 netmask 0xff000000 broadcast 91.227.17.15
         media: Ethernet autoselect (1000baseT <full-duplex>)
         status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
         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<UP,SIMPLEX,MULTICAST> 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.
Received on Tue Oct 11 2011 - 17:18:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC