how to change ip address static dynamic Linux Fedora Core Red Hat
RegisterLogin
how to change ip address static dynamic Linux Fedora Core Red Hat
Post Description: how to change ip address static dynamic Linux Fedora Core Red Hat
Tags: how, to, change, ip, address, static, dynamic, Linux, , Fedora, Core, Red, Hat
This Post Was Posted On Feb 29, 2008 By web hosting #2185
Post Description: how to change ip address static dynamic Linux Fedora Core Red Hat
Tags: how, to, change, ip, address, static, dynamic, Linux, , Fedora, Core, Red, Hat
This Post Was Posted On Feb 29, 2008 By web hosting #2185
how to change ip address static dynamic Linux Fedora Core Red Hat by web hosting
these are the steps i took to make it happen
1. login as root
2. get your current IP address with this command:
ifconfig
The OUTPUT will look someting like this:
[root@host ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:D0:BC:08:09:BC
inet addr:70.238.17.69 Bcast:255.255.255.255 Mask:255.255.255.248
inet6 addr: fe80::2d0:b7ff:fe08:9bb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7174 errors:0 dropped:0 overruns:0 frame:0
TX packets:2305 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5339910 (5.0 MiB) TX bytes:170109 (166.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4275 (4.1 KiB) TX bytes:4275 (4.1 KiB)
eth0 Link encap:Ethernet HWaddr 00:D0:BC:08:09:BC
inet addr:70.238.17.69 Bcast:255.255.255.255 Mask:255.255.255.248
inet6 addr: fe80::2d0:b7ff:fe08:9bb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7174 errors:0 dropped:0 overruns:0 frame:0
TX packets:2305 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5339910 (5.0 MiB) TX bytes:170109 (166.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4275 (4.1 KiB) TX bytes:4275 (4.1 KiB)
OR you can also get the ip from the network configuration file wit this command:
COMMAND to show configuration:
cat /etc/sysconfig/network-scripts/ifcfg-eth0
THe OUTPUT will look like this (i have it set to DHCP)
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:D0:B7:08:09:BB
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=00:D0:B7:08:09:BB
ONBOOT=yes
OUTPUT for static IP (example)
#
# File: ifcfg-eth0
#
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
#
# The following settings are optional
#
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
# File: ifcfg-eth0
#
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
#
# The following settings are optional
#
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
3. Ok, on step 3 we are going to change from DHCP to static ip. so send this command to edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file: (im using nano, but you can use vi if you want)
nano /etc/sysconfig/network-scripts/ifcfg-eth0
Change from this:
# Intel Corporation 82557/8/9 [Ethernet Pro 100]
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:D0:B7:08:09:BB
ONBOOT=yes
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:D0:B7:08:09:BB
ONBOOT=yes
TO this:
# File: ifcfg-eth0
#
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.248
BOOTPROTO=static
ONBOOT=yes
#
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.248
BOOTPROTO=static
ONBOOT=yes
4. now save your changes and reboot your server.
Leave Your Comments
saban
#3275 1
اختيار ip في فيدورا
Jan 18, 2010 Reply Report abuse
famore
#2656 2
very useful steps for changing ip address in fedora linux
Oct 26, 2009 Reply Report abuse
amjad
#2256 3
i am able to change my ip address but not being able to reach my network
Jul 21, 2009 Reply Report abuse
interface
#2255 4
yeah, its better to just restart the network instead of rebooting the machine. thanks for your tutorial. helped me alot
Jan 22, 2008 Reply Report abuse
spen
#2254 5
this is very helpful!
i would like to comment that you can restart the network service instead of rebooting..
on fedora.. /etc/init.d/network restart
:)
i would like to comment that you can restart the network service instead of rebooting..
on fedora.. /etc/init.d/network restart
:)
Sep 20, 2007 Reply Report abuse
hostman
#2253 6
thanks, that was much easier.
Jul 09, 2007 Reply Report abuse
apco
#2252 7

now populate the fields according to your new ip address and save.
then reboot your server with this command:
reboot
Jul 09, 2007 Reply Report abuse
apco
#2251 8

next, you will see a select device. if you have only one nic on your computer, you will only see one, but if you have more than one nic, you will see more. so now select the interface you want to change the ip for, you select the device with your arrows until the device you want is highlighted in red, then hit ENTER on your keyboard.
Jul 09, 2007 Reply Report abuse
apco
#2250 9
yeah, this is how you do it.
first send this command:
and you will see something like this picture. using your arrows, select Network Configuration and hit the ENTER key on your keyboard

first send this command:
setup
and you will see something like this picture. using your arrows, select Network Configuration and hit the ENTER key on your keyboard

Jul 09, 2007 Reply Report abuse
hostman
#2249 10
cool, can you show you me how to do that!
Jul 09, 2007 Reply Report abuse
apco
#2248 11
you know what, i followed your steps, but they didn't work. i think its just easier if you doit through the setup command
Jul 09, 2007 Reply Report abuse
Leave Your Comments...
©2011 Webune Forums - Sun Dec 18, 2011 9:17 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3