XEN Server 的IP设置教程。搞不清哪些是可用IP?请到这里查询:IP段查询:
If you've exhausted the IP addresses that were originally configured with your XenServer system you can request additional IP address blocks. Different size address blocks are available (4 IPs, 8 IPs, 16 IPs). When requesting additional IPs you should specifically request that a full network block be assigned.
Regardless of what size you are assigned, you will need to use three of the IP addresses for administrative purposes (specifically one as a network address, one as a broadcast address and one as the "default gateway").
If you ordered 4 IP addresses then use 255.255.255.252 as the netmask.
If you ordered 8 IP addresses then use 255.255.255.248 as the netmask.
If you ordered 16 IP addresses then use 255.255.255.240 as the netmask.
If you ordered 32 IP addresses then use 255.255.255.224 as the netmask.
For purposes of an example, we'll assume that you have been assigned 8 additional IP addresses; specifically the 192.168.1.0/29 address block (192.168.1.0 - 192.168.1.7 with a netmask of 255.255.255.248).
The first IP address (192.168.1.0) will be used as a network address. You do not need to do anything with that IP address.
The second IP address (192.168.1.1) will be used as the default gateway address. This IP address needs to be configured on the XenServer system. create
# Dummy interface for subnet 192.168.1.0/29 DEVICE=dummy0 BOOTPROTO=none ONBOOT=yes USERCTL=no IPV6INIT=no PEERDNS=yes TYPE=Ethernet IPADDR=192.168.1.1 NETMASK=255.255.255.248 DNS1=204.74.208.2 DNS2=204.74.213.254 ARP=yes
Now issue the following command:
ifup dummy0
The 192.168.1.1 IP address should now be pingable.
For the third through seventh IP addresses (192.168.1.2 - 192.168.1.6) you need to issue the following commands:
ip route add 192.168.1.2 dev xenbr0 ip route add 192.168.1.3 dev xenbr0 ip route add 192.168.1.4 dev xenbr0 ip route add 192.168.1.5 dev xenbr0 ip route add 192.168.1.6 dev xenbr0
You need to *also* add those commands to the end of the /etc/rc.local file so that the routes are established any time you reboot the server.
The last IP address (192.168.1.7) will be used as a broadcast address. You do not need to do anything with that IP address.