Re: address translation



J. Peng wrote:
On Thu, Feb 21, 2008 at 3:29 PM, John W. Krahn <krahnj@xxxxxxxxx> wrote:
J. Peng wrote:
> how to translate this mask to clear text form with perl?
> netmask 0xffffffff

If you mean an IP address netmask then 0xffffffff is an invalid netmask
because all the bits are 1.


John,

all 1 means 255.255.255.255, is it?
it's also a valid netmask I think.

I dont know how to translate that,:)

According to the RFC's

<QUOTE>
ipAdEntNetMask OBJECT-TYPE
SYNTAX IpAddress
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The subnet mask associated with the IP address of
this entry. The value of the mask is an IP
address with all the network bits set to 1 and all
the hosts bits set to 0."
::= { ipAddrEntry 3 }
</QUOTE>

So 0xffffffff would indicate a network with no hosts on it and thus it is not a valid netmask.



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
.



Relevant Pages

  • Re: Questions for AVG and Inertnet Exploder-savvy sheddi please
    ... The netmask works by comparing the bits set in the mask with the bits set in yer actual IP address. ... On every machine except the router the default gateway should be 192.168.0.1, ... The DNS server for the router is also the one provided by the ISP and it's also best set automagically. ...
    (uk.rec.sheds)
  • Re: TCPIP SHOW ROUTE
    ... > The /24 CIDR block correpsonds to the mask you have. ... 192.168.1.0/24 means that same thing as 192.168.1.0 with a netmask ... I first encountered this slash notation when dealing with IPv6, ... It seems plausible that you've turned it into a host route (netmask ...
    (comp.os.vms)
  • Summary : Netmasks in Solaris
    ... netmask is also assigned. ... network with a subnet mask different from the mask associated with the ... various classes of IP addresses then you dont need to put in the ... details for the network. ...
    (SunManagers)
  • Using netmask ffffffff
    ... I have also seen this netmask being assigned to client ... machines connecting to an ISP. ... The concept is to assign IP addresses by the DHCP server with this mask. ... what I'd like to know in theory is what a host on my network ...
    (comp.unix.bsd.freebsd.misc)
  • named error in /var/log/messages
    ... localnets ACL: address mask not contiguous ... ifconfig_xl1="inet 2xx.195.187.244 netmask 2xx.195.191.255" ... premium service at my ISP I learned I gained extra IP addresses. ...
    (freebsd-questions)