LinuxQuestions.org
Help answer threads with 0 replies.
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-24-2012, 07:12 PM   #1
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
IP address alias


I'm somewhat confused about setting an alias on an ethernet interface in /etc/rc.d/rc.inet1.conf.

I specify an alias as follows under the eth0 section:

Code:
# Config information for eth0:
IPADDR[0]="192.168.1.200"   # static address
NETMASK[0]="255.255.255.0"   # netmask
USE_DHCP[0]=""   # no dhcp
DHCP_HOSTNAME[0]=""   # no dhcp hostname     
IFNAME[0]="eth0:1"   # IP alias
I have two questions:

1) how do I specify an alternate IP address for the alias;

2) do I need to add a route for the alias?
 
Old 03-24-2012, 08:27 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
When you add IFNAME[0]="<name>", you tell the init script to configure interface <name> instead of the default interface for section 0, which is eth0.

If you want to give the alias eth0:1 an IP address, you should do so in the next interface section, like this:

Code:
IFNAME[1]="eth0:1"
IPADDR[1]="<ip address>"
NETMASK[1]="<netmask>"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
When an interface is assigned an IP address, a direct route is added to the routing table automatically, based on the address and netmask. You do not have to add a route manually.
 
1 members found this post helpful.
Old 03-25-2012, 10:40 AM   #3
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
That did the trick. Thank you.
 
  


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
[SOLVED] IP alias - SIOCSIFFLAGS: Cannot assign requested address yenn Slackware 3 11-15-2011 08:45 AM
Postfix Error: Address not found in virtual alias table medspec Linux - Newbie 3 09-08-2010 07:49 AM
Recipient address rejected: User unknown in virtual alias table Phiggy Linux - Server 6 11-08-2009 05:34 PM
Alias IP address kskkumar Linux - Networking 1 11-10-2005 04:48 PM
MAC Address spoofing on alias/secondary interface tara Linux - Networking 3 08-31-2005 09:22 PM

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

All times are GMT -5. The time now is 11:21 AM.

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