Installation guide

DEVICE=dummy0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=10.1.1.1
ARP=yes
3. Bind xenbr0 to dummy0, so you can use networking even when not connected to a physical
network. Edit /etc/xen/xend-config.sxp to include the netdev=dummy0 entry:
(network-script 'network-bridge bridge=xenbr0 netdev=dummy0')
4. Open /etc/sysconfig/network in the guest and modify the default gateway to point to
dummy0. If you are using a static IP, set the guest's IP address to exist on the same subnet as
dummy0.
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=10.1.1.1
IPADDR=10.1.1.10
NETMASK=255.255.255.0
5. Setting up NAT in the host will allow the guests access Internet, including with wireless,
solving the Xen and wireless card issues. The script below will enable NAT based on the
interface currently used for your network connection.
Co n f ig u rin g NAT f o r gu est s
Network address translation (NAT) allows multiple network address to connect through a single IP
address by intercepting packets and passing them to the private IP addresses. You can copy the
following script to /etc/init.d/xenLaptopNAT and create a soft link to
/etc/rc3.d/S99xenLaptopNAT. This automatically starts NAT at boot time.
Note
The script below may not work well with wireless network or Net wo rkMan ag er due to start-up
delays. In this case run the script manually once the machine has booted.
#!/bin/bash
PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH
GATEWAYDEV=`ip route | grep default | awk {'print $5'}`
iptables -F
case "$1" in
start)
if test -z "$GATEWAYDEV"; then
echo "No gateway device found"
else
echo "Masquerading using $GATEWAYDEV"
/sbin/iptables -t nat -A POSTROUTING -o $GATEWAYDEV -j MASQUERADE
fi
echo "Enabling IP forwarding"
echo 1 > /proc/sys/net/ipv4/ip_forward
Chapt er 1 1 . Pre- Red Hat Ent erprise Linux 5.4 Xen n et workin g
14 3