Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Assign eth0 and eth1 on cloned RHEL3 for HP-xw4300

Gabriella Schmidt
Occasional Advisor

Assign eth0 and eth1 on cloned RHEL3 for HP-xw4300

We have on our xw4300 workstations two ethernet controller (both Braodcom with tg3 driver).

28:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express (rev 01)
3f:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 01)

For convienient usage I want the additional card to be eth1 with a dedicated IP-addess, while eth0 should be set from the company wide DHCP server.
This can be done with 'redhat-config-network' by assigning the MAC addresses.

But if I clone this workstation and install the diskimage of machine on an other workstation, this MAC information is now incorrect.

Are there any tools, to do the wanted assignment on the new system automaticaly without user invention?

Thanks in advance,
Guenter
5 REPLIES
Ivan Ferreira
Honored Contributor

Re: Assign eth0 and eth1 on cloned RHEL3 for HP-xw4300

I think that in the original image, you can create a script like a rc service. In this script, you query the MAC for the devices, and use awk, perl, etc to modify the settings of the ifcfg-ethX files on startup.

So, when the service starts, it modifies the files according to the machine that is started.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Gopi Sekar
Honored Contributor

Re: Assign eth0 and eth1 on cloned RHEL3 for HP-xw4300


if you want one NIC to be static IP address and the second one to be DHCPD assigned then it should be possible to do this by editing the /etc/sysconfig/network-scripts/ifcfg-ethX file where ethX is either eth0 or eth1.

These are the files which tells what is the type of connection (DHCP, static) and other details including whether they should be activated at boot.

Hope this helps,
Gopi
Never Never Never Giveup
Gabriella Schmidt
Occasional Advisor

Re: Assign eth0 and eth1 on cloned RHEL3 for HP-xw4300

Just to be more precious. In principal I know what must be done, and I havbe already a script which is called within rc.sysinit.
But my problem is how to detect wich controller I need with 'lspci' I get the same string'
and even the PCI Bus identifier do not show to me which one is the primary and which the additional controller.

Greetings,
Guenter.
Gopi Sekar
Honored Contributor

Re: Assign eth0 and eth1 on cloned RHEL3 for HP-xw4300


Alright if your problem is identifying which device is eth0 and which is eth1, then kudzu should be able to help you with it.

Kudzu checks the hardware configurations and writes the information (like device name, driver etc) in to /etc/sysconfig/hwconf file. This file will have two entries (one for eth0 and one for eth1) by parsing this file you should be able to to know the device.

Hope I am correct this time,
Gopi
Never Never Never Giveup
Gabriella Schmidt
Occasional Advisor

Re: Assign eth0 and eth1 on cloned RHEL3 for HP-xw4300

I don't believe kudzu will solve it.
Kudzu does the assignment in the sequenz as the eth-devices are found by the kernel and destroys my MAC-assignment and needs user interaction too.
The real problem is the PCI assignment.

As long as all machines will be delivered with
the additional card in the same slot, I think I will get always the same assignment. But the cloned image will be installed on different computer worldwide from different factories, and I can't be sure that they are all build with the same layout. I only know both controller will be Broadcom with tg3 driver.

Greetings,
Guenter