On Tue, May 26, 2009 at 4:09 PM, Aldo Foot wrote:
On Tue, May 26, 2009 at 2:33 PM, David L wrote:
> I have a fedora live USB stick that I want to be able to boot in
> a co-worker's laptop so they can run a Linux app on their
> Windows system. The app talks to an embedded device
> through wired ethernet, so I need to set a static IP address
> of the wired ethernet device. Is there a way to do this since
> the wired hardware device will be different on different computers?
> On one co-worker's system, wired ethernet came up as eth0.
> On another, it came up as eth2. We don't have a DHCP server
> in the embedded device, so I have to assign a static address.
>
> Thanks,
>
> David
The easy way:
Say that the ethernet device came up a eth2, then edit or create
the file /etc/sysconfig/network-scripts/ifcfg-eth2. In the file put
something like this:
DEVICE=eth2
BOOTPROTO=static
BROADCAST=1111.2222.3333.4444
HWADDR=00:07:F5:3E:A7:6A
IPADDR= 5555.6666.7777.8888
NETMASK=255.255.254.0
NETWORK=143.119.40.0
ONBOOT=yes
The DEVICE and HWADDR labels identify the NIC.
Thanks for the response...
If I understand this easy way, it requires that I know what eth device
the wired ethernet will come up as. I've tested it on two laptops
and one came up as eth0 and one came up as eth2. But I don't
know that it won't come up as eth1 or eth3 on another system.
I was hoping there was a way to configure the wired ethernet
device rather than a specific eth# so I could give a USB stick
to a random co-worker and expect the wired ethernet to come
up with the desired IP (without knowing their eth# or hwaddr).
Thanks,
David