# Routing Table

0 votes
590 views

We know routing table looks something like this .

Network ID  Subnet Mask Interface

Question : We go with larger subnet mask in case of two matches. !! Why ? I know that's fact and called https://en.wikipedia.org/wiki/Longest_prefix_match !! What is already setup in the backend side so that we're choosing one with the larger  subnet mask??

2) I guess this question has some relation with the previous one.

If i have to  divide a network in 5 unequal subnets. then which is the correct method ?

edited

## 3 Answers

1 vote
I think we choose the subnet mask with longest match because it's more reliable in determining route to deliver packets while routing.

As for the second part of the question, it would be given how many hosts you need to accommodate in each subnet. Subnet mask can be adjusted accordingly to suit your needs.

Reference: https://learningnetwork.cisco.com/thread/64710
0 votes
1. The packet source cannot set the route of an outgoing packets; the route is determined only by the routing tables in the routers on the way
0

In computer networking, source routing, also called path addressing, allows a sender of a packet to partially or completely specify the route of the packet takes through the network. In contrast, in non-source routing protocols, routers in the network determine the path based on the packet's destination.

https://gateoverflow.in/917/gate2003-27

0 votes
The subnet with longest match falls under the subnet with small match. So, if a host falls under 2 subnets, it will get routed to its destination more faster if its routed to subnet with longest match.

## Related questions

0 votes
1 answer
1
302 views
0 votes
2 answers
2
59 views
In classless addressing, there are no classes but addresses are still granted in : Codes Blocks IPs Sizes
0 votes
1 answer
3
56 views
A subnet mask in class $C$ can have _____________ $1$’s with the remaining bits $0$’s. $10$ $24$ $12$ $7$
1 vote
1 answer
4
118 views
A router has the following (CIDR) entries in its routing table: Address/Mask Next hop 135.46.56.0/22 Interface 0 135.46.60.0/22 Interface 1 192.53.40.0/23 Router 1 default Router 2 For each of the following IP addresses, what does the router do if a packet with that address arrives? (a) 135.46.63.10 (b) 135.46.57.14 (c) 135.46.52.2 (d) 192.53.40.7 (e) 192.53.56.7