I agree the answer is A but you made a typo of the question.
It's not 172.16.10.50 It's 172.20.10.50
Anyway 172.20.10.50 is also a host of 172.16.0.0/12 (255.240.0.0)
The cost metric is higher on the 172.16.0.0/12 network, routers always go with the lowest costing connection (metric). Even if that connection is directly connected to the intended host, it may not be used if that connection has higher latency.
Routing decisions are first made by selecting the route with the longest matching subnet. 0.0.0.0 is a catchall and matches on everything but 172.16.0.0/12 is a longer match with the destination address.
A. Server1 will attempt to connect directly to 172.20.10.50.
>>Now correct answer
B. Server1 will route the connection to 10.10.0.2.
>>If you attempt to 10.20.200.1-254, it's correct.
C. Server1 will silently drop the connection attempt.
>>I don't know when it's correct.
D. Server1 will route the connection to 192.168.2.1.
>>If you attempt to 172.32.10.50, it's correct.
I tested it with adding routes like in the example:
The correct answer is A!
when you add a route for 172.16.0.0 Mask 255.240.0.0 on the client you want to ping from, the client ignores the default gateway and attempts to connect directly to 172.20.10.50 even tough the Metric was lower on the Default Gateway.
Which means a route has a higher priority than the default gateway
172.16.0.0/12 contains the Adress of 172.20.10.50 which is why it takes this route
amazed how many people dont understand how subnetting works.
255.240.0.0 = subnet mask of 12 = total possible amount of IPs = 1,048,576.
range = 172.16.0.1 - 172.31.255.254. this range covers the IP address in question.
In a network route, it will always try to match the 'destination' as much as it can, before looking at Metrics.
Metrics are used when there are more than 1 route available for the same thing.
Answer is A
The correct answer is A) Server1 will attempt to connect directly to 172.20.10.50
Route Determination Process for WINDOWS:
[ To determine which routing table entry is used for the forwarding decision, IP uses the following process:
The list of matching routes is compiled. The route that has the longest match (the route that matched the most amount of bits with the destination IP address) is chosen. The longest matching route is the most specific route to the destination IP address. ]
When the address 172.20.10.50 needs to be looked, the longest prefix of the candidate routes is 172.16.0.0/12, since its subnet mask (/12) is longer than the 0.0.0.0 entry's mask (/0), making the route more specific.
Here We can view better: https://drive.google.com/drive/folders/1lhNkTgRRfN85HXVbvFljKzcdgM5OuhMU?usp=sharing
URL:
https://en.wikipedia.org/wiki/Longest_prefix_match
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc958823(v=technet.10)
The default route has the shortest possible prefix match, to fall back on in case matches with all other entries fail. the Longest prefix match is first, then is the metric.
Even though the address 172.20.10.50 is part of network 172.16.0.0/12 which is in this range 172.16.0.1 - 172.31.255.254, answer D is correct because of the lower metric
The correct answer is A) Server1 will attempt to connect directly to 172.20.10.50
What is difference between administrative distance and metric?
Administrative Distance: is used for a router to choose a route to reach the same subnet when more than one routing protocol is used to reach it. The route in the routing protocol that has the lowest administrative distance will be the best route .
Metric: If a router learns two different routes for the same network with the "same routing protocol" , it must decide which route is better and will add it to the routing table .
Origin of the route -> Administrative distance
ON-LINK -> 0
The default route is used when the route is not matched by any other entry in the routing table. So the default route is programmed to use it as a "LAST RESORT" because any packet with unknown destination, it should be send to this interface/ip of default route. If there is no default-route then the packets will be dropped
172.16.0.0 is on-link ->0 then the default route is not used
So in this case Server1 will attempt to connect directly to 172.20.10.50
Your reasoning is confusing like long shit.
172.16.0.0 /12 is the subnet ID of 172.16.10.50 That is the best route.
Address: 172.16.0.0 10101100.0001 0000.00000000.00000000
Netmask: 255.240.0.0 = 12 11111111.1111 0000.00000000.00000000
Wildcard: 0.15.255.255 00000000.0000 1111.11111111.11111111
=>
Network: 172.16.0.0/12 10101100.0001 0000.00000000.00000000 (Class B)
Broadcast: 172.31.255.255 10101100.0001 1111.11111111.11111111
HostMin: 172.16.0.1 10101100.0001 0000.00000000.00000001
HostMax: 172.31.255.254 10101100.0001 1111.11111111.11111110
B could possibly work for 10.10.0.2 to go thru 10.10.0.11 if subnet mask is legal. However, the routing table has 10.10.0.11 with 255.255.0.25, and this last number 25 has illegal mask as 0001 1001, which is not continuous masking.
D could possibly work for 192.168.2.1 to go thru 255.255.255.0, but it has higher metric cost as 266 than ANS A which has 261 metric cost.
So the routing will go thru ANS A option.
Server1 will attempt to connect directly to 172.20.10.50.
The routing table contains an entry for the destination 172.16.0.0 / 255.240.0.0. This network includes the address range 172.16.0.1 to 172.31.255.254. The interface used for the network is "On-link". This means that the network is reachable without using a router.
D, Is the answer. Eventhough 172.16.0.0/12 is directly connected, it happens that his route metric is greater than the default route metric. That's why A is not the answer.
Because the CIDR is a /12, the subnets would be:
172.16.0.0
172.32.0.0
172.48.00
and so forth
Which means that there is no route entry for the 172.20.0.0 subnet. So what does the computer do when it receives an IP address that it doesnt know what to do with.. it sends it to the default gateway.. 192.168.2.1
Looks like it should be 172.16.0.0/12 because it has the longest matching network address: (see "Route Determination Process") https://docs.microsoft.com/en-us/previous-versions/bb727001(v=technet.10)
we guys are really thinking too much. in routing, the first thing a routers does is to check if the destination is local i.e directly connected and if not, it forwards it to the default gateway. In this case both A and D could be the answer but since the qsn says what will occur when server attempt to connect to the network, the first thing it will do is to first attempt to connect to it. if it is unsuccesful, then it will forward it to the default gateway only becuase there is a defualt route else it would have dropped the packet. so the answer is A
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
DD
Highly Voted 5 years, 7 months agonoppy
5 years, 7 months agowilvarel
5 years, 1 month agoruiramadas
4 years agoShockwaveXYZ
5 years, 2 months agojamesps
4 years, 3 months agozzzergu
4 years, 7 months agoDD
Highly Voted 5 years, 7 months agoDhelailla
4 years, 9 months ago[Removed]
4 years, 7 months agopanda
Most Recent 3 years, 10 months agoSakadia
3 years, 11 months agolofzee
3 years, 11 months agosimocb
3 years, 11 months agoGoldenFox
4 years agoelopez2207
4 years agoelopez2207
4 years agobolbolskanes
4 years agoelopez2207
4 years agoelopez2207
4 years agoMountie
3 years, 12 months agorebeen
4 years agoNkanze
4 years agoMountie
3 years, 12 months agoakaz
4 years agoVortex_SA
4 years agoDannyPlace
4 years agoProfessorX
4 years agoGvSt
4 years, 1 month agoCCIEBYDEC
4 years, 3 months ago