< All CompTIA Network+ Notes

Tobraham | CompTIA Network+ | Module 1.3

By: Tobraham | Related Course: CompTIA Network+ | Published: February 3, 2018 | Modified: February 5, 2018
Join Cybrary

NotepadAPIPA

APIPA (Automatic Private IP Addressing) – assined to your computer when you have neither a static IP assigned nor an IP assigned to you via DHCP
ex. 169.254.x.x

If you see you have an APIPA address when you should be getting an IP from DHCP, something is wrong.

You can check your IP address by checking ipconfig and looking at your IP address.

If you are assigned an APIPA address, you will only be able to communicate with other computers on the network that also have an APIPA address.

Public vs Private addresses – public face the outside world, private are *inside* a network

 


NotepadAPIPA Pt 2

Public vs Private

Class A –

  • full range w/subnet mask 255.0.0.0:
    • 1.0.0.1 to 126.255.255.254
  • private reserved  w subnet mask 255.0.0.0:
    • 10.0.0.0 – 10.255.255.255 is reserved for private use. 
  • public ranges:
    • 1.0.0.1 – 9.255.255.255
    • 11.0.0.1 – 126.255.255.254

Class B –

  • full range w/subnet mask 255.255.0.0:
    • 128.1.0.1 to 191.255.255.254
  • private reserved w/subnet mask 255.240.0.0:
    • 172.16.0.0 – 172.31.255.255
  • public ranges:
    • 128.1.0.1 – 172.15.255.255
    • 172.32.0.0 – 191.255.255.254

Class C-

  • full range w/subnet mask 255.255.255.0:
    • 192.0.1.1 to 223.255.254.254
  • private reserved w/subnet mask 255.255.0.0
    • 192.168.0.0 – 192.168.255.255
  • public ranges:
    • 192.0.1.1 – 192.167.255.255
    • 192.169.0.0 – 223.255.254.254

 


NotepadCIDR

CIDR – ”cyder” – Classless Inter-Domain Routing

  • allows variable domain subnet masks as opposed to ClassFULL IPs which use the 255.0.0.0, 255.255.0.0, 255.255.255.0 masks
  • sometimes standard subnet masks don’t work for us and we want to break up our network ranges into smaller subnets
  • display format: /N   
    • /N can be 1-31
    • N = number of bits from left to right
    • example /16 = 16 ones = 11111111.11111111.00000000.00000000 = 255.255.0.0
    • /8 = 255.0.0.0
    • /16 = 255.255.0.0
    • /12 = 11111111.11110000.00000000.00000000 = 255.240.0.0


NotepadIP Address Classes

Classes allow us to divide up a range of IP addresses between a network and host segments

IP is a series of 32-bit numbers broken up into 4 octets

With an IP address of 192.168.1.1, the binary representation would be 
11000000.10101000.00000001.00000001

 

Network segment – tells us the number of the network we are on
Host Segment – the computer ID on that network

 

With an IP address of 192.168.1.1:
192.168.1 = Network           1 = Host

Can be shown as 192.168.1/1 or
11000000.10101000.00000001/00000001

This example has 24-bits available to identify potential networks and 8-bit (-2) to describe potentials hosts (computers). 

  • .0 is always reserved for the network and .255 is reserved as a broadcast channel, which sends to all hosts on the network. So this example would only allow .1 -.254 , or 254 potential hosts.

Subnet mask – tells us what portion of an IP address is the network portion and what part is the host portion.

example subnet mask : 255.255.255.0
11111111.11111111.11111111.00000000

if you applied this subnet mask to the IP of 192.168.1.1
IP          11000000.10101000.00000001.00000001
Mask    11111111     .11111111     .11111111    .00000000

You see that 192.168.1 belongs to the network , thus 192.168.1/1

 

Classes will determine the balance of available networks vs hosts: ”Classful IP Addressing” – the IP addresses will separate networks from hosts at a different point.

Class A – first octet is your network ID, the rest are the hosts. 

  • 1.0.0.0 – 126.0.0.0
  • Subnet mask: 255.0.0.0 
  • Allows for 254 networks with millions of hosts
    • example – an ISP with millions of subscribers

127.0.0.1 = reserved for self or ”localhost”

Class B – first two octets is network ID.

  • 128.0.0.0 – 191.255.0.0
  • Subnet mask: 255.255.0.0 

Class C

  • 192.0.0.0 – 223.255.255.0
  • Subnet mask: 255.255.255.0 

Class D – for multicasting (addresses used to broadcast to multiple computers

  • 224.0.0.0 – 239.0.0.0
  • no subnet mask for this IP range

 

A: 1-126
 – home/localhost
B 128-191
C: 192 – 223
D: 224 – 239

* an easier way to remember which IPs belong in each class is to look at the binary representation of the first octet. This should have been mentioned because it makes much more sense as to why it was broken up this way rather than just having the appearance of an arbitrary choice of ranges.

Class A range always starts with 0 (0xxxxxxx) = 0
Class B range always starts with 10 (10xxxxxx) = 128
Class C range always starts with 110 (110xxxxx) = 192
Class D range always starts with 1110 (1110xxxx) = 224


NotepadIP Addresses

IP addresses are logically assigned addresses mapped to a physical address – they are not hard-coded. They are either set for us by the network we are on or set statically by us.

Format
– IPv4 32-bit binary address (32 1’s or 0’s in our address)
– divided into 4 octets (groups of 8)
– values are 0 -255

binary example: 10110000.11111111.00000000.11110000
IP example: 176.255.0.240

 


NotepadIPv4 vs IPv6

IPv4

  • 32bit address
  • 4 billion addresses
  • 4 octet

IPv6

  • 128-bit addresses (32 hex characters = 128 binary characters)
  • 340 trillion, trillion, trillion addresses
  • displayed as hex format (0-F)
    • 0 – F 
    • each character represents 4 binary characters
      • 2001:0DB8:AC10:FE01:0000:0000:0000:0000
    • consecutive 0’s represented by ”::”  [ can only use this shortcut ONCE in the address, so use it where it’s most effective
      • 2001:0DB8:AC10:FE01::
    • you can omit leading zeroes
      • 2001:DB8:AC10:FE01::


NotepadMAC Addresses

”Media Access Control” Address

  • the physical network address of your network interface card (NIC)
  • Layer 2 – data link layer. Not physical so it doesn’t fall under L1
  • globally unique address
  • hex format – 6 sections of two characters (48-bit)
    • E0-06-E6-97-34-99
      • when using ipconfig, this would be listed as ’physical address and would uses dashes, not colons
      • if you are entering MAC addresses when setting up a system and you continue to get error messages, try replacing the dashes with colons.
    • E0:06:E6:97:34:99
      • 11100000.00000111.1110011111….
  • MAC addresses are used:
    • DNS
    • ARP (address resolution protocol) – systems sends out a broadcast request asking the hosts which one has been assigned a certain IP address so that it can retrieve the MAC address and send directly to that 
    • DHCP – manages IP assignments. Assigns a new host on the network an IP by offering it an available IP address and the host sends back its MAC address. If both agree to use that IP, the MAC address is stored by the DHCP server and assigns it the IP it offered.

 

 

* remember for test: hex addresses can only go from 0-F. If you see a G in an answer, it’s W R O N G!


NotepadSubnetting

Subnetting – adding additional networks to our standard Class A/B/C IP address ranges

  • allows us to take an address range and split it into smaller sub networks
    • ex. 192.168.0.1 with a subnet of 255.255.255.0 gives you a network capable of hosting 254 computers( x.x.x.255 is reserved for broadcasting). In a small location, that may be much more than what you require for your home network, so you can subnet to make a group of smaller networks within that class.
  • All subnets must have a beginning and end number that we can’t use (reserved)
    • first number is Network ID (even number)
    • last number is Broadcast ID (odd number)

When given an IP Address with a subnet mask

 – First locate ’N’ = furthest subnet number that is not 255
     ex: 255.255.255.240 – N = 240

– Determine the ”Network Increment”:
       subtract N from 256:   256-240=16  

  • Network Increment will dictate the startingpoints for each subnetwork. So in the above example your new sub networks will be spaced 16 addresses apart
    • 192.168.0.0
    • 192.168.0.16
    • 192.168.0.32
    • etc
    • * the first and last IP are reserved so 0 (network ID) and 15 (broadcast ID) are unusable, 16 and 30 are unusable etc
      (NetID+1 and Next Net ID – 2 are unusuable)


NotepadSubnetting Part 2

Important Math

  • Number of Subnets = 2^added bits
    1. compare class subnet mask 255.255.255.0
      11111111.11111111.11111111.00000000
    2. with new subnet mask 255.255.255.240
      11111111.11111111.11111111.11110000
    3. and see that we’ve added 4 bits to the last octet
    4. so our number of subnets = 2^4 = 16
  • Number of Hosts = (2^remaining ’off bits’) – 2
    • off bits would be the number of unchanged host binary bits
    • in this case also 4 bits 2^4 = 16-2 = 14

 

Using mask: 255.255.255.240

Net Increment = 256-N(240) = 16
Subnets = 2^ added bits = 16
Hosts = 2^off bits -2 = 14

 

IP with CIDR Notation:

192.168.10.0/25

/25 = 11111111.11111111.11111111.10000000
/25 = 255.255.255.128
Extra bits = 1
Off bits = 7
Subnets = 2^added = 2^1 = 2
Hosts = 2^off bits-2 = 2^7 -2= 128-2 = 126
Net Increments: 256-N = 256-128=128
Net ID = 0, 128
Host IDs: 1-126, 129-254
Broadcast IDs:
 – 192.168.10.127, 192.168.10.255


NotepadUnicast, Multicast, Broadcast

Refer to the ways our individual device tries to talk to other devices on the network.

Unicast – ”one-to-one” 

  • IPv4: 1 -> 1
  • IPv6: includes addresses known as Link local, Site local, Unique local, Global Unicast

Multicast – ”one to many”

  • IPv4: computer sends message to a multicast address. Sending to one address sends to multiple nodes
  • IPv6: doesn’t have ’broadcast’ mentality but does have multicast groups

Broadcast (IPv4)/ Anycast (IPv6)

  • IPv4: one-to any who will listen within my broadcast domain
    • broadcast domain would be any host that you could reach by MAC address only – internal network comms
  • IPv6: Anycast to Nearest location. If 3 devices share the same Anycast address, the one closest to the sending device will receive it.


< All CompTIA Network+ Notes
Join Cybrary

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge

 
Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel