2
My home network is configured as follows:
Computer -- Route -- Internet
If I run route
on my computer, I see
~ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
My question is that since all packets matching 192.168.1.0 will be directed to 0.0.0.0, why is the first entry needed? Would removing the entry cause any problem?
But when I remove the first entry, I can still ping google.com. Why is this happening? – Wei Shi – 2011-10-19T01:07:52.167
@Usavich: Because the first entry doesn't match Google's address and wouldn't have been used anyway. It is only for communications with 192.168.1.*. – user1686 – 2011-10-19T09:25:01.430