Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2002 23:23:54 +0200
From:      Stable User <stable@ei.bzerk.org>
To:        aaron g <click46@operamail.com>
Cc:        fbsd-q@bzerk.org, freebsd-questions@FreeBSD.ORG
Subject:   Re: Jail single ip network (FreeBSD 4.5)
Message-ID:  <20020610232354.A25245@ei.bzerk.org>
In-Reply-To: <20020610205511.29606.qmail@operamail.com>; from click46@operamail.com on Tue, Jun 11, 2002 at 04:55:10AM %2B0800
References:  <20020610205511.29606.qmail@operamail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 11, 2002 at 04:55:10AM +0800, aaron g typed:
> 
> >> I then created the network alias, here is the output from ifconfig:
> >> 
> >>    xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >> 	options=3<rxcsum,txcsum>
> >> 	inet 142.39.88.238 netmask 0xffffff00 broadcast 142.39.88.255
> >> 	inet6 fe80::2c0:4fff:fea0:86fa%xl0 prefixlen 64 scopeid 0x1 
> >> 	inet 192.168.200.13 netmask 0xffffffff broadcast 192.168.200.13
> >                                      ^^^^^^^^
> > Normally you would use such a netmask if your alias IP address is 
> > in the same subnet as your primary IP address. Since they are in 
> > unrelated networks you probably want to use a netmask of 255.255.255.0
> here. 
> 
> > Ruben
> 
> 
> actually, since this is an alias, you must set the netmask
> to 255.255.255.255. As of 4.6 [or perhaps 4.5? I cannot

*IF* both addresses are in the same subnet. In this case, they 
are not.

> remember] you are forced to use this netmask or the alias
> will not work.

You can use any netmask you like if the addresses are in different
subnets:

ei# ifconfig ed0 
ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255
        ether 00:20:18:39:eb:5a
ei# ifconfig ed0 10.0.1.1 netmask 255.0.0.0 alias
ei# ifconfig ed0
ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255
        inet 10.0.1.1 netmask 0xff000000 broadcast 10.255.255.255
        ether 00:20:18:39:eb:5a
ei# uname -a
FreeBSD ei.lan.bzerk.org 4.6-RC FreeBSD 4.6-RC #7: Sun Jun  9 22:29:27 CEST
    2002 root@ei.lan.bzerk.org:/usr/obj/usr/src/sys/EI  i386

> 
> - aarong
> -- 
> _______________________________________________
> Download the free Opera browser at http://www.opera.com/
> 
> Powered by Outblaze
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020610232354.A25245>