Re: HOWTO - Basic Network Troubleshooting / Understanding
I thought I know quite a bit about networking and linux, but I cannot get the following to work like I want it to:
I want to have a static local ip address for my Ubuntu 5.10 (custom kernel 2.6.16-suspend2).
I have set up debian before on the same network with the same gateway/router.
Here the config I'm aiming for:
router 10.0.0.11
local static ip 10.0.0.4/8
I got dhcp enabled on the router and my box with Ubuntu 5.10 and it works fine. But I use port-forwarding for my web-server I got running and for other little things. The annoying thing is that my ip keeps changing when I reboot or similar. So, every time I boot, I have to reconfigure my router. The funny thing is, that with other Linux versions, such as Debian it works with the same configuration.
Is it maybe an issue that I have vmware installed?
Here an output of
Code:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:05:1C:01:7C:85
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2984 errors:0 dropped:0 overruns:0 frame:0
TX packets:2486 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1682309 (1.6 MiB) TX bytes:461215 (450.4 KiB)
Interrupt:11 Base address:0xb800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:471 errors:0 dropped:0 overruns:0 frame:0
TX packets:471 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:73755 (72.0 KiB) TX bytes:73755 (72.0 KiB)
vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:172.16.231.128 Bcast:172.16.231.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:418 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
inet addr:172.16.120.128 Bcast:172.16.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:436 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
and
Code:
# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.231.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
172.16.120.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
0.0.0.0 10.0.0.11 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 172.16.120.2 0.0.0.0 UG 0 0 0 vmnet8
when it's working.
and
Code:
eth0 Link encap:Ethernet HWaddr 00:05:1C:01:7C:85
inet addr:10.0.0.4 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3008 errors:0 dropped:0 overruns:0 frame:0
TX packets:2498 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1685308 (1.6 MiB) TX bytes:462483 (451.6 KiB)
Interrupt:11 Base address:0xb800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:497 errors:0 dropped:0 overruns:0 frame:0
TX packets:497 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:80019 (78.1 KiB) TX bytes:80019 (78.1 KiB)
vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:172.16.231.128 Bcast:172.16.231.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19 errors:0 dropped:0 overruns:0 frame:0
TX packets:420 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
inet addr:172.16.120.128 Bcast:172.16.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19 errors:0 dropped:0 overruns:0 frame:0
TX packets:459 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.231.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
172.16.120.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
0.0.0.0 10.0.0.11 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 172.16.120.2 0.0.0.0 UG 0 0 0 vmnet8
when it's not working
I think I have to let the vmnet1 and vmnet8 settings alone, otherwise networking wont work in the bridged networking of my virtual machines.
My virtual machines have ip addresses
10.0.0.100
10.0.0.101
...
and they all work fine ('ping -c 1 google.com' gives ip etc). Windows, Linux, all work.
I used http://howtoforge.com/perfect_setup_debian_sarge_p3 as a skeleton for my setup on the Ubuntu machine, but am never successful in pinging google when I set a static ip.
Also, I did put my correct nameservers into /etc/resolv.conf .
What am I missing? I thought Ubuntu is Debian based.
Re: HOWTO - Basic Network Troubleshooting / Understanding
i am not able to access other systems in the network as well not able to connect to internet.i have set the ipaddresse and default gateway address
Re: HOWTO - Basic Network Troubleshooting / Understanding
You seemed to be trying to create a default route to address 0.0.0.0. You might like to try 'route add default gw 192.168.1.1' or what ever your gateway's IP address is.
Also note that 'default' is just shorthand for '0.0.0.0'.
Oops - just noticed how old this was ... sorry.
Nick.
Re: HOWTO - Basic Network Troubleshooting / Understanding
Hi,
Thanks dataw0lf for the wonderful guide.
Well,I am using DHCP to connect to the internet. Eventhough yahoo.com and other sites can be opened through the browser, I cant Ping them. I had problems with activating my universe and multiverse, for which I had set configure proxy. But, how do I do something similar for Ping?
Re: HOWTO - Basic Network Troubleshooting / Understanding
heh, very nice guide :D
sriganeshs,
what do you mean by 'similar to Ping' ?
Tracerouter or 'tracepath' is similar (it uses the same protocol ICMP), but it shows routers, which packet passes to reach the destination.
Proxy goal to cache Internet object requests (commonly HTTP, FTP data), not ICMP packets.
Re: HOWTO - Basic Network Troubleshooting / Understanding
I'm back from the nether, and I'll be writing the sequel to this post in the next week. Any specific requests?
Re: HOWTO - Basic Network Troubleshooting / Understanding
Your HOWTO is very good. Glad you're going to continue, and hope you're fully recovered from your accident.
My network has 1 Winxp, 2 Win98se and 1 Ubuntu. All of them can get on the internet, ping all the other boxes, and print to my printer server (ref: http://pigtail.net/LRP/printsrv/).
The Win boxes can see each other but my favorite box can't see the other 3 and vice versa. Someone just gave me an old P3, so I will soon have a second Ubuntu box. \\:D/
The question that I can't seem to find an answer to is, how do I get them to share files? What am I missing? :-({|= Is it something very basic? Is this possibly something you're going to cover in your next HOWTO?
Re: HOWTO - Basic Network Troubleshooting / Understanding
Thanks for the how to post.
Now for my problem,
I am unable to connect through firefox, ssh or any other application.
I suspect that its a DNS linker problem.
~$ ping -c 3 yahoo.com
PING yahoo.com (66.94.234.13) 56(84) bytes of data.
64 bytes from yahoo.com (66.94.234.13): icmp_seq=1 ttl=52 time=182 ms
64 bytes from yahoo.com (66.94.234.13): icmp_seq=2 ttl=52 time=182 ms
64 bytes from yahoo.com (66.94.234.13): icmp_seq=3 ttl=52 time=179 ms
--- yahoo.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 179.117/181.250/182.451/1.590 ms
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
I greatly appreciate everyone’s time in helping me.
Re: HOWTO - Basic Network Troubleshooting / Understanding
Ok, so I was looking at the basic part of the networking guide, and it had that list of a couple commands (ie ifconfig /etc/network/interfaces), it returns an error saying "error fetching interface information: Device not found." I think it's a matter of the interface not being configured correctly considering that when I look at the network statistics, it shows that packets are being sent and received. I am trying to network this with a Windows XP laptop, but when I look at the windows network stats, it only shows that packets are being sent. Any have any suggestions?
Re: HOWTO - Basic Network Troubleshooting / Understanding
Hi all,
thanks to Javier for the network test script. I ran it today for the first time in ages and noticed a problem:
Code:
$ networktest.sh
-e is not available! (please install netstat net-tools)
This is a small bug probably caused by a conflict between the built-in echo and the /bin/echo command. I fixed it by changing the "echo -e" to "/bin/echo -e" in this stanza near the top of the script:
Code:
# Check if all commands we need are available
# NOTE: if using nslookup add "nslookup dnsutils"
( echo -e "netstat net-tools\nifconfig net-tools\nping netkit-ping\n\
arp net-tools\nip iproute\nhost bind9-host\nmktemp debianutils\nnc netcat" |
while read cmd package; do
if ! `which $cmd 2>/dev/null >&2`; then
echo "$cmd is not available! (please install $package)" >&2
exit 1
fi
done ) || exit 1
(I think there are multiple versions of the script floating around, so my apologies if this has already been fixed.)