yozloy
By:
yozloy

Why does ubuntu set the both private and public Gateway to 0.0.0.0?

March 15, 2014 1.2k views
Hi, Today I was trying to mess around the private network in ny2 datacenter, here's default route set up for Ubuntu 12: Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 107.170.96.1 0.0.0.0 UG 100 0 0 eth0 10.128.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 107.170.96.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0 Does it mean both 10.128.*.*(private) and 107.179.96.*(public) go though the save gateway(107.170.96.1)? how about map public and private traffic into different gateway as follow setup: Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 162.243.216.1 0.0.0.0 UG 0 0 0 eth0 10.128.0.0 10.128.1.1 255.255.255.255 UGH 0 0 0 enp0s4v1 162.243.216.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
1 Answer
Basically, the routes mean that since the private interface lives in that subnet, anything with a destination of 10.128.0.0/16 should be reachable just by throwing it on the interface, without going through a gateway as it will break/cause heavy packet loss on the droplet.
Public traffic goes through the gateway "107.170.96.1".
Have another answer? Share your knowledge.