Two subnets with different mask on a single router?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 03:26 PM - edited 03-10-2019 12:26 PM
router 1941
Hello. I'm needing assistance with the setup of two subnets within a single router.
Here's my information:
Router has only two GigabitEthernet interfaces.
GigabitEthernet0/0 has 172.20.0.1 ip and 255.255.252.0 mask.
GigabitEthernet0/1 has 172.21.0.1 ip and 255.255.128.0 mask
Now, on each side there is a Switch with two computers.
I need to have 1 computer on each side on the same subnet, and the other one on a different subnet, meaning a pc on the same side cannot communicate with the other computer on its side, but can with another computer on the other side.
I have no idea how to configure this on the router, can anyone please help me?
Thanks in advance!
- Labels:
-
Other Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 03:39 PM
Not sure i understand.
Do you mean you have -
PC1 PC3
SW1 -> gi0/0 router gi0/1 -> SW2
PC2 PC4
where PC1 and PC3 are in the same subnet and PC2 and PC4 are in a different subnet.
If so this isn't going to work because you cannot route to the same subnet ie. PC1 cannot route to the same subnet through the router.
However if the above is what you want a much easier solution is to just use one switch and then you could make it work.
Perhaps you can clarify if the above is what you want and if it is can you just use one switch ?
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 03:47 PM
Just to say, you could use both switches but they would need to connected to each other with a trunk link.
Again this assumes the above is what you are trying to do.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 03:54 PM
The topology you described is correct.
PC1 & PC3 are on the same mask.
PC2 & PC4 are on the same mask.
In all, they are using two different subnet masks.
Problem is, each interface can only have 1 mask. So two pcs could communicate, but not 4 of them.
I need it with this topology, I heard I could use static routes to do this.
Hope this helps helping me.
And thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 04:02 PM
So you want PC1 and PC3 to be able to talk to each other but you don't want them to be able to talk to PC2 and PC4 and vice versa.
Is the above correct ?
If so you don't need a router, you can just a switch (or switches) and use two vlans with no L3 interfaces.
Do you need these PCs to be able to communicate with other devices ie. not the PCs listed but other devices ?
Please clarify exactly what you are trying to do because i can't see from your description why you need a router.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 04:12 PM
>>> So you want PC1 and PC3 to be able to talk to each other but you don't want them to be able to >>>talk to PC2 and PC4 and vice versa.
This is correct.
>>>If so you don't need a router, you can just a switch (or switches) and use two vlans with no L3 >>>interfaces.
Unfortunately they are not giving me the choice of making my own net design. I need to setup this with all the devices mentioned (1 router, 2 switches, 4 pcs).
>>>If so you don't need a router, you can just a switch (or switches) and use two vlans with no L3 >>>interfaces.
As long as they communicate with the appropiate PC, it doesnt matter if they communicate to other devices or not.
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 04:29 PM
Unfortunately they are not giving me the choice of making my own net design. I need to setup this with all the devices mentioned (1 router, 2 switches, 4 pcs).
Please don't take this the wrong way but is this a homework type test because the above makes no sense otherwise. You don't setup networks having to use certain equipment whether it is needed or not, you just setup the network using what is needed.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2014 03:16 AM
Hi,
is this some kind of a school excercise?
IMHO, you could make all 4 PCs communicating following way:
Let's say the PCs are having IP addresses
172.20.0.2
172.20.0.3
172.21.0.2
172.21.0.3
And the PCs with .3 Ip addresses are placed on the "wrong" router side (behing the interface assigned to the other subnet).
In that case you could configure:
ip route 172.20.0.3 255.255.255.255 GigabitEthernet0/1
ip route 172.21.0.3 255.255.255.255 GigabitEthernet0/0
You aslo need proxy arp enabled on both interfaces:
int GigabitEthernet0/0
ip proxy-arp
int GigabitEthernet0/1
ip proxy-arp
In this case all 4 PCs will be able to communicate each to the others (even without default GW configured).
If you want to block some communication between the PCs on the same router side, e.g., you will need to apply some ACL though, I'm afraid.
Best regards,
Milan
