Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: ANDing problem

ANDing problem 10 years 6 months ago #13450

  • iana
  • iana's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
Hi guys,

Im having problems understanding ANDing, i know it is use by a router to send data packets,what i dont understand is, why a destination IP needs to be ANDs to its own subnet mask.

Help me
The administrator has disabled public write access.

AND 10 years 6 months ago #13454

  • TheBishop
  • TheBishop's Avatar
  • Offline
  • Moderator
  • Posts: 1719
  • Thank you received: 8
  • Karma: 5
Hello iana
A destination IP address is ANDed with its subnet mask to let the router understand which part of the address identifies the destination network and which part identifies the target host.
For example:

IP address 10.1.1.1 in binary is
00001010:00000001:00000001:00000001

Subnet mask is 255.255.0.0 which in binary is
11111111:11111111:00000000:00000000

If you AND in binary then
0 AND 0 = 0
0 AND 1 = 0
1 AND 0 = 0
1 AND 1 = 1

So AND ing the IP Address and Subnet Mask allows the 'network' part of the destination address to filter through while surpressing the part that identifies the destination host:

00001010:00000001:00000001:00000001 AND
11111111:11111111:00000000:00000000
gives
00001010:00000001:00000000:00000000
which identifies the destination network, 10.1.0.0

All the router then has to do is decide which interface it needs to forward the packet on to have it reach this destination network. Once on that network, the part of the address which identifies the host comes into play

Does that clear it up a bit?
The administrator has disabled public write access.
Time to create page: 0.073 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup