For Wireless
ipconfig getpacket en1 |
For Wired
ipconfig getpacket en0 |
From OS-X daily
You can also find your router address
ipconfig getoption en0 router |
Your Name Server
ipconfig getoption en0 domain_name_server |
Your IP Address
ipconfig getifaddr en0 |
Create an alias to a new IP address
ifconfig en0 alias 10.0.0.100/24 |
And to remove the alias
ifconfig en0 -alias 10.0.0.100 |