1

Normaly, for two subnets connected with one router, i always used to create two routes

per example:

subnet 1: 192.168.1.0/24 subnet 2: 192.168.2.0/24

router interface 1: 192.168.1.99
router interface 2: 192.168.2.99

route 1: dst-adress 192.168.2.0/24 gateway: 192.168.1.99
route 2: dst-adress 192.168.1.0/24 gateway: 192.168.2.99

So far so good, i can ping subnet 1 from subnet 2 and vice versa

i am using routerOS from microtik and just realised, that the routing also works without any static route. Is this an automation from routerOS or is that normal with any router wich has only two network interfaces?

i am confused, Thank you

3
  • 1
    Routers inherently know about directly attached networks, so static routes for those are not necessary. Routers learn routes in three ways: directly connected networks, statically configured routes, or through a routing protocol. The last two are only necessary for non-attached networks. Commented Dec 11, 2018 at 15:06
  • @RonMaupin: Post your comment as answer to be upvoted :) Commented Dec 11, 2018 at 15:13
  • @Khaled, OK, it's done. Commented Dec 11, 2018 at 15:18

1 Answer 1

4

Routers inherently know about directly attached networks, so static routes for those are unnecessary. Routers learn routes in three ways:

  1. Directly connected networks
  2. Statically configured routes
  3. Through a routing protocol

The last two are only necessary for non-attached networks.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.