The key is still the "more specific route": we only have to craft some routes more specific than the "default route"! The default route itself is indeed the least specific! Any routes with just one bit more specific, is enough to be more specific!
---
OK! Let me give you the answer: we only have to add two routes 0.0.0.0/1 和 128.0.0.0/1, pointing both of them to Wired LAN's gateway IP address, done! Now the Internet traffic will go through Wired LAN in normal time. It goes through the Wireless LAN only when Wired LAN is broken!
Why these 2 routes? We can clearly see it by looking at its binary form:
33 2 1 0 33 2 1 0
1098765.43210987.65432109.876543210 1098765.43210987.65432109.876543210
00000000.00000000.00000000.00000000, mask 10000000.00000000.00000000.00000000
10000000.00000000.00000000.00000000, mask 10000000.00000000.00000000.00000000
Of course, we can also come up with 4 routes, or even 8 routes to play the same trick! Two is the simplest one!
Interesting, isn't it! This trick is quite useful in many cases! We might see it again very often!
No comments:
Post a Comment
Tip: you can also anonymously comment here.