[Gambas-user] How to find out internet status
Demosthenes Koptsis
demosthenesk at ...626...
Sun Apr 3 15:08:02 CEST 2011
As net admin i would check in order
1) ping the dns of LAN, for example a Linux box inside the LAN
example ping 192.168.0.3
2)if there is no DNS in LAN, ping the DNS of ISP
example ping the.dnsofisp.com
3) if you are sure that you have a working DNS, ping google
example ping www.google.com
3) if there is no result make traceroute to check where the packets dont
pass throught.
example traceroute www.google.com
4) if the packets stops on your ip, you dont have set Default Route.
Make a route command to check your routes.
example: route
6) if you get
user at ...2494...:~$ ping www.google.com
ping: unknown host www.google.com
or
user at ...2494...:~$ traceroute www.google.com
www.google.com: Name or service not known
Cannot handle "host" cmdline arg `www.google.com' on position 1 (argc 1)
your netcard is down.
Make an ifconfig to check the status.
example:
ifconfig
With this pseudo-algorithm you can check the status of your network on
your machine.
To fix something you must make something like
route add default gw 192.168.0.3
or other ip
and
ifconfig eth0 up 192.168.0.1
the values: eth0, ip can be in your program as values from textboxes or
valuebox.
also you need to use EXEC or SHELL instruction and make a virtual
terminal with a TextArea to get the result of SHELL or EXEC instruction.
in quick thought that is the solution i made.
--
Regards,
Demosthenes
More information about the User
mailing list