adding 4 ip's to eth0

If none of the more specific forums is the right place to ask

adding 4 ip's to eth0

Postby photo » 2004-05-26 06:52

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...
photo
 
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

Postby hugtux » 2004-05-26 07:54

If I where you, I would get the IP' s out of the thread.
hugtux
 
Posts: 19
Joined: 2004-03-04 11:28
Location: Belgium

Postby photo » 2004-05-26 09:17

i don't understand. get the ip's out of whick thread ?
photo
 
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

Postby photo » 2004-05-26 09:17

i don't understand. get the ip's out of which thread ?
photo
 
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

Postby photo » 2004-05-26 09:21

oh i see. the ip's i had in the original post were syntactially valid, yet fake ones, not mine.
photo
 
Posts: 12
Joined: 2004-05-26 06:49
Location: Los Angeles

Postby lacek » 2004-05-26 09:32

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
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary

Postby lacek » 2004-05-26 09:33

Ah, great. They seemed real, so I changed them again... :oops:
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary

Postby photo » 2004-05-26 09:47

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

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


Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable