Skip to contentSkip to conversation

How to use NAT and bridge together?

Xen 3.2 pradeep singh rautela 1 participant 1 message Feb 20, 2008

lore
Share & tools
lore
#0 lore raw

Hi All,

How does NAT work now in xen-3.2?
I am not at all able to write a custom script which will attache peth0 to bridge xenbr0(eth0 now) and make peth1 NAT for a dedicated HVM domU.

This is what i write in my custom script.

dir=$(dirname "$0")

"$dir/network-bridge" "$@" bridge=eth0 netdev=eth0

"$dir/network-nat" "$@" netdev=eth1

Whats wrong this thing?

Can't i run one ethernet interface in NAT mode and other in bridged mode at the same time in Xen-3.2?

How will i know that this NAT thing is working only for one NIC and one HVM domainU?What should i look for in dom0?

$ brctl show gets me [without any domU working]
bridge name     bridge id               STP enabled     interfaces
eth0            8000.0000c0123300       no              peth0

Can someone explain me why xenbr0 was renamed to eth0 and so on? It seems to beat shit out of poor soul like me :-).

On a side note, the eth1 device on domainU cannot be created, meaning something wrong with the way i am using nat-script it seems. How do i use it in this case.

I used the syntax after a look at network-nat under /etc/xen/scripts/ .

Any pointers.

ps:- I have looked into shorewall and xen configuration link, it works only for PV guests.

Thanks,
--Pradeep

Signature · 3 lines
Pradeep Singh Rautela
http://eagain.wordpress.com
http://emptydomain.googlepages.com