cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
601
Views
2
Helpful
13
Replies

pcs in the same subnet but different default gateway

hello everyone,

I am facing an issue with my college project. i have 6 pcs that they are in the same network, but 2 pcs must be excluded(no communication with the other 4) but keep their ips (network: 192.168.1.0). I used a router with default gateway 192.168.2.1, but they won't communicate with their router. 

How is this problem solved?

Thank you in advance. @

13 Replies 13

Hello,

private Vlans would be an option (the only option I can see, to be honest)...

Martin L
VIP
VIP

Private vlans are probably out of scope of ccna level, more like ccnp and up.

I think simpler solution is just different vlan number for those 2 PCs then rest of 4 PCs while all PCs have and are on the same network subnet.

default gateway is used and necessary for PCs to communicate with other remote networks, subnets. If PCs don't have default gateway set up, they will only be able to reach others on the same vlan and the same subnet, network. 

Regards, ML
**Please Rate All Helpful Responses **

The problem is that I had made 2 vlans on the same network, but when I tried to configure the router so that I can give them a different default gateway, the 2 pcs can’t communicate.

"default gateway is used and necessary for PCs to communicate with other remote networks, subnets. If PCs don't have default gateway set up, they will only be able to reach others on the same vlan and the same subnet, network."

True if gateway router is NOT supporting proxy and, as you note, hosts are in different L2 domains.

The traffic between host in same subent not routing via router it direct bridge via SW.

You need to apply acl in port' this acl is called port-acl.

MHM

Joseph W. Doherty
Hall of Fame
Hall of Fame

An interesting project.  Possible solution(s) would depend on your equipment features.

As you've described the problem, the first issue that arises, as @MHM Cisco World has already noted, hosts on the same network intercommunicate NOT using the gateway.

Private VLANs and L2 ACLs have been mentioned, but both depend on network device features.

Two other possible approaches, that immediately come to my mind, which also require device support, would be firewall rules on the PCs blocking particular host-to-host communication or perhaps using NAT to make all the host "believe" they are in the same network, but they are not.

Hopefully, someone will suggest an easy way to solve this issue, but in any case, would like to hear what the "approve" solution(s) by whoever assigned this project.

ppapiomytoglou23b_0-1705337653680.png

here's the topology. All the pcs are on the same network. 2 of them will not communicate with the others but, they get to keep their ip addresses. i've installed a router there so it can transfer the packs. i've created 2 VLANS (management and upper management). I've created the router's sub interfaces. created a default gateway(192.168.2.1) for the 2 pcs but im facing the issue of no communication for the 2 pc's and router.

this task need EVE-NG or GNS3 VM 
it can not be done in Packet tracer 
MHM

so the solution is to change their IPs? Im asking that, because i tried it and it is the only vialble solution...

it one of solution 
either

config private VLAN <<- if you have one VLAN
or

change the IP <<- if you have more than one VLAN
MHM

Zip your PT lab file and attach here. We will check it out

Regards, ML
**Please Rate All Helpful Responses **

"I've created the router's sub interfaces. created a default gateway(192.168.2.1) for the 2 pcs but im facing the issue of no communication for the 2 pc's and router."

That's to be expected if you don't assign those hosts IPs in the new network.

With your posted topology, the NAT approach I mentioned earlier should work.

Review Cisco Networking for a $25 gift card