subnetting problem will this work?

Will this work guys?
i need 2 networks with 1 ip range for my exam tomorrow.

so i had this in thought; i only need 20 hosts but i want to have some spare adresses
network 0 192.168.10.0-127 255.255.255.128
network 1 192.168.10.128-255 255.255.255.128 or does this need to be different?
klaas vaakAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
masnrockCommented:
i need 2 networks with 1 ip range for my exam tomorrow.
What exactly do you mean by this?

The two networks you have are certainly OK, but it depends on exactly what you want to accomplish.
0
 
klaas vaakAuthor Commented:
2 seperated networks using the same ip. so with 192.168.10.0 or is this not possible.
0
 
AlanConsultantCommented:
Hi Klaas,

I'm not entirely sure what the requirement actually is, but if you mean two subnets with no overlap, but with no 'gap' between the two, then what you have set out does achieve that.

Your second subnet (192.168.10.128 / 25) is not a 'standard' subnet, but mathematically it works.  If you are setting this up on hardware for real, it will depend on whether the router or whatever device(s) are involved will accept that subnet or not (some cheap routers only allow a few predefined subnets).

Again, not sure what you mean exactly, but the two combined subnets are also equal to this one:

192.168.10.0 / 255.255.255.0

or if you prefer:

192.168.10.0 / 24


Hope that helps,

Alan.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
masnrockCommented:
2 seperated networks using the same ip. so with 192.168.10.0 or is this not possible.
This is the portion that's not quite clear.

If by "same ip" you mean 192.168.10.x range, then yes, what you're doing is fine. You could've made the networks even smaller had you wanted to by adding additional bits to the subnet mask.

You proposed 255.255.255.128 subnet mask. You actually could've gone as far as 255.255.255.224 subnet mask and still had enough hosts.
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
klaas vaakAuthor Commented:
okay so i won't need to use any vlans whatsoever. when i have gigabitethernet 0/1 with 192.168.10.0-127 with 255.255.255.128 and i have gigabitethernet 0/2 with 192.168.10.128-255 also using 255.255.255.128.

Also is it better to use vlans for this?
0
 
AlanConsultantCommented:
Hi Klaas,

It is not clear what your objective is here.

I had thought from your initial question, this was an exam setup / question?

Alan.
0
 
masnrockCommented:
No, you wouldn't *have* to use VLANs.

VLANs would work, but whether they're better depends on the use case (like device locations and so on).
0
 
klaas vaakAuthor Commented:
Okee the VLAN are clear now. To clear things up i have the office and the warehouse. they want the networks to be seperated but i only have 1 router.

so i thought about this : network 0 192.168.10.0-127 255.255.255.128
                                            network 1 192.168.10.128-255 255.255.255.128
The only doubts i have is about the subnet using the 255.128.
i recreated this situation in packet tracer and it worked. but I still have my doubts about it
0
 
CompProbSolvCommented:
As others have suggested, what you have specified will give you two different subnets.  In addition to the concern about whether or not a /25 net mask will be allowed in your router, there is also concern about whether or not your router allows two different LAN IP addresses.  Lastly, be sure to configure the routing so that you either keep the two subnets isolated or to allow communication between them.
0
 
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
Applying Cisco Logic, for 20 host.

2^n-2 > #host    
for n=0 and #host=20
2^0 -2 > 20
1-2 > 20  
-1 > 20 (doens't comply), then increase n in 1.

for n=1 and #host=20
2^1-2 > 20
2-2 > 20
0 > 0   (doesn't c omply), then increase n in 1

for n=2 and #host =20;
2^2-2 > 20
4-2 > 20
2 > 20 (doesn't comply), then increase n in 1

for n=3 and #host =20;
2^3 - 2  > 20
8-2 > 20
6 > 20 (doesn't comply then increase n in 1)

for n=4 and #host =20;
2^4-2 > 20
16-2 >20
14 > 20  (doesn't comply then increase n in 1)

n=5 and #host =20;
2^5-2 > 20
32-2 > 20 (it complies, then you need 5 bits for hosts)


Now you need to apply a similar equation  to the number of subnets that you want. (just remove the -2 on the left side, since you don't have to remove the Network and Broadcast Address).
If you just want 2 subnets then the formula would be
2^n  > 2, note that is "strict major than",  and this is true when n= 3 (8>=4), you can see the n=3 in the math above.

Then you need a total of 7 bits (5 from host) and (3 for subnets).

As you should know ipv4 it's the formation of 4 octets of bytes.
- - - - - - - - . - - - - - - - - . - - - - - - - - . - - - - - - - -

they are counted from right to left on each from 2^7 to 2^0  (in decimal: 128 64 32 16 8 4 2 1) and if you add them all, you got the famous 255.255.255.255 in the submask.

Now we are going to take away the Host, and subnets bytes from RIGHT to LEFT. (remember 5 and 2 respectively) I'll mark them as H for host and S for subnets.

- - - - - - - - . - - - - - - - - . - - - - - - - - . S S S H H H H H

The remained "-"s will be the submask. So
255.255.255.0

You already get the basic Network mask that is: 192.168.10.0 and the submask is /24
All the subneting.
0
 
AlanConsultantCommented:
Hi,

As I stated above, there is nothing mathematically wrong with those subnets.

The only issue is whether any given router will be able to implement it.

Alan.
0
 
Mitul PrajapatiJunior IT EngineerCommented:
your thought is absolute right but it will waste many IP addresses in real world. Instead of using 255.255.255.128, you can use 255.255.255.224 which will give you 30 IP address in its range

For Example

Network 0    192.168.10.0 -31   255.255.255.224              (30 Host)
Network 1    192.168.10.32 -63   255.255.255.224            (30 Host)
Network 2    192.168.10.64 -95   255.255.255.224            (30 Host)
Network 3    192.168.10.96 -127   255.255.255.224         (30 Host)
Network 4    192.168.10.128 -159   255.255.255.224       (30 Host)
Network 5    192.168.10.160 -191   255.255.255.224       (30 Host)
Network 6    192.168.10.192 -223   255.255.255.224       (30 Host)
Network 7    192.168.10.224 -255   255.255.255.224       (30 Host)
0
 
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
@Mitul,
The networking you are proposing it's with a different submask, it's not what he wants he wants a single network (class C) with subnets within the same network, you are changing everything with the change of the submask.
Also you are giving him the "network lan address" as a host  from 0 to 31 are 32 addresses, not just 30, you need to remove the "lan address" and the "broadcast address"
0
 
Fred MarshallPrincipalCommented:
Your initial question suggests doing something that is "mathematically" correct.  There are two subnets that are contiguous and, yes, they use the same subnet mask because each one is the same size as the other: 128 addresses total with 126 hosts.

Here is a "thought experiment" (it is NOT a suggestion as you will see):
1) Set the router with 2 IP addresses on the same port or on separate ports even better: 192.168.10.1 and 192.168.10.129 and use subnet mask 255.255.255.0 <<<<<<!!
These become the gateway addresses for two subnets but the router may treat it as one.
2) configure the hosts on each subnet like this:
IP address 192.168.10.2-126
subnet: 255.255.255.128
gateway: 192.168.10.1
OR
IP address 192.168.10.128-254
subnet: 255.255.255.128
gateway: 192.168.10.129

Now, when a host launches a packet to any address in its subnet, it just goes out on the wire.
And, if it launches a packet that's not on its subnet, it goes to the gateway address of its own subnet.
When the packet arrives at the router, there is no network address in the packet and the router will treat the packet as either within it's own (larger) subnet and put it back on the wire or it will direct the traffic out the WAN or it will drop it altogether.

One problem I see with this is that 192.168.10.127 is the broadcast address for the lower subnet but it's NOT the broadcast address for the router (which is 192.168.10.255).  So that's likely going to be a problem with some protocols.

Your original question is ambiguous:
i need 2 networks with 1 ip range for my exam tomorrow
Just what does "network" mean in this context?
2 *wire* networks?
2 *network address ranges*?

You may wish to consider what is a "LAN" and what is a "subnet".  They are often used interchangeably because they coincide.  But that's not necessary.  

Think of a "LAN" as a collection of cables and (Level 2) switches - forget about IP addresses and subnets.  You can run multiple subnets (that don't overlap) on the same wires and switches.  So you could have 2 (or more) routers as gateways for their respective subnets while ALL on the same LAN (i.e. copper).  So here you have 2 (or more) subnets with ONE physical network, the LAN.

Think of a "VLAN" as a somewhat abstract version of the same thing.  Again, there is no necessity to connect it with a subnet address range at all!  That would be a true Virtual LAN.

Think of a "subnet" as an address space.  Most often, we use one subnet per LAN or VLAN.  But, as above, it's not necessary.

That's why this clarifying question about what is a "network" is important.

My guess is that you want one LAN with a split address space or, perhaps, 2 LANs each with their own address space.
You've not mentioned DHCP.  How do you envision that being implemented?
0
 
klaas vaakAuthor Commented:
Thanks!! everyone who assisted me. Everything is clear and i am confident that i passed my exam. There were multiple good answers but i can only select one as the best -_-
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.