How do I find out which gateway a Linux system is currently using?
Want to support HowtoForge? Become a subscriber!
|
Run route -nee The output will look like this: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface MSS Window irtt 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0 0 0 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 0 0 0 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 0 0 0 This means that the system with the IP address 192.168.0.100 is using 192.168.0.1 as gateway.
|



Recent comments
1 day 11 hours ago
1 day 14 hours ago
1 day 15 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 20 hours ago
1 day 21 hours ago
2 days 13 hours ago
2 days 14 hours ago
2 days 17 hours ago