Mask Operations - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Mask Operations

Description:

Mask Operations. Masks were introduced in Chapter 3 ... 11111111 11100000 00000000 00000000 (mask) 11111111 01000000 00000000 00000000 (result) ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 8
Provided by: WayneS2
Category:
Tags: mask | operations

less

Transcript and Presenter's Notes

Title: Mask Operations


1
Mask Operations
  • Masks were introduced in Chapter 3
  • IP addresses alone do not tell you the size of
    their network or subnet parts
  • Network Mask
  • Has 1s in the network part
  • Has 0s in the remaining bits
  • Subnet Mask
  • Has 1s in the network plus subnet parts
  • Has 0s in the remaining bits

2
Mask Operations
  • Based on Logical AND
  • Both must be true for the result to be true
  • Example
  • 1010101010 Data
  • 1111100000 Mask
  • 1010100000 Result

3
Mask Operations
  • Based on Logical AND
  • If mask bit is 1, get back original data
  • If mask bit is 0, bet back zero
  • Example
  • 1010101010 Data
  • 1111100000 Mask
  • 1010100000 Result

4
Mask Operations
  • IP packet arrives at a router
  • Router sees destination IP address
  • 11111111 01000000 10101010 00000000
  • Compares to each router forwarding table row
  • Address Part in First Entry
  • 11111111 01000000 00000000 00000000
  • Mask in First Entry
  • 11111111 11100000 00000000 00000000

5
Mask Operations
  • Mask the IP destination Address
  • 11111111 01000000 10101010 00000000 (IP address)
  • 11111111 11100000 00000000 00000000 (mask)
  • 11111111 01000000 00000000 00000000 (result)
  • Compare Result with First Entry Address part
  • 11111111 01000000 00000000 00000000 (address
    part)
  • 11111111 01000000 00000000 00000000 (result)
  • The Entry is a Match!

6
Mask Operations
  • Recap
  • Read destination IP address of incoming IP packet
  • For each entry in the router forwarding table
  • Read the mask (prefix)
  • Mask the incoming IP address
  • Compare the result with the entrys IP address
    part
  • Do they match or not?

7
Mask Operations
  • Simple for Computers
  • Computers have circuitry to AND to numbers
  • Computers have circuitry to COMPARE two numbers
    to see if they are equal or not
  • Very computer-friendly, so used on routers
  • Difficult for people, unfortunately
Write a Comment
User Comments (0)
About PowerShow.com