Hi every body.
I have this scenario.
I understand it is not the best design practice. Still just want to know if it works.
Sw1 has one vlan1. Two subnets 10.10.10.0/24, 126.96.36.199/24 are used inside vlan1 by different hosts. " R" router is connected to switch port which is in vlan1.
Following default ip addresses are used as default gateway addresses.
10.10.10.1/24 for subnet 10.10.10.0/24
188.8.131.52 /24 for subnet 184.108.40.206/24
Hosts in subnets 10.10.10.0/24 and 220.127.116.11/24 are configured with their respective default gateway ip addresses.
I configure the rourter as;
ip address 10.10.10.1/24
ip address 18.104.22.168/24 secondary
Now will router be able to route traffic between the hosts in subnet 10.10.10.0/24 and 22.214.171.124/24 provided all the other configurations are correctly configured?
Thanks and have a nice weekend
As Reza says, yes it will work but be aware that a broadcast would go to all machines the vlan which means all machines in both subnets. If you only had a router and L2 switch then 802.1q routing on a stick would be a better solution.
But obviously the optimum solution is a L3 switch.
Although not a very good design but it works. You can configure a secondary IP on the router's interface to allow it to respond to ARP and that will make the 2 subnets communicate with each other.