I am not quite familir with Fedora's layout but most likely it would be /etc/sysconfig/network.
HTH,
Hello.
Currently I have Fedora 10 installed on my machine. This machine is on my LAN which has a few other computers. During the OS install I opted out for a dynamic IP via DHCP but now I want to change the setup and set a static IP for just this particular machine -- all others still use dynamic IPs.
I've done some reading and I think I can accomplish this by setting an IP address which is outside of my router's DHCP address range. This way all other devices will still get dynamic IPs from the range and this Fedora machine will get a static one with no conflicts.
My issue is how to get this set using the command line -- I don't want to use the GUI.
I am not quite familir with Fedora's layout but most likely it would be /etc/sysconfig/network.
HTH,
Ce-GNU-LUG
The file you want is:
/etc/sysconfig/network-scripts/ifcfg-eth0
where "eth0" is most likely the name of your device
Here are the contents you want to set:
then this command as root:Code:ONBOOT=yes BOOTPROTO=none IPADDR=XXX.XXX.XXX.XXX NETMASK=XXXX.XXX.XXX.XXX
Quick explanation:Code:service networking restart
ONBOOT=yes => Make the interface come up on system boot
BOOTPROTO=none => don't use any dynamic addressing schemes
IPADDR => set this to your desired IP address
NETMASK => set this to your netmask (make sure that it will allow the other machines in your DHCP poll and vis-versa)
Typically, Fedora will also have a HWADDR=XX:XX:XX:XX:XX:XX line in there too, so you can leave that in there as well, but it probably won't be necessary.
Hope this helps!
63,000 bugs in the code, 63,000 bugs,
ya get 1 whacked with a service pack,
now there's 63,005 bugs in the code!!
Bookmarks