Re: how to attach class C net to an interface?

2004-06-04 Thread Artem Koutchine
  I have a server with one interface and many virtual web hosts.
  I have been given class C network to use for the virtual
  web hosts and jails on the server. How to i tell the interface
  that all addresses of some A1.A2.A3.A4  0xFF00 
  network belong to the interface. Do i specify 250-some aliases?
  Or there is a better way?
  
 
 Unfortunately, there is no built-in solution I know of to add aliases in 
 bulk - you need to issue individual ifconfig commands.  As such, you can 
 do it on the command-line using a loop such as this:
 
 for (( foo = 1; foo  255; foo++ )); \
 do ifconfig fxp1 alias 172.16.100.$foo netmask 0x; \
 done
 
 This will add the aliases 172.16.100.1 through 172.16.100.254 to the 
 fxp1 interface.  All you need to do is change the command to reflect 
 your requirements for the network number and interface name, and you 
 should be good to go.  You can add this command into /etc/rc.local to 
 have it run at startup.
 

Thank you for the scrip. I will then asign a single main ip to the interface
in rc.conf and then run this script from /usr/local/etc/rc.d because i think
rc.local is merged after each cvp/buildworld/installworld/mergmaster,
so /usr/local/etc/rc.d is a safer place to to keep it. Right or not?

The other question, will assigning 200+ ip addresses  degrade tcp/ip
perfomance noticeably? 

How to i spell noticably or noticaebly?  :)

Regards,
Artem
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to attach class C net to an interface?

2004-06-04 Thread Kevin Stevens
On Jun 4, 2004, at 00:36, Artem Koutchine wrote:
The other question, will assigning 200+ ip addresses  degrade tcp/ip
perfomance noticeably?
It is a common practice, and I haven't heard of problems with it.  
Remember that the same-subnet mask is /32 regardless of what the 
primary address mask is.

How to i spell noticably or noticaebly?  :)
Apparently you spell it both ways.  ;)  Correct is noticeably, as in 
English has noticeably inconsistent rules for both spelling and 
pronunciation.

KeS
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to attach class C net to an interface?

2004-06-04 Thread Matthew Seaman
On Fri, Jun 04, 2004 at 11:36:10AM +0400, Artem Koutchine wrote:

  for (( foo = 1; foo  255; foo++ )); \
  do ifconfig fxp1 alias 172.16.100.$foo netmask 0x; \
  done

 Thank you for the scrip. I will then asign a single main ip to the interface
 in rc.conf and then run this script from /usr/local/etc/rc.d because i think
 rc.local is merged after each cvp/buildworld/installworld/mergmaster,
 so /usr/local/etc/rc.d is a safer place to to keep it. Right or not?

Probably the best place to put this is in a file named 'start_if.fxp1'
assuming fxp1 is the interface you want all this to happen to.  That
will be read into /etc/rc.network and executed by this bit of code:

for ifn in ${network_interfaces}; do
if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn}
eval showstat_$ifn=1
fi

This effectively lets you introduce custom bits of shell script into
the standard /etc/rc.network script without having to worry about
keeping that script patched and in synch across system updates.

There isn't a similar 'stop_if.fxp1' facility -- just disabling the
interface usually does the trick.
 
 The other question, will assigning 200+ ip addresses  degrade tcp/ip
 perfomance noticeably? 

Hard to say.  Probably not a huge amount, but it will depend on your
hardware amongst other things.  The only way to know for sure is to
run some tests yourself.  

 How to i spell noticably or noticaebly?  :)

noticeably

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp3iMNm8uCPf.pgp
Description: PGP signature


Re: how to attach class C net to an interface?

2004-06-03 Thread David Fuchs
Artem Koutchine wrote:
Hi!
I have a server with one interface and many virtual web hosts.
I have been given class C network to use for the virtual
web hosts and jails on the server. How to i tell the interface
that all addresses of some A1.A2.A3.A4  0xFF00 
network belong to the interface. Do i specify 250-some aliases?
Or there is a better way?

Hi Artem!
Unfortunately, there is no built-in solution I know of to add aliases in 
bulk - you need to issue individual ifconfig commands.  As such, you can 
do it on the command-line using a loop such as this:

for (( foo = 1; foo  255; foo++ )); \
do ifconfig fxp1 alias 172.16.100.$foo netmask 0x; \
done
This will add the aliases 172.16.100.1 through 172.16.100.254 to the 
fxp1 interface.  All you need to do is change the command to reflect 
your requirements for the network number and interface name, and you 
should be good to go.  You can add this command into /etc/rc.local to 
have it run at startup.

--
Thanks,
-David Fuchs BCIS ([EMAIL PROTECTED])
WWW:http://www.davidfuchs.ca/
MSN:[EMAIL PROTECTED]
PGP:http://www.davidfuchs.ca/aboutme/433EEC91.pgp
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]