You can find the default Gateway with
/sbin/route
or
/sbin/route -n
It will output your routing table, including your default gateway, as below:
Code:
Destination Gateway Genmask Flags Metric Ref Use Iface
Default <hostname> 0.0.0.0 UG 0 0 0 eth1
or (/sbin/route -n)
Code:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 <hostip> 0.0.0.0 UG 0 0 0 eth1
The DNS servers are listed in the /etc/resolv.conf file. Find what they are by running:
cat /etc/resolv.conf
Code:
nameserver <nameserver1-IP>
nameserver <nameserver2-IP>
search <domain-suffix>
How to find the DHCP server you got your IP from depends on what DHCP client you are using, and how it is set up to store info. On my box, I use dhcpcd which saves info in /etc/dhcpc/dhcpcd-ethN.info. In that file it has a line like:
DHCPSID=<DHCP-server-IP>
Much more info available:
man 8 ifconfig
man 8 route
man 5 resolv.conf
The
DHCP-mini-HOWTO
Hope this helps,
Beolach