XL_Networking

https://wiki.xenproject.org/wiki/Xen_Networking

https://wiki.xenproject.org/wiki/Network_Configuration_Examples_(Xen_4.1%2B)

br0 -> already created (previous setup) in /etc/network/interfaces:

auto lo
iface lo inet loopback
auto br0
iface br0 inet dhcp
        bridge-ports eth0
        hostname dharra

for domU..chottu ....the conf is vif = [ 'model=e1000, mac=xx:xx:xx:xx:xx:38, bridge=br0' ]

this connects it to the dom0 bridge:

dharra:~/alpineDomU# brctl show
bridge name bridge id STP enabled interfacesbr0 8000.408d5c4d660c no eth0 vif12.0virbr0 8000.5254001d3226 yes virbr0-nic

br0 has vif12.0 (that's domID 12 for chottu . device ID 0)

virbr0 is a bridge created by libvirt ...but we aborting it.

create a new bridge w/o any interfaces: e.g. https://blog.x-way.org/Linux/2013/02/05/Configure-unattached-Bridge-Interfaces-in-Debian.html

https://wiki.alpinelinux.org/wiki/Bridge

IN DOM0

dharra:/etc/network# cat /proc/sys/net/ipv4/ip_forward

1

dharra:/etc/network# cat interfaces
auto loiface lo inet loopbackauto br0iface br0 inet dhcp bridge-ports eth0 bridge_stp 0 hostname dharraauto xenbr0iface xenbr0 inet static address 10.x.x.x netmask 255.255.255.0 bridge-ports none

dharra:/etc/network#

this brings up xenbr0 w/ 10.x.x.x IP address. Next setup dhcp to feed IPs to xenbr0; also IPtables to fwd packets in & out.

apk add dhcp <-- installs the DHCPD

USING the CONF FROM OUR ipFWD work

in /etc/conf.d/dhcpd -> set network interface to xenbr0

rc-service dhcpd start
rc-update add dhcpd
cat /etc/dhcp/dhcpd.conf:
##for fixed leases to internal machineshost internal1 { hardware ethernet xx:xx:xx:xx:xx:42; fixed-address 10.x.x.y1;}host internal2 { hardware ethernet xx:xx:xx:xx:xx:44; fixed-address 10.x.x.y2;}

on CHOTTU:

read NEW_ALPINE_DOMU_SUPPLEMENTS_ABOVE

CHOTU ALSO BEING USED AS A ROUTER W/ IP FORWARDING & IPTABELS RULES FOR ALL 10.20.1.X machines