Hello "The Nerd",
when your kernel loaded drivers for your network cards you'll find this devices in /proc/net/dev:
# cat /proc/net/dev
In case a network interface is visible in /proc/net/dev you do not have to cope with driver problems. Enter
# ifconfig
in order to obtain information about your network interfaces. In case you want to shut down eth0 enter
# ifconfig eth0 down
Your next ifconfig command will now exclude this interface (use the -a swith to display non active interfaces)
To work on your "connection problem" I assume the following:
- your computer has a fixed IP address configured in /etc/hosts (192.168.1.1)
- your computer is connected to an Internet router with fixed IP address (192.168.1.100)
- you know DNS of your ISP (using Windows open the command window and enter "ipconfig /all". This command will list your IP configuration and will also display the IP address of your DNS service
- you have no physical firewall between your computer and the internet router
To proceed I initially recommend a static configuration, that makes life a bit easier when searching for configuration problems. Later on you can change back to DHCP etc. if you like.
a) check /etc/hosts
example entry consists of ip address domain spec alias # comment:
192.168.1.1 domain.home.told domain # (told = your top level domain if any)
192.168.1.100 told.home.told told # your internet access router
b) check the correct IP configuration of your internet router. In the router manual you'll probably find an ip address that can be used for configuration. Use your working windows to get the router configuration.
c) Ensure that we first look into /etc/hosts (here we define our ip addresses, alias etc.)
Open /etc/host.conf (the resolver) and enter the lines
order hosts, bind
multi on
d) Verify the basic connectivity to your ISP router Enter
# ping told
The ping command should be used to verify the basic connectivity between two points in a network. told shall be translated to the ip address of your internet router. In case ping fails you have either a problem with your network cabling of with your ip configuration.
e) Verify connectivity to the DNS
# nslookup
www.cisco.com
should return the ip address of cisco.com using your DNS server. If this nslookup call fails immediately no nameserver is configured. Please enter the following line into the file /etc/resolv.conf:
nameserver 10.11.12.13 # with 10.11.12.13 is the DNS ip address
In case the nslookup fails after 20-30 seconds a nameserver is configured but can not be reached or does not respond. Possible reasons are firewall systems blocking the nslookup, routing errors or a DNS that is down.
enter
#route -n
in order to display the current routing configuration. It consists of your network interface (definition) in line 1 and your default route (line 3)
Destination Router Genmask Flags Metric Ref Use Iface
192.168.1.1 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.100 0.0.0.0 UG 0 0 0 eth0
All traffic not assigned to the 192.168.1.0/24 net is routed via the default route to the ISP router device.
Else enter the following command:
route add default gw 192.168.1.100
Then go to file /etc/sysconfig/network/routes (this is the location in my SLES, please check in Ubuntu) Here you should find the entry
default 192.168.1.100
When changing the configuration files restart your network in order to reload the new configurations. If the nslookup still fails check /etc/hosts.allow and /etc/hosts.deny to make sure you are not blocking yourself.
When ping DNS successfully completes and you still get no response on nslookup try
strace -e options ping DNS
options (can be comma separated) are socket, connect, send, recvfrom
The first socket shows the socket number; in the following connect (on the socket number) a sin_port=htons(53)..
is the DNS request. Next look for recvfrom to obtain the data returned from the DNS.
Hope my comments are of any help for you.
regards
Martin