Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

adding 4 ip's to eth0

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
photo
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

adding 4 ip's to eth0

#1 Post by photo »

i have a debian box which is remotely accessed via ssh/ethernet ONLY. (i don't have physical access to the box).

the ip address (for the purposes this discussion) is 651.721.841.120.

i have 5 ip's total and want to configure it for the remaining 4 addresses 651.721.841.121 to .29.

i have edited the /etc/network/interfaces file accordingly.

please check it and make sure it will work and not lock me out after reboot.

thanks

........................................

auto eth0
iface eth0 inet static
address 651.721.841.120
netmask 255.255.255.0
gateway GW

auto eth0:0
iface eth0:0 inet static
address 651.721.841.120
netmask 255.255.255.0
gateway GW

auto eth0:1
iface eth0:1 inet static
address 651.721.841.121
netmask 255.255.255.0
gateway GW

auto eth0:2
iface eth0:2 inet static
address 651.721.841.122
netmask 255.255.255.0
gateway GW

auto eth0:3
iface eth0:3 inet static
address 651.721.841.123
netmask 255.255.255.0
gateway GW

---
Lacek: hugtux is right, so I have edited your post and replaced the IPs with fake ones. There is more than enough script kiddies out there, looking for targets...

hugtux
Posts: 19
Joined: 2004-03-04 11:28
Location: Belgium

#2 Post by hugtux »

If I where you, I would get the IP' s out of the thread.

photo
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

#3 Post by photo »

i don't understand. get the ip's out of whick thread ?

photo
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

#4 Post by photo »

i don't understand. get the ip's out of which thread ?

photo
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

#5 Post by photo »

oh i see. the ip's i had in the original post were syntactially valid, yet fake ones, not mine.

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#6 Post by lacek »

That way it probably won't work. Do this:

Code: Select all

iface eth0 inet static
address IP_ADDRESS
network NETWORK_ADDRESS
broadcast BROADCAST_ADDRESS
netmask NETMASK
gateway GW
up ifconfig eth0:0 IP2 up
up ifconfig eth0:1 IP3 up
up ifconfig eth0:2 IP4 up
# and so on...
If you happen to screw up something, the first interface (eth0) will be always up and running, and processing will halt on the first error.
The pseudo interfaces will have the same settings for gateway, netmask, etc. as the physical one. You may give ifconfig some extra options if you want, but according your post, I don't think it will be necessary...

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#7 Post by lacek »

Ah, great. They seemed real, so I changed them again... :oops:

photo
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

#8 Post by photo »

i see, the 'up' command makes it easy.

thanx

Post Reply