 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

18th May 2012, 04:59 AM
|
|
Registered User
|
|
Join Date: Feb 2012
Location: Hong Kong
Posts: 26

|
|
static ip with Fedora 16 minimal install
Hi all,
I have installed Fedora 16 in text mode. I prefer Fedora using a static ip. I have done the fellowing steps :
1) edit /etc/sysconfig/network-scipts/ifcfg-eth0
PHP Code:
HWADDR=00:01:02:03:04:05
TYPE=Ethernet
NAME="Static Ethernet"
DEVICE=eth0
UUID=5fb16bd2-3bb4-7ffb-45f1-d6edd65f3e53
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.1.191
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
DNS1=1.2.3.4
DNS2=2.3.4.5
2) service network restart
3) ifdown eth0; ifup eth0
The result is what I want!
However, when the machine is rebooted, the ip is using the DHCP (eg 192.168.1.100), I have to run [ ifdown eth0; ifup eth0 ] in order the ip is 192.168.1.191!
Can someone suggest what's wrong?
|

18th May 2012, 06:17 AM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Detroit
Posts: 4,722

|
|
|
Re: static ip with Fedora 16 minimal install
I'm not sure if you need the UUID line. Also, try adding the following lines:
Code:
NM_CONTROLLED="no"
USERCTL="no"
Make sure the network service is enabled and started, using these commands (as root):
Code:
systemctl enable network.service
systemctl start network.service
You can check the status of the network service with this command:
Code:
systemctl status network.service
If all that doesn't work then try uninstalling NetworkManager, which in my experience can be flaky with static IPs.
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
|

18th May 2012, 07:43 AM
|
|
Registered User
|
|
Join Date: Feb 2012
Location: Hong Kong
Posts: 26

|
|
|
Re: static ip with Fedora 16 minimal install
ths RupertPupkin ,
I have tried to append
NM_CONTROLLED
USERCTRL
to ifcfg-eth0
it doesnt help
I am sure network service is running correctly.
But still , I have to restart the eth0 before the static ip works after each reboot.
ps:
In minimal installation, NetworkManager is not installed in default
|

18th May 2012, 02:51 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 5,019

|
|
|
Re: static ip with Fedora 16 minimal install
In other posts, stevea has pointed out that there are various and sundry files affected by network--for better or worse, I have no idea, but at any rate, his recommendation which I follow in Fedora is to install system-config-network (or system-config-network-tui if you don't want X) and use that. It apparently writes properly to all the necessary files.
I haven't had to do this in RHEL6.x and its clones, but in Fedora I have--more accurately, I tried on a Fedora, say, 13 or 14, it didn't work, and I said the heck with it and used system-config-tui. (Without doublechecking had I mistyped something or any other research).
|

18th May 2012, 03:20 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150

|
|
|
Re: static ip with Fedora 16 minimal install
Not all the files used by NetworkManager are documented.
If you want it to work reliably (and have some VMs to boot) disable NetworkManager, and enable network.
This will use the files properly.
Network manager seems to only work with wireless in a reliable manner.
|

18th May 2012, 04:39 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 5,019

|
|
|
Re: static ip with Fedora 16 minimal install
I didn't even mean with NetworkManager.
Actually, with system-config-tui (not sure about the GUI version) it leaves the file controlled by NM. I have to, after running the tool, manually change NM_CONTROLLED to no.
I believe the plan is to eventually make NM the drop in network tool. Judging from these forums however, it seems that my avoidance of it helps me avoid many issues.
|

18th May 2012, 06:47 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150

|
|
|
Re: static ip with Fedora 16 minimal install
It used to work fairly well, in Fedora 14, with warnings about using it when running VMs (and it sucked there)
While testing F16 I found it would not setup the network properly if you had two network interfaces (one internal, one DHCP -once it screwed up the default route it would not reset it), not to mention still not working properly with VMs (it seemed to be even worse).
Since I use VMs to test distributions that made it totally unusable.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 13:06 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|