Preface
Once upon a time, there was a Xen hypervisor on the server, virtual machines were spinning, driving traffic through the network, I didn’t think about anything.
The network lived through xenbr0, which combined eth0 and virtual interfaces.
In addition to eth0, there was another interface on the server - eth1. Which is not used as unnecessary.
And in connection with the dying of the router, the admin decided through eth1 to let his LAN to the Network.
Without thinking twice, he raised eth1, stuck in the provider lace, Baitik flowed - well ...
But a terrible thing happened - reboot. After the reboot, xenbr0 completely refused to rise, arguing that the ppp0 interface is busy ...
“What does ppp0 have to do with this?” - you will think - and you will be right.
Admin also thought the same. And he began to read mana and in the Xenov scripts poking around.
')
That's what I picked
The network layout of Xen is as simple as a door.
When starting xend, a script is pulled (by default, / etc / xen / scripts / network-bridge), which does the following:
1. Creates a xenbr0 bridge
2. Extinguishes physical eth0
3. Copies the IP and MAC of physical eth0 to the virtual interface veth0
4. Renames physical eth0 to peth0
5. Virtual veth0 renames eth0
6. peth0 and vif0.0 clings to xenbr0
7. Raises xenbr0, peth0, eth0 and vif0.0
This is in theory. But in practice, the script for some reason tried to perform all actions with ppp0.
This happens because the default script works with the interface that we have default route for.
Well, it does not matter, good developers have provided for this - / etc / xen / scripts / network-bridge can be run with parameters.
Like that:
/etc/xen/scripts/network-bridge start bridge=xenbr0 netdev=eth0
That is, it is hard to set the interface through which we will work. And for some reason, my script refused to extinguish eth0 itself - I had to help him with my hands ...
Based on the above, the solution to the problem turned out to be quite simple.
Practice
We extinguish eth0
ifconfig eth0 down
Configure Bridge
/etc/xen/scripts/network-bridge start bridge=xenbr0 netdev=eth0
Raise the bridge (the script for some reason did not)
ifconfig xenbr0 up
Everything, byketik from virtual computers went to a local area network and the Internet.