On 2013-01-15, Johan Helsingius <j...@julf.com> wrote:
> Peter,
>
>> :em0 (internal network):
>> :        inet 172.24.42.254 netmask 0xffffff00 broadcast 172.24.42.255
>> :em2 (wifi sandbox):
>> :        inet 172.24.42.223 netmask 0xffffffc0 broadcast 172.24.42.255
>> :
>> 
>> You can't do that.
>
> What specific reason is there that that won't work?

$ ipcalc 172.24.42.223/0xffffffc0
address   : 172.24.42.223   
netmask   : 255.255.255.192 (0xffffffc0)
network   : 172.24.42.192   /26
broadcast : 172.24.42.255   
host min  : 172.24.42.193   
host max  : 172.24.42.254   
hosts/net : 62

The 172.24.42.254 address you have on em0 is *inside* the
172.24.42.192/26 network you have on em2.

You would need to move that to another address that is in the /24 but
outside the /26. Additionally you would need to add a static route on the
machines in em0's network so that 172.24.42.192/26 is routed to whatever
new address you have for em0 as you have to consider the return path as
well as the forward path.

Basically: supernetting is tricky, it's best avoided unless there's no
other choice - even if you are pretty familiar with networking it's easy
to get wrong.

Reply via email to