Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: How to identify subnets??

How to identify subnets?? 7 years 9 months ago #29396

  • astra
  • astra's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Hello All,


How identify that the two LAN cards are in same subnet or in different in classless network.?/
For an example: -

lan0 : 10.129.246.139 : 255.255.255.224
lan3 : 192.168.0.69 : 255.255.255.240

lan1 : 192.168.1.1 : 255.255.255.0
lan2 : 172.27.120.225 : 255.255.255.0

Can anyone help me to identify whether pair of LANs (lan0,lan3) and (lan1,lan2) are in same subnet or in different??

Thanks in advance,

Best Regards,
Amit
The administrator has disabled public write access.

Re: How to identify subnets?? 7 years 9 months ago #29397

  • Smurf
  • Smurf's Avatar
  • Offline
  • Moderator
  • Posts: 1390
  • Karma: 1
Hi Astra,

The maths is as follows;

If you convert to binary for the IP;

10.129.246.139 = 00001010.10000001.11110110.10001011

Now, convert the subnet mask into binary;

255.255.255.224 = 11111111.11111111.11111111.11100000

Now perform an AND operation on these (to get the NetworkID)

00001010.10000001.11110110.10001011
11111111.11111111.11111111.11100000
AND 00001010.10000001.11110110.10000000

Ok, now do this again for the next one;

If you convert to binary for the IP;

192.168.0.69 = 11000000.10101000.00000000.01000101

Now, convert the subnet mask into binary;

255.255.255.224 = 11111111.11111111.11111111.11110000

Now perform an AND operation on these (to get the NetworkID)

11000000.10101000.00000000.01000101
11111111.11111111.11111111.11110000
AND 11000000.10101000.00000000.01000000

So, if we compare the two, they dont match therefore they are not on the same network;

00001010.10000001.11110110.10000000
11000000.10101000.00000000.01000000

If we did lan0 against 10.129.246.140 255.255.255.224 then we would get this;

If you convert to binary for the IP;

10.129.246.140 = 00001010.10000001.11110110.10001100

Now, convert the subnet mask into binary;

255.255.255.224 = 11111111.11111111.11111111.11100000

Now perform an AND operation on these (to get the NetworkID)

00001010.10000001.11110110.10001100
11111111.11111111.11111111.11100000
AND 00001010.10000001.11110110.10000000

Now if we compared these, you would see

00001010.10000001.11110110.10000000
00001010.10000001.11110110.10000000

therefore they match so 10.129.246.139 & 10.129.246.139 are on the same LAN

Hope it makes some sort of sense. If not, take a look at the subnetting section on this site www.firewall.cx/ip-subnetting-intro.php
Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
The administrator has disabled public write access.

Re: How to identify subnets?? 7 years 9 months ago #29399

  • astra
  • astra's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Hello Wayne,

Thanks for your reply and valuable input.

Keep enjoying,

Amit
The administrator has disabled public write access.

Re: How to identify subnets?? 7 years 9 months ago #29405

  • Smurf
  • Smurf's Avatar
  • Offline
  • Moderator
  • Posts: 1390
  • Karma: 1
no worries
Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
The administrator has disabled public write access.

Re: How to identify subnets?? 7 years 7 months ago #30276

  • NeoTech
  • NeoTech's Avatar
  • Offline
  • Distinguished Member
  • Posts: 101
  • Karma: 0
"therefore they match so 10.129.246.139 & 10.129.246.139 are on the same LAN"...



Ofcourse they are smurf, these would be the same machine, lol.

:P

Neo
Tech
The administrator has disabled public write access.

Re: How to identify subnets?? 7 years 6 months ago #30399

  • pedenski
  • pedenski's Avatar
  • Offline
  • Frequent Member
  • Posts: 75
  • Karma: 0
I dont get it..
therefore they match so 10.129.246.139 & 10.129.246.139 are on the same LAN

of course they are, why bother computing it since its the same address...

:shock:
The administrator has disabled public write access.
Time to create page: 0.085 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