Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

camparing IP subnets...

Featured Replies

I am making a calculation that compares IP addresses to see if they are the same. That is easy enough, but I also want to check to see if they are on the same sub net. for example:

55.56.57.56

55.56.57.69

are not the same IP but they are on the same subnet, because the first 3 numbers on the same but the last is different.

But each of the numbers can be 1 to 3 digits and can't just compare the left X numbers, i just want to see if the first 3 are the same.

How would your left brain do that?

You need to treat the IP address as a text string. This test will return a 1 if the subnets match (1.2.3.x = 1.2.3.y)

Left(IP1, Position(IP1, ".", 1, 3) - 1) = Left(IP1, Position(IP2, ".", 1, 3) - 1)

-bd

Be careful. The first 3 numbers do not necessarily specify the subnet. You need to check the subnet mask. If it's 255.255.255.0 then fine, but this isn't always the case in large organizations with large networks.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.