cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1767
Views
0
Helpful
4
Replies

scenario two subnets one vlan and router

sarahr202
Level 5
Level 5

  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, 11.11.11.0/24  are used inside vlan1 by different hosts.  " R"  router is connected to switch port  which is in vlan1.

Sw1--------f1-R

Following default ip addresses are used as default gateway  addresses.

10.10.10.1/24   for subnet 10.10.10.0/24

11.11.11.1 /24   for subnet  11.11.11.0/24

Hosts in subnets 10.10.10.0/24 and 11.11.11.0/24   are configured with their respective default gateway ip addresses.

I configure the rourter as;

int f0

ip address 10.10.10.1/24

ip address  11.11.11.1/24 secondary

no shutdown.

Now  will router be able to route traffic between the hosts in subnet 10.10.10.0/24 and 11.11.11.0/24  provided all the  other  configurations are correctly configured?

Thanks and have a nice weekend

2 Accepted Solutions

Accepted Solutions

Reza Sharifi
Hall of Fame
Hall of Fame

Hi Sarah,

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.

HTH

Reza

View solution in original post

Jon Marshall
Hall of Fame
Hall of Fame

Sarah

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.

Jon

View solution in original post

4 Replies 4

Reza Sharifi
Hall of Fame
Hall of Fame

Hi Sarah,

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.

HTH

Reza

thanks for your reply.


Based on your reply, i have few questions.

How can router  respond to arp  request  as it should not get any.  For example,  let say hostA in subnet 10.10.10./24  has ip address 10.10.10.2.  The same host want to send packet to 11.11.11.11  to another hostB in subnet 11.11.11.0.  HostA  knows  the hostB is not on the same subnet, so it will simply  send this packet to default gateway.    How does this packet get to default gateway?   After determining  hostB is on the different subnet, hostA  will  use the arp table  to find the mac address  associated with default gateway. If it finds one, it will send the packet to  gateway,  If it does not, it will use arp to resolve  default gateway' s ip address to its mac address. The point is   the only time  router responds to  arp request it will be  the time  when host needs to find  mac address of default gateway.   Am i correct?

Thanks and you have good evening.

You are correct.  If the destination IP is not local then the router looks in its routing table and if it has a route to the destination network, then it will reply with its own MAC address.

HTH

Reza

Jon Marshall
Hall of Fame
Hall of Fame

Sarah

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.

Jon

Review Cisco Networking for a $25 gift card