[CentOS] Simple routing question

Thu Sep 6 17:55:05 UTC 2012
Les Mikesell <lesmikesell at gmail.com>

On Thu, Sep 6, 2012 at 11:11 AM, James B. Byrne <byrnejb at harte-lyne.ca> wrote:
> I am still having some difficulty understanding what is going on with
> routing on 192.168.x.x.
>
> I have removed the IP aliases from the gateway eth1 so that it only
> responds to aaa.bbb.ccc.1.
>
> I have changed the netmask on Host B eth1 [192.168.209.43] to
> 255.255.0.0 and set its gateway to aaa.bbb.ccc.1; as I have on all of
> the guests that have eth1 active.
>
> The network service on both hosts and guests has been restarted.
>
> However, when I do a traceroute from Host C [aaa.bbb.ccc.25] to
> 192.168.209.43 it still goes directly to the gateway at aaa.bbb.ccc.1
> and thence out to the eth0 i/f on the gateway, where it dies as
> before.
>
> I note that Host C is a xen virtual host (used for some experiments
> several years ago but no longer hosting any active guests) and that it
> has the following virtual interface:
>
> 5: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
>     link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
>
> This has an address in the same network as 192.168.209.43 but with a
> different netmask.  This seems to eb the case on the kvm virtual hosts
> as well.
>
> 6: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
> state UNKNOWN
>     link/ether 52:54:00:a6:3f:49 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
>
> So, is this the source of the problem when I try and connect to
> 192.168.209.43?  Is the netblock 192.168.255.255 constrained to use a
> netmask of 255.255.255.0 because of its use by the virtual hosts?
>

A 'route -n' should show you where any destination will head on the
next hop.  On host C, what is the line with the smallest matching
destination/mask?  Likewise, on the gateway host where you think it is
being forwarded the wrong way?

-- 
   Les Mikesell
     lesmikesell at gmail.com