A Linux router is experiencing asymmetric routing issues. The network has two internet connections (ISP1 and ISP2) with default routes. The administrator wants to ensure that traffic originating from a specific source IP uses ISP1 for both incoming and outgoing packets. Which ip rule configuration achieves this?
Trap 1: ip rule add from 10.0.0.10 to 0/0 table isp1; ip route add default…
Extra rule for incoming traffic is unnecessary; rp_filter still may drop packets.
Trap 2: ip rule add from 10.0.0.10 table isp1; ip route add default via…
Missing sysctl tuning; reverse path filtering will drop return packets arriving on a different interface.
Trap 3: ip rule add from 10.0.0.10 table isp1; ip route add default via…
Default route not added to custom table; also no rp_filter adjustment.
- A
ip rule add from 10.0.0.10 to 0/0 table isp1; ip route add default via 1.1.1.1 table isp1; ip rule add to 10.0.0.10 table isp1
Why wrong: Extra rule for incoming traffic is unnecessary; rp_filter still may drop packets.
- B
ip rule add from 10.0.0.10 table isp1; ip route add default via 1.1.1.1 table isp1; sysctl -w net.ipv4.conf.all.rp_filter=0
Policy routing with table-specific default and disabled rp_filter allows asymmetric routing.
- C
ip rule add from 10.0.0.10 table isp1; ip route add default via 1.1.1.1 table isp1
Why wrong: Missing sysctl tuning; reverse path filtering will drop return packets arriving on a different interface.
- D
ip rule add from 10.0.0.10 table isp1; ip route add default via 1.1.1.1
Why wrong: Default route not added to custom table; also no rp_filter adjustment.