Re: [suse-linux-uk-schools] ifconfig
Dave
Where/how can I set the equivalent of "ifconfig eth0:1 x.x.x.x netmask etc" in Suse 8.0 yast.
As Roger has said, you cannot *do it* in YASt, but you can take what yast has done so far and modify it to get your old startup behaviour. Let us assume that you have set up the primary address for your card. Briefly, you need to investigate the contents of /etc/sysconfig/network. In there you will find ascii files relating to the card you have set up one address for using YaST (probably called ifcfg-eth0. This will contain lines like: IPADDR=10.0.0.104 NETMASK=255.255.255.0 BROADCAST=10.0.0.255 NETWORK=10.0.0.0 STARTMODE=onboot Look in the file ifcfg.template, where you will se the following advice ... # Multiple addresses (aka aliases) # There are several ways to assign more than one IP address to a network # interface. If you ever want to use YaST2 for this you should choose the # first possibility: # 1) one IP address per config file: # create multiple copies of your master config files and add ':<string>' to # the filenames of the copy. Prefer increasing number starting at 1. # 2) multiple IP addresses per config file: # You can extend the variable name 'IPADDR' by any string you like (IPADDR_1, That advice is slightly expanded in the man page for ifup. (I haven't continued the second section, as the first is what you need.) So all you do is copy your ifcfg-eth0 file to ifcfg-eth0:1 etc and then change the internal data to match your alias requirements. Happy hunting. Andrew -- ******************************************************************************** E-Mail: aray@computerpark.co.uk ********************************************************************************
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
Dave
Where/how can I set the equivalent of "ifconfig eth0:1 x.x.x.x netmask etc" in Suse 8.0 yast.
As Roger has said, you cannot *do it* in YASt, but you can take what yast has done so far and modify it to get your old startup behaviour. Let us assume that you have set up the primary address for your card. Briefly, you need to investigate the contents of /etc/sysconfig/network. In there you will find ascii files relating to the card you have set up one address for using YaST (probably called ifcfg-eth0. This will contain lines like:
IPADDR=10.0.0.104 NETMASK=255.255.255.0 BROADCAST=10.0.0.255 NETWORK=10.0.0.0 STARTMODE=onboot
Look in the file ifcfg.template, where you will se the following advice
Unless SuSE have changed things to resemble Red Hat in version 8 this will get you nowhere. Assuming they havn't Then you'd need instead to edit /etc/rc.config Such that you had something like NETCONFIG="_0 _1" IPADDR_0="10.3.48.80" IPADDR_1="1.0.0.1" NETDEV_0="eth0" NETDEV_1="eth0:0" IFCONFIG_0="10.3.48.80 broadcast 10.3.51.255 netmask 255.255.252.0 up" IFCONFIG_1="1.0.0.1 broadcast 1.255.255.255 netmask 255.0.0.0 up"
Mark On 2002.06.12 10:32 Mark Evans wrote:
Unless SuSE have changed things to resemble Red Hat in version 8 this will get you nowhere.
Assuming they havn't
They have. It works perfectly (but only in SuSE 8.0, which is where Mark is getting the problems). You don't need to run SuSEconfig, either. I *did* check that it worked before I posted the reply!
Then you'd need instead to edit /etc/rc.config
/etc/rc.config has now been split into sub-components in SuSE 8.0. The main file no longer supports the variables you list.
Such that you had something like
NETCONFIG="_0 _1"
IPADDR_0="10.3.48.80" IPADDR_1="1.0.0.1"
NETDEV_0="eth0" NETDEV_1="eth0:0"
IFCONFIG_0="10.3.48.80 broadcast 10.3.51.255 netmask 255.255.252.0 up" IFCONFIG_1="1.0.0.1 broadcast 1.255.255.255 netmask 255.0.0.0 up"
Your advice holds good for earlier versions, but the old version of YaST is present there anyway. Hope this helps. Andrew -- ******************************************************************************** E-Mail: aray@computerpark.co.uk Tel: +44 (0) 1536 417155 Fax: +44 (0) 1536 417566 Computer Park Ltd Broughton Grange Headlands Kettering Northamptonshire NN15 6XA ********************************************************************************
I wonder if anyone has a Firewall2 script I could look at which uses IPTables to forward port 25 from external IP to Internal IP addresses. Best wishes, Gareth Edmondson
participants (3)
-
Andrew Ray
-
Gareth Edmondson
-
Mark Evans