How to change the permanent IP

How to change the permanent IP

Post by Joachim Wagne » Tue, 15 Jun 1999 04:00:00



Hey,

thanks for taking time for my problem.

I know i can change the ip after startup with ifconfig, but I want to
understand how the scripts in rc?.d are working.

Thanks for your help in advance...


 
 
 

How to change the permanent IP

Post by Peer Klerck » Tue, 15 Jun 1999 04:00:00



> I know i can change the ip after startup with ifconfig, but I want to
> understand how the scripts in rc?.d are working.

The IP address (I assume that's what you mean) is set by sysidnet(1) which
is called by /etc/rc2.d/S30sysid.net (at least on the Solaris7 machine I'm
on currently - can remember if it's true for older versions). To get a
feeling for what's going on, read the script and do a 'man sysidnet'.

Changing the IP adress is simple, though - but we'll leave that as an
assignment to you ;-)

--
Peer Klercke <peer(a)klercke.dk>
I represent myself.

 
 
 

How to change the permanent IP

Post by Joachim Wagne » Tue, 15 Jun 1999 04:00:00


Sorry,

the file /etc/.UNCONFIGURED doesnt exist, so /etc/rc2.d/S30sysid.net is
ignored

AND however, in this script a ifconfig auto-revarp is used.

Iam really sorry, i want to know from where the system gets the ip.
The system gets the hostname from /etc/hostname.le0, but from where the IP.
His IP appears only in /etc/hosts and in the the DNS-server-entrys.

Thanks for your knowledge


 
 
 

How to change the permanent IP

Post by Brian Gibso » Wed, 16 Jun 1999 04:00:00


You answered you're own question.  The system uses the hosts file to
determine what the address is.


> Sorry,

> the file /etc/.UNCONFIGURED doesnt exist, so /etc/rc2.d/S30sysid.net is
> ignored

> AND however, in this script a ifconfig auto-revarp is used.

> Iam really sorry, i want to know from where the system gets the ip.
> The system gets the hostname from /etc/hostname.le0, but from where the
IP.
> His IP appears only in /etc/hosts and in the the DNS-server-entrys.

> Thanks for your knowledge



 
 
 

1. Multiple NICs, IP changes permanent

Hi all,

I have three interfaces configured on my box, and each lives on a
different network:

# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.0.1 netmask ffffff00 broadcast 10.0.0.255
        ether 8:0:20:bd:ca:22
qfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 172.19.124.25 netmask ffffff00 broadcast 172.19.255.255
        ether 8:0:20:bd:ca:22
qfe1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 172.18.86.106 netmask ffffff00 broadcast 172.18.255.255
        ether 8:0:20:bd:ca:22

I want the host name to be the same on all networks.  I have placed an
entry for each in /etc/hosts:

#more /etc/hosts
127.0.0.1       localhost
10.0.0.1        ingot   loghost
172.19.124.25   ingot
172.18.86.106   ingot

And have created /etc/hostname.hme0, qfe0, and qfe1, each containing the
name "ingot."

When I reboot the machine, all settings for qfe0 and qfe1 are lost.  So I
wrote an rc script to force the issue and ifconfig plumb, ifconfig <int>
<net> <mask>, and ifconfig up each interface, and then add some static
routes.

During the boot sequence the machine complains about not being able to
assign addresses to qfe0 and qfe1.

I run a dozen machines with multiple ethernet interfaces, and some of
their configs stick with them through reboots, and some do not.  I thought
that the /etc/hostname.xxx was the trick, but it doesn't work on all
machines.  I can never tell for sure what black magic commands are the
ones that work.

I am just trying to add to my limited knowledge and get to the bottom of
this.

How can I make the above changes stick through reboots?

Thanks.

2. How much space left on my HD?

3. Permanent IP address change in 2.5

4. KT266A - Install

5. Linux permanent Line (connection two linux machines over a leased line (permanent telephone line)

6. Linux-activists

7. ifconfig: no permanent change

8. Audio CD won't play under RH 6.1

9. make mtab change permanent

10. RedHat 9.0 - Making 'route' changes permanent

11. Keycode mapping - permanent change

12. Are changes made with "route" and "ifconfig" permanent?

13. Making X changes permanent