cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2222
Views
1
Helpful
2
Replies

Network ID same for Class C

ankitohc
Spotlight
Spotlight

Team,

I am new to networking and learning CCNA. I am confused about the network ID for class C. We usually consider a different network if the network IDs are not the same example class A 10.10.1.1 and 10.11.1.1 they both are different network..but in class C we have three network ID So how can we know about the different network when doing subnetting for class C IP address

192.168.1.2 /30
192.168.1.0192.168.1.1 - 192.168.1.2192.168.1.3
192.168.1.4192.168.1.5 - 192.168.1.6192.168.1.7
192.168.1.8192.168.1.9 - 192.168.1.10192.168.1.11
192.168.1.12192.168.1.13 - 192.168.1.14192.168.1.15
192.168.1.16192.168.1.17 - 192.168.1.18192.168.1.19
192.168.1.20192.168.1.21 - 192.168.1.22192.168.1.23
192.168.1.24192.168.1.25 - 192.168.1.26192.168.1.27
192.168.1.28192.168.1.29 - 192.168.1.30192.168.1.31
192.168.1.32192.168.1.33 - 192.168.1.34192.168.1.35
192.168.1.36192.168.1.37 - 192.168.1.38192.168.1.3

 

 

1 Accepted Solution

Accepted Solutions

Joseph W. Doherty
Hall of Fame
Hall of Fame

"example class A 10.10.1.1 and 10.11.1.1 they both are different network"

Incorrect, they are both the same Class A network, network ID is 10 (in fact for this private Class A you might hear someone refer to it as 10 net).

"class C we have three network ID"

3 network ID?  If you meant to say the first three octets are the network ID, that would be correct.  (BTW, Class A is just the first octet, Class B uses the first two octets.)

"So how can we know about the different network when doing subnetting for class C IP address"

The same way as subnetting a Class A or B, it depends on the network mask, one smaller than the natural class mask.

Your 192.168.1.x Class C network, is apparently being subnetted to a series of /30s, which would use a 255.255.255.252 mask, rather than a Class C mask of 255.255.255.0.

To first understand classful networking, you should understand it was a way for a routing protocol, like RIPv1 or Cisco's IGRP, to pass networks about without needing to include a network mask.  The address, itself, implies the mask.

So a Class A, from 0.x.x.x to 127.x.x.x implies the network mask is 255.0.0.0.  (BTW, the first bit of a Class A IP is zero.)

So a Class B, from 128.0.0.0 to 191.255.x.x implies the network mask is 255.255.0.0.  (BTW, the first two bits of a Class B IP is 10.)

So a Class C, from 192.0.0.x to 223.255.255.x implies the network mask is 255.255.255.0. (BTW the first 3 bits of a Class C IP is 110.  NB: just looking at the first 3 bits tells whether IP is Class A, B or C.)

Subnetting is subdividing a natural Class IP.

IP 10.168.1.1/24 is a subnet of the Class A 10.x.x.x but IP 192.168.1.1/24 is in the Class C 192.168.1.x network.

IP 10.168.1.1/30 is a subnet of the Class A 10.x.x.x but IP 192.168.1.1/30 is a subnet of the Class C 192.168.1.x network.

Again, how do we recognize a subnet?  First we need to see what Class an IP falls within, then we need to determine if it's using an unnatural network mask smaller (larger would be a supernet) than the Class's natural network mask.

As Classful routing protocols don't carry network masks, when subnetting (or supernetting), there are a bunch of dos and don'ts.

In Classless networks, there's really no such thing as a subnet, but we still use the term for any network and/or subdividing an network's address space precluding it from being used other than as an aggregate.

For example, in Classless networks, I might have the network 192.168.1.1/24 or 192.168.1.1/30, but if I use the latter /30 network (again, it's now, Classless, not a subnet), I can no longer have the network (not a route) 192.168.1.1/24, or /29, /28, /27, /26, /25, /23, /22, . . .

On first read, you'll probably not understand much of the above, but if you continue your studies, or have someone knowledgeable about networking network addressing, to consult, likely the "light bulb" will come on, and you'll find, it's not really complex as it seems. 

View solution in original post

2 Replies 2

M02@rt37
VIP
VIP

Hello @ankitohc,

I think the question is about both classful and classless subnetting.

In classful subnetting, IP addresses are divided into predefined classes: Class A, Class B, and Class C. Each class has a default subnet mask associated with it.

Class A: 1.0.0.0 to 126.0.0.0 (subnet mask: 255.0.0.0)

Class B: 128.0.0.0 to 191.255.0.0 (subnet mask: 255.255.0.0)

Class C: 192.0.0.0 to 223.255.255.0 (subnet mask: 255.255.255.0)

With classful subnetting, the subnet mask is implied by the class of the IP address. For example, if you have an IP address of 192.168.1.1, it would belong to Class C, and the default subnet mask would be 255.255.255.0.

Classless Subnetting (CIDR): In classless subnetting (CIDR stabd for Classless Inter-Domain Routing), the concept of predefined classes is no longer used. All IP addresses are treated as one large address space, and subnets can be of varying sizes. The subnet mask is represented in CIDR notation, which indicates the number of bits used for the network portion of the IP address.

You understand that in CIDR notation, a subnet mask of /24 means the first 24 bits are used for the network portion, and the remaining 8 bits are used for host addresses. A /30 subnet mask means the first 30 bits are used for the network portion, leaving 2 bits for host addresses.

CIDR allows for more flexibility in defining subnet sizes and efficiently using IP address space.

Classful subnetting is based on predefined classes with fixed subnet masks, while classless subnetting (CIDR) allows for flexible subnet sizes by specifying the number of bits used for the network portion of the IP address. Classless subnetting is the modern approach used in today's networks for better address space utilization and more efficient routing.

In classful subnetting, the subnet mask is associated with the class of the IP address, and it is determined based on the default subnet masks for each class.

Class A: Default subnet mask is 255.0.0.0 (or /8 in CIDR notation).

Class B: Default subnet mask is 255.255.0.0 (or /16 in CIDR notation).

Class C: Default subnet mask is 255.255.255.0 (or /24 in CIDR notation).

In classful subnetting, all IP addresses within a specific class have the same default subnet mask, and the class determines the size of the network and the number of available hosts.

Then, when you say "We usually consider a different network if the network IDs are not the same example class A 10.10.1.1 and 10.11.1.1 they both are different network."

--In a clasfull context this is a Class A these IP belong to the same subnet 10.0.0.0/8.

In classless subnetting, the subnet mask is not bound to the class of the IP address, and it can be specified in any way to divide the address space into smaller subnets of varying sizes.

--With you example again, these IP with /30 subnet belong to different subnet.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Joseph W. Doherty
Hall of Fame
Hall of Fame

"example class A 10.10.1.1 and 10.11.1.1 they both are different network"

Incorrect, they are both the same Class A network, network ID is 10 (in fact for this private Class A you might hear someone refer to it as 10 net).

"class C we have three network ID"

3 network ID?  If you meant to say the first three octets are the network ID, that would be correct.  (BTW, Class A is just the first octet, Class B uses the first two octets.)

"So how can we know about the different network when doing subnetting for class C IP address"

The same way as subnetting a Class A or B, it depends on the network mask, one smaller than the natural class mask.

Your 192.168.1.x Class C network, is apparently being subnetted to a series of /30s, which would use a 255.255.255.252 mask, rather than a Class C mask of 255.255.255.0.

To first understand classful networking, you should understand it was a way for a routing protocol, like RIPv1 or Cisco's IGRP, to pass networks about without needing to include a network mask.  The address, itself, implies the mask.

So a Class A, from 0.x.x.x to 127.x.x.x implies the network mask is 255.0.0.0.  (BTW, the first bit of a Class A IP is zero.)

So a Class B, from 128.0.0.0 to 191.255.x.x implies the network mask is 255.255.0.0.  (BTW, the first two bits of a Class B IP is 10.)

So a Class C, from 192.0.0.x to 223.255.255.x implies the network mask is 255.255.255.0. (BTW the first 3 bits of a Class C IP is 110.  NB: just looking at the first 3 bits tells whether IP is Class A, B or C.)

Subnetting is subdividing a natural Class IP.

IP 10.168.1.1/24 is a subnet of the Class A 10.x.x.x but IP 192.168.1.1/24 is in the Class C 192.168.1.x network.

IP 10.168.1.1/30 is a subnet of the Class A 10.x.x.x but IP 192.168.1.1/30 is a subnet of the Class C 192.168.1.x network.

Again, how do we recognize a subnet?  First we need to see what Class an IP falls within, then we need to determine if it's using an unnatural network mask smaller (larger would be a supernet) than the Class's natural network mask.

As Classful routing protocols don't carry network masks, when subnetting (or supernetting), there are a bunch of dos and don'ts.

In Classless networks, there's really no such thing as a subnet, but we still use the term for any network and/or subdividing an network's address space precluding it from being used other than as an aggregate.

For example, in Classless networks, I might have the network 192.168.1.1/24 or 192.168.1.1/30, but if I use the latter /30 network (again, it's now, Classless, not a subnet), I can no longer have the network (not a route) 192.168.1.1/24, or /29, /28, /27, /26, /25, /23, /22, . . .

On first read, you'll probably not understand much of the above, but if you continue your studies, or have someone knowledgeable about networking network addressing, to consult, likely the "light bulb" will come on, and you'll find, it's not really complex as it seems.