Multiple Network Interfaces Howto: Difference between revisions

From FAIWiki
Jump to navigation Jump to search
(New page: == Motivation == You want to use FAI to install systems with two or more network interface cards (NIC). By default FAI sets up only one (i.e. the first) network interface dynamically with...)
 
(add link to different solution)
 
(21 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Motivation ==
== Motivation ==


You want to use FAI to install systems with two or more network interface cards (NIC). By default FAI sets up only one (i.e. the first) network interface dynamically with the following script of the FAIBASE class:
You want to use FAI to install systems with two or more network interface cards (NIC).
 
Installing a client with two active interfaces usually causes trouble as the boot process hangs when ''ipconfig'' tries to set up the 'wrong' interface using DHCP when no DHCP server is present for the respective interface. Also, by default FAI sets up only one (i.e. the first) network interface dynamically with the following script of the ''FAIBASE'' class:


  /var/lib/fai/config/scripts/FAIBASE/30-interface
  /var/lib/fai/config/scripts/FAIBASE/30-interface


== Solution ==
''Draft recommendation I:''
* Set up DHCP for all network interfaces on the client, otherwise the installation boot process will hang when <tt>ipconfig</tt> tries to set up all interfaces. Put a boot loader code (''filename ...'') in each network, so the client will boot for sure.
EXAMPLE (/etc/dhcp3/dhcpd.conf)
* You should have one template <tt>/etc/network/interfaces</tt> for each class of machine, and then plug in the IP addresses for each machine via search and replace. Use cfagent for this.
''Draft recommendation II:''
* Set up BIOS to boot preferably from network card on internal network where you have the FAI server.
* Specify a <tt>ip=eth0:dhcp</tt> line in the tftp config file for all clients. If that doesn't work specify it statically (see <tt>/usr/src/linux/Documentation/filesystems/nfsroot.txt</tt> for the syntax).
* Set up the dhcp server to assign IP address to the MAC address of the client network interface you boot from.
* Write a simple shell script to generate an appropriate <tt>/etc/network/interfaces</tt> file from the <tt>$HOSTNAME</tt> corresponding to the IP address obtained from DHCP (also check <tt>/etc/hosts file</tt>).
== Analysis, Troubleshooting ==
; Boot process stops at ''ipconfig'' (client installation over network)
: Check which MAC address ipconfig is trying to set up. Typically, the related interface is not connected to a network that provides a DHCP address for that network card.
; NFSROOT cooperates only with one network interface
: <strike>Before you build your NFSROOT (using [[make-fai-nfsroot]]) make sure you have specified all possible IP addresses and server names for your FAI server at the <tt>NFSROOT_ETC_HOSTS</tt> option in /etc/fai/[[make-fai-nfsroot.conf]]</strike>
== See also ==
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg04452.html New solution on linux-fai mailing list] (Nov 2011)
* [[Multi-ethernet|Multi-ethernet setup with custom initrd]]
* [[Grml Kernel]]
* [[fai-chboot]]
* [[make-fai-nfsroot.conf]]
=== Related Discussions ===
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg02730.html New packages in FAI repository] (Jan 2010)
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg02600.html booting from host with multiple network cards] (Nov 2009)
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg02582.html Two network cards] (Nov 2009)
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg02110.html FAI - Debian Lenny and Hardware with Multiple Ethernets] (Jun 2009)
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg01845.html Multiple NICs, partial success, partial weirdness] (Mar 2009)
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg01748.html Dual NIC = hang] (Feb 2009)
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg01553.html tg3 network cards] (Dec 2008)
* [http://www.mail-archive.com/linux-fai@uni-koeln.de/msg01321.html problem install client with multiple interfaces] (Sep 2008)


[[Category:Howto]]
[[Category:Howto]]

Latest revision as of 16:43, 22 December 2011

Motivation

You want to use FAI to install systems with two or more network interface cards (NIC).

Installing a client with two active interfaces usually causes trouble as the boot process hangs when ipconfig tries to set up the 'wrong' interface using DHCP when no DHCP server is present for the respective interface. Also, by default FAI sets up only one (i.e. the first) network interface dynamically with the following script of the FAIBASE class:

/var/lib/fai/config/scripts/FAIBASE/30-interface

Solution

Draft recommendation I:

  • Set up DHCP for all network interfaces on the client, otherwise the installation boot process will hang when ipconfig tries to set up all interfaces. Put a boot loader code (filename ...) in each network, so the client will boot for sure.
EXAMPLE (/etc/dhcp3/dhcpd.conf)
  • You should have one template /etc/network/interfaces for each class of machine, and then plug in the IP addresses for each machine via search and replace. Use cfagent for this.

Draft recommendation II:

  • Set up BIOS to boot preferably from network card on internal network where you have the FAI server.
  • Specify a ip=eth0:dhcp line in the tftp config file for all clients. If that doesn't work specify it statically (see /usr/src/linux/Documentation/filesystems/nfsroot.txt for the syntax).
  • Set up the dhcp server to assign IP address to the MAC address of the client network interface you boot from.
  • Write a simple shell script to generate an appropriate /etc/network/interfaces file from the $HOSTNAME corresponding to the IP address obtained from DHCP (also check /etc/hosts file).

Analysis, Troubleshooting

Boot process stops at ipconfig (client installation over network)
Check which MAC address ipconfig is trying to set up. Typically, the related interface is not connected to a network that provides a DHCP address for that network card.
NFSROOT cooperates only with one network interface
Before you build your NFSROOT (using make-fai-nfsroot) make sure you have specified all possible IP addresses and server names for your FAI server at the NFSROOT_ETC_HOSTS option in /etc/fai/make-fai-nfsroot.conf

See also

Related Discussions