SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to add a second IP address "alias" to my NIC. Running this as root works fine every time:
/sbin/ifconfig eth0:1 inet 69.41.0.59 broadcast 69.41.0.63 netmask 255.255.255.192 up
However, when I reboot it, the setting gets lost. So, I did some searching around, and thought I could add that line to the bottom of /etc/rc.d/rc.local
No dice.
However, if I call that script manually after I SSH in, it does run that line.
Instead of using the Eth0[alias] function in /etc/rc.d/rc.inet1.conf, just add your command verbatim to /etc/rc.d/rc.inet1
I think what's happening is that rc.local is being called before your interface is initialized to begin with -- can't assign an alias if the interface isn't up.
Plus, it makes for a cleaner system if you have all your network related configurations within one script. You can add your command to the end of rc.inet1 below a comment, such as "#eth0 alias"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.