Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can i add an extra ip (the server already has one ip now) to fedora 6 in command line?

Thanks!

share|improve this question

3 Answers 3

You can add a virtual IP address, otherwise, you'll need to add an extra NIC and assign it an IP address.

Tutorial on adding a Virtual IP address: LINK

For adding a NIC and assigning it an IP address, look under System > Network Configuration or something like that. In command line run: system-config-network. You might need to install the Administration Tools group.

share|improve this answer
    
Thanks, but here is my ifcfg-ech0: DEVICE=eth0 BOOTPROTO=dhcp TYPE=Ethernet ONBOOT=yes i don't see a "IPADDR=" field –  Weiwei Aug 28 '09 at 2:25
    
You have it set to DHCP. You'll have to follow the tutorial some. It shows you want you want to put in your config. Copy it from the tutorial and use it as you need it. –  David Rickman Aug 28 '09 at 2:50

I will have two static ips as 77.78.8.111 and 77.78.8.89

I will have this configure:

DEVICE=eth0:0
BOOTPROTO=static
IPADDR=77.78.8.111
BROADCAST = ???????
NETWORK=????
NETMASK=255.255.255.0
TYPE=Ethernet
ONBOOT=yes

and

DEVICE=eth0:1
BOOTPROTO=static
IPADDR=77.78.8.89
BROADCAST = ??????
NETWORK=????
NETMASK=255.255.255.0
TYPE=Ethernet
ONBOOT=yes

What value would for BROADCAST and NETMASK ?

this if the ifconfig output:

-------------
eth0      Link encap:Ethernet  HWaddr 00:19:99:0D:CC:14
          inet addr:77.78.8.89  Bcast:77.78.8.89  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:509 errors:0 dropped:0 overruns:0 frame:0
          TX packets:473 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:72383 (70.6 KiB)  TX bytes:195760 (191.1 KiB)
          Interrupt:23 Base address:0xe000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

------
share|improve this answer
    
You have two external IP addresses, how are you plugging in the second one? Do you have two NICs as well? –  David Rickman Aug 28 '09 at 9:48
    
no , only one NIC –  Weiwei Aug 28 '09 at 16:27
    
use the 'ipcalc' utility –  cstamas Sep 11 '09 at 18:53

If you are looking for a command line version try:

 ip addr add 10.1.1.1/24 dev eth0

These setting are temporary and they will be lost on next reboot.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.