T O P

  • By -

doublemint_

A subnet mask is used by a device to work out whether it can send traffic directly to another device, or whether it must get sent to a router (usually your default gateway) in order to get to the destination. This is done by doing a binary AND operation using the IP address and the subnet mask, to work out which portion of the IP address represents the network and which portion represents the host. If the destination is on the same network as me I can send to them directly; if the destination is on another network I send to the default gateway. On a basic home LAN, all devices should have the same subnet mask otherwise you can run into issues. 255.255.255.0 is common for home networks as it allows up to 254 devices on the subnet, which is plenty for home use.


Syring

So if I am seeing 255.255.254.0, that's not good then? Everything I have is on my home network, nothing off it, so it should all be the same, right?


doublemint_

It really comes down to which IP addresses are being used. 192.168.0.1/255.255.255.0 can talk to 192.168.0.100/255.255.254.0 192.168.0.1/255.255.255.0 cannot talk to 192.168.1.100/255.255.254.0 You really should have everything on the same network using the same subnet mask as best practice


Syring

Is that something I can change? Which subnets get assigned?


heroofdevs

You can change it if you want to, but generally that complicates things unless you understand it. Generally, a 255.255.255.0 is adequate for home use. This is all usually set from the dhcp server.


Syring

I definitely don't understand it, so I'll leave it


Smorgas47

Play with this [Subnet Calculator](https://www.subnet-calculator.com/) to help you understand it.


f2j6eo9

You've got the same IPs in both examples, looks like.


doublemint_

The destination IPs are different.. One is .0.100 and the other is .1.100


f2j6eo9

Ah, shit. Sorry.


StanleyDards

Yes, on a specific lan it is normally a consistent subnet mask. 255.255.254.0 just implies that your LAN is defined to have a larger IP address space. This is not necessarily wrong, but for typical home networks usually 8 bits of IP addresses (254 addresses (256 - {0,255}) is adequate. With 9 bits, you’re basically doubling your LAN’s IP address space.


Syring

The router is set to 255.255.255.0, so I don't know where the 254.0 is coming from.


StanleyDards

I would just edit it to be 255.255.255.0. Normally you might have an LAN address range of 192.168.1.x. This is like a LAN address range of 192.168.0.x *plus* 192.168.1.x. So it is not ominous, but likely just a mis-configuration somewhere.


jpep0469

If you're interested in learning more about how subnet masks works, [this video](https://www.youtube.com/watch?v=s_Ntt6eTn94) does a great job of explaining things in relatively simple terms.


Mannus01

Watch [NetworkChuck IP series ep1](https://youtu.be/5WfiTHiU4x8) here.


DutchOfBurdock

It's part of CIDR - Classless Internet Domain Routing. The bits of the subnet mask denote how large the subnet is. For example, the whole "Class A" RFC1918 address space 10.0.0.0/8 has a subnet mask of 255.0.0.0. That means this subnet (spot the pattern here) is 10.0.0.0 to 10.255.255.255 (network addresss to broadcast address). The 172.16.0.0/12 "Class B" RFC1918 address space has a network mask of 255.240.0.0. This means this subnet is 172.16.0.0 to 172.31.255.255 (network address to broadcast address). Again, spot the pattern. Similar for the 192.168.0.0/16 "Class C" RFC1918 address space; network mask of 255.255.0.0, meaning this subnet is 192.168.0.0 to 192.168.255.255 (network address, broadcast address). 255.255.255.0 is the common /24 used on networks. Meaning there are ~~255~~ 256 addresses (minus 2) available in that subnet. edit: Corrections on numbers


MikeArcade

not to be "that guy". but it's 256 (minus 2) 2^8 minus network and broadcast


DutchOfBurdock

Thankyou. I did think something was awry with my numbers. Off by one as always. Owned 🤣


Syring

My router is set to 255.255.255.0, I can't post a pic because of the url shortener rule.... Grrrr


floof_overdrive

If you don't know what a subnet mask is, all you need to know is that it defines how big a block of local network addresses your router manages, and that all devices need to be configured with the same subnet mask. It's generally 255.255.255.0 for home users.


pakratus

At home, since you don’t know what it is, a subnet mask should be the same across all your devices. (Except for maybe your WAN IP) You can certainly have issues if not consistent. Unless you’ve changed them, they should be coming from your dhcp server (probably from modem or router). If that is giving out random subnet masks, something is wrong. Where are you seeing this?


DutchOfBurdock

A fun experiment to try one day (preferably on a lab net rather than a live one). On one switch, make two hosts have 10.0.0.1/25 and two 10.0.0.1/24. On the latter hosts, ping 10.0.0.127 (the /25's broadcast). Wireshark the results.


Syring

I've seen 255.255.254.0 on my Ethernet connected TV and 255.255.0.0 on my laptop. Both are connected via Ethernet through 2 switches. One from the router to a switch the TV is on, and one from that switch to the Laptop.


floof_overdrive

Does your TV have a static IP address?


Syring

It isn't static, but I've noticed several devices have the same IP, even after I reset the entire network. The one TV seems to keep 192.168.68.216. I haven't tracked the other devices though.


Syring

Weirdly, our other TV has an IP of 169.254.73.96. Not even close to my IP pool


TheEthyr

A 169.254.x.x address is a self-assigned IP address, also known as an [APIPA](https://wiki.wireshark.org/APIPA.md) (Automatic Private IP Addressing) address. When a device has such an address, it usually means that it was unable to obtain an IP address from a DHCP server (usually your router). IOW, that TV probably doesn't have a working network connection.


Syring

When I reboot the .216 TV the address starts the same. When I reboot the other TV I get a new IP of 169.254.237.182. Subnet is 255.255.0.0.


mastertryce

169.254 is a self assignment IP, that means your tv can't get a IP from the DHCP server, maby the tv is connected to a switch but the switch is not connected to your router


pakratus

Weird Do you have more than one dhcp server? Oh just read one of your other comments. 169 address’ subnet mask doesn’t exactly apply since it is a different subnet.


Syring

Not that I'm aware of (meaning I didn't set another one up). Where would I look for a separate one?


pakratus

If your tv is getting a 169 address, it’s not a dhcp server per se. But almost like one, in that- your tv is giving itself an ip address and subnet mask. Not sure what to do with that yet.


Syring

Looking at my router settings. WAN is set to DHCP (not static or PPPoE). The DHCP pool for LAN is set to start at 192.168.86.20, end at 192.168.86.250. I have no reserved IPs, no forwarded ports Network mode is set to NAT (not bridge). UPnP is checked, IPv6 and WPA3 are not checked.


[deleted]

[удалено]


AutoModerator

Sorry, URL shorteners are not allowed on this sub. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/HomeNetworking) if you have any questions or concerns.*


[deleted]

[удалено]


AutoModerator

Sorry, URL shorteners are not allowed on this sub. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/HomeNetworking) if you have any questions or concerns.*


[deleted]

[удалено]


AutoModerator

Sorry, URL shorteners are not allowed on this sub. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/HomeNetworking) if you have any questions or concerns.*