Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dealing with 31-bit subnet masks(with suggested code attached) #17

Closed
rjalan opened this issue Sep 27, 2012 · 1 comment
Closed

dealing with 31-bit subnet masks(with suggested code attached) #17

rjalan opened this issue Sep 27, 2012 · 1 comment

Comments

@rjalan
Copy link

rjalan commented Sep 27, 2012

RFC 3021 specifies an exception to this rule when dealing with 31-bit subnet masks (i.e. 1-bit host identifiers). In such networks, usually point-to-point links, only two hosts (the end points) may be connected and a specification of network and broadcast addresses is not necessary.

suggested addition to host first:
def host_first(self):
if (self.version() == 4 and self.mask == 31) or (self.version() == 6 and self.mask == 127):
return self.network()

suggested addition to host last:
def host_last(self):
if (self.version() == 4 and self.mask == 31) or (self.version() == 6 and self.mask == 127):
return self.broadcast()

@gandaro
Copy link
Collaborator

gandaro commented Apr 22, 2013

has been fixed by 9395373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants