1

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

Thanks!

Weiwei
  • 367
  • 1
  • 5
  • 10

3 Answers3

1

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.

cstamas
  • 6,707
  • 25
  • 42
0

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.

David Rickman
  • 3,320
  • 18
  • 16
  • 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 02: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 02:50
0

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)

------
Weiwei
  • 367
  • 1
  • 5
  • 10