Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"No route to host"

Status
Not open for further replies.

adelinewss

Programmer
May 22, 2000
20
SG
I just install Freebsd.&nbsp;&nbsp;When I try to ftp to other server, it will show error &quot;No route to host&quot;.&nbsp;&nbsp;So I try to add a new route.&nbsp;&nbsp;Now it shows &quot;Writing to routing socket: Network is unreachable&quot;.&nbsp;&nbsp;May I know what is going wrong?&nbsp;&nbsp;Pls advice.&nbsp;&nbsp;<br><br><br>Thks with regards,<br>Adeline
 
You need to know IP of your gateway<br><br>and just type<br>route add default x.x.x.x<br>where x.x.x.x - IP address of your gateway<br><br>add this IP address to /etc/defaults/rc.conf to<br>defaultroute=
 
What if the unit is multihomed?
NIC #1 works fine

NIC #3 on a different subnet just keeps giving &quot;no route to host&quot;

Thanks in advance,
bonwier [sig][/sig]
 
Do not add the default gateway to the /etc/defaults/rc.conf file. That file is for the defaults only, instead add the gateway to the /etc/rc.conf file. It should exist, but if it does not, make one and add the gateway.

The /etc/default/rc.conf file is exec first on boot and the /etc/rc.conf file is exec last.

Add this line to /etc/rc.conf

defaultrouter=&quot;your if address goes here&quot; [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top