Re: setting up network virtual hosts (ifconfig)

2004-03-09 Thread Matthew Seaman
On Mon, Mar 08, 2004 at 04:50:47PM -0800, Jason Williams wrote:

 e.g. something like this works fine here :
 
 # /etc/rc.local :
 ifconfig fxp0 alias 192.168.2.222 netmask 0x
 
 That seemed to have done the trick, manually. Im guessing, I could put the 
 same thing in my rc.conf file, but with proper syntax:
 
 ifconfig_fxp0_alias0=inet 192.168.2.222 netmask 0xff

The proper syntax for the netmask on the second and subsequent
interface addresses from each distinct network block is to use the
all-ones netmask: you can express that either as 255.255.255.255 or as
0x or as /32, whichever suit you best. This is a FAQ on this
list but it still keeps tripping people up -- despite being clearly
documented in ifconfig(8):

 alias   Establish an additional network address for this interface.  This
 is sometimes useful when changing network numbers, and one wishes
 to accept packets addressed to the old interface.  If the address
 is on the same subnet as the first network address for this
 interface, a non-conflicting netmask must be given.  Usually
 0x is most appropriate.

However you look at it, 0xff could never be a correct netmask.

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


pgp0.pgp
Description: PGP signature


Re: setting up network virtual hosts (ifconfig)

2004-03-09 Thread Chuck Swiger
Jason Williams wrote:
That seemed to have done the trick, manually. Im guessing, I could put 
the same thing in my rc.conf file, but with proper syntax:

ifconfig_fxp0_alias0=inet 192.168.2.222 netmask 0xff

On a side note, if you set something up in rc.conf, how can you manually 
start it without having to reboot?
The rc.conf configuration above could be manually done via:

ifconfig fxp0 alias 192.168.2.222 netmask 0xff

Other changes to rc.conf may require you to to run a startup script-- check 
/usr/local/etc/rc.d-- or do something else, depending on what the change is.

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


Re: setting up network virtual hosts (ifconfig)

2004-03-08 Thread albi
On Mon, 08 Mar 2004 16:07:41 -0800
Jason Williams [EMAIL PROTECTED] wrote:

 For instance, I had this in my rc.conf:
 
 ifconfig_fxp0=inet 192.168.1.91  netmask 255.255.255.0
 and tried to add this:
 ifconfig_fxp0_alias0=inet 192.168.1.75  netmask 255.255.255.0

e.g. something like this works fine here :

# /etc/rc.local :
ifconfig fxp0 alias 192.168.2.222 netmask 0x

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


Re: setting up network virtual hosts (ifconfig)

2004-03-08 Thread Jason Williams

e.g. something like this works fine here :

# /etc/rc.local :
ifconfig fxp0 alias 192.168.2.222 netmask 0x
That seemed to have done the trick, manually. Im guessing, I could put the 
same thing in my rc.conf file, but with proper syntax:

ifconfig_fxp0_alias0=inet 192.168.2.222 netmask 0xff

On a side note, if you set something up in rc.conf, how can you manually 
start it without having to reboot?

Thanks,

Jason 

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


Re: setting up network virtual hosts (ifconfig)

2004-03-08 Thread Mike Maltese
 On a side note, if you set something up in rc.conf, how can you manually
 start it without having to reboot?

Well that depends on what it is, but if you want to just go through
everything you can do this:

# shutdown now

This will put you in single-user mode. Hit enter for the default shell, then
just log out (Ctrl-D) and that will fire up init and run through the rc
system again.

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


Re: setting up network virtual hosts (ifconfig)

2004-03-08 Thread Jason Williams

Well that depends on what it is, but if you want to just go through
everything you can do this:
# shutdown now

This will put you in single-user mode. Hit enter for the default shell, then
just log out (Ctrl-D) and that will fire up init and run through the rc
system again.
What if you are doing this remotely? :)
Any other way to get around that?
Jason 

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


Re: setting up network virtual hosts (ifconfig)

2004-03-08 Thread Mike Maltese
 What if you are doing this remotely? :)
 Any other way to get around that?

Not unless you're connected to another machine and connected to the target
box through a serial console. In this case you're probably better of making
the change manually. What is it you want to reconfigure?

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