To find the IP address of your network gateway:
$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 br0 0.0.0.0 192.168.11.1 0.0.0.0 UG 100 0 0 br0
Check the line with the
U indicates that route is up and
indicates that it is gateway.
The following command will produce very similar output:
The DNS server should be listed in:
To lookup the DNS information for a site (including IP address):
To find the IP address:
To set the IP address, edit the following files:
Is normally used in preference to a DNS server. The file is used by the workstation to lookup the IP address for a server and to find the fully qualified name from an alias.
The fully qualified domain name needs to be entered. To leave it out would imply some kind of DNS search as a command would not know if this was a top level domain or a host on the local network.
An example file:
127.0.0.1 woody.pjdk.co.uk woody localhost.localdomain localhost 10.10.10.4 weezy.pjdk.co.uk weezy 10.10.10.5 buzz.pjdk.co.uk buzz
Another example file:
127.0.0.1>--localhost 127.0.1.1>--buzz 192.168.11.68 bigbox 192.168.11.69 toybox 192.168.11.73 storagebox 192.168.11.70 openerp-dev # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
host is a simple utility for performing DNS lookups. It is normally
used to convert names to IP addresses and vice versa:
To see which ports are open on a server:
nmap <ip address>
To see if a port is running a service:
telnet <ip address> <port>
telnet 10.10.10.4 80
Probably have to close down the telnet window (I don’t know how to close it properly).