Question

In: Computer Science

in the longest prefix matching rule, if I have an address that matches 2 interfaces, which...

in the longest prefix matching rule, if I have an address that matches 2 interfaces, which interface should I choose ?
+
is the router the same as interface ? and what is the default address for a router ?

Thank you

Solutions

Expert Solution

If a incoming packet maps to more than one entry in routing table,the packet is forwarded to interface having longest prefix .

Example:

Prefix next hop

131.16.0.0/12 3

131.28.0.0/14 5

131.22.0.0/15 1

if router recieves a packet with address 131.23.151.76,following is done:

131.16.0.0/12 =>subnet mask=255.240.0.0

131.23.151.76 bitwise and 255.240.0.0=131.16.0.0

Hence the network address of packet and prefix are matching.

131.28.0.0/14=>subnet mask=255.252.0.0

131.23.151.76 bitwise and 255.252.0.0=131.20.0.0

Here network address of packet and prefix are not matching.

131.22.0.0/15=>subnet mask=255.254.0.0

131.23.151.76 bitwise and 255.254.0.0=131.22.0.0

Hence the network address of packet and prefix are matching

Here prefixes of 3 and 1 are matching.

But according to longest prefix matching rule, we have to forward it to 131.22.0.0/15 instead of  131.16.0.0/12 .(since 131.22.0.0/15 has longer prefix than 131.16.0.0/12)

Router is not same as interface.

A router has more than one interface and each interface is assigned a ip address.

default address of a router is the address of interface on which a packet is forwarded when packet doesn't match to any of entries in router.

Generally default address =0.0.0.0 and subnet mask is 0.0.0.0.

Hence if a packet doesn't match with any of entries and ip address bitwise and 0.0.0.0=0.0.0.0 which is default address.

Hence packet is forwarded onto that interface.


Related Solutions

For the following two network interfaces, identify their IP address, host name, subnet id, prefix, and...
For the following two network interfaces, identify their IP address, host name, subnet id, prefix, and subnet mask. en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500      ether 6c:96:cf:d9:3f:0f      inet6 fe80::cb3:7b1b:362f:48bc%en0 prefixlen 64 secured scopeid 0x5      inet 10.21.136.95 netmask 0xffff0000 broadcast 10.21.255.255      nd6 options=201<PERFORMNUD,DAD>      media: autoselect      status: active awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484      ether 26:db:01:45:50:73      inet6 fe80::24db:1ff:fe45:5073%awdl0 prefixlen 64 scopeid 0x7      nd6 options=201<PERFORMNUD,DAD>      media: autoselect      status: active
Which two OSPFv3 LSAs advertise address prefix information? (Choose two.) Which is a difference between OSPFv2...
Which two OSPFv3 LSAs advertise address prefix information? (Choose two.) Which is a difference between OSPFv2 and OSPFv3 In the planning stages for an OSPF deployment, which step can be taken to reduce router overhead by limiting the size of the link state databases, and LSA Type 1 and Type 2 propagation? Which type of LSAs are reduced through interarea summarization?
Define the following key terms 1. Octet 2. Prefix length 3. Slash notation 4. Network address...
Define the following key terms 1. Octet 2. Prefix length 3. Slash notation 4. Network address 5. Host address 6. Broadcast address 7. Classful addressing 8. Classless addressing 9. Tunneling 10. Dual stack
Assume that you have the following MAC address 01:00:5e:XX:XX:XX (where the last 3 bytes matches the...
Assume that you have the following MAC address 01:00:5e:XX:XX:XX (where the last 3 bytes matches the last 3 bytes of your own device MAC address), figure out what IPv4 multicast address does this MAC address belongs to?
Which of the following types of business would normally have the longest operating cycle? A. A...
Which of the following types of business would normally have the longest operating cycle? A. A car manufacturer B. A seller of resort property C. A car dealer D. A record store E. A grocery store Which of the following would not be classified as a current asset? A. Investments B. Marketable securities C. Cash D. Inventories E. Receivables Which of the following accounts would not be classified as a current asset? A. Cash and equivalents B. Cash C. Cash...
I.  Fill in Blank / Matching   Fill in the blanks with the appropriate terms below.  (2...
I.  Fill in Blank / Matching   Fill in the blanks with the appropriate terms below.  (2 pts. each = 20 pts.)   activity                        chemical                      resonance                    polychromatic             empirical electrons                      evaporation                 emission                      filtration                      filtrate gas                               hydrogen                     VESPR                       limiting                       liquid   mass                            mass percent               mole                            molecular                    oxide absorption                   oxygen                        physical                       precipitate                   precipitation    monochromatic           Lewis Dot                   supernatant                  periods                        groups     Many metals react readily with oxygen to form binary ____________ compounds.    ...
I am confused with Python I have to write a specification for an email address. In...
I am confused with Python I have to write a specification for an email address. In one string a valid email address and the other without a valid email address. Ex: print(text_match("My teacher’s email is [email protected]")) print(text_match("My teacher has no email address"))
3) Determine the longest interval in which the given initial value problem is certain to have...
3) Determine the longest interval in which the given initial value problem is certain to have a unique twice-differentiable solution. Do not attempt to find the solution t(t − 4)y" + 3ty' + 4y = 2 = 0, y(3) = 0, y'(3) = −1. 4) Consider the ODE: y" + y' − 2y = 0. Find the fundamental set of solutions y1, y2 satisfying y1(0) = 1, y'1 (0) = 0, y2(0) = 0, y'2 (0) = 1.
1. Which of the following biomes is likely to have the longest food chains? Tundra Boreal...
1. Which of the following biomes is likely to have the longest food chains? Tundra Boreal forest/Taiga Temperate deciduous forest Open ocean Desert 2. A key difference between the carbon, nitrogen, and phosphorus cycles is carbon dioxide dissolves more readily in oceans than nitrogen phosphorus enters the biosphere primarily through soil rather than air and is less renewable than carbon dioxide or nitrogen most nitrogen in the atmosphere is in a readily usable form whereas carbon in the air is...
List the players that have either won more than 2 matches or lost more than 2...
List the players that have either won more than 2 matches or lost more than 2 matches. List the player number, name, initials, won, and lost. Insert your snip here. Which players are captains of a team and have ever served as a committee members? Display the player number, player name, initials, team number, and committee member position. This will require 3 tables. Insert your snip here. Using a subquery, have any other players been penalized the same amount as...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT