-   Linux - Networking (
-   -   Routing Red Hat VM through local physical box. (

geelsu 05-31-2011 08:02 AM

Routing Red Hat VM through local physical box.
I've setup an XP VM using Red Hat's KVM. The physical Red Hat box has two NICs, a fiber one in use and active and a CAT-5 one that is disabled and with no wire connected.

The physical box has br0 active and bridging on the subnet of ip route show also displays for virbr0

My physical box ( ping the virbr0 IP of, but not the XP VM of

I have played around with Window's route command to try and setup some method for the Windows VM to ping the network, but have not had any luck. I've also messed around with the Red Hat netmask and such to work it from the Linux side. But then, as would be expected, I can't talk to other Linux boxes on the physical network.

Does anyone have any ideas how to get the Windows box to communicate with the Red Hat box and the other Linux systems beyond while keeping the two distinct networks of and leaving them both as Class C (

I mentioned the unused CAT-5 NIC thinking perhaps it could operate as an internal router even with no cable attached. That was just a random thought and I have not even explored that.

Thanks everyone for reading and especially for your thoughts and expertise.

T3RM1NVT0R 05-31-2011 01:01 PM

@ Reply
Hi there,

Try this add the following route on your RedHat machine: route add -net gw

Also let us know the following information:

1. Virtual box solution in use. Like VMware or Virtual Box
2. What type of ethernet configuration is in use on host machine (XP) whether bridged or NAT or host only etc.

geelsu 06-01-2011 06:40 AM


I actually had some contact with Red Hat and my barking-up the tree seems to be a dead end perhaps. Here is their statement:

"The virbr0 IP address is completely unrelated to the IP address of the guest operating systems. You should simply be able to set the IP address as you wish. Bridges act like virtual ethernet switches, rather than as routers."

So it seems I've been trying to route via "switches." I guess I would need some sort of software based routing RPM so that systems attached to the network and the network could be routed to each other.

In his statement above he says "...You should simply be able to set the IP address as you wish..." and that is true. I can set the VM IP to one on the network and it is happy. I can ping other systems.

I've also played around with your route command using all sorts of combinations of the parameters and their variables, but haven't hit on any success yet.

I had hoped to try and trick the VM by setting the IP to something like and then use a netmask of so the network portion of the IP would match (well sort of match), but this did not work.

Oh well, it seems I have two machines, one physical and one virtual. Either I put them on the same subnet and move on or I find a virtual router. I seen rumors that squid might do this, but I haven't found any good examples of setting that up. All the examples and forums point squid to being more useful as a proxy for web stuff and such.

If I get something figured out, I'll let you know.


All times are GMT -5. The time now is 06:51 PM.