LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Set IP address to static from DHCP assigned address (http://www.linuxquestions.org/questions/linux-networking-3/set-ip-address-to-static-from-dhcp-assigned-address-518512/)

jborn 01-11-2007 08:03 PM

Set IP address to static from DHCP assigned address
 
My linksys switch has a dhcp on it. I have it starting to assign address from 192.168.1.105 and up... I would like to assign a FC6 box 192.168.1.103

The FC6 box currently has IP4 on. It also currently automatically grabs an address from the linksys switch. How do I stop that from happening and assign it 192.168.1.103?

I would also like to give my box a name so that from my Windows boxes I can just search for a name. How do I do that?

Thanks for the information

pljvaldez 01-11-2007 08:13 PM

What linksys switch model are you using? Some of them allow for "static" DHCP (assign IP by MAC address) so that you could leave FC as DHCP but it would always get the same IP anyway.

There should be an option in the Network Settings dialog for static IP though (sorry, not much help on FC since I use Debian and I know networking is one of those things that's setup in completely different config files).

jborn 01-11-2007 09:33 PM

BEFSR41 V.2 The firmware version is 1.45.7, Jul 31 2003.

My guess is that the router is to old to support what you are talking about.

So any FC networking folks that know how to support this?

pljvaldez 01-12-2007 12:56 AM

I googled and found this.

Looks like you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0 to looks something like this
Code:

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0C:29:11:31:55
IPADDR=192.168.0.100
IPV6ADDR=
IPV6PREFIX=
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

Of course, change the network addresses to the correct subnet.

Good luck. If I'm wrong, I'll give you your money back... :D

jborn 02-02-2007 08:38 PM

That worked like a charm.. Thanks!


All times are GMT -5. The time now is 11:45 PM.