The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 "No route to host", please help
Author: Mai Minh 
Date:   24-01-03 08:05

Hi all,
I'm a FreeBSD newbie.
I'm setting up my modem to connect to my ISP.
When the modem has connected to my ISP, i can ping the Server IP, but that's all. Any IP will caused this error: "No route to host".
How to solve? Please help.
Thank you.

Reply To This Message
 
 Re: "No route to host", please help
Author: k 
Date:   24-01-03 17:12

List the contents of your /etc/resolv.conf file
and the appropriate ppp messages from /var/log/messages.

Reply To This Message
 
 Re: "No route to host", please help
Author: anthonyf 
Date:   24-01-03 21:40

eh i dont think it has anything to do with your resolv.conf like the previous poster said, otherwise youd be getting messages about being unable to resolve the host name. Yours seems more like a gateway problem where your ISP isnt assigning the default gateway correctly or youve set it wrong.

check the output of the route command and see what it says your default gateway is set to on a clean boot, the connect and see if it changes. If not the easiest way to find out what it should be (if they do not provide the info) is to connect using a windows machine and see what it gets automagicly set to.

Of course there are prolly faster and better ways, using windows for a breif minute will prolly end up being easier for a newb, this way you can at least get connect to the net and then look up how to do it the right way while in bsd ;)

Reply To This Message
 
 Re: "No route to host", please help
Author: k 
Date:   25-01-03 00:56

That is of course correct and that's what I get for not reading the question thoroughly in the first place and trying to answer a question while simultaneously helping a field tech over the phone.
Of course the quickest way might be to call the ISP itself for the settings :)

Reply To This Message
 
 Re: "No route to host", please help
Author: Mai Minh 
Date:   25-01-03 06:56

Hi all,
thanks K and Anthonyf for your reply.
Here is my resolve.conf:
--------
domain maingo.local
nameserver 203.162.4.1
nameserver 203.162.0.11
(they are my ISP's DNS server)
--------
but till now, when i had removed the line "defaultrouter 192.168.0.1" in the rc.conf but ther are nothing changes.
:(

Reply To This Message
 
 Re: "No route to host", please help
Author: CoderZ 
Date:   26-01-03 05:12

Maybe you could try adding your ISP's IP address as the default router?

# route add -net default <MY_ISPs_IP_ADDRESS>

Hope that helps...

Reply To This Message
 
 Re: &quot;No route to host&quot;, please help
Author: k 
Date:   27-01-03 01:46

Change the domain line in your resolv.conf file to your ISP's name.
Example:
change:
domain maingo.local
to:
domain myisp.com (whatever your ISP's host name is)

Reply To This Message
 
 Re: &quot;No route to host&quot;, please help
Author: .daniel.schrock 
Date:   27-01-03 03:03

This will not change anything.
"No route to host" has _nothing_ at all to do with dns.

tell us what `netstat -rn` says after you are connected. also tell us the gateway the isp says you are supposed to have.

Reply To This Message
 
 Re: &quot;No route to host&quot;, please help
Author: k 
Date:   27-01-03 04:42

.daniel.schrock wrote:
>
> This will not change anything.
> "No route to host" has _nothing_ at all to do with dns.

And I had referred to that fact earlier in my previous post.


However from: publib16.boulder.ibm.com/pseries/en_US/files/aixfiles/resolv.conf.

2. The resolver routines require you to set the default domain. If the default domain is not set in the /etc/resolv.conf file, then you must set it in the hostname on the machine.

To define a domain host that is not a name server, enter:
domain abc.aus.century.com
nameserver 192.9.201.1
nameserver 192.9.201.2

To me this domain line shows an example of a resolvable host name
and it certainly doesn't hurt anything to put a resolvable host name in the domain line. Now curiosity will take me to a dialup
box and I'll edit the domain to foo.bar and see what happens

Reply To This Message
 
 Re: &quot;No route to host&quot;, please help
Author: .daniel.schrock 
Date:   27-01-03 05:16

that still doesn't mean anything in this case... that is a AIX man page... not FreeBSD....

the domain line purely optional. it allows resolution based on the short hostname instead of the fully-qualified domainname.

ie: with a domain line of 'domain example.com',
you can resolve someserver.example.com using just someserver.

check `man 5 resolver` on a FreeBSD box... domain and search are mutually exclusive and neither required for normal operation.
i use search since i own 2 domains and also have an internal subdomain.

should i `ping server` it will append the internal subdomain...if nothing found... it moves on to the first domain... if nothing found, it moves on to the final domain... if nothing found, i will get an error since hostnames won't resolve on the internet.

example:
<code>
23:10:12:d_jab@carbon (/dev/ttyp1): 8 ~
>> cat /etc/resolv.conf
search int.sec-d.net sec-d.net anonymous-daemon.org
nameserver 127.0.0.1
nameserver 192.168.23.200
nameserver 192.168.23.249
nameserver 64.81.159.2
nameserver 216.231.41.2

23:11:01:d_jab@carbon (/dev/ttyp1): 9 ~
>> nslookup al
Server: localhost.anonymous-daemon.org
Address: 127.0.0.1

Name: aluminum.int.sec-d.net
Address: 192.168.23.200
Aliases: al.int.sec-d.net

</code>


now that this settled... the simple definition of a host is any networked device with an address....

'no route to host' means your system doesn't know how to get to that address... this is normally the result of no default gateway or misconfigured routing...

Reply To This Message
 
 Re: &quot;No route to host&quot;, please help
Author: k 
Date:   27-01-03 05:31

Well I learn something everyday. All this time I had been setting
up dialups on BSD boxes like I learned with Slowlaris and AIX.
At best it's a non issue, but that resolv.conf did look funny to me.

Reply To This Message
 
 Re: &quot;No route to host&quot;, please help
Author: Mai Minh 
Date:   29-01-03 01:45

Hi,
Thanks for all replies.
Here are what you need (In Windoze)
- IP: 203.162.153.24 (dynamic)
- Subnetmask: 255.255.255.255
- Default gateway: 203.162.153.24
- DNS: 203.162.4.1, 203.162.0.11
And nslookup in Windoze:
hcm-server1.vnn.vn
IP: 203.162.4.1
aliases: 1.4.162.203.in-addr.arpa
In FreeBSD, nslookup failed and here are the errors:
-Can't find the server name for 203.162.4.1 :Time out
-Can't find the server name for 203.162.4.1 :Time out
- Default server are not available

Here is the ifconfig:
sv2# ifconfig
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::250:8bff:fe34:7edf%fxp0 prefixlen 64 scopeid 0x1
ether 00:50:8b:34:7e:df
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
inet 203.162.2.56 --> 203.162.4.125 netmask 0xffffff00
Opened by PID 183
Here is the netstat:
sv2# netstat -n
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 20 192.168.0.2.22 192.168.0.101.3891 ESTABLISHED
udp4 0 0 203.162.2.56.138 *.*
udp4 0 0 203.162.2.56.137 *.*
udp4 0 0 192.168.0.2.138 *.*
udp4 0 0 192.168.0.2.137 *.*
Active UNIX domain sockets
Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr
c6209c80 stream 0 0 c61f6b00 0 0 0 /tmp/mysql.sock
c6209be0 dgram 0 0 0 c61eaf00 0 c6209d20
c6209d20 dgram 0 0 0 c61eaf00 0 c6209dc0
c6209dc0 dgram 0 0 0 c61eaf00 0 c6209e60
c6209e60 dgram 0 0 0 c61eaf00 0 c6209f00
c6209f00 dgram 0 0 0 c61eaf00 0 0
c61eaf00 dgram 0 0 c61e4f40 0 c6209be0 0 /var/run/log

-----------------------------
Thanks anyway. Hope you will bring me up. ;)

Reply To This Message
 
 Re: &quot;No route to host&quot;, please help
Author: .daniel.schrock 
Date:   30-01-03 04:41

what does netstat -rn say... we need the routing table.

i'm not sure if this will work, as i have never tried, but try bringing up the ethernet interface without an address...

since tun0 is what you want to use, it should still allow it.
also, the subnet mask for the tunnel doesn't look right to me:

inet 203.162.2.56 --> 203.162.4.125 netmask <b>0xffffff00</b>

but i don't use tunnels so i may be wrong. just don't use a /24 unless you were told to...

Reply To This Message
 
 Hell
Author: Anh Duong 
Date:   18-12-04 05:24

Mai Minh wrote:

Verry bad

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org