Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

derive host address from network #88

Closed
RubyTuesdayDONO opened this issue Apr 17, 2017 · 0 comments
Closed

derive host address from network #88

RubyTuesdayDONO opened this issue Apr 17, 2017 · 0 comments

Comments

@RubyTuesdayDONO
Copy link

given a network and a host portion, is it possible for IPAddress to generate the full host address in that network? for example, if i've got an IPAddress('1.1.1.0/24'), can i ask it for the full address of a host whose host bits are 123 (i.e. 1.1.1.123)?

i searched various methods and did not see anything direct (yes, you can splice octets, but that only works reliably for /8, /16, and /24 networks). there are useful applications in templating, e.g. "i'm planning IPs for a new network, and hosts of a given role always have the host bits 123, so please give me the full address of that host in this network"

@ipaddress-gem ipaddress-gem locked and limited conversation to collaborators Mar 23, 2023
@sandstrom sandstrom converted this issue into discussion #136 Mar 23, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant