Class B Network IP Address Explained with Examples

July 04, 2026 by Andrew Smith

IP addresses are like street addresses for devices. They help computers find each other. A Class B network IP address is one old but important way to group those addresses. Think of it as a medium sized neighborhood with many houses.

TLDR: A Class B IP address uses the first two numbers for the network and the last two numbers for devices. Its default subnet mask is 255.255.0.0, also written as /16. Class B addresses start with a first number from 128 to 191. They are useful for big groups of devices, like schools, offices, and older company networks.

What Is a Class B IP Address?

An IPv4 address has four parts. Each part is called an octet. Here is one example:

150.25.10.45

Each number can go from 0 to 255. The dots separate the four octets.

In the old classful system, IPv4 addresses were split into classes. The main ones were Class A, Class B, and Class C. Each class had a different size.

Class B was the “middle child.” Not tiny. Not huge. Just right for many large networks.

The Simple Rule

A Class B address has a first octet from 128 to 191.

  • Class A: 1 to 126
  • Class B: 128 to 191
  • Class C: 192 to 223

So, if an IP address starts with 150, it is Class B.

Example:

  • 150.10.20.30 is Class B.
  • 172.16.5.9 is Class B.
  • 191.255.1.1 is Class B.

But this one is not:

  • 192.168.1.1 is Class C by old class rules.

Network Part and Host Part

Now comes the useful part.

In a Class B address, the first two octets are the network part. The last two octets are the host part.

Let’s use this address:

150.10.25.7

Break it into two chunks:

  • Network: 150.10
  • Host: 25.7

This means the device lives on the 150.10.0.0 network. Its device ID is 25.7.

Picture an apartment building. The network part is the building name. The host part is the room number. The mail carrier needs both.

Default Subnet Mask for Class B

The default subnet mask for Class B is:

255.255.0.0

You may also see it written as:

/16

This means the first 16 bits are for the network. The last 16 bits are for hosts.

Do not worry if “bits” sounds scary. A bit is just a tiny on or off switch. Networks are full of tiny switches wearing serious business suits.

With a default Class B mask, the layout looks like this:

  • Network.Network.Host.Host
  • 150.10.25.7
  • 150.10 is the network.
  • 25.7 is the host.

How Many Hosts Can a Class B Network Have?

A Class B network has 16 bits for hosts.

That gives:

65,536 total addresses

But two addresses are reserved.

  • One is for the network address.
  • One is for the broadcast address.

So the usable number is:

65,534 hosts

That is a lot of laptops, printers, phones, servers, cameras, smart coffee machines, and that one mystery device named “Bob.”

Example 1: A Basic Class B Network

Let’s take this IP address:

150.10.25.7

Because the first octet is 150, it is Class B.

The default mask is:

255.255.0.0

So the network is:

150.10.0.0

The broadcast address is:

150.10.255.255

The usable host range is:

  • 150.10.0.1
  • through
  • 150.10.255.254

The address 150.10.25.7 fits inside that range. So it is a normal host on that network.

Example 2: A Private Class B Address

Some IP addresses are private. They are used inside homes, offices, labs, and schools. They are not used directly on the public internet.

For Class B, the well-known private range is:

172.16.0.0 to 172.31.255.255

Here is an example:

172.16.5.20

This is private. It is often used inside company networks.

With the default Class B idea, 172.16.5.20 belongs to:

172.16.0.0/16

The host part is:

5.20

So the device is like “room 5.20” in the “172.16” building.

Example 3: Spot the Class B Address

Try this mini game.

Which of these are Class B?

  • 10.1.2.3
  • 130.45.8.9
  • 172.20.1.100
  • 192.168.5.5
  • 191.50.10.10

Answers:

  • 10.1.2.3 is Class A.
  • 130.45.8.9 is Class B.
  • 172.20.1.100 is Class B.
  • 192.168.5.5 is Class C.
  • 191.50.10.10 is Class B.

If the first number is between 128 and 191, you found a Class B address. Congratulations. You now have tiny network detective glasses.

Image not found in postmeta

Class B vs Class A vs Class C

Here is the quick comparison:

  • Class A: Very large networks. Default mask is 255.0.0.0.
  • Class B: Medium to large networks. Default mask is 255.255.0.0.
  • Class C: Smaller networks. Default mask is 255.255.255.0.

Class A gives a network tons of host addresses. Class C gives fewer. Class B sits in the middle.

That made Class B popular for universities, big offices, and large organizations. It had enough space without being as massive as Class A.

Do We Still Use Class B Today?

Yes and no.

The old class system is mostly historical now. Modern networks use CIDR. CIDR stands for Classless Inter-Domain Routing.

CIDR lets network admins choose flexible sizes like:

  • /24
  • /20
  • /16
  • /12

So we do not have to stay inside strict Class A, B, or C boxes.

Still, people say “Class B” all the time. It is a handy shortcut. It helps explain address ranges and default masks.

Common Mistakes

  • Mistake 1: Thinking every 172 address is private. Not true. Only 172.16.0.0 to 172.31.255.255 is private.
  • Mistake 2: Thinking Class B always uses /16 today. Modern networks can use many masks.
  • Mistake 3: Mixing up the network and host parts. In default Class B, the first two octets are the network.

Easy Memory Trick

Remember this:

Class B = Big middle network.

It starts with 128 to 191. It uses 255.255.0.0 by default. It has the first two octets for the network. It can support 65,534 usable hosts.

That is the heart of it.

Final Thought

A Class B IP address is not magic. It is just a neat way to split an IPv4 address. The first two numbers name the network. The last two numbers name the device. Once you see that pattern, Class B becomes much less scary and much more like a map.