[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to change the IPs for a given NIC permanently ?

Dear All:

	Thank Lee Bradshaw & Hugo van der Merwe reply my questions so quickly, after taking a look at both files " /etc/init.d/network "
and " /etc/pcmcia/network.opts ", I still have the same questions about the IPs:

	1. In my " /etc/init.d/network " simply has two entries :

	    ifconfig lo
	    route add -net

	2. In my " /etc/pcmcia/network.opts " has following information :

	    case "$ADDRESS" in
	            # Use BOOTP [y/n]

	Well, I do use Lap-top to install Debian 2.1,  since the first time installation, I only use one network pc-card, and assign it an IP
address for my home-network, but now I insert the 2nd network pc-card to simulate an router ( sure I re-compile it as an router ).  As soon
as I rebooting the Linux, then I found both eth0, eth1 use the same IP ( witch assigned from the beginning ), at the same
time, I put this Linux router into a different network environment which have totally different subnet from the original home-network, one is
eth0 netmask ---> another eth1 netmask ---> , and given this router a default route " :

	|-------------------- | Linux ||

in order to change IPs to the different NICs, and modify its routing table, I issue following command:

ifconfig eth0 broadcast ....... netmask .......
route add -net netmask ...... eth0
ifconfig eth1 broadcast ....... netmask .......
route add -net netmask ...... eth0
route add default gw

of cause it will lost when the Linux have to reboot,  so, should I modify the /etc/init.d/network via inserting these commands or what to do
with the /etc/pcmcia/network.opts ?  which file is actually referenced during booting processes, or,  overwrite the configuration after
booting completely ?

	Finally, those information, such like hostname, domain name, dns, ..... etc., which files should to be modified ?

									Thanks !
									Nazareth Shu
									Jun. 7, 2000

Reply to: