IPv4

IPv4 addresses basically come in three flavors Public, Private and Multicast. The main difference between Public and Private addresses is the fact that private addresses are not rotatable on the Internet. They actually are, but ISP’s put measures in place to block the routing of private addresses. This design is not by accident, and has allowed IPv4 to survive as long as it has. Even with the recent depletion of IPv4 addresses large and small Corporations continue to run their networks behind Network Address Translation, and will continue to do so for years to come.

Where n = networks, and h = hosts

IPv4 Address Space

  • A – [ 00000000 ] to [ 01111111 ] Range 0 to 127 
  • A – [ 10.0.0.0 – 10.255.255.255 ] = 16,777,216
  • B – [ 10000000 ] to [ 10111111 ] Range 128 to 191
  • B – [ 172.16.0.0 – 172.31.255.255 ] = 1,048,576
  • C – [ 11000000 ] to [ 11011111 ] Range 192 to 223
  • C – [ 192.168.0.0 – 192.168.255.255 ] = 65,536

RFC 1918 Private Address Space

  • A  – [ 10.0.0.0 – 10.255.255.255 ] 
  • B –  [ 172.16.0.0 – 172.31.255.255 ]
  • C –  [ 192.168.0.0 – 192.168.25.255 ]

Link Local Address Range

  • 169.254.0.0 to 169.254.255.255
  • 224.0.0.0 to 224.0.0.255
  • TTL = 1

Positional Values

  • 128, 64, 32, 16, 8, 4, 2, 1
  • High order: 128 + 64 + 16 = 240
  • Low order: 8 + 4 + 2 + 1 = 15
  • High + Low: 240 + 15 = 255

Building Subnet Blocks

Building [ 1 ] network block from 172.16.1.0/24

Block bits:  2^0 = 1
Block host bits: 2^8 – 2 = 254

Block = .0
Broadcast = .255

Building [ 2 ] network blocks from 172.16.1.0/25

Block bits: 2^1 = 2
Block hosts bits: 2^7 – 2 = 126

Blocks: .0 .127
Broadcasts: .126 .255

Building [ 4 ] network blocks from 172.16.1.0/26

Block bits: 2^2 = 4
Block host bits: 2^6 – 2 = 62

Blocks: .0 .64 .128 .192
Broadcasts: .63 .127 .191 .255

Building [ 8 ] network blocks from 172.16.1.0/27

Block bits: 2^3 = 8
Block host bits: 2^5 – 2 = 30

Blocks: .0 .32 .64 .96 .128 .160 .192 .224
Broadcasts: .31 .63 .95 .127 .159 .191 .223 .255

Building [ 16 ] network blocks from 172.16.1.0/28

Block bits: 2^4 = 16
Block host bits: 2^4 – 2 = 14

Blocks: .0 .16 .32 .48 .64 .80 .96 .112 .128 .144 .160 .176 .192 .209 .224 .240
Broadcasts: .15 .31 .47 .63 .79 .95 .111 .127 .143 .159 .175 .191 .208 .223 .239 .255

Building [ 32 ] network blocks from 172.16.1.0/29

Block bits: 2^5 = 32
Block host bits: 2^3 – 2 = 6

Blocks: .0 .8 .16, .24 .32 .40 .48 .56 .64 .72 .80 .88 .96 .104 .112 .120 .128 .136 .144 .152 .160 .168 .176 .184 .192 .200 .208 .216 .224 .232 .240 .248
Broadcasts: .7 .15 .23 .31 .39 .47 .55 .63 .71 .79 .87 .95 .103 .111 .119 .127 .135 .143 .151 .159 .167 .175 .183 .191 .199 .207 .215 .223 .231 .139 .247

Building [ 64 ] network blocks from 172.16.1.0/30

Block bits: 2^6 = 64
Block host bits: 2^2 – 2 = 2

Blocks: .0 .4 .8 .12 .16 .20 .24 .28 .32 .36, .40 .44 .48 .52 .56 .60 .64 .68 .72 .76 .80 .84 .88, .92 .96 .100 .104 .108 .112 .116 .120 .124 .128 .132 .136 .140 .144 .148 .152 .156 .160 .164 .168 .172 .176 .180 .184 .188 .192 .196 .200 .204 .208 .212 .216 .220 .224 .228 .232 .236 .240 .244 .248 .252 
Broadcast: .3 .7 .11 .15 .19 .23 .27 .31 .35, .39 .43 .47 .51 .55 .59 .63 .67 .71 .75 .79 .83 .87, .91 .95 .99 .103 .107 .111 .115 .119 .123 .127 .131 .135 .139 .143 .147 .151 .155 .159 .163 .167 .171 .175 .179 .183 .187 .191 .195 .199 .203 .207 .211 .215 .219 .223 .227 .231 .235 .239 .243 .247 .251

IPv4 Multicasting

The processes of mapping Layer 3 to Layer 2 addresses is accomplished with the help of a special 24 bit HEX value of 01:00:5E. This special reserved 24 bit address prefix makes up half the Layer 2 address. Fortunately mapping the renaming portion of the address is very simple. All we need to do is take the remaining 23 bits ( 24 – 1 ) bits of the Layer 3 address and simply convert into HEX, and added to the remaining portion.

Class D Range[ 224.0.0.0 – 239.255.255.255 ]

  • Link Local – [ 224.0.0.0 – 224.0.0.255 ]
  • Globally Scoped – [ 224.0.1.0 – 238.255.255.255 ]
  • Source Specific – [ 232.0.0.0 – 232.255.255.255 ]
  • GLOP – [ 223.0.0.0 – 223.255.255.255 ]
  • Limited Scope – [ 239.0.0.0 – 239.255.255.255 ] – Similar to RFC 1918

Link Local Examples

  • 169.254.0.0/16 –169.254.255.255
  • Range – [ 224.0.0.0 – 224.0.0.255 ]
  • RIPv2 – 224.0.0.9
  • EIGRP – 224.0.0.10
  • OSPF – 224.0.0.5 – 224.0.0.6
  • TTL = 1

Reverse Path Forwarding

  1. If ingress ( multicast ) traffic is observed on multiple interfaces
  2. Use the underlying IGP unicast routing protocol to forward the traffic out the correct interface

Protocol Independent Multicast

  • PIM Dense Mode: Builds source distribution trees
  • PIM Sparse Mode: Builds unidirectional shared trees rooted at a Rendezvous Points or RPs

Rendezvous Points

  • Static RP – As the name implies it’s a static configuration 
  • Auto RP – Advertise availability automatically  

Internet Group [ Management ] Protocol

In a typical deployment IGMPv1, IGMPv2 or IGMPv3 would be configured on Routers, and Clients. The IGMP Snooping Protocol would be configured within the Switching infrastructure. The IGMPv1 or IGMPv2 Protocol on the Routers will manage the group Joins and Leaves  such as ( *, G ) and ( S, G ) join messages. For example an IGMP join message might look something like this ( *, 239.0.0.5 ) where the star in the source is independent. A source specific join might look like something like this ( 239.0.0.20, 239.0.0.5 ) etc.  The IGMP protocol will send Joins in the form of a IGMP Report messages such as flooding, pruning, and grafting.

  • IGMPv1 
  • IGMPv2 – Leave Messages 
  • IGMPv3 – Leave Messages + Source Specific – [ 232.0.0.0 – 232.255.255.255 ]
  • IGMP Snooping 
  • 60 Second update timer

Conversion Example

Remember when converting from Layer 3 to Layer 2 the first half of the [ MAC address ] is already done 01:00:5E. Overlapping can occur depending on the address range..!

  1. Address: 239.1.10.10 
  2. Convert the last [ three ] octets in this case 1.10.10 
  3. 0000.0001 0000.1010 0000.1010
  4. Flip the left most bit to 0 if it’s not already 0
  5. Convert 0000.0001 0000.1010 0000.1010 into HEX
  6. 0000.0001 = 01
  7. 0000.1010 = 0a
  8. 0000.1010 = 0a
  9. 01.0a.0a
  10. 01:00:5E.01.0a.0a

Routing Switching Voice Firewall Wireless