Fedora Linux Support Community & Resources Center
  #1  
Old 7th November 2011, 11:26 AM
carenamina Offline
Registered User
 
Join Date: Oct 2011
Location: tunisia
Posts: 16
windows_xp_2003chrome
changing IP address

Hello,

i use Fedora8, i tried to change the IP address of my system

ifconfig eth0 192.168.1.4 netmask 255.255.255.0 works well

but i want to change it through the file /etc/sysconfig/network-scripts/ifcfg-eth0

this file contains

DEVICE=eth0
BOOTPROTO=dhcp
HWADDR= ......
ONBOOT=yes
DHCP HOSTNAME=poste1

i tried to change it to


DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
HWADDR=....
IPADDR=192.168.1.4
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
GATEWAY=192.168.1.1
TYPe=ethernet
IPV6INIT=no


but it does not work
the ip address doesn't change when i try to modify it through this file

Can you help me
Thanks

Last edited by carenamina; 7th November 2011 at 11:35 AM.
Reply With Quote
  #2  
Old 7th November 2011, 03:02 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 4,976
linuxfirefox
Re: changing IP address

Stevea has commented that nowadays, there are some other files affected as well. Therefore, one way to do it is to use the tool system-config-network-tui (If not installed, you can install it with yum install system-config-network-tui)


Then, you can set the address there. Once you've done that, you might want to manually check ifcfg-eth0, because sometimes that tool sets NM_CONTROLLED=yes (that is, controlled by networkmanager) and onboot=no.

If it does either or both of those, you can manually edit it in that file.
Reply With Quote
  #3  
Old 7th November 2011, 03:22 PM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118
linuxfirefox
Re: changing IP address

Also, after you've made any manual edits to /etc/sysconfig/network-scripts/ifcg-*, and you're using "network" service rather than "NetworkManager" service, you need to..
Code:
# service network restart
to make the changes the current values.
Reply With Quote
  #4  
Old 7th November 2011, 06:24 PM
carenamina Offline
Registered User
 
Join Date: Oct 2011
Location: tunisia
Posts: 16
windows_xp_2003firefox
Re: changing IP address

Quote:
Code:
# service network restart
Yes it works well now

Thanks a lot fo all

---------- Post added at 07:24 PM ---------- Previous post was at 05:19 PM ----------

Just a question if possible

i used this configuration into two virtual machines
the first machine's IP is 192.168.1.5
and the second one is 192.168.1.4

when trying to ping 192.168.1.5 from the other one i find "Destination Host unreachable"
Can this problem be made by the configuration of the file /etc/sysconfig/network-scripts/ifcfg-eth0 ???
Reply With Quote
  #5  
Old 7th November 2011, 06:29 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,094
linuxfedorafirefox
Re: changing IP address

Doesn't work. The VMs are behind a NAT, and as yet, support for non-NAT operation isn't available by the normal means.

I understand it can be setup, but requires a bridge network+alternate interfaces for the VMs.

And I haven't done it myself.
Reply With Quote
  #6  
Old 7th November 2011, 07:10 PM
carenamina Offline
Registered User
 
Join Date: Oct 2011
Location: tunisia
Posts: 16
windows_xp_2003firefox
Re: changing IP address

Ok thanks a lot for help
Reply With Quote
Reply

Tags
address, changing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
changing IP address problems: need some help? EUSEBIUS Servers & Networking 1 10th May 2008 06:44 AM
ip address keeps changing chud Servers & Networking 7 25th January 2006 01:51 AM
Changing the MAC address in FC4 monjur Using Fedora 7 11th September 2005 10:48 AM


Current GMT-time: 16:18 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat