Bug 449686
| Summary: | [Chapter 12.2] Network_Devices.xml | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Michael Hideo <mhideo> |
| Component: | doc-Virtualization_Guide | Assignee: | Christopher Curran <ccurran> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Don Domingo <ddomingo> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 5.2 | CC: | berrange, herbert.xu |
| Target Milestone: | rc | Keywords: | Documentation |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.2/html/Virtualization/sect-Virtualization-Virtualized_network_devices-Laptop_network_configuration.html | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-09-02 04:56:50 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 449674 | ||
|
Description
Michael Hideo
2008-06-03 01:26:05 UTC
needs tech review. My bash is good but I can't be sure I could write the init script for this. Requesting engineering to write the rest of the init script. Herbert, can you review this for Chris? Sorry what exactly do I need to review? Could you attach it to this bug please? Thanks! Configuring NAT for virtualized guests
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.
NetworkManager and wireless NAT
The script below may not work well with wireless network or NetworkManager 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
echo "IP forwarding set to `cat /proc/sys/net/ipv4/ip_forward`"
echo "done."
;;
*)
echo "Usage: $0 {start|restart|status}"
;;
esac
The script looks fine to me. Although the "iptables -F" line would kill all iptables rules that were added before this script gets run. In general this would seem something that's better configured on a per-interface basis. But I'm no expert when it comes to RHEL configuration. Thanks! I propose this section is removed or marked Xen specific. I think it could be replaced by: http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/chap-Virtualization-Network_Configuration.html That method covers using libvirt for NAT and bridging which is our preferred method for RHEL 5.4 (with the introduction of KVM). My question is now whether this procedure will work for older versions of RHEL (that is anything earlier than 5.4)? Yes, AFAIK, the section Mark pointed to should work with all versions of Xen in RHEL5. I've certainly been running that config since 5.2 Rock, well I shall remore or relabel the old section as Xen legacy. |