Compare cert salaries and plan your next career move
errorken wrote: the route with the longest prefix is chosen
iworms wrote: Thanks dtlokee. errorken wrote: the route with the longest prefix is chosen I'm trying to see if I understand this correctly. Suppose the routing table has: 192.168.0.0/24 -- S1 (low AD/metric) 192.168.0.0/25 -- S2 (high AD/metric) and a packet destined to 192.168.0.1 is received, then it gets sent out S2 even though AD on S1 is lower. Am I correct?
dtlokee wrote: If only one path to a prefix exists the router will install that path in the routing table. If more than one path to a prefix exists the router will compare the AD and install the path with the lowest AD in the routing table. If there are multiple paths to the same prefix with the same AD the router will install the route with the lowest metric in the routing table. If there are multiple paths to the same prefix with the same AD and the same metric the router will install up to the "maximum-paths" into the routing table. Depending on the routing protocol and code version the default number of paths will vary.
dtlokee wrote: First - You can't configure the same prefix or overlapping prefixes on different interfaces of the same router (except in some circumstances)
172.160.0/16 is variably subnetted, 5 subnets, 4masks R 172.16.1.1/32 [120/1] via 172.16.25.2 serial 0/1/1 R 172.16.1.0/24 [120/2] via 172.16.25.129 serial 0/1/0 R 172.16.0.0/22 [120/1] via 172.16.25.2 serial 0/1/1 R 172.16.0.0/16 [120/2] via 172.16.25.129 serial 0/1/0 R 0.0.0.0/0 [120/3] via 172.16.25.129 serial 0/1/0
Second - If you you are looking at how the router will handle different prefixes, they will both be installed in the routing table. Now once the routing table is built then path selection will be done on a longest match, assuming "ip classless" is on.
dtlokee wrote: (assuming ip classless is on)
dtlokee wrote: There is a fundamental disconnect here. You can't assign overlapping networks or subnets to the directly attached interfaces. This is reagrding using the IP address on the directly connected interface. You can have a destination prefix that is reachable through different interfaces.
The routing table is built based on the prefix then AD then metric. Once the routing table is buit the path is selected based on the longest match to what it already entered in the routing table (assuming ip classless is on). The routing of an individual packet does not consider the AD/Metric at all, that was taken into account when the routing table was built. As new routes are learned or removed the routing table is updated based on the prefix/ad/metric.
Compare salaries for top cybersecurity certifications. Free download for TechExams community.