08-24-2011 09:14 AM - edited 03-07-2019 01:52 AM
Hi all
i created a vlan with ip address 172.19.1.254 255.255.255.0 ..i assigned a static ip for a server in this vlan with
IP address172.19.1.1
Subnet mask : 255.255.255.0
Gateway : 172.19.1.254
the machine is working fine but this server is working even when the subnet mask is 255.255.0.0 i though it should be a class subnet mask only but it is working both ways i dont know why..
can you please let me know any settings i have to do in my switch or in the server
thanks
Karthik
08-24-2011 09:23 AM
Kartik,
You should have the same subnet mask for the IP address on switch as well as on server.
What you are seeing is expected. When you assign a /16 mask on the server, what really matters is the first 16 bits of the IP address. So, with /16, the network range is 172.19.0.0 -172.19.255.255 & since 172.19.1.254 falls in this range, it is in the same subnet & hence it can be pinged.
With /24 mask, the range is 172.19.1.0 - 172.19.1.255, still 172.19.1.254 falls in the range & can be pinged. What really matters is that your gateway should be in the same subnet.
I would use /24, if I have less than 255 (253 ideally) users in that vlan, if that specific vlan has more than 255 users, let's say 500, I will use subnet mask of /16 on both server & vlan interface.
HTH,
Amit
08-24-2011 09:27 AM
So what you are saying is the subnet mask doesn’t matter the gateway should be correct ? am I right
08-24-2011 09:28 AM
Hi,
The server and the switch both have a class C address and it works just fine. Since both devices are in the same subnet, you can have one mask of 16 and the other one 24. In this case the server does not need to use the gateway.
You need the correct gateway if you are leaving the local subnet.
HTH
08-24-2011 09:30 AM
Understood thank you
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide