Skip to content

native tool to discern whether a given IP is in the given range (support aliases)

License

Notifications You must be signed in to change notification settings

bAndie91/subnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use Case

  • check an IP is within one or more IP range
  • answer is command's return code
  • support named IP ranges, see cidr.txt
  • list all named IP range an IP is in
  • good for scripting
  • IPv4, IPv6

Examples

  • Check an IP is in a subnet
    • subnet 192.168.1.1 192.168.1.0/24
  • Check by well known network name
    • subnet 192.168.100.100 class-C
  • Check multiple ranges
    • subnet 192.168.100.100 class-C 192.168.100.0/24
    • one match sufficient
  • List named networks
    • subnet 10.8.1.0
    • output:
      private-net
      rfc1918
      class-A
      priv-class-A
      

issues

Please submit issues via PR to some file <TITLE>.txt or <TITLE>.md on issues branch.

About

native tool to discern whether a given IP is in the given range (support aliases)

Resources

License

Stars

Watchers

Forks

Packages

No packages published