i used slitaz live cds [ core-firefox-loram]. There is an internet connction[eth0]but midori and firefox can't access the internet and i have the error message [ hostname not resolved]. eth0 says it's receiving packets .
I am in a dchp network

network problem
(16 posts) (3 voices)-
Posted 12 years ago #
-
Open terminal:
IF
ping 8.8.8.8
Works
ping http://www.slitaz.org
FailsThen the DNS servers which are assigned by your ISP's udhcpd server are not working.
Your computer contacts the DNS server to get the i.p. address for a web site name query.The nslookup tool can be used to test the existing DNS server configuration or override by appending the i.p. address of an alternate DNS server.
nslookup http://www.slitaz.org
or to try google DNS
nslookup http://www.slitaz.org 8.8.8.8
On my machine google DNS replys with correct i.p. address for http://www.slitaz.org:
root@slitaz:/home/tux# nslookup http://www.slitaz.org
Server: 8.8.8.8 <= First DNS listed in /etc/resolv.conf
Address 1: 8.8.8.8 google-public-dns-a.google.comName: http://www.slitaz.org <= lookup address name query
Address 1: 94.23.61.29 pangolin.pimentvert.com <= i.p. address with web server domain nameThe following edit will use google DNS servers instead of the DNS servers assigned by your i.s.p.
su, password: root
# leafpad /usr/share/udhcpc/default.script
Add what's in bold:#!/bin/sh
# udhcpc script edited by Tim Riker
dns="8.8.8.8 8.8.4.4"[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
...leafpad=>File/Save/File/Quit
Restart networking:
# /etc/init.d/network.sh restart
Rerun ping test
Posted 12 years ago # -
Thanks for your help but it doesn't ping at all despite that eth0 says that it receives packets . i did what you said and it didn't work and it gave me that
#tux@slitaz:~$ /etc/init.d/network.sh restart
Stopping all interfaces
ifconfig: SIOCSIFFLAGS: Permission denied
ifconfig: SIOCGIFFLAGS: No such device
Killing all daemons
killall: can't kill pid 2064: Operation not permitted
wlan0 No such deviceifconfig: SIOCSIFFLAGS: Permission denied
Starting udhcpc client on: eth0...
udhcpc: socket: Operation not permitted
sed: can't create temp file '/etc/lxpanel/default/panels/panelEO5yFk': Permission denied
tux@slitaz:~$Posted 12 years ago # -
@mido
#tux@slitaz:~$ /etc/init.d/network.sh restart
You have to be root user to stop|start|restart network.sh
Commands preceded with # indicates you must be root
tux@slitaz:~$
<=regular user
su
<=type
Hit the Enter key
Password: <= system requests root password
root
<=type or your root password if you changed it
Hit the Enter key
root@slitaz:/home/tux#
<=now your root userIf you still can't ping 8.8.8.8 open terminal,post output from commands:
ls /sys/class/net
ifconfig
cat /etc/network.conf
lspci -nn | grep -i eth
uname -a
Posted 12 years ago # -
i got these outputs
ls /sys/class/net
dummy0 eth0 loifconfig eth0 Link encap:Ethernet HWaddr 00:15:F2:BA:57:0F
inet addr:192.168.77.246 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:341 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:88154 (86.0 KiB) TX bytes:1552 (1.5 KiB)
Interrupt:19 Base address:0xd000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:248 errors:0 dropped:0 overruns:0 frame:0
TX packets:248 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:47546 (46.4 KiB) TX bytes:47546 (46.4 KiB)cat /etc/network.conf
# /etc/network.conf: SliTaz system wide networking configuration.
# Config file used by: /etc/init.d/network.sh
## Set default interface.
INTERFACE="eth0"# Dynamic IP address.
# Enable/disable DHCP client at boot time.
DHCP="yes"# Static IP address.
# Enable/disable static IP at boot time.
STATIC="no"# Set IP address and netmask for a static IP.
IP="192.168.0.6"
NETMASK="255.255.255.0"# Set route gateway for a static IP.
GATEWAY="192.168.0.1"# Set DNS server for a static IP.
DNS_SERVER="192.168.0.1"# Wifi connection.
# Enable/disable wireless connection at boot time.
WIFI="no"# Wifi interface (iwconfig) and ESSID.
WIFI_INTERFACE="wlan0"
WIFI_ESSID="any"
WIFI_MODE="managed"
WIFI_KEY=""
WIFI_KEY_TYPE="none"
WPA_DRIVER=""
WIFI_CHANNEL=""
WIFI_IWCONFIG_ARGS=""lspci -nn | grep -i eth
00:04.0 Ethernet controller [0200]: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet [1039:0900] (rev 90)
root@slitaz:/home/tux#uname -a
Linux slitaz 2.6.37-slitaz #2 SMP Wed Mar 7 10:36:39 CET 2012 i686 GNU/Linux
root@slitaz:/home/tux#i'd like to say that i have only one adapter ethernet
Posted 12 years ago # -
The i.p. address assigned to eth0 inet addr:192.168.77.246 is not used on the internet,it is for Local Area Network only.
Is this computer directly connected to a cable/dsl modem or is there a router between it and the modem?
If your connected to a router that assigned the i.p. address can you ping the router ?
Post output from this command:
route
Posted 12 years ago # -
there is a router . i managed to ping the router but the problem still exists "hostname not resolved"
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
192.168.0.0 * 255.255.0.0 U 0 0 0 eth0root@slitaz:/home/tux# ping 192.168.77.1
PING 192.168.77.1 (192.168.77.1): 56 data bytes
64 bytes from 192.168.77.1: seq=0 ttl=64 time=0.521 ms
64 bytes from 192.168.77.1: seq=1 ttl=64 time=0.456 ms
64 bytes from 192.168.77.1: seq=2 ttl=64 time=0.475 ms
64 bytes from 192.168.77.1: seq=3 ttl=64 time=0.865 ms
64 bytes from 192.168.77.1: seq=4 ttl=64 time=0.564 ms
64 bytes from 192.168.77.1: seq=5 ttl=64 time=1.317 ms
64 bytes from 192.168.77.1: seq=6 ttl=64 time=0.445 ms
64 bytes from 192.168.77.1: seq=7 ttl=64 time=2.364 ms
64 bytes from 192.168.77.1: seq=8 ttl=64 time=0.580 ms
64 bytes from 192.168.77.1: seq=9 ttl=64 time=0.520 ms
64 bytes from 192.168.77.1: seq=10 ttl=64 time=2.214 ms
64 bytes from 192.168.77.1: seq=11 ttl=64 time=0.472 ms
64 bytes from 192.168.77.1: seq=12 ttl=64 time=0.491 msPosted 12 years ago # -
Your output of
route
has no default gateway which should be the router i.p. (192.168.77.1)
The gateway is the LAN i.p. of the computer or router that provides access to the internet or another network.
My slitaz(192.168.1.2) is connected to a wifi router(192.168.1.1) which connects to the cable modem(internet).Output of route:
tux@slitaz:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0The router's dhcpd is supposed to configure the clients gateway,DNS,mask,broadcast in addition to assigning the i.p. address.
I would power off/on the router to reboot it, then restart network.shPosted 12 years ago # -
Also, worth checking the dhcp server settings in your router....for example if you are using a more advanced router you are expected to provide all values, like the default gateway, for the dhcp server process running on the router. Perhaps it will be useful to give more details of your network and make and model of the router you are using.
Posted 12 years ago # -
thanks for your help but the problem still exists.i can access the internet in windows but not in siltaz.In siltaz I can ping the dhcp server 192.168.77.1 but i can't ping the default gateway 3.3.3.3 and i can't ping any other site.The machine identifies dns servers .
siltaz network begins with wlan which is idle and i change it to eth0 and it receives packets but doesn't access the internetPosted 12 years ago # -
Figure out the network configuration of windows which connects to the internet and you will figure out how to connect slitaz.
Posted 12 years ago # -
ok the error message is Error - http://scn.slitaz.org/
The page 'http://scn.slitaz.org/' couldn't be loaded.
Cannot resolve hostname (scn.slitaz.org)
and these are the outputs of internect connection in slitaz and i don't know what the problem is.Interface Name Status IP Address Scan ports
eth0 Ethernet connected 192.168.77.246
lo Loopback connected 127.0.0.1
Hosts127.0.0.1 localhost slitaz tazpanel
Edit hosts
HostnameOutput of ifconfig
eth0 Link encap:Ethernet HWaddr 00:15:F2:BA:57:0F
inet addr:192.168.77.246 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2453 (2.3 KiB) TX bytes:1552 (1.5 KiB)
Interrupt:19 Base address:0xd000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:372 errors:0 dropped:0 overruns:0 frame:0
TX packets:372 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:84592 (82.6 KiB) TX bytes:84592 (82.6 KiB)
Routing tableKernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 lo
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
Domain name resolutionnameserver 4.2.2.5
nameserver 4.2.2.6
ARP table? (192.168.77.1) at 00:0c:42:e6:a6:6f [ether] on eth0
IP ConnectionsActive Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1799/httpd
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 1787/Xorg
tcp 0 0 0.0.0.0:82 0.0.0.0:* LISTEN 1384/httpd
tcp 0 0 127.0.0.1:82 127.0.0.1:39513 TIME_WAIT -
tcp 0 0 127.0.0.1:82 127.0.0.1:39516 ESTABLISHED 2318/httpd
tcp 0 0 127.0.0.1:82 127.0.0.1:39440 TIME_WAIT -
tcp 0 0 127.0.0.1:82 127.0.0.1:39515 TIME_WAIT -
tcp 0 0 127.0.0.1:39516 127.0.0.1:82 ESTABLISHED 1898/tazweb
tcp 0 0 127.0.0.1:82 127.0.0.1:39514 TIME_WAIT -Posted 12 years ago # -
i can access the internet in windows but not in siltaz
If a windows computer running on the same network connects to the internet you should be able to copy the windows network configuration to slitaz so it connects to internet from the same network.
Windows: paste the output fromipconfig /all
into your Reply
start/run
typecmd
in run box
click ok button opens windows terminal
In terminal type:
ipconfig /all
Hit the Enter key
Place the mouse cursor in the terminal window,left click mouse button
Right click mouse choose Select All from menu
Left click with mouse cursor in Slitaz forum Reply/Post: box
Right click mouse choose PastePosted 12 years ago # -
This what i got
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.C:\Documents and Settings\abo>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : abdo
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : NoEthernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : SiS 900-Based PCI Fast Ethernet Adap
ter
Physical Address. . . . . . . . . : 00-15-F2-BA-57-0F
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.77.246
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 3.3.3.3
DHCP Server . . . . . . . . . . . : 192.168.77.1
DNS Servers . . . . . . . . . . . : 4.2.2.5
4.2.2.6
Lease Obtained. . . . . . . . . . : Thursday, February 07, 2013 8:07:52
PM
Lease Expires . . . . . . . . . . : Thursday, February 07, 2013 9:07:52
PMC:\Documents and Settings\abo>
Posted 12 years ago # -
Configure a static connection using the windows configuration.
Boot into slitaz,open terminal,su,password: root
# leafpad /etc/network.conf
Configure network.conf like this:# /etc/network.conf: SliTaz system wide networking configuration.
# Config file used by: /etc/init.d/network.sh
## Set default interface.
INTERFACE="eth0"# Dynamic IP address.
# Enable/disable DHCP client at boot time.
DHCP="no"# Static IP address.
# Enable/disable static IP at boot time.
STATIC="yes"# Set IP address and netmask for a static IP.
IP="192.168.77.246"
NETMASK="255.255.255.255"# Set route gateway for a static IP.
GATEWAY="3.3.3.3"# Set DNS server for a static IP.
DNS_SERVER="4.2.2.5 4.2.2.6"# Wifi connection.
# Enable/disable wireless connection at boot time.
WIFI="no"# Wifi interface (iwconfig) and ESSID.
WIFI_INTERFACE=""
WIFI_ESSID=""
WIFI_AP=""
WIFI_MODE="managed"
WIFI_KEY=""
WIFI_KEY_TYPE="any"
WPA_DRIVER=""
WIFI_CHANNEL=""
WIFI_IWCONFIG_ARGS=""leafpad=> File/Save/File/Quit
Restart networking:
# /etc/init.d/network.sh stop
# /etc/init.d/network.sh start
Posted 12 years ago #
Reply »
You must log in to post.