How to setup new purchased ip?
Once machine is up,I am doing it by this command:
ifconfig eth0:1 xxx.xxx.xxx.xxx netmask 255.255.255.0 up
I want it to be enabled at startup.
Adding new file ifcfg-etho:1 in /etc/sysconfig/network-scripts did not work???
8 Replies
You need to create a new config file for the new IP.
if your main IP is eth0 then your second one can be eth0:0 or eth0:1, the new file would be /etc/sysconfig/network-scripts/ifcfg-eth0:0 or similar.
Yell out if you get stuck.
For now I have put this command in /etc/rc.d/rc.local file:
ifconfig eth0:1 xxx.xxx.xxx.xxx netmask 255.255.255.0 up
With this ip is reachable when machine reboots
/etc/network/interfaces
then add your private ip you 'purchased'
auto eth1
iface eth1 inet static
address 192.168.1.90
netmask 255.255.255.0
then edit
/etc/hosts
and add
192.168.1.90 server1 server1.yourdomain.com
@anubix:
edit
/etc/network/interfaces
snip
That's Debian et. al., not Fedora/RedHat. They are quite different.
@anubix:
then add your private ip you 'purchased'
He is not asking about his private IP, he is asking about his public IP that he 'purchased'.
@ajay:I have purchased an additional ip and want this ip to be up on startup.How doI do this? I am running Fedora Core 9.
@ivytony:
of course it's private ip after purchase
"Private IP" is not the same as additional IP. Private IP is the IP address for the private local network, and can be used for traffic between two Linodes in the same datacenter without it being counted against your monthly network quota.