lookup ip address, subnet mask, gateway, and dns at same time

Is there a command that can lookup ip address, subnet mask, gateway, and dns all at the same. I know ifconfig can lookup ip address and subnet mask. I know route -n can lookup gateway. Not sure about a dns command. So I hope there is a way to lookup ip address, subnet mask, gateway, and dns all at the same.

.

i think there is no command for this..

Please see here
or here

i have changed something again:

gedit ipconfig.sh

#! /bin/bash
ifconfig | awk '/inet/ {print "IP " $2}'
echo -e "\nGateway\t\t\tInterface"
route -n | awk '/UG/ {printf "%-21s %s\n",$2,$8}'

RESOLVEDOTCONF=/etc/resolv.conf
if [ -f $RESOLVEDOTCONF ]
then
echo -e "\nDNS Servers \n-----------"
grep "nameserver " $RESOLVEDOTCONF | awk '{print $2}'
fi
DHCPfile=/var/lib/dhcp3/dhclient.leases
if [ -f $DHCPfile ]
then
echo -e "\nDHCP Server"
awk '/dhcp-server-identifier/ {print $3}' $DHCPfile
fi

chmod +x ipconfig.sh
sh ipconfig.sh

it may help u..

While the combination of ip address, netmask, gateway and DNS may seem logical, they are separate entities (well, DNS and gateway are separate from NIC config anyhow).

So... no. You can build a quick script to query the 3 pieces and output them all though.