can't ping, ftp etc "Unable to connect, unknown host"

can't ping, ftp etc "Unable to connect, unknown host"

Post by Eriksso » Sat, 15 May 1999 04:00:00



it is me again.

I'm having troubles with my PPP script. (who hasn't?)

This is what happends.

# pppd
the modem dials the number and I connect to my ISP.

When I check /var/log/messages I see that I've got an IP address.

BUT Something is wrong with the host lookup things. I can't do anything!
When I try to ftp it says. "Unknown host servername" or "Unable to connect,
unknown host" etc..

in /etc/resolv.conf I've got all the nameservers that my ISP provides.

What have I missed?

Thanx!

/Martin

 
 
 

can't ping, ftp etc "Unable to connect, unknown host"

Post by hazzma » Sun, 16 May 1999 04:00:00


Hi,
Beware advice from the very-newbie (like me)....
        Do you have a ethernet card? And if so, do you remember the point in
your installation when you set it up --there's a line in the setup screen, the
third i believe, that reads "default gateway". The redhat install program will
automatically put a 'reasonable' number in here for you if you simply enter a
IP for your nic on the first field. Unfortunately, this will screw-up your PPP
connection to Internet , if you make that connection directly from your Linux
box without going through a gateway host on your LAN. You would deliberately
have to zero out this field during initial setup to avoid having unusable PPP.

    If I have guessed your problem correctly, in the output of the route
command you will see some # like 192.168.1..254 flagged with the UG 'gateway'
tag in the output--but PPP.is also flagged as UG! This means that your box
dials up and authenticates itself to the ISP but all your TCP requests and
such are mis-routed to the eth interface.  Study the man page for route to
figure out how to delete this spurious gateway. Or reinstall and be sure to
avoid having the eth0 interface become a gateway device. Ask someone for help
with route, it's a complicated pain in the neck to use correctly.

I don't really know what I am doing --your situation sounds exactly like one I
had, though.


> it is me again.

> I'm having troubles with my PPP script. (who hasn't?)

> This is what happends.

> # pppd
> the modem dials the number and I connect to my ISP.

> When I check /var/log/messages I see that I've got an IP address.

> BUT Something is wrong with the host lookup things. I can't do anything!
> When I try to ftp it says. "Unknown host servername" or "Unable to connect,
> unknown host" etc..

> in /etc/resolv.conf I've got all the nameservers that my ISP provides.

> What have I missed?

> Thanx!

> /Martin


 
 
 

can't ping, ftp etc "Unable to connect, unknown host"

Post by Eriksso » Sun, 16 May 1999 04:00:00


No.. That wasn't my problem. I'm using Slackware 3.6 and kernel 2.2.4 btw.

Any other ideas?

/Martin

Quote:>Hi,
>Beware advice from the very-newbie (like me)....
>        Do you have a ethernet card? And if so, do you remember the point
in
>your installation when you set it up --there's a line in the setup screen,
the
>third i believe, that reads "default gateway". The redhat install program
will
>automatically put a 'reasonable' number in here for you if you simply enter
a
>IP for your nic on the first field. Unfortunately, this will screw-up your
PPP
>connection to Internet , if you make that connection directly from your
Linux
>box without going through a gateway host on your LAN. You would
deliberately
>have to zero out this field during initial setup to avoid having unusable
PPP.

>    If I have guessed your problem correctly, in the output of the route
>command you will see some # like 192.168.1..254 flagged with the UG
'gateway'
>tag in the output--but PPP.is also flagged as UG! This means that your box
>dials up and authenticates itself to the ISP but all your TCP requests and
>such are mis-routed to the eth interface.  Study the man page for route to
>figure out how to delete this spurious gateway. Or reinstall and be sure to
>avoid having the eth0 interface become a gateway device. Ask someone for
help
>with route, it's a complicated pain in the neck to use correctly.

>I don't really know what I am doing --your situation sounds exactly like
one I
>had, though.

 
 
 

can't ping, ftp etc "Unable to connect, unknown host"

Post by hazzma » Sun, 16 May 1999 04:00:00


Sorry. Way out of my depth. Using Netstat and ifconfig, you should be able to
tell where those packets are going. If it's not an erroneous routing address,
then it's a hardware thing, or cosmic rays or gypsies...

Anybody gonna give this guy some real help?


> No.. That wasn't my problem. I'm using Slackware 3.6 and kernel 2.2.4 btw.

> Any other ideas?

> /Martin

> >Hi,
> >Beware advice from the very-newbie (like me)....
> >        Do you have a ethernet card? And if so, do you remember the point
> in
> >your installation when you set it up --there's a line in the setup screen,
> the
> >third i believe, that reads "default gateway". The redhat install program
> will
> >automatically put a 'reasonable' number in here for you if you simply enter
> a
> >IP for your nic on the first field. Unfortunately, this will screw-up your
> PPP
> >connection to Internet , if you make that connection directly from your
> Linux
> >box without going through a gateway host on your LAN. You would
> deliberately
> >have to zero out this field during initial setup to avoid having unusable
> PPP.

> >    If I have guessed your problem correctly, in the output of the route
> >command you will see some # like 192.168.1..254 flagged with the UG
> 'gateway'
> >tag in the output--but PPP.is also flagged as UG! This means that your box
> >dials up and authenticates itself to the ISP but all your TCP requests and
> >such are mis-routed to the eth interface.  Study the man page for route to
> >figure out how to delete this spurious gateway. Or reinstall and be sure to
> >avoid having the eth0 interface become a gateway device. Ask someone for
> help
> >with route, it's a complicated pain in the neck to use correctly.

> >I don't really know what I am doing --your situation sounds exactly like
> one I
> >had, though.

 
 
 

can't ping, ftp etc "Unable to connect, unknown host"

Post by Aaron Baughe » Sun, 16 May 1999 04:00:00



> No.. That wasn't my problem. I'm using Slackware 3.6 and kernel
> 2.2.4 btw.
> Any other ideas?

I missed your original post.  Can you post the results of 'netstat
-rn' before and after you make your ppp connection, and maybe your
/etc/rc.d/rc.inet1, unless you're very confident about it ?

Aaron
--

Extreme Systems Consulting - http://haruchai.rnet.com/esc/
CGI, Perl, Java, and Linux/Unix Administration

 
 
 

can't ping, ftp etc "Unable to connect, unknown host"

Post by Eriksso » Mon, 17 May 1999 04:00:00


Quote:>I missed your original post.  Can you post the results of 'netstat
>-rn' before and after you make your ppp connection, and maybe your
>/etc/rc.d/rc.inet1, unless you're very confident about it ?

OK..

# netstat -rn

--- Before ppp connection ---
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
192.168.1.0        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

--- After ppp connection --- (no change)
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
192.168.1.0        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

My rc.inet1 file

#! /bin/sh
#
# rc.inet1 This shell script boots up the base INET system.
#

#

HOSTNAME=`cat /etc/HOSTNAME`

# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth0 interface. If you're only using loopback or SLIP, don't include the
# rest of the lines in this file.

# Edit for your setup.
IPADDR="192.168.1.5" # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
NETWORK="192.168.1.0" # REPLACE with YOUR network address!
BROADCAST="192.168.1.255" # REPLACE with YOUR broadcast address, if you
   # have one. If not, leave blank and edit below.
GATEWAY="" # REPLACE with YOUR gateway address!

# Uncomment the line below to configure your ethernet card.
/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

# If the line above is uncommented, the code below can also be uncommented.
# It sees if the ethernet was properly initialized, and gives the admin some
# hints about what to do if it wasn't.
if [ ! $? = 0 ]; then
  cat << END
Your ethernet card was not initialized properly.  Here are some reasons why
this
may have happened, and the solutions:
1. Your kernel does not contain support for your card.  Including all the
   network drivers in a Linux kernel can make it too large to even boot, and
   sometimes including extra drivers can cause system hangs.  To support
your
   ethernet, either edit /etc/rc.d/rc.modules to load the support at
boottime,
   or compile and install a kernel that contains support.
2. You don't have an ethernet card, in which case you should comment out
this
   section of /etc/rc.d/rc.inet1.  (Unless you don't mind seeing this
error...)
END
fi

# Uncomment these to set up your IP routing table.
/sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
if [ ! "$GATEWAY" = "" ]; then
 /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1
fi

# End of rc.inet1

>Aaron
>--

>Extreme Systems Consulting - http://haruchai.rnet.com/esc/
>CGI, Perl, Java, and Linux/Unix Administration

 
 
 

can't ping, ftp etc "Unable to connect, unknown host"

Post by Curt » Mon, 17 May 1999 04:00:00


Looks like you need to add a default route to ppp0

route add default gw dev ppp0

Somehow you also have 2 identical routes you your local net, this probably
won't cause any problems,
but you might look for where it is happening.

I also noticed your MSS size is 0.  This may cause problems.  You can set
this via ifconfig.   I have an MTU
size of 1500 for all my interfaces eth0 and ppp0,  you might try the same.


Quote:> >I missed your original post.  Can you post the results of 'netstat
> >-rn' before and after you make your ppp connection, and maybe your
> >/etc/rc.d/rc.inet1, unless you're very confident about it ?

> OK..

> # netstat -rn

> --- Before ppp connection ---
> 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
> 192.168.1.0        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

- Show quoted text -

> --- After ppp connection --- (no change)
> 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
> 192.168.1.0        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

> My rc.inet1 file

> #! /bin/sh
> #
> # rc.inet1 This shell script boots up the base INET system.
> #

> #

> HOSTNAME=`cat /etc/HOSTNAME`

> # Attach the loopback device.
> /sbin/ifconfig lo 127.0.0.1
> /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

> # IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure
the
> # eth0 interface. If you're only using loopback or SLIP, don't include the
> # rest of the lines in this file.

> # Edit for your setup.
> IPADDR="192.168.1.5" # REPLACE with YOUR IP address!
> NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
> NETWORK="192.168.1.0" # REPLACE with YOUR network address!
> BROADCAST="192.168.1.255" # REPLACE with YOUR broadcast address, if you
>    # have one. If not, leave blank and edit below.
> GATEWAY="" # REPLACE with YOUR gateway address!

> # Uncomment the line below to configure your ethernet card.
> /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

> # If the line above is uncommented, the code below can also be
uncommented.
> # It sees if the ethernet was properly initialized, and gives the admin
some
> # hints about what to do if it wasn't.
> if [ ! $? = 0 ]; then
>   cat << END
> Your ethernet card was not initialized properly.  Here are some reasons
why
> this
> may have happened, and the solutions:
> 1. Your kernel does not contain support for your card.  Including all the
>    network drivers in a Linux kernel can make it too large to even boot,
and
>    sometimes including extra drivers can cause system hangs.  To support
> your
>    ethernet, either edit /etc/rc.d/rc.modules to load the support at
> boottime,
>    or compile and install a kernel that contains support.
> 2. You don't have an ethernet card, in which case you should comment out
> this
>    section of /etc/rc.d/rc.inet1.  (Unless you don't mind seeing this
> error...)
> END
> fi

> # Uncomment these to set up your IP routing table.
> /sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
> if [ ! "$GATEWAY" = "" ]; then
>  /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1
> fi

> # End of rc.inet1

> >Aaron
> >--

> >Extreme Systems Consulting - http://haruchai.rnet.com/esc/
> >CGI, Perl, Java, and Linux/Unix Administration

 
 
 

1. named: "found it", ping: "unknown host"

Dear All

Soory, this looks much like a standard Unix question:

Applications can't resolve some addresses of my domain and only from my
Linux PC: all those who starts with the same group of letters as the
Linux PC itself, i.e.: tvn_pc, tvn_xt, tvn_lap. The Linux box's name is
tvn_linux. I don't have such problem with my other Unix boes nor my
PC's.

1/ I've setup a local named to monitor the name resolution: it's Ok.
named finds it but the invoking application don't get it.
2/ My resolv.conf has a search onto my subdomain and main domain.
3/ My nsswitch.conf says  hosts: dns [NOTFOUND=continue] files

If I put an entry in the /etc/hosts: it works.

How can it be doing this?

Many thanks,
Thierry de Villeneuve

----


ping: unknown host tvn_pc

----

the /var/tpm/named.run (Intranet names and IPs edited) reports:

datagram from [192.4.209.73].1370, fd 22, len 35; now Fri Jun 12
09:46:44 1998
ns_req(from=[192.4.209.73].1370)
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59847
;; flags: rd; Ques: 1, Ans: 0, Auth: 0, Addit: 0
;; QUESTIONS:
;;      tvn_pc.rbc.st.com, type = A, class = IN

req: nlookup(tvn_pc.rbc.tt.com) id 59847 type=1 class=1
req: found 'tvn_pc.rbc.tt.com' as 'tvn_pc.rbc.tt.com' (cname=0)
wanted(0x8079988, 1, 1) [IN A]
make_rr(tvn_pc.rbc.tt.com, 8079988, bffffc1b, 465, 1) 4 zone 0 ttl
897753892
finddata: added 1 class 1 type 1 RRs
req: foundname=1, count=1, founddata=1, cname=0
sort_response(1)
findns: np 0x8078140 'tvn_pc'
match(0x8079988, 1, 2) 1, 1
findns: np 0x8079d10 'rbc'
match(0x8077f28, 1, 2) 1, 6
match(0x80780a0, 1, 2) 1, 2
findns: 1 NS's added for 'rbc'
make_rr(rbc.st.com, 80780a0, bffffc2b, 449, 1) 17 zone 0 ttl 897754724
free_nsp: rbdns.rbc.tt.com rcnt 1
doaddinfo() addcount = 1
do additional "rbdns.rbc.tt.com" (from "rbc.tt.com")
found it
match(0x8078fd0, 1, 5) 1, 1
match(0x8078fd0, 1, 5) 1, 1
match(0x8078fd0, 1, 1) 1, 1
make_rr(rbdns.rbc.st.com, 8078fd0, bffffc49, 419, 0) 4 zone 0 ttl
897754724
addinfo: adding address data n = 16
ns_req: answer -> [192.4.209.73].1370 fd=22 id=59847 size=97 Local

2. /etc/printcap for(laserwriter Select 310) Postscript printer

3. FileZilla: SFTP "unable to connect"; FTP can't CD above homedir

4. setup a unix shell

5. DNS: ping gives "unknown host", but nslookup works

6. Kernel 2.2.5 hangs after some hours !

7. pb: "unknown host" from ping.

8. Graphical frontend to GDB

9. Canned "ping"

10. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

11. "syslogd: unknown priority "24" " error - won't boot!

12. Where is source code for "telnet", "ftp" etc.

13. Why "ping" can't recognize the "icmp: echo reply" message ?