LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to add / bind ip addresses to one box on slackware ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-add-bind-ip-addresses-to-one-box-on-slackware-52480/)

Mouse_103 03-30-2003 07:25 AM

how to add / bind ip addresses to one box on slackware ?
 
I have slackware box and my ISP gave me 16 ip addresses to use for my box.

wondering how to bind multi ip addresses on the slackware

so http server can use one ip and other service can use one diff ip.

Thanks.

Mouse

iphoting 03-30-2003 07:39 AM

U can do an alias

ifconfig --help shoud give you some idea.

Mara 03-30-2003 09:25 AM

For example:
ifconfig eth0:1 192.168.1.34

syntac 03-30-2003 12:11 PM

I have a server that I run that hosts multiple IPs and this is how I bind the IP addresses to my server. Since I only have one ethernet card, I have to create virtual hosts on eth0.

You can use ifconfig to add them to your network. In my /etc/rc.d/rc.local, I have the following (so it starts up and adds them everytime):

/sbin/ifconfig eth0:0 <ip> netmask <netmask> up
/sbin/ifconfig eth0:1 <ip> netmask <netmask> up
/sbin/ifconfig eth0:2 <ip> netmask <netmask> up
/sbin/ifconfig eth0:3 <ip> netmask <netmask> up

Where <ip> and <netmask> are the IP and netmask, respectively.


All times are GMT -5. The time now is 03:05 PM.