Click here to Skip to main content
15,918,243 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: What have I gotten myself into now? Pin
enhzflep25-May-24 13:02
enhzflep25-May-24 13:02 
GeneralRe: What have I gotten myself into now? Pin
kmoorevs23-May-24 5:19
kmoorevs23-May-24 5:19 
GeneralRe: What have I gotten myself into now? Pin
Jeremy Falcon23-May-24 8:59
professionalJeremy Falcon23-May-24 8:59 
QuestionChatGPT makes me *less* confident about things I know little about Pin
dandy7222-May-24 10:34
dandy7222-May-24 10:34 
AnswerRe: ChatGPT makes me *less* confident about things I know little about Pin
Mircea Neacsu22-May-24 11:56
Mircea Neacsu22-May-24 11:56 
GeneralRe: ChatGPT makes me *less* confident about things I know little about Pin
dandy7223-May-24 4:08
dandy7223-May-24 4:08 
AnswerRe: ChatGPT makes me *less* confident about things I know little about Pin
11917640 Member 22-May-24 18:38
11917640 Member 22-May-24 18:38 
AnswerRe: ChatGPT makes me *less* confident about things I know little about Pin
steve at p2cl24-May-24 3:13
steve at p2cl24-May-24 3:13 
TL;DR; you are correct and devices with an IP of 192.168.32.0 (and up) would not be on the same subnet as a device with an IP of 192.168.11.1 ... so should not be able to communicate directly... and the TCP/IP stack(s) would/should try and "route" the packets via something that knows about "routing" (or in this case not at all because such subnet addresses are internal/private/non-routable)

Oh boy, I hope I've got all these details correct Smile | :)

I don't think of a subnet as a number... I always think of a subnet in terms of the binary mask... network mask

... 255.255.224.0 ... is ... 11111111.11111111.11100000.00000000

The 'network' of a device can be found by ANDing the device IP with that network mask (gives the subnet address). If I do the same with another device IP and I find that the resulting values (i.e. subnet addresses) are the same, then the 2 devices are on the same 'network/subnet' and can (copper and switches willing) communicate directly

If the value I get after applying the mask is different then the devices are on different subnets and the TCP/IP stack will/should send it to something that can "route" between these subnets.

So...

192.168.0.1 masked (ANDed) with the 255.255.224.0 pattern will be 192.168.0.0, or 11000000.10101000.00000000.00000000

192.168.31.1 masked with that pattern will be 192.168.0.0 ... same subnet is local so can communicate directly (and at which point ARP kicks in)

192.168.32.1 masked with that pattern will be 192.168.32.0 ... 11000000.10101000.00100000.00000000 (see the new 1 in the third octet which corresponds with a 1 in both the mask and the IP address) ... subnet values are different so different network/subnet, needs to be routed

Of course, if the a router is set up in an interesting way, and knows how to route for both the 192.168.0.0/19 subnet AND the 192.168.32.0/19 network on the same piece of copper, then it might/should work (DHCP et.all. complexity though)

And if a mask is set incorrectly somewhere (e.g. 255.255.0.0) that it'll maybe work one way and not the other

And it all depends on the TCP/IP stack. I don't know whether ARP understands netmasks so whether a device on a different subnet is plugged into the same network cabling could obtain the hardware network address regardless of subnet... so this is more about routing than security.

The good thing about doing it the way you want to is it makes you think about details, and not just plug simple numbers in like 255.255.255.0 ... all good fun Smile | :)
AnswerRe: ChatGPT makes me *less* confident about things I know little about Pin
Bruce Patin24-May-24 3:55
Bruce Patin24-May-24 3:55 
GeneralWhen technology doesn't get it right... Pin
charlieg22-May-24 8:00
charlieg22-May-24 8:00 
GeneralRe: When technology doesn't get it right... Pin
Chris Maunder22-May-24 8:06
cofounderChris Maunder22-May-24 8:06 
GeneralRe: When technology doesn't get it right... PinPopular
Rick York22-May-24 13:26
mveRick York22-May-24 13:26 
GeneralRe: When technology doesn't get it right... Pin
Jeremy Falcon22-May-24 9:32
professionalJeremy Falcon22-May-24 9:32 
GeneralRe: When technology doesn't get it right... Pin
charlieg22-May-24 9:36
charlieg22-May-24 9:36 
GeneralRe: When technology doesn't get it right... Pin
jmaida22-May-24 15:14
jmaida22-May-24 15:14 
GeneralRe: When technology doesn't get it right... Pin
Steve Naidamast23-May-24 8:42
professionalSteve Naidamast23-May-24 8:42 
GeneralRe: When technology doesn't get it right... Pin
Jeremy Falcon23-May-24 9:28
professionalJeremy Falcon23-May-24 9:28 
GeneralRe: When technology doesn't get it right... Pin
Steve Naidamast23-May-24 9:39
professionalSteve Naidamast23-May-24 9:39 
GeneralRe: When technology doesn't get it right... Pin
Richard Andrew x6423-May-24 11:28
professionalRichard Andrew x6423-May-24 11:28 
GeneralRe: When technology doesn't get it right... Pin
Steve Naidamast23-May-24 11:45
professionalSteve Naidamast23-May-24 11:45 
GeneralRe: When technology doesn't get it right... Pin
Richard Andrew x6423-May-24 11:49
professionalRichard Andrew x6423-May-24 11:49 
GeneralRe: When technology doesn't get it right... Pin
Steve Naidamast23-May-24 11:55
professionalSteve Naidamast23-May-24 11:55 
GeneralRe: When technology doesn't get it right... Pin
dandy7222-May-24 10:47
dandy7222-May-24 10:47 
GeneralRe: When technology doesn't get it right... Pin
Rick York22-May-24 13:22
mveRick York22-May-24 13:22 
GeneralRe: When technology doesn't get it right... Pin
Rick York22-May-24 13:23
mveRick York22-May-24 13:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.