[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Please help with IP Aliasing


I am currently setting up a Mail and Webserver (hamm, 2.0.33).  I have got
a whole package of 256 IP addresses that I want to assign to this server.
In the NET-3-HOWTO I read that I have to set it up like this:

/etc/init.d/network:  (part of the addresses X-ed out)

#! /bin/sh
ifconfig lo
route add -net

# here is the "real" IP address for this linux box
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1

# here I am trying to set up the IP-Aliasing for the whole
# subnetwork XXX.231.206.x
ifconfig eth0:1 XXX.231.206.1 netmask up
route add -net XXX.231.206.0 netmask eth0:1

ifconfig eth0:2 XXX.231.206.2 netmask up
route add -net XXX.231.206.2 netmask eth0:2

ifconfig eth0:3 XXX.231.206.3 netmask up
route add -net XXX.231.206.3 netmask eth0:3

# [...]
# and so on, until:

ifconfig eth0:253 XXX.231.206.253 netmask up
route add -net XXX.231.206.253 netmask eth0:253

ifconfig eth0:254 XXX.231.206.254 netmask up
route add -net XXX.231.206.254 netmask eth0:254

What I want seems to work this way, but I can't imagine that this
is the right way to do it.  And if I will ever get another subnetwork
to add, how would I add it using the above method?  I found that
eth0:255 is the highest possible virtual network number.  So I
couldn't add any more?

All you network-gurus: Please give me a hint or any pointer as
to where I can find more info on that.

Thank you so much in advance!

 Andy Spiegl, University of Technology, Muenchen, Germany
 E-Mail: andy@spiegl.de     URL: http://www.spiegl.de
 PGP fingerprint: B8 48 24 7B DB 96 6F 1C  D9 6D 8E 6C DB C2 E7 E9
                                o      _     _         _
  --------- __o       __o      /\_   _ \\o  (_)\__/o  (_)
  ------- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/
  ------ (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_

Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

Reply to: