Re: IP Aliasing
On Fri, 19 Dec 1997 tps@major.pita.org wrote:
>On Dec 19, tps@major.pita.org wrote
>> I just threw together a page on IP Aliasing, since it seems to be a
>> topic more and more. If someone more knowledgeable than I could take
>> a look at it, I would appreciate it.
>
>Heh. Oops! I guess telling you where to look would be even better!
>It's off my ISP page http://www.buoy.com/isp
You might note that the procedure for Red Hat Linux 4.2 is as follows
(I haven't installed 5.0 yet, so I don't know how it differs):
1. Use your favorite method to recompile your kernel. Answer Y to
CONFIG_NET_ALIAS and CONFIG_IP_ALIAS. Install the new kernel and
reboot.
2. Create a new network interface configuration file for the interface
alias. The easiest way is to copy an existing configuration file.
The name of the new configuration file should reflect the name of
the interface alias.
For instance, if you are creating an alias on the zero'th ethernet
interface, eth0, copy the eth0 configuration file:
cd /etc/sysconfig/network-scripts
cp -p ifcfg-eth0 ifcfg-eth0:0
This will create a file in /etc/sysconfig/network-scripts named
ifcfg-eth0:0. The name reflects the file's role: to configure the
zero'th alias on the zero'th ethernet interface.
3. Using your favorite editor, edit the newly-created network interface
configuration file and make appropriate changes to the values in
the file. Specifically, you'll need to change the DEVICE and IPADDR
lines at the very least.
For example, suppose the interface configuration file we copied,
eth0's, looked like this:
DEVICE=eth0
IPADDR=10.151.9.241
NETMASK=255.255.255.0
NETWORK=10.151.9.0
BROADCAST=10.151.9.255
ONBOOT=yes
Suppose we were creating the zero'th alias on the zero'th ethernet
interface, so we need to change the DEVICE value to "eth0:0".
The alias is to have the IP address, 10.151.9.242, so we need to
change the IPADDR value. The address is on the same network, within
the same subnet, responds to the same broadcast address, and should
be configured at boot-time, so the other values will stay the same.
We would thus change the above to:
DEVICE=eth0:0
IPADDR=10.151.9.242
NETMASK=255.255.255.0
NETWORK=10.151.9.0
BROADCAST=10.151.9.255
ONBOOT=yes
Save the changes and exit the editor.
3. To active the new network interface alias, issue the following
command from the /etc/sysconfig/network-scripts directory:
./ifup ifcfg-eth0:0
replacing "ifcfg-eth0:0" with the name of the interface alias
configuration file you just created. If, at some point in the future,
you want to deactivate the interface alias temporarily, issue the
following command, also from the /etc/sysconfig/network-scripts
directory:
./ifdown ifcfg-eth0:0
4. Test your new interface alias by pinging its IP address:
ping 10.151.9.242
If you receive a response, your new interface has been set-up
successfully. Your Red Hat Linux system will automatically configure
the interface alias again whenever the system is started.
--
Steve Coile P a t r i o t N e t Systems Engineering
scoile@patriot.net Patriot Computer Group (703) 277-7737
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: