LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 12-07-2013, 03:47 AM   #1
kenw232
Member
 
Registered: May 2006
Posts: 44

Rep: Reputation: 0
Assign multiple IPs to eth0?


How do I assign multiple IP's to eth0? I edited rc.inet1.conf and did this:

# Config information for eth0:
IPADDR[0]="202.11.193.114"
NETMASK[0]="255.255.255.240"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

# Alias
IPADDR[1]="202.11.193.116"
NETMASK[1]="255.255.255.240"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]="202.11.193.117"
NETMASK[2]="255.255.255.240"
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

GATEWAY="202.11.193.113"


202.11.193.114 still works and is assigned to eth0 and is pingable, but the other two are not. This is under slackware 14.1. Linux central 3.10.18 #11 SMP Wed Dec 4 22:07:20 EST 2013 x86_64.

Last edited by kenw232; 12-07-2013 at 04:25 AM.
 
Old 12-07-2013, 03:59 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Its been a while since I used Slackware, but I do believe you need to add IFNAME[A]="ethX:Y"

eth0 is short for eth0:0 and if you want to add multiple IP addresses to this device you use: eth0:1, eth0:2 etc

Looking at the above, try this:
Code:
# Config information for eth0:
IFNAME[0]="eth0"
IPADDR[0]="202.11.193.114"
NETMASK[0]="255.255.255.240"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

# Alias for extremehosting.ca (eth0:1)
IFNAME[1]="eth0:1"
IPADDR[1]="202.11.193.116"
NETMASK[1]="255.255.255.240"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IFNAME[2]="eth2"
IPADDR[2]="202.11.193.117"
NETMASK[2]="255.255.255.240"
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""
 
  


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
Redhat 7 what file is being used to assign my multiple IPs? TooSlow Linux - Networking 3 10-24-2007 11:35 AM
Howto assign multiple ip addresses to eth0 in Mandrake 10???? tictocdoc Mandriva 3 05-07-2004 03:00 PM
howto delete existing static ip of ethernet(eth0)& reconf multiple ips on eth0 viveku Linux - Networking 2 02-02-2004 01:30 AM
eth0:9 incorrect IPs ,and eth0 not IPs WannaLearnLinux Linux - Networking 10 10-26-2003 08:50 PM
Multiple IPs on eth0, 2 of them stopped working? jeromio Linux - Networking 0 04-20-2001 08:20 AM


All times are GMT -5. The time now is 07:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration