aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/man/xend-config.sxp.pod.52
-rw-r--r--docs/src/user.tex14
-rw-r--r--tools/examples/network-nat6
-rw-r--r--tools/examples/xeninfo.pl8
-rw-r--r--tools/examples/xmexample12
-rw-r--r--tools/examples/xmexample22
-rwxr-xr-xtools/python/xen/sv/CreateDomain.py6
-rw-r--r--tools/python/xen/xm/create.py2
-rw-r--r--tools/python/xen/xm/tests/test_create.py4
-rw-r--r--tools/vnet/doc/man/vn.pod.16
-rw-r--r--tools/vnet/doc/vnet-xend.txt12
-rw-r--r--tools/xm-test/Writing_Tests_HOWTO14
-rw-r--r--tools/xm-test/configure.ac16
-rw-r--r--tools/xm-test/lib/XmTestLib/NetConfig.py9
-rw-r--r--tools/xm-test/tests/restore/04_restore_withdevices_pos.py8
-rw-r--r--tools/xm-test/tests/xapi/03_xapi-network_pos.py8
16 files changed, 56 insertions, 63 deletions
diff --git a/docs/man/xend-config.sxp.pod.5 b/docs/man/xend-config.sxp.pod.5
index 5f949dee3b..3851bba3b4 100644
--- a/docs/man/xend-config.sxp.pod.5
+++ b/docs/man/xend-config.sxp.pod.5
@@ -124,7 +124,7 @@ An example configuration with relocation enabled for the local network:
=over 4
(xend-relocation-server yes)
- (xend-relocation-address 192.168.1.1)
+ (xend-relocation-address 192.0.2.192)
(network-script network-bridge)
(vif-script vif-bridge)
(dom0-min-mem 0)
diff --git a/docs/src/user.tex b/docs/src/user.tex
index c1c0a35e74..c6884c0040 100644
--- a/docs/src/user.tex
+++ b/docs/src/user.tex
@@ -1807,7 +1807,7 @@ network by adding a line to \path{/etc/exports}, for instance:
\begin{quote}
\begin{small}
\begin{verbatim}
-/export/vm1root 1.2.3.4/24 (rw,sync,no_root_squash)
+/export/vm1root 192.0.2.4/24 (rw,sync,no_root_squash)
\end{verbatim}
\end{small}
\end{quote}
@@ -2076,7 +2076,7 @@ iptables -A INPUT -p tcp --destination-port 8002 -j REJECT
# this command enables Xen relocations only from the specific
# subnet:
-iptables -I INPUT -p tcp -{}-source 192.168.1.1/8 \
+iptables -I INPUT -p tcp -{}-source 192.0.2.0/24 \
--destination-port 8002 -j ACCEPT
\end{verbatim}
@@ -5121,9 +5121,9 @@ vnets are working by configuring IP addresses on these interfaces
and trying to ping them across the network. For example, using machines
hostA and hostB:
\begin{verbatim}
-hostA# ifconfig vnif0004 10.0.0.100 up
-hostB# ifconfig vnif0004 10.0.0.101 up
-hostB# ping 10.0.0.100
+hostA# ifconfig vnif0004 192.0.2.100 up
+hostB# ifconfig vnif0004 192.0.2.101 up
+hostB# ping 192.0.2.100
\end{verbatim}
The vnet implementation uses IP multicast to discover vnet interfaces, so
@@ -5144,8 +5144,8 @@ on the vnet UDP port:
\end{verbatim}
If multicast is not being forwarded between machines you can configure
-multicast forwarding using vn. Suppose we have machines hostA on 10.10.0.100
-and hostB on 10.11.0.100 and that multicast is not forwarded between them.
+multicast forwarding using vn. Suppose we have machines hostA on 192.0.2.200
+and hostB on 192.0.2.211 and that multicast is not forwarded between them.
We use vn to configure each machine to forward to the other:
\begin{verbatim}
hostA# vn peer-add hostB
diff --git a/tools/examples/network-nat b/tools/examples/network-nat
index 62d2b0c259..165d92ca68 100644
--- a/tools/examples/network-nat
+++ b/tools/examples/network-nat
@@ -43,9 +43,9 @@ fi
function dhcp_start()
{
- if ! grep -q "subnet 10.0.0.0" "$dhcpd_conf_file"
+ if ! grep -q "subnet 192.0.2.0" "$dhcpd_conf_file"
then
- echo >>"$dhcpd_conf_file" "subnet 10.0.0.0 netmask 255.255.0.0 {}"
+ echo >>"$dhcpd_conf_file" "subnet 192.0.2.0 netmask 255.255.255.0 {}"
fi
"$dhcpd_init_file" restart
@@ -55,7 +55,7 @@ function dhcp_start()
function dhcp_stop()
{
local tmpfile=$(mktemp)
- grep -v "subnet 10.0.0.0" "$dhcpd_conf_file" >"$tmpfile"
+ grep -v "subnet 192.0.2.0" "$dhcpd_conf_file" >"$tmpfile"
if diff "$tmpfile" "$dhcpd_conf_file" >&/dev/null
then
rm "$tmpfile"
diff --git a/tools/examples/xeninfo.pl b/tools/examples/xeninfo.pl
index 1c982ba591..47431c6323 100644
--- a/tools/examples/xeninfo.pl
+++ b/tools/examples/xeninfo.pl
@@ -21,10 +21,10 @@ require RPC::XML::Client;
##### CONFIG ######
-my %xenhosts = ("192.168.0.10" => {"port" => "9363"},
- "192.168.0.11" => {"port" => "9363"},
- "192.168.0.12" => {"port" => "9363"},
- "192.168.0.13" => {"port" => "9363"});
+my %xenhosts = ("192.0.2.10" => {"port" => "9363"},
+ "192.0.2.11" => {"port" => "9363"},
+ "192.0.2.12" => {"port" => "9363"},
+ "192.0.2.13" => {"port" => "9363"});
##### CONFIG END ###
diff --git a/tools/examples/xmexample1 b/tools/examples/xmexample1
index fc17ca84d9..2fd24ab84f 100644
--- a/tools/examples/xmexample1
+++ b/tools/examples/xmexample1
@@ -135,7 +135,7 @@ root = "/dev/hda1 ro"
# Root device for nfs.
#root = "/dev/nfs"
# The nfs server.
-#nfs_server = '169.254.1.0'
+#nfs_server = '192.0.2.1'
# Root directory on the nfs server.
#nfs_root = '/full/path/to/root/directory'
diff --git a/tools/examples/xmexample2 b/tools/examples/xmexample2
index 4d9595c05c..4ccd61eec5 100644
--- a/tools/examples/xmexample2
+++ b/tools/examples/xmexample2
@@ -171,7 +171,7 @@ root = "/dev/sda1 ro"
# Root device for nfs.
#root = "/dev/nfs"
# The nfs server.
-#nfs_server = '169.254.1.0'
+#nfs_server = '192.0.2.1'
# Root directory on the nfs server.
#nfs_root = '/full/path/to/root/directory'
diff --git a/tools/python/xen/sv/CreateDomain.py b/tools/python/xen/sv/CreateDomain.py
index ee5e62eb4a..748d99bca2 100755
--- a/tools/python/xen/sv/CreateDomain.py
+++ b/tools/python/xen/sv/CreateDomain.py
@@ -103,10 +103,10 @@ class CreatePage4( Sheet ):
Sheet.__init__( self, urlWriter, "Network settings", 4 )
self.addControl( ListControl( 'dhcp', [('off', 'No'), ('dhcp', 'Yes')], 'Use DHCP:' ) )
self.addControl( InputControl( 'hostname', 'hostname', 'VM Hostname:' ) )
- self.addControl( InputControl( 'ip_addr', '1.2.3.4', 'VM IP Address:' ) )
+ self.addControl( InputControl( 'ip_addr', '192.168.1.1', 'VM IP Address:' ) )
self.addControl( InputControl( 'ip_subnet', '255.255.255.0', 'VM Subnet Mask:' ) )
- self.addControl( InputControl( 'ip_gateway', '1.2.3.4', 'VM Gateway:' ) )
- self.addControl( InputControl( 'ip_nfs', '1.2.3.4', 'NFS Server:' ) )
+ self.addControl( InputControl( 'ip_gateway', '192.168.1.1', 'VM Gateway:' ) )
+ self.addControl( InputControl( 'ip_nfs', '192.168.1.1', 'NFS Server:' ) )
class CreateFinish( Sheet ):
diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py
index 297b819fdb..440b7d4fe9 100644
--- a/tools/python/xen/xm/create.py
+++ b/tools/python/xen/xm/create.py
@@ -886,7 +886,7 @@ def preprocess_access_control(vals):
def preprocess_ip(vals):
if vals.ip or vals.dhcp != 'off':
- dummy_nfs_server = '1.2.3.4'
+ dummy_nfs_server = '127.0.255.255'
ip = (vals.ip
+ ':' + (vals.nfs_server or dummy_nfs_server)
+ ':' + vals.gateway
diff --git a/tools/python/xen/xm/tests/test_create.py b/tools/python/xen/xm/tests/test_create.py
index a25ebb1fb0..fa173f6836 100644
--- a/tools/python/xen/xm/tests/test_create.py
+++ b/tools/python/xen/xm/tests/test_create.py
@@ -68,7 +68,7 @@ vcpus = 4
disk = ['phy:/dev/virt-blkdev-backend/dom1,sda1,w',
'phy:/dev/virt-blkdev-backend/usr,sda2,r']
root = "/dev/sda1 ro"
-extra = " profile=1 GATEWAY=10.0.1.254 NETMASK=255.255.0.0 IPADDR=10.0.134.1 HOSTNAME=dom1"
+extra = " profile=1 GATEWAY=192.0.2.254 NETMASK=255.255.255.0 IPADDR=192.0.2.1 HOSTNAME=dom1"
on_poweroff = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'
@@ -83,7 +83,7 @@ on_crash = 'destroy'
'vcpus' : 4,
'nics' : -1,
'root' : '/dev/sda1 ro',
- 'extra' : ' profile=1 GATEWAY=10.0.1.254 NETMASK=255.255.0.0 IPADDR=10.0.134.1 HOSTNAME=dom1',
+ 'extra' : ' profile=1 GATEWAY=192.0.2.254 NETMASK=255.255.255.0 IPADDR=192.0.2.1 HOSTNAME=dom1',
'on_poweroff' : 'destroy',
'on_reboot' : 'destroy',
'on_crash' : 'destroy',
diff --git a/tools/vnet/doc/man/vn.pod.1 b/tools/vnet/doc/man/vn.pod.1
index 6d4d550f76..a7707bd509 100644
--- a/tools/vnet/doc/man/vn.pod.1
+++ b/tools/vnet/doc/man/vn.pod.1
@@ -48,9 +48,9 @@ The vnet devices are fully-functional network devices, so you can add IP address
to them and test connectivity without any vms running.
For example, using vnif0004 on machines A and B:
- A> ifconfig vnif0004 10.0.0.11
- B> ifconfig vnif0004 10.0.0.12
- B> ping 10.0.0.11
+ A> ifconfig vnif0004 192.0.2.11
+ B> ifconfig vnif0004 192.0.2.12
+ B> ping 192.0.2.11
If the vnet device is enslaved to a bridge you will have to add the IP address
to the bridge instead. Use C<brctl show> or C<vn vnets> to see if a vnet
diff --git a/tools/vnet/doc/vnet-xend.txt b/tools/vnet/doc/vnet-xend.txt
index 817a307f1b..ee55d06f90 100644
--- a/tools/vnet/doc/vnet-xend.txt
+++ b/tools/vnet/doc/vnet-xend.txt
@@ -108,19 +108,19 @@ Its bridge and interface should appear in 'ifconfig'.
It should also show in 'brctl show', with its attached interfaces.
You can 'see into' a vnet from dom0 if you put an IP address on the bridge.
-For example, if you have vnet97 and a vm with ip addr 10.0.0.12 connected to it,
+For example, if you have vnet97 and a vm with ip addr 192.0.2.12 connected to it,
then
-ifconfig vnet97 10.0.0.20 up
+ifconfig vnet97 192.0.2.20 up
-should let you ping 10.0.0.12 via the vnet97 bridge.
+should let you ping 192.0.2.12 via the vnet97 bridge.
4) Examples
-----------
These assume a vnet with a bridge 'vnet97' has been created.
-Here's the full config for a vm on vnet 97, using ip addr 10.0.0.12:
+Here's the full config for a vm on vnet 97, using ip addr 192.0.2.12:
(vm
(name dom12)
@@ -130,7 +130,7 @@ Here's the full config for a vm on vnet 97, using ip addr 10.0.0.12:
(image
(linux
(kernel /boot/vmlinuz-2.6-xenU)
- (ip 10.0.0.12:1.2.3.4::::eth0:off)
+ (ip 192.0.2.12:192.0.2.4::::eth0:off)
(root /dev/sda1)
(args 'rw fastboot 4')
)
@@ -149,7 +149,7 @@ If you run another vm on the same vnet:
(image
(linux
(kernel /boot/vmlinuz-2.6-xenU)
- (ip 10.0.0.11:1.2.3.4::::eth0:off)
+ (ip 192.0.2.11:192.0.2.4::::eth0:off)
(root /dev/sda1)
(args 'rw fastboot 4')
)
diff --git a/tools/xm-test/Writing_Tests_HOWTO b/tools/xm-test/Writing_Tests_HOWTO
index 84cc90e2c6..379b0b145c 100644
--- a/tools/xm-test/Writing_Tests_HOWTO
+++ b/tools/xm-test/Writing_Tests_HOWTO
@@ -104,12 +104,14 @@ routing environments in the future, the current xm-test only supports
a bridging environment. Xm-test currently only supports a range of
IPs, the dhcp feature will be added soon.
-The network tests will need to know what IPs to use. IPs are configured
-when you build xm-test. Xm-test uses the zeroconf address range by
-default, 169.254.0.1-169.254.255.255. If you'd like to set a new range,
-do so at configure time, a netmask and network address must also be defined:
-
- # ./configure --with-net-ip-range=192.168.1.1-192.168.1.100 --with-network-address=192.168.1.0 --with-netmask=255.255.255.0
+The network tests will need to know what IPs to use. IPs are
+configured when you build xm-test. Xm-test by default a range chosen
+at random from the RFC1918 private use space, and published at
+www.ucam.org/cam-grin, 172.30.206.1-172.30.206.254 from
+172.30.206.0/24. If you'd like to set a new range, do so at configure
+time, a netmask and network address must also be defined:
+
+ # ./configure --with-net-ip-range=192.0.2.1-192.0.2.100 --with-network-address=192.0.2.0 --with-netmask=255.255.255.0
The tests will not need to set network information, this is done by
the library once it's configured.
diff --git a/tools/xm-test/configure.ac b/tools/xm-test/configure.ac
index bbc639bdb0..a92b6daa6b 100644
--- a/tools/xm-test/configure.ac
+++ b/tools/xm-test/configure.ac
@@ -56,24 +56,24 @@ else
fi
# Network needs to know ips to use: dhcp or a range of IPs in the form
-# of: 192.168.1.1-192.168.1.100
+# of: 192.0.2.1-192.0.2.100
# If not dhcp, a netmask and network address must be supplied. Defaults to
-# zeroconf range.
-NET_IP_RANGE="169.254.0.1-169.254.255.255"
+# range allocated in www.ucam.org/cam-grin.
+NET_IP_RANGE="172.30.206.1-172.30.206.254"
AC_ARG_WITH(net-ip-range,
- [ --with-net-ip-range=ip-range Set a range of ip addresses to use for xm-test guest domain networks. Can specify dhcp or a range of IPs: 192.168.1.1-192.168.1.100 [[default="169.254.0.1-169.254.255.255"]]],
+ [ --with-net-ip-range=ip-range Set a range of ip addresses to use for xm-test guest domain networks. Can specify dhcp or a range of IPs: 192.0.2.1-192.0.2.100 [[default="172.30.206.1-172.30.206.254"]]],
[ NET_IP_RANGE="$withval" ])
iprange=`echo $NET_IP_RANGE | perl -e 'while(<>) { print if /\d+\.\d+\.\d+\.\d+-\d+\.\d+\.\d+\.\d+/ }'`
-NETWORK_ADDRESS="169.254.0.0"
+NETWORK_ADDRESS="172.30.206.0"
AC_ARG_WITH(network-address,
- [ --with-network-address=ip Set network address to use with ip range [[default="169.254.0.0"]]],
+ [ --with-network-address=ip Set network address to use with ip range [[default="172.30.206.0"]]],
[ NETWORK_ADDRESS="$withval" ])
-NETMASK="255.255.0.0"
+NETMASK="255.255.255.0"
AC_ARG_WITH(netmask,
- [ --with-netmask=mask Set netmask to use with ip range [[default="255.255.0.0"]]],
+ [ --with-netmask=mask Set netmask to use with ip range [[default="255.255.255.0"]]],
[ NETMASK="$withval" ])
if test "x$NET_IP_RANGE" != "xdhcp" && test -z "$iprange"
diff --git a/tools/xm-test/lib/XmTestLib/NetConfig.py b/tools/xm-test/lib/XmTestLib/NetConfig.py
index 919af65fdb..0c39969806 100644
--- a/tools/xm-test/lib/XmTestLib/NetConfig.py
+++ b/tools/xm-test/lib/XmTestLib/NetConfig.py
@@ -69,12 +69,6 @@ def getXendNetConfig():
configfile.close()
return netenv
-def checkZeroconfAddresses():
- # Make sure there aren't existing zeroconf addresses.
- rc, out = traceCommand("ip addr show |grep \"inet 169.254\" | grep eth0")
- if rc == 0:
- raise NetworkError("Zeroconf addresses already used: %s" % out)
-
class NetConfig:
def __init__(self):
@@ -101,9 +95,6 @@ class NetConfig:
self.__setMaxNumberIPs()
- if self.network == "169.254.0.0":
- checkZeroconfAddresses()
-
# Clean out any aliases in the network range for dom0's interface.
# If an alias exists, a test xendevice add command could fail.
if NETWORK_IP_RANGE != "dhcp":
diff --git a/tools/xm-test/tests/restore/04_restore_withdevices_pos.py b/tools/xm-test/tests/restore/04_restore_withdevices_pos.py
index 63b716da62..a7a67f7c93 100644
--- a/tools/xm-test/tests/restore/04_restore_withdevices_pos.py
+++ b/tools/xm-test/tests/restore/04_restore_withdevices_pos.py
@@ -48,11 +48,11 @@ try:
if run["return"] != 0:
FAIL("Unable to write to block device hdb2!")
- run = console.runCmd("ifconfig eth0 169.254.0.1 netmask 255.255.255.0")
+ run = console.runCmd("ifconfig eth0 172.30.206.1 netmask 255.255.255.240")
if run["return"] != 0:
FAIL("Unable to configure DomU's eth0")
- run = console.runCmd("ifconfig eth1 169.254.1.1 netmask 255.255.255.0")
+ run = console.runCmd("ifconfig eth1 172.30.206.17 netmask 255.255.255.240")
if run["return"] != 0:
FAIL("Unable to configure DomU's eth1")
@@ -114,11 +114,11 @@ try:
run = console.runCmd("ifconfig")
if not re.search("eth0", run["output"]):
FAIL("DomU's eth0 disappeared")
- if not re.search("169.254.0.1", run["output"]):
+ if not re.search("172.30.206.1", run["output"]):
FAIL("DomU's eth0 lost its IP")
if not re.search("eth1", run["output"]):
FAIL("DomU's eth1 disappeared")
- if not re.search("169.254.1.1", run["output"]):
+ if not re.search("172.30.206.17", run["output"]):
FAIL("DomU's eth1 lost its IP")
if not re.search("Loopback", run["output"]):
FAIL("DomU's lo disappeared")
diff --git a/tools/xm-test/tests/xapi/03_xapi-network_pos.py b/tools/xm-test/tests/xapi/03_xapi-network_pos.py
index 43ea82691d..9ae2daea1b 100644
--- a/tools/xm-test/tests/xapi/03_xapi-network_pos.py
+++ b/tools/xm-test/tests/xapi/03_xapi-network_pos.py
@@ -39,18 +39,18 @@ if status:
# Configure IP addresses on two domains
try:
# Run 'ls'
- run = console1.runCmd("ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up")
- run = console2.runCmd("ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up")
+ run = console1.runCmd("ifconfig eth0 172.30.206.1 netmask 255.255.255.0 up")
+ run = console2.runCmd("ifconfig eth0 172.30.206.2 netmask 255.255.255.0 up")
except ConsoleError, e:
saveLog(console.getHistory())
FAIL(str(e))
# Now ping...
try:
- run = console1.runCmd("ping -c 4 192.168.0.2")
+ run = console1.runCmd("ping -c 4 172.30.206.2")
if run['return'] > 0:
FAIL("Could not ping other host")
- run = console2.runCmd("ping -c 4 192.168.0.1")
+ run = console2.runCmd("ping -c 4 172.30.206.1")
if run['return'] > 0:
FAIL("Could not pint other host")
except ConsoleError, e: