Changes

Jump to: navigation, search
no edit summary
For many Xen configurations this is desired behavior for which there are a number of benefits. For some configurations, however, an IP address on the same subnet (and issued by the same DHCP server) as the Xen host system is needed.
'''Solution''' - By default a number of systems (typically Red Hat based distributions) default to using the virbr0 network bridge for the all domainU guests. This For example, running ''ifconfig'' on the Xen domainU guest will provide output similar to the private networkfollowing: <pre>eth0 Link encap:Ethernet HWaddr 00:16:3E:34:12:00 inet addr:192.168.122.233 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe34:1200/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:55 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:634 (634.0 b) TX bytes:9467 (9.2 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:188 errors:0 dropped:0 overruns:0 frame:0 TX packets:188 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:14732 (14.3 KiB) TX bytes:14732 (14.3 KiB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:56 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:9764 (9.5 KiB)</pre> As shown above, the domainU guest has an IP address in the 192.168.122.* subnet range. In order to configure the domainU guest so that it acquires an IP address in the same subnet as the domain0 host it is necessary to modify the guest configuration file and specify the ''xenbr0'' bridge on the ''vif ='' line. For example: <pre>vif = [ 'bridge=xenbr0' ]</pre> Once this change has been made, restart the domainU guest. When the system has started running ''ifconfig'' shows that the domainU guest now has an IP address on the same subnet as the Xen host (in this the 192.168.2.* address range): <pre>eth0 Link encap:Ethernet HWaddr 00:16:3E:05:B5:6C inet addr:192.168.2.29 Bcast:255.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe05:b56c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:44 errors:0 dropped:0 overruns:0 frame:0 TX packets:101 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11243 (10.9 KiB) TX bytes:19012 (18.5 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:560 (560.0 b) TX bytes:560 (560.0 b) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:41 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:8307 (8.1 KiB)</pre>
1,798
edits

Navigation menu