There are two easy way on how to get a router (default gateway) IP address on Mac OS. One is via Terminal “netstat” command and another is via the network preferences dialog. Both of these ways are quick and efficient so you can use the one which is more comfortable for you.
Get Router IP using Terminal
- Start Terminal by either clicking on it from the Mac OS dock menu or by looking it up using Launchpad tool (you can start Launchpad by pressing F4 or Fn-F4 on your keyboard).
- Type “netstat -nr | grep default” and press Enter.
- The netstat tool will produce output with multiple lines in it. Look for a line with “default” in it and an IP address. This address is your default gateway IP address
The command “netstat -nr | grep default” filters “netstat -nr” tool output to only show lines with “default” text in it. If you want to see the full output of the netstat tool just type “netstat -nr” and press Enter. This will output IP addresses of all connections which Mac OS device currently maintains.
Get Router IP using Network Preferences
- Launch “System Preferences” by clicking on Apple System Menu and selecting “System Preferences”.
- Select “Network” from the preferences icon list or type “Network” in a preferences search bar.
- Select your current network (it is typically highlighted with green circle) and click on “Advanced” button.
- Navigate to “TCP/IP” tab.
- You can see your router IP in a “Router” line. Subnet and your device IP address are available in the corresponding fields.