how to re-IP the machine without reboot in Linux 7.2

how to re-IP the machine without reboot in Linux 7.2

Post by Hung Ngoc La » Mon, 17 Dec 2001 04:32:42



Hi eveyone,

I have two PCs running Redhat Linux.  Machine A runs
Redhat Linux 7.1 and machine B runs Redhat Linux 7.2.
On Machine A, whenever I need to change the IP
address, I just modify the following files:

1) /etc/sysconfig/network (modify the default gatewway),
2) /etc/sysconfig/network-scripts/ifcfg-eth0 (in this file,
I just modify the IP address, broadcast, network, etc),
3) modify the /etc/resolv.conf (to point it to a different
DNS server.  This is optional)

After making all the necessary changes, I just execute
the following command from root:  "service network restart"

That will do the trick.  When I run the command "netstat -rn"
and "ifcfg eth0", I can see that the machine now has a
new IP address and a new default gateway.

I try to do the same thing on machine B (which runs
Redhat Linux 7.2).  The "service network restart"
successfully executed; however, it still retains the old
IP address and the old default gateway.  It will work
if I reboot the machine.  This gets me thinking: Is
RedHat Linux 7.2 behaved more like Microsoft
Winblows?  How can I re-IP my linux box without
a reboot?  Please help.  Thanks.

David

 
 
 

how to re-IP the machine without reboot in Linux 7.2

Post by Jack Palmadess » Mon, 17 Dec 2001 05:18:56



> Hi eveyone,

> I have two PCs running Redhat Linux.  Machine A runs
> Redhat Linux 7.1 and machine B runs Redhat Linux 7.2.
> On Machine A, whenever I need to change the IP
> address, I just modify the following files:

> 1) /etc/sysconfig/network (modify the default gatewway),
> 2) /etc/sysconfig/network-scripts/ifcfg-eth0 (in this file,
> I just modify the IP address, broadcast, network, etc),
> 3) modify the /etc/resolv.conf (to point it to a different
> DNS server.  This is optional)

> After making all the necessary changes, I just execute
> the following command from root:  "service network restart"

> That will do the trick.  When I run the command "netstat -rn"
> and "ifcfg eth0", I can see that the machine now has a
> new IP address and a new default gateway.

> I try to do the same thing on machine B (which runs
> Redhat Linux 7.2).  The "service network restart"
> successfully executed; however, it still retains the old
> IP address and the old default gateway.  It will work
> if I reboot the machine.  This gets me thinking: Is
> RedHat Linux 7.2 behaved more like Microsoft
> Winblows?  How can I re-IP my linux box without
> a reboot?  Please help.  Thanks.

> David

Have you tried using "ifconfig"
--
From the SuSE 7.3 Desktop Of ME!!

 
 
 

how to re-IP the machine without reboot in Linux 7.2

Post by Bit Twist » Mon, 17 Dec 2001 05:49:28



> Hi eveyone,

> I try to do the same thing on machine B (which runs
> Redhat Linux 7.2).  The "service network restart"
> successfully executed; however, it still retains the old
> IP address and the old default gateway.  It will work
> if I reboot the machine.  This gets me thinking: Is
> RedHat Linux 7.2 behaved more like Microsoft

If you do a    locate eth0     you will find a few new
files which might help explain what you see.
 
 
 

how to re-IP the machine without reboot in Linux 7.2

Post by ToZ » Mon, 17 Dec 2001 05:54:57





>> Hi eveyone,

>> I try to do the same thing on machine B (which runs Redhat Linux 7.2).
>> The "service network restart" successfully executed; however, it still
>> retains the old IP address and the old default gateway.  It will work
>> if I reboot the machine.  This gets me thinking: Is RedHat Linux 7.2
>> behaved more like Microsoft

> If you do a    locate eth0     you will find a few new files which might
> help explain what you see.

I've run into the same problem with my laptop. 'locate eth0' does not
reveal any new files. Instead of rebooting, I currently 'init 1' , make
changes, 'init 5'. I guess we will need to directly manipulate using the
ifconfig and route commands (as well as manually copying over
/etc/resolv.conf). This is my next test.

[ ToZ ]

 
 
 

how to re-IP the machine without reboot in Linux 7.2

Post by Bit Twist » Mon, 17 Dec 2001 06:36:28



>> If you do a    locate eth0     you will find a few new files which might
>> help explain what you see.

> I've run into the same problem with my laptop. 'locate eth0' does not
> reveal any new files. Instead of rebooting, I currently 'init 1' , make

locate eth0
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/networking/devices/ifcfg-eth0
/etc/sysconfig/networking/profiles/default/ifcfg-eth0

Humm, maybe I ran something which created /default/ .
Guess I will have to follow the code in
/etc/sysconfig/network-scripts/ifup

 
 
 

how to re-IP the machine without reboot in Linux 7.2

Post by Plasm » Mon, 17 Dec 2001 15:54:38


You don't need to restart the computer, just the networking interface.  
While I don't know the exact command lines, RH7.1 and probably RH7.2's
networking configuration programs allow you to deactivate and activate
interfaces.  If once you have chosen to change IPs, you restart the
interfaces in that way, then I expect that should change the IPs for them.

--
GCS/J d s+:-- a--- C++++ UL++++S+ P+ L+++(++)>+++++$ E---- W++ N+ o? K?
w+>--- O !M-- V-- PS+(-) PE- Y-- PGP- t+>++ 5>+ X R>+ tv+ b++(+++)
DI++++ D++ G e>+++ h! r-- y?

 
 
 

how to re-IP the machine without reboot in Linux 7.2

Post by Dean Thompso » Tue, 18 Dec 2001 14:08:02


Hi!,


> You don't need to restart the computer, just the networking interface.
> While I don't know the exact command lines, RH7.1 and probably RH7.2's
> networking configuration programs allow you to deactivate and activate
> interfaces.  If once you have chosen to change IPs, you restart the
> interfaces in that way, then I expect that should change the IPs for them.

A combination of ifup and ifdown scripts should be enough to bring the
interface up and down with the correct IP address.

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

 
 
 

1. how to re-IP a linux machine without reboot

I am hoping that I might get a specific answer this time around.
My problem is that whenever I change the IP address on my Laptop
Amarda M700 running RedHat 7.2 (machine A), I have to reboot
the machine.  I have another laptop (machine B) running
Redhat 7.1 that whenever I change the IP address, I don't have to
reboot the machine for it to take effect.  Here is what I do to
both laptops:

1) modify the /etc/sysconfig/network file (default gatewaway),
2) modify the /etc/sysconfig/network-script/ifcfg-eth0 file,
3) modify the /etc/resolv.conf (since I am at home),
4) run the "service network restart"

It works on Redhat 7.1 but not on Redhat 7.2.  Furthermore, it
even works on Redhat 7.0 (my desktop).  Can someone tell me what
I am doing wrong on Redhat 7.2?  From what I know, there isn't much
difference between 7.1 and 7.2.  And please don't tell me to use
the "ifconfig" command, I like the "service" command.  Also, please
don't tell me about using DHCP (don't like doing that either).  I
just need to know if there are other files in RedHat 7.2 that I
need to modify in order for the "service network restart" to work.
Many thanks..
David

2. FVWM2-95 and seyon

3. Yggdrasil Fall 1994 problems

4. How to re-IP the machine without reboot?

5. Help with Xconfig

6. RH 7.2 changing IP without reboot

7. How to install kernel 2.2 under RH 5.2

8. How to free up hung TCP/IP ports without rebooting machine

9. Setting IP of my linux without reboot

10. Changing Ethernet IP address without rebooting Linux server

11. adding a EMC lun to sun machine without reboot

12. Need to change my domain of machine without rebooting