multiple ethernet interfaces causes duplicate host records in the /etc/hosts file?
Hello. I am using autoyast/sles9. I just started building hosts with more than 1 physical ethernet interface which resulted in some surprising entries in the /etc/hosts file. here is the snippet of my control.xml file that pertains to the hosts networking setup. <?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <configure> <networking> <dns> <domain>atl.company.com</domain> <hostname>app01</hostname> <nameservers config:type="list"> <nameserver>172.17.9.25</nameserver> </nameservers> <searchlist config:type="list"> <search>atl.company.com</search> </searchlist> </dns> <interfaces config:type="list"> <interface> <bootproto>static</bootproto> <device>eth0</device> <startmode>onboot</startmode> <broadcast>172.17.177.255</broadcast> <netmask>255.255.255.0</netmask> <ipaddr>172.17.177.54</ipaddr> </interface> <interface> <bootproto>static</bootproto> <device>eth1</device> <startmode>onboot</startmode> <broadcast>10.170.3.255</broadcast> <netmask>255.255.255.0</netmask> <ipaddr>10.170.3.21</ipaddr> </interface> </interfaces> The resulting hosts file has these 2 entries. 10.170.3.21 app01.atl.company.com 172.17.177.54 app01.atl.company.com app01 The question is. Why is the line "10.170.3.21 app01.atl.company.com" being added to the /etc/hosts file? If I cannot stop this from occuring can I at least control the name that gets associated with the 2nd interface so I might end up with 10.170.3.21 eth1-app01.atl.company.com or something like that? TIA. Deet.
On Thu, Apr 21, 2005 at 03:45:04PM -0700, deet wrote:
<dns> <domain>atl.company.com</domain> <hostname>app01</hostname> <nameservers config:type="list"> <nameserver>172.17.9.25</nameserver> </nameservers> <searchlist config:type="list"> <search>atl.company.com</search> </searchlist> </dns> <interfaces config:type="list"> <interface> <bootproto>static</bootproto> <device>eth0</device> <startmode>onboot</startmode> <broadcast>172.17.177.255</broadcast> <netmask>255.255.255.0</netmask> <ipaddr>172.17.177.54</ipaddr> </interface> <interface> <bootproto>static</bootproto> <device>eth1</device> <startmode>onboot</startmode> <broadcast>10.170.3.255</broadcast> <netmask>255.255.255.0</netmask> <ipaddr>10.170.3.21</ipaddr> </interface> </interfaces>
The resulting hosts file has these 2 entries. 10.170.3.21 app01.atl.company.com 172.17.177.54 app01.atl.company.com app01
The question is. Why is the line "10.170.3.21 app01.atl.company.com" being added to the /etc/hosts file? If I cannot stop this from occuring can I at least control the name that gets associated with the 2nd interface so I might end up with 10.170.3.21 eth1-app01.atl.company.com
Having a global name that is applied to all interfaces is a "feature" of the current setup. It is not specific to autoinstallation. I plan to fix it in the next release. You can use a post script to edit the host file. -- Martin Vidner, YaST developer SuSE CR, s.r.o. e-mail: mvidner@suse.cz Drahobejlova 27 tel:+420-296542373 190 00 Praha 9, Czech Republic http://www.suse.cz
participants (2)
-
deet
-
Martin Vidner