?
Solved

create ip aliases

Posted on 2003-03-18
7
Medium Priority
?
757 Views
Last Modified: 2013-12-16
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
Comment
Question by:mullie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 3

Expert Comment

by:jnbkze
ID: 8165072
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
 

Author Comment

by:mullie
ID: 8266750
[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
 

Author Comment

by:mullie
ID: 8266809
[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
How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

 

Author Comment

by:mullie
ID: 8267161
[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
 

Author Comment

by:mullie
ID: 8267947
[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
 
LVL 3

Accepted Solution

by:
jnbkze earned 60 total points
ID: 8268228
Hmm - ok, try this rather

ifconfig eth0:1 x.x.x.x
and nothing else.
0
 

Author Comment

by:mullie
ID: 8273759
thanks jnbkze
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question