On Wed, 20 Jun 2001, Kalyan wrote:
> If you have already a functional NIC ,let us say the interface is eth0
> then issuing this command will do the aliasing for the second ip address
> to be given to the same card
> ifconfig eth0:1 <ip address > netmask <netmask > up
> ifconfig eth0:1 192.168.100.2 netmask 255.255.255.0 up
If you are on redhat, there's a better way out - the options in
/etc/sysconfig/network-scripts (from where the initscripts pick up IP
settings). Similar files on other unices / distros = rc.network etc.
Assuming
a. Your kernel supports ip aliasing (stock redhat does, IIRC stock
slackware doesn't - you have to recompile)
b. You want to bind two IPs to the same interface
# cd /etc/sysconfig/network-scripts
# cp ifcfg-eth0 ifcfg-eth0:1
# vi ifcfg-eth0:1
DEVICE=eth0:1 <- change from eth0
BOOTPROTO=static
IPADDR=10.0.3.26 <- change the IP
NETMASK=255.0.0.0 <- change the netmask
NETWORK=10.0.0.0 <- place the corresponding network here
BROADCAST=10.255.255.255 <- give the broadcast address (or skip)
ONBOOT=yes <- so that it is brought up at boottime
Finally
# /etc/rc.d/init.d/network restart
note: If you want to bind an IP to another interface (say eth1) then cp
ifcfg-eth0 ifcfg-eth1 and go on as above.
-suresh
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/linux-india-help