I am getting

Longman, Bill yellowdog-newbie@lists.terrasoftsolutions.com
Wed, 4 Jun 2003 09:03:27 -0700


> I was wondering if any one knows where I would look to fix 
> the error below.  
> This is the one that I am getting while trying to run yum.  I 
> checked the 
> file and it looks find to me.  I do not know if I have this 
> port blocked and 
> this is why I am getting this error or what.  I do not know 
> what to check to 
> see if maybe this is why I am getting this error.  If any one has any 
> suggestions on where to look it would be greatly appreciated.
> 
> IOError: [Errno socket error] (113, 'No route to host')

You have no route.

Use the route command to show you the current routes. You should have a
"default" route that goes to your gateway. Here are my routes:

miswelme01$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.224.0   *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.224.1   0.0.0.0         UG    0      0        0 eth0

I have a single interface (eth0) and my gateway is 192.168.224.1. That's the
router here at work that sends to and from the internet and the rest of the
lab.

You can enter a route if you don't have one and you know where to route the
traffic. If you know, for instance, that 192.168.0.1 is your gateway to the
wild blue yonder, you can do this:

~
miswelme01# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.224.0   *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo

[See, no default route!]

~
miswelme01# route add default gw 192.168.0.1
~
miswelme01# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
~
miswelme01#

[Happy joy joy]

You can also see that that route is good (G) in the flags column.

Bill