LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-26-2005, 03:53 PM   #1
rspivack
LQ Newbie
 
Registered: Sep 2005
Posts: 3

Rep: Reputation: 0
how to config IP alias


I would like to configure multiple IP addresses on a single NIC for name-based hosting.

How do I setup IP alias (or equivalent) network configuration for Fedora Core 3 distro?
 
Old 09-26-2005, 04:45 PM   #2
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
Re: how to config IP alias

Quote:
Originally posted by rspivack
I would like to configure multiple IP addresses on a single NIC for name-based hosting.

How do I setup IP alias (or equivalent) network configuration for Fedora Core 3 distro?
You configure aliases just like a normal interface. You just add a ":" prefix and a number to the interface name.

e.g
ifconfig eth0 192.168.0.2 up (Real interface)
ifconfig eth0:1 192.168.5.2 up (alias)
ifconfig eth0:45 172.16.1.1 (alias)
.
.
.
 
Old 09-26-2005, 06:10 PM   #3
rspivack
LQ Newbie
 
Registered: Sep 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Re: Re: how to config IP alias

Do I need "route" commands? In some examples I've seen that, in others none.

Is eth0:0 different from eth0 ? Should I skip using using eth0:0 ?

Some references I've seen said IP aliases is deprecated and to use IPtables? Is that correct or wrong?

Quote:
Originally posted by imitheos
You configure aliases just like a normal interface. You just add a ":" prefix and a number to the interface name.

e.g
ifconfig eth0 192.168.0.2 up (Real interface)
ifconfig eth0:1 192.168.5.2 up (alias)
ifconfig eth0:45 172.16.1.1 (alias)
.
.
.
 
Old 09-26-2005, 11:25 PM   #4
javaroast
Member
 
Registered: Apr 2005
Posts: 131

Rep: Reputation: 19
Use the IP addr command:

ip addr add 192.168.1.5/24 dev eth0
ip addr add 192.168.2.1/24 dev eth0

These are the ip route2 commands and not IP Tables.
 
Old 09-27-2005, 01:20 PM   #5
rspivack
LQ Newbie
 
Registered: Sep 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Are these transient commands or do they update the configuration files to remain active after a reboot?

Quote:
Originally posted by javaroast
Use the IP addr command:

ip addr add 192.168.1.5/24 dev eth0
ip addr add 192.168.2.1/24 dev eth0

These are the ip route2 commands and not IP Tables.
 
Old 09-27-2005, 06:07 PM   #6
javaroast
Member
 
Registered: Apr 2005
Posts: 131

Rep: Reputation: 19
IP Alias

They are transient, you'll have to load them at boot time by editing your distro's respective config files or adding the commands to load at boot.
 
  


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
Alias question (2 commands for one alias) gflores Linux - Newbie 3 01-21-2006 12:40 AM
alias help jfauteux Linux - Software 3 04-08-2005 12:56 PM
"modprobe config already contains alias directive", must reconfigure at restart Desert Linux - Wireless Networking 1 07-22-2004 07:43 PM
Alias ChimpFace9000 Linux - General 9 01-14-2004 04:01 AM
ip alias mindcry Linux - Networking 0 10-16-2003 07:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:14 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