cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
670
Views
4
Helpful
5
Replies

Longest match

Raha_1990
Level 1
Level 1

hi.plz look at the example.why the longest match is associated with route 1,not route 2

regards,Abdurahman

5 Replies 5

cadet alain
VIP Alumni
VIP Alumni

Hi,

the arrow designates route 2 as longest match which it is.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

no,route 1 is the longest match.and i don't understand why it is route 1 and not route 2?

Hi Abdurahman,

The longest matched is determined based on the destination address which you are tying to reach.

According the snap shot the destination you are tryhting to reach is 192.168.3.23.

You have two routes here in the routinng table i.e.

192.168.0.0/22

192.168.1.0/24

The ip's included in the subnet 192.168.1.0/24 is from 192.168.1.0 to 255 and this does not include 192.168.3.23. Since 192.168.3.23 is not in the subnet range of 192.168.1.0/24 router will match the next avialable network which is 192.168.0.0 (i.e route 1 as per your snapshot)

So the solution in the snap shot is correct.

Regards

Najaf

Please rate when applicable or helpful !!!

Hi,

correct.

I should be ashamed Next time will be using my brain when I answer and not only my fingers.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Hi Cadet,

It is all right.. Everyone make mistake:-)..Belive me if i was looking just at the binary i would also have answered like what you have mentioned. It was decimal notation which helped me here :-)

Regards

Najaf

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: