LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-04-2004, 05:22 AM   #1
Anibal
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Slack/Ubuntu & OpenBSD (not a linux distro)
Posts: 56

Rep: Reputation: 15
Where to add ip aliases on configuration on boot


Where can i add ip aliases on my configuration on the boot process ?
 
Old 03-04-2004, 06:35 AM   #2
OdieQ
Member
 
Registered: Jan 2004
Location: Stockholm, Sweden
Distribution: Debian, Slackware
Posts: 71

Rep: Reputation: 15
/etc/rc.d/rc.inet1

If you are using Slackware 9.1, the network configuration is split up into two files, rc.inet1 and rc.inet1.conf. Unfortunately, these do not support multiple ip addresses per interface, so you will have to muck about in rc.inet1, just as you will in earlier Slackware versions.

Edit /etc/rc.d/rc.inet1 and add the relevant ifconfig directives there, preferably alongside the already present ifconfigs.

/Odie
 
Old 03-04-2004, 01:07 PM   #3
dbauder
LQ Newbie
 
Registered: Oct 2003
Distribution: Slackware-Current
Posts: 12

Rep: Reputation: 0
There should be a line in /etc/rc.d/rc.inet1 that looks something like this:
Code:
/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
You can add a line under that with something like this:
Code:
/sbin/ifconfig eth0:0 [put 2nd IP here] broadcast [put broadcast here] netmask [put netmask here]
If you needed another IP you can add another line, just make the interface eth0:1 and so on.
 
Old 03-06-2004, 09:34 AM   #4
Qzukk
Member
 
Registered: Jun 2003
Posts: 132

Rep: Reputation: 15
(please specify distributions when asking configuration questions)

In Debian, and probably other major distributions, network addresses are controlled through the /etc/network/interfaces file. Just add:
auto ethx:y # (where x is the card # and y is the alias number)
iface ethx:y inet static # if this is dhcp, change static to dhcp and leave the rest out
address 555.555.555.555
netmask 255.255.255.0
network 555.555.555.0
broadcast 555.555.555.255

You can then use "ifup ethx:y" to test this, and the auto line indicates that it will be run on boot.
You should probably not DHCP for more than one alias, as you'll just confuse the DHCP server.
 
Old 03-09-2004, 02:37 AM   #5
Anibal
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Slack/Ubuntu & OpenBSD (not a linux distro)
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Qzukk
(please specify distributions when asking configuration questions)

In Debian, and probably other major distributions, network addresses are controlled through the /etc/network/interfaces file. Just add:
auto ethx:y # (where x is the card # and y is the alias number)
iface ethx:y inet static # if this is dhcp, change static to dhcp and leave the rest out
address 555.555.555.555
netmask 255.255.255.0
network 555.555.555.0
broadcast 555.555.555.255

You can then use "ifup ethx:y" to test this, and the auto line indicates that it will be run on boot.
You should probably not DHCP for more than one alias, as you'll just confuse the DHCP server.

Hallo can you read ???? this is the slackware forum !! so this is a slackware question....
Slackware > Where to add ip aliases on configuration on boot
 
Old 03-09-2004, 03:09 AM   #6
Anibal
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Slack/Ubuntu & OpenBSD (not a linux distro)
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by dbauder
There should be a line in /etc/rc.d/rc.inet1 that looks something like this:
Code:
/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
You can add a line under that with something like this:
Code:
/sbin/ifconfig eth0:0 [put 2nd IP here] broadcast [put broadcast here] netmask [put netmask here]
If you needed another IP you can add another line, just make the interface eth0:1 and so on.
It doesn't work :-( here is a sample of my /etc/rc.d/rc.inet1 file:

/sbin/ifconfig eth${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}
/sbin/ifconfig eth0:0 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0

My eth0 work on DHCP
 
Old 03-09-2004, 03:21 AM   #7
r1w1s1
Member
 
Registered: Mar 2004
Location: São Paulo - Brazil
Distribution: Slackware
Posts: 57
Blog Entries: 1

Rep: Reputation: 34
put these information in /etc/rc.d/rc.local:

/sbin/ifconfig eth0:0 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0

/sbin/ifconfig eth0:1 192.168.2.1 broadcast 192.168.1.255 netmask 255.255.255.0


Regards,
Ricardson
 
Old 03-09-2004, 03:45 AM   #8
Anibal
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Slack/Ubuntu & OpenBSD (not a linux distro)
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by ricardson
put these information in /etc/rc.d/rc.local:

/sbin/ifconfig eth0:0 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0

/sbin/ifconfig eth0:1 192.168.2.1 broadcast 192.168.1.255 netmask 255.255.255.0


Regards,
Ricardson
Thanks !! this works better !!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to export stuff and add aliases in bash MalachiX Linux - Newbie 2 03-21-2005 06:33 PM
add to boot usa1234 Debian 1 10-09-2004 06:39 PM
Add to boot loader oscarp Linux - Newbie 9 09-22-2004 11:15 AM
how to add modprobe at boot whitecloud1 Fedora 3 08-27-2004 05:29 AM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration