Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Unexpected behavior with Net::Netmask

by ferrency (Deacon)
on Jul 31, 2002 at 20:02 UTC ( #186582=note: print w/replies, xml ) Need Help??


in reply to Unexpected behavior with Net::Netmask

My initial guess would be that a range of IPs as you've specified will only work correctly if Net::Netmask can make it into a bit mask, and that it doesn't work with generic IP ranges. The lowest 4 bits of 218 are "1010" and th e lowest 4 bits of 221 are "1101". You can't make a single bitmask which only covers that range.

Update:Or, maybe Net::Netmask builds the smallest netmask which will cover both of the IPs specified; in which case, if they don't mark the boundaries of a net block, then the netmask ends up specifying a larger netblock than you intended. I'd use the mask() method to print out the netmask it thinks it has.

Alan

  • Comment on Re: Unexpected behavior with Net::Netmask

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://186582]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2019-12-12 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?