Link to home
Start Free TrialLog in
Avatar of mullie
mullie

asked on

create ip aliases

how to create first ip address and second ip address (as ip aliases) at only one network card under linux mandrake 8.2?

does anyone have tried to use djbdns? can i use only 1 NIC card with 2 public ip address (1 ip address and 1 ip alias)?
Avatar of jnbkze
jnbkze
Flag of Afghanistan image

logged in as root, from the command line, do the following:
ifconfig eth0:1 inet x.x.x.x y.y.y.y z.z.z.z

Where :
x.x.x.x is the ip you want to assign the virtual nic
y.y.y.y is the netmask for that subnet
z.z.z.z is the gateway for that network

The above changes will be lost when you reboot. If you want to make the changes permanent, find the file named ifcfg-eth0 and in the same location as that one create a new file called ifcfg-eth01. The file should contain the following:

DEVICE=eth0:1
BOOTPROTO=static
BROADCAST=x.x.x.255
IPADDR=x.x.x.x
NETMASK=y.y.y.y
NETWORK=x.x.x.0
ONBOOT=yes

You then need to look for a script called ifup and make sure that it includes the latest file you've just created.
Avatar of mullie
mullie

ASKER

[root] ifconfig eth0:1 inet x.x.x.x y.y.y.y z.z.z.z
SIOCSIFADDR: Invalid argument

What should i do?

every time i write those syntaks, my server gets hang,and i have to restart my server.

please help me.

thanks
Avatar of mullie

ASKER

[root] ifconfig eth0:1 inet x.x.x.x y.y.y.y z.z.z.z
SIOCSIFADDR: Invalid argument

What should i do?

every time i write those syntaks, my server gets hang,and i have to restart my server.

please help me.

thanks
Avatar of mullie

ASKER

[root] ifconfig eth0:1 inet x.x.x.x y.y.y.y z.z.z.z
SIOCSIFADDR: Invalid argument

What should i do?

every time i write those syntaks, my server gets hang,and i have to restart my server.

please help me.

thanks
Avatar of mullie

ASKER

[root] ifconfig eth0:1 inet x.x.x.x y.y.y.y z.z.z.z
SIOCSIFADDR: Invalid argument

What should i do?

every time i write those syntaks, my server gets hang,and i have to restart my server.

please help me.

thanks
ASKER CERTIFIED SOLUTION
Avatar of jnbkze
jnbkze
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mullie

ASKER

thanks jnbkze