On Friday 15 September 2006 4:10 pm, Bacchu, Anjan wrote:
Hi All,
Thanks for any pointers.
On Suse 9.3(CONSOLE only, no GUI), what are the steps needed to add multiple IP addresses to the NIC ?
Previously, while using Redhat (not Fedora), we used to
a) make a copy of ./etc/sysconfig/network-scripts/ifcfg-eth0
b) rename the copy to ./sysconfig/network-scripts/ifcfg-eth01
c) edit the contents of the new file and
d) reboot
This is easier in SUSE. From /etc/sysconfig/network/ifcfg.template: ## Multiple addresses ## You can extend the variable name 'IPADDR' by any string you like (IPADDR_1, ## IPADDR_FOO, IPADDRxxx, ...) and use these variables for your IP addresses. ## If you need some additional parameters for these addresses, then just add ## the same extension to these variable names. ## IPADDR_AAA=1.2.3.4 ## NETMASK_AAA=255.0.0.0 ## BROADCAST_AAA=1.2.3.55 ## IPADDR_BBB=10.10.2.3/16 ## LABEL_BBB=BBB ## an so on ... ## ## You do not need to set a label for any address. But then you should not use ## ifconfig any longer; go and use ip. If you want to use ifconfig then omit the ## label for your main address and set a label for every additional address. So you simply need to edit the /etc/sysconfig/network/ifcfg-eth-id-<mac> file and add the addresses. I usually specify only IPADDR for each additional entry in cidr format like so: IPADDR_FOO='10.1.1.1/24' IPADDR_BAR='192.168.1.1/24' Once you save the file, there's no need for a reboot. You can do one of the following: ifdown <devicename> ; ifup <devicename> or rcnetwork restart Hope that helps, -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org