Hi james , thanks fro this help i also need the same thing , but i may have some more need if u can help a great appreciation . like i am using suse_10.1 iam having one eth0 and 2 different internet connections 1.Office 2.Home both are static ip now i write a shell script when i logged in to home or office so run the script and it make the Network entries accordingly . but every time i need to overwrite my "resolv.conf" and gateway entries which are very different for Home and Office . Example : Office : IP: 210.X.X.X gateway: 210.X.X.254 Primary NameServer : 220.X.3.X Secondary NameServer:220.X.4.X Home : IP:61.X.X.X gateway:61.X.X.254 PS:110.X.X.X SS:110.220.X.X So how can make this both entrie in suse and ever time i need not require to run a script like in REdhat we have a choice of making network profile and and once boot u can choose a network profile and corresponding entries are loaded auto. Do we have like for suse ???? let me know .. thanks for co-operation. -- ======================================================= With Best Regards Mr.Shailesh Bhutada(CTO) Web:www.comptrixsys.com Email::kernel.2k5@gmail.com :shailesh@cspl.com :shailesh_oss@redhat.com ========================================================= This Message is sent Via Qmail-smtpd@comptrixsys.com Server Suse 10.1 Linux Using Opera's e-mail client or Mozilla ThunderBird Mail Client. ========================================================= James Oakley wrote:
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,