LFCS · Question #103
Given the following routing table: How would an outgoing packet to the destination 192.168.2.150 be handled?
The correct answer is E. It would be passed to the router 192.168.1.1 on eth0. An outgoing packet destined for 192.168.2.150 would be processed according to the routing table, which indicates it should be forwarded to the gateway 192.168.1.1 via the eth0 interface.
Question
Exhibit
Options
- AIt would be passed to the default router 192.168.178.1 on wlan0.
- BIt would be directly transmitted on the device eth0.
- CIt would be passed to the default router 255.255.255.0 on eth0.
- DIt would be directly transmitted on the device wlan0.
- EIt would be passed to the router 192.168.1.1 on eth0.
How the community answered
(62 responses)- A3% (2)
- B11% (7)
- C2% (1)
- D8% (5)
- E76% (47)
Why each option
An outgoing packet destined for 192.168.2.150 would be processed according to the routing table, which indicates it should be forwarded to the gateway 192.168.1.1 via the eth0 interface.
This option describes a default route or a route for a different network via a different interface, which would not be the most specific match for 192.168.2.150.
Direct transmission on eth0 would only occur if 192.168.2.150 was on a directly connected subnet assigned to eth0.
255.255.255.0 is a netmask, not a router's IP address, and would not be specified as a default router.
Direct transmission on wlan0 would only occur if 192.168.2.150 was on a directly connected subnet assigned to wlan0.
The routing table would contain an entry matching the 192.168.2.0/24 network (or a more specific route encompassing 192.168.2.150) that directs traffic to the gateway 192.168.1.1, which is reachable through the eth0 interface.
Concept tested: Linux IP routing table lookup
Source: https://man7.org/linux/man-pages/man8/ip-route.8.html
Topics
Community Discussion
No community discussion yet for this question.
