Xen-bridging ifaces

Who faced with the problem of bridgevine, viz. Bridge is transparent, the tail is DHCP, odnakovo raised on virtual reality and the interface is not what comes to DHCP.

#:uname-a
Ulskpal Linux 3.0.0-17-server #30-Ubuntu SMP Thu Mar 8 22:15:30 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

#:lsb_release
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric

#############
The DECISION
#############

However, the solution is found. And God will judge them in this Canonicle!

Need everything else for the bridge to add in /etc/xen/xend-config.sxp: (the exact name of the bridge bridge=xenbr1 )

brctl show to find out the name of the bridge interface.<br>

(network-script 'network-bridge netdev=eth1 bridge=xenbr1')<br>

And guest to EXPLICITLY specify its ip despite the fact that even he will receive via dhcp (I Have dhcp configured so tied to Mac and I'm sure the ip-shka does not change without my knowledge from here):

vif = ['type=ioemu, mac=00:2c:02:f2:72:5b, ip=192.168.144.61, bridge=xenbr1' ]<br>

Interestingly, THIS happens only in Ubuntu Server. On Debian this is not necessary, I would even say that this configuration breaks the network. Gentoo even ask.
October 8th 19 at 00:31
6 answers
October 8th 19 at 00:33
Solution
However, the solution is found. And God will judge them in this Canonicle!

Need everything else for the bridge to add in /etc/xen/xend-config.sxp: (the exact name of the bridge bridge=xenbr1 )

brctl show to find out the name of the bridge interface.<br>

(network-script 'network-bridge netdev=eth1 bridge=xenbr1')<br>

And guest to EXPLICITLY specify its ip despite the fact that even he will receive via dhcp (I Have dhcp configured so tied to Mac and I'm sure the ip-shka does not change without my knowledge from here):

vif = ['type=ioemu, mac=00:2c:02:f2:72:5b, ip=192.168.144.61, bridge=xenbr1' ]<br>

Interestingly, THIS happens only in Ubuntu Server. On Debian this is not necessary, I would even say that this configuration breaks the network. Gentoo even ask.
October 8th 19 at 00:35
I think that the best advice is a working example, below, the files that are on my production server:

[root@OracleLinux ~]# cat /etc/xen/xend-config.sxp | grep vif-script
(vif-script vif-bridge)
#(vif-script vif-route)
#(vif-script vif-nat)
[root@OracleLinux ~]# cat /etc/xen/xend-config.sxp | grep network-script
# (network-script network-bridge)
#(network-script network-xen-multi-bridge)
(network-script 'network-bridge netdev=eth2')
# (network-script 'network-bridge bridge=')
#(network-script network-bridge)
# (network-script 'network-bridge bridge=') then you may wish to do the
#(network-script network-route)
#(network-script network-nat)

This configuration guest system on it is Ubuntu server 10.04. Two network interfaces, one physical, the one that You need, it looks to LAN, gets DHCP, etc. (now it is configured for static).
The second shares the network interface with the host system, and receives from it the Internet, for NATом So to speak.

[root@OracleLinux ~]# cat /etc/xen/Ubuntu_squid_sams 
name = "Ubuntu_squid_sams"
uuid = "7cc14ee2-5be9-b5ad-ce3f-f3d01f821a09"
maxmem = 256
memory = 256
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "c"
pae = 1
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib64/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
keymap = "ru"
disk = [ "phy:/dev/sda9,hda,w", ",hdc:cdrom,r" ]
vif = [ "mac=00:16:36:2f:26:7a,bridge=virbr0,script=vif-bridge, mac=00:16:36:3b:21:97,bridge=xenbr0,script=vif-bridge" ]
parallel = "none"
serial = "pty"
extra = "xencons=pty"


Try to see if it does not, will thoroughly investigate.
Tell me the uuid is for the hard disk file under dev? - Ila.Mayert commented on October 8th 19 at 00:38
File hard drive under the V-world is "phy:/dev/sda9,hda,w", and is a unique identifier for the guest - Dorothy_Smi commented on October 8th 19 at 00:41
randomly in my head to come up with? And Yes, I have 4 gsen, maybe it's something will give. Your config does not work. And Yes, it's clear that you have Fizicheskii disk. - Ila.Mayert commented on October 8th 19 at 00:44
hmm, 4 xen I have Xen 3.1.2-194.el5. Host system Ubuntu means, and the guest who? - Dorothy_Smi commented on October 8th 19 at 00:47
gentoo =)) 32bit - Ila.Mayert commented on October 8th 19 at 00:50
and when Your guest is loaded in ifconfig it that glows? - Dorothy_Smi commented on October 8th 19 at 00:53
the interface I set up on dhcp and designs available ACCOR. However, that will notice. If the hands to assign sodny ipesco, I pingwu the host folder and host folder, pinguy daughter. I hope I made myself clear. - Ila.Mayert commented on October 8th 19 at 00:56
"sognu" — apparently meant guest, "ping folder" expression too weird, but approximately I understand, i.e. if You priviate rustami guest IP, guest and host machine pigout each other. What subnet is assigned an IP address? - Dorothy_Smi commented on October 8th 19 at 00:59
corrected-corrected and he made a mistake *handles had to be - Dorothy_Smi commented on October 8th 19 at 01:02
the LAN — 192.168.144.0\24 - Ila.Mayert commented on October 8th 19 at 01:05
192.168.144.5(host) | 192.168.144.61(guest) - Ila.Mayert commented on October 8th 19 at 01:08
You arbitrarily chose these IP? And perhaps the question is ridiculous, and DHCP all is? - Dorothy_Smi commented on October 8th 19 at 01:11
October 8th 19 at 00:37
My working day comes to an end, go in there will not soon be able to help can leave your question about the networking in XEN:
habrahabr.ru/qa/10302/

And yet, all the man'ula says to do exactly so, as for xend-config.sxp
A custom bridge. To do this, in the file /etc/network/interfaces in the settings of your network card add:
up /etc/xen/scripts/network-bridge start
Custom XEN. Attributed to/recomendavel line in the file /etc/xen/xend-config.sxp:
(network-script 'network-bridge bridge=eth0 antispoof=yes')
(vif-script vif-bridge)

Should work.
Here is this command in the startup script knocks iface the interface and host — up /etc/xen/scripts/network-bridge start - Ila.Mayert commented on October 8th 19 at 00:40
October 8th 19 at 00:39
1 — etc/xen/xend-config.sxp:

(network-script 'network-bridge bridge=xenbr1 netdev=eth1 antispoof=yes')

(vif-script vif-bridge)

2 — Guest conf (/home/xen/config/gen32_test)

kernel = '/usr/lib/xen-4.1/boot/hvmloader'
builder = 'hvm'
memory = '800'
device_model='/usr/lib/xen-4.1/bin/qemu-dm'

###################################################################################

# Disks

disk = [ 'file:/home/xen/image/gen32_test.raw,ioemu:hda,w',
'file:/home/xen/install-x86-minimal-20120306.iso,ioemu:hdc:cdrom,r' ]

# Hostname
name = 'gen32_test'

# Networking
#vif = ['type=ioemu, model=e1000, mac=00:0c:29:02:76:47']
vif = ['type=ioemu, mac=00:2c:02:f2:72:5b, bridge=xenbr1']

vcpus = 1
apic = 0
acpi = 1
pae = 1

# boot floppy (a), hard disk © CD-ROM (d).
boot='d'

localtime=1

vnc=1
vnclisten = '0.0.0.0'
#vncconsole=0
#vncviewer=1
stdvga=0
#vncunused = 1
sdl=0
serial="

on_reboot = 'restart'
on_crash = 'destroy'
on_poweroff = 'destroy'
October 8th 19 at 00:41
On a host that is a DHCP assigned address 144.5. Hands on the guest I took the neighboring ip-shku.
October 8th 19 at 00:43
Describe the bridge in advance in conf.d/net (this habrahabr.ru/post/131196/)
bridge_br0="eth0"<br> rc_need_br0="net.eth0"<br> config_eth0=("null")<br> config_br0=(<br> "x.x.x.x/27"<br> "192.168.194.1/24" to communicate with virtualname<br> )<br> routes_br0=("default gw y.y.y.y")<br>
It's not like not apply! - Ila.Mayert commented on October 8th 19 at 00:46

Find more questions by tags XenLinux* nix-like systems