Skip to content

Instantly share code, notes, and snippets.

@srleyva
Created May 19, 2019 17:27
Show Gist options
  • Save srleyva/1d134927e4dd3fe03a6b9ff74a01c160 to your computer and use it in GitHub Desktop.
Save srleyva/1d134927e4dd3fe03a6b9ff74a01c160 to your computer and use it in GitHub Desktop.

Subnetting

What is an IP?

Unique address that machines have.

192 . 168 . 1 . 10 1100000.10101000.00000001.00001010

Global and Private IPs

Private or Local

192.168.1.10/24

Public or Global

168.173.70.134/29

Classes

Public

  • A - 0-127
  • B - 128-191
  • C - 192-223
  • D - 224 - Multicast

Private

  • A - 10.0.0.0
  • B - 172.16.0.0
  • C - 192.168.0.0

What is a subnet mask

Subnet - a sub network in your network

Subnet Mask

Specifies what is the network address and the host address

[ 172.134.7.10 ]/[ 27 ]

Subnet mask:

  • 11111111.11111111.11111111.11100000
  • 255 . 255 . 255 . 224

Subnetting

168.173.70.134/29

  • What is the subnet mask?
    • 11111111.11111111.11111111.11111000
    • 255 . 255 . 255 . 248
  • What is the network IP
    • 10101000.10101101.01000110.10000110
    • 10101000.10101101.01000110.10000000
    • 168 . 173 . 70 . 128
  • First Host IP? 168.173.70.129
  • Last Host IP? 168.173.70.134
  • Broadcast IP? 168.173.70.135

153.34.173.242/17

  • Subnet Mask
    • 11111111.11111111.10000000.00000000
    • 255 . 255 . 128 . 0
  • Network IP
    • 10011001.00100010.10101101.11110010
    • 10011001.00100010.10000000.00000000
    • 153 . 34 . 128 . 0
  • First Host IP - 153.34.128.1
  • Last Host IP - 153.34.255.254
  • Broadcast IP - 153.34.255.255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment