0

I am trying to connect two routers in one switch to ping each other using IP route .

upload

router 0 has 192.168.10.1/24 gi0/0
router 1 has 192.168.20.1/24 gi0/0

I tried putting switch-port trunks on both fa0/1 and fa0/2 for switch 0

2 Answers 2

1

For the two routers to communicate with each other they need to share a common network (across the switch in your diagram).

So, using e.g. 192.168.10.1/16 and 192.168.20.1/16 (or up to /18) would work, while 192.168.10.1/24 and 192.168.20.1/24 will not.

3
  • So basically 1 switch holds 1 network to communicate and it is not possible to do routing on different networks connecting 1 switch to 2 routers? Even it has ip route? Thanks Zac Commented Oct 15, 2019 at 9:53
  • For two parties on different networks to communicate, you need a router in between. Switches allow two parties to communicate in the same network. Setting up (static or dynamic) routes enables communication beyond the two routers, not between them.
    – Zac67
    Commented Oct 15, 2019 at 10:17
  • Thanks alot now i know the use of switches and routers on this scenario. Commented Oct 15, 2019 at 10:28
0

Both the routers has to share same network subnet to ensure communication between two router's ..

For example

1 ) 192.168.10.1/24 for first router 2) 192.168.10.2/24 for second router

Then both router will communicate..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.