Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 760
  • Last Modified:

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)?
0
mullie
Asked:
mullie
  • 5
  • 2
1 Solution
 
jnbkzeCommented:
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.
0
 
mullieAuthor Commented:
[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
0
 
mullieAuthor Commented:
[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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
mullieAuthor Commented:
[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
0
 
mullieAuthor Commented:
[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
0
 
jnbkzeCommented:
Hmm - ok, try this rather

ifconfig eth0:1 x.x.x.x
and nothing else.
0
 
mullieAuthor Commented:
thanks jnbkze
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now