B
B
betal2012-10-10 02:04:31
Debian
betal, 2012-10-10 02:04:31

Three network cards and XEN

Hello,
I can’t figure out how to write a config in XEN 4 (debian), the situation is this, there are three network cards in the server
1) eth0 is connected to the internal network, it is connected by a bridge between dom0 and dom1, it is currently working correctly
2) eth1 is connected to the Internet from dom0, so we don’t touch it, it works
3) eth2 is connected to the Internet from dom1, we can’t forward it.

Thus, the guest system should have two network interfaces, the first goes to the local network, the second on a separate network card to the Internet. I am unable to correctly configure the second network card.

Configuration in xend-conf:

(network-script 'network-bridge netdev=eth0')
(vif-script vif-bridge)
(network-script 'network-route netdev=eth2')
(vif script vif route)

configuration in dom1.cfg
vif = [ 'mac=00:16:3E:CF:20:E7', 'mac=00:16:3E:CF:20:E9' ]


I understand what I'm doing wrong, I don't ask you to write me a configuration, I ask you to at least tell me in which direction you need to think.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jov, 2012-10-10
@jov

I don’t quite understand why exactly two network cards should be forwarded, because in dom0 the routing is already configured and the packets go in the right direction, but if you really want to, then you need to create a second bridge for the second network, that is

(network-script 'network-route netdev=eth2  bridge=bridge2')

M
Melkij, 2012-10-10
@melkij

I know 2 options:
0) bring eth2 to another bridge (how - see jov's answer) and specify in the domU config which bridge to which interface to connect:
vif = [
'mac=00:16:3E:10:8F:0A, bridge=xenbr',
'mac=00:1C:C0:A8:07:01,bridge=dmz',
]
1) Forward physically (google pci passthrough)

I
iandriyanov, 2012-10-10
@iandriyanov

For me, the best solution for working with xen was the Suse server system. It spreads, of course, with a crutch, but it is stable and more than suitable. She has a minus out of the box, and this is that she does not know how to update and has only a distribution kit on the disk. However, there are hacks.
How it works in Suse:
- xend-config.sxp:

(network-script )
(vif-script vif-bridge)

And this is enough to bridge the interfaces. Xenia has her own autoscripts before starting the service, which raise bridges equal to interfaces, for example eth0 = br0 | eth1=br1.
And the domU config itself in terms of the interface looks like this:
# Networking
#vif = ['mac=00:0c:29:03:00:02, bridge=br0, model=e1000',  - иногда бывает нужно указать драйвер 
#       'mac=00:0c:29:03:00:03, bridge=br1, model=e1000']

vif = ['mac=00:0d:29:03:d0:02, bridge=br0',
       'mac=00:0c:29:03:00:03, bridge=br1']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question