Hi please forgive this if it seems a dumb question but I am new to xen and linux. I have Xen running in Centos and another Centos Partition DomU running. But I cannot seem to get networking running between 0 and U. All the doco appears to assume you know everything about networking bridging and the like. Does anyone have a simple how to step by step on how to get a single dom0 talking to a single DomU. Below is the output from ifconfig from dom0 eth0 Link encap:Ethernet HWaddr 00:11:11:BD:C0:23 inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:672 (672.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1383 errors:0 dropped:0 overruns:0 frame:0 TX packets:1383 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1417720 (1.3 MiB) TX bytes:1417720 (1.3 MiB) peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF UP BROADCAST RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:640 (640.0 b) Interrupt:16 vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:672 (672.0 b) TX bytes:0 (0.0 b) xen-br0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.255 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:588 (588.0 b) TX bytes:0 (0.0 b) and domU eth0 Link encap:Ethernet HWaddr AA:BB:CC:DD:00:11 inet addr:10.1.0.5 Bcast:10.1.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:65 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:2730 (2.6 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:117 errors:0 dropped:0 overruns:0 frame:0 TX packets:117 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:10220 (9.9 KiB) TX bytes:10220 (9.9 KiB) and my config file. # -*- mode: python; -*- #===========================================================================# Python configuration setup for ''xm create''. # This script sets the parameters used when a domain is created using ''xm create''. # You use a separate script for each domain you want to create, or # you can set the parameters for the domain on the xm command line. #=========================================================================== #---------------------------------------------------------------------------- # Kernel image file. kernel = "/boot/vmlinuz-2.6.12-xenU" # Optional ramdisk. ramdisk = "/boot/initrd-2.6.12-xen0" # The domain build function. Default is ''linux''. #builder=''linux'' # Initial memory allocation (in megabytes) for the new domain. memory = 128 # A name for your domain. All domains must have different names. name = "RHL" # Which CPU to start domain on? #cpu = -1 # leave to Xen to pick #---------------------------------------------------------------------------- # Define network interfaces. # Number of network interfaces. Default is 1. nics = 1 # Optionally define mac and/or bridge for the network interfaces. # Random MACs are assigned if not given. vif = [ ''mac=aa:bb:cc:dd:00:11, bridge=xen-br0'' ] #---------------------------------------------------------------------------- # Define the disk devices you want the domain to have access to, and # what you want them accessible as. # Each disk entry is of the form phy:UNAME,DEV,MODE # where UNAME is the device, DEV is the device name the domain will see, # and MODE is r for read-only, w for read-write. disk = [ ''phy:/dev/VolGroup00/LogVol00,sda1,w'' ] #---------------------------------------------------------------------------- # Set the kernel command line for the new domain. # You only need to define the IP parameters and hostname if the domain''s # IP config doesn''t, e.g. in ifcfg-eth0 or via DHCP. # You can use ''extra'' to set the runlevel and custom environment # variables used by custom rc scripts (e.g. VMID=, usr= ). # Set if you want dhcp to allocate the IP address. #dhcp="dhcp" # Set netmask. #ipaddr="192.168.0.3" #netmask="255.255.255.0" # Set default gateway. #gateway="192.168.0.1" # Set the hostname. #hostname= "vm%d" % vmid hostname = "RHL" # Set root device. root = "/dev/sda1 ro" # Root device for nfs. #root = "/dev/nfs" # The nfs server. #nfs_server = ''169.254.1.0'' # Root directory on the nfs server. #nfs_root = ''/full/path/to/root/directory'' # Sets runlevel 4. extra = "5" #---------------------------------------------------------------------------- # Set according to whether you want the domain restarted when it exits. # The default is ''onreboot'', which restarts the domain when it shuts down # with exit code reboot. # Other values are ''always'', and ''never''. #restart = ''onreboot'' #=========================================================================== All I am looking for is a really simple explanation of what all the interfaces do and how to get the doms talking to each other. Thanks very much _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
They appear to be on different subnets - are you using an external router? - if so, make sure you have a default route to the gateway, otherwise try setting the DomU''s IP to something the in the Dom0''s network... Kent Andrew Olds wrote:>Hi please forgive this if it seems a dumb question but I am new to xen and linux. I have Xen running in Centos and another Centos Partition DomU running. >But I cannot seem to get networking running between 0 and U. >All the doco appears to assume you know everything about networking bridging and the like. Does anyone have a simple how to step by step on how to get a single dom0 talking to a single DomU. >Below is the output from ifconfig from dom0 >eth0 Link encap:Ethernet HWaddr 00:11:11:BD:C0:23 > inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:0 (0.0 b) TX bytes:672 (672.0 b) > >lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:1383 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1383 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:1417720 (1.3 MiB) TX bytes:1417720 (1.3 MiB) > >peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > UP BROADCAST RUNNING NOARP MULTICAST MTU:1500 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 b) TX bytes:640 (640.0 b) > Interrupt:16 > >vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:6 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:672 (672.0 b) TX bytes:0 (0.0 b) > >xen-br0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.255 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:6 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:588 (588.0 b) TX bytes:0 (0.0 b) > >and domU >eth0 Link encap:Ethernet HWaddr AA:BB:CC:DD:00:11 > inet addr:10.1.0.5 Bcast:10.1.0.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:65 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 b) TX bytes:2730 (2.6 KiB) > >lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:117 errors:0 dropped:0 overruns:0 frame:0 > TX packets:117 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:10220 (9.9 KiB) TX bytes:10220 (9.9 KiB) > >and my config file. ># -*- mode: python; -*- >#===========================================================================># Python configuration setup for ''xm create''. ># This script sets the parameters used when a domain is created using ''xm create''. ># You use a separate script for each domain you want to create, or ># you can set the parameters for the domain on the xm command line. >#===========================================================================> >#---------------------------------------------------------------------------- ># Kernel image file. >kernel = "/boot/vmlinuz-2.6.12-xenU" > ># Optional ramdisk. >ramdisk = "/boot/initrd-2.6.12-xen0" > ># The domain build function. Default is ''linux''. >#builder=''linux'' > ># Initial memory allocation (in megabytes) for the new domain. >memory = 128 > ># A name for your domain. All domains must have different names. >name = "RHL" > ># Which CPU to start domain on? >#cpu = -1 # leave to Xen to pick > >#---------------------------------------------------------------------------- ># Define network interfaces. > ># Number of network interfaces. Default is 1. >nics = 1 > ># Optionally define mac and/or bridge for the network interfaces. ># Random MACs are assigned if not given. >vif = [ ''mac=aa:bb:cc:dd:00:11, bridge=xen-br0'' ] > >#---------------------------------------------------------------------------- ># Define the disk devices you want the domain to have access to, and ># what you want them accessible as. ># Each disk entry is of the form phy:UNAME,DEV,MODE ># where UNAME is the device, DEV is the device name the domain will see, ># and MODE is r for read-only, w for read-write. > >disk = [ ''phy:/dev/VolGroup00/LogVol00,sda1,w'' ] > >#---------------------------------------------------------------------------- ># Set the kernel command line for the new domain. ># You only need to define the IP parameters and hostname if the domain''s ># IP config doesn''t, e.g. in ifcfg-eth0 or via DHCP. ># You can use ''extra'' to set the runlevel and custom environment ># variables used by custom rc scripts (e.g. VMID=, usr= ). > ># Set if you want dhcp to allocate the IP address. >#dhcp="dhcp" ># Set netmask. >#ipaddr="192.168.0.3" >#netmask="255.255.255.0" ># Set default gateway. >#gateway="192.168.0.1" ># Set the hostname. >#hostname= "vm%d" % vmid >hostname = "RHL" > ># Set root device. >root = "/dev/sda1 ro" > ># Root device for nfs. >#root = "/dev/nfs" ># The nfs server. >#nfs_server = ''169.254.1.0'' ># Root directory on the nfs server. >#nfs_root = ''/full/path/to/root/directory'' > ># Sets runlevel 4. >extra = "5" > >#---------------------------------------------------------------------------- ># Set according to whether you want the domain restarted when it exits. ># The default is ''onreboot'', which restarts the domain when it shuts down ># with exit code reboot. ># Other values are ''always'', and ''never''. > >#restart = ''onreboot'' > >#===========================================================================> >All I am looking for is a really simple explanation of what all the interfaces do and how to get the doms talking to each other. > >Thanks very much > > >_______________________________________________ >Xen-users mailing list >Xen-users@lists.xensource.com >http://lists.xensource.com/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I have tried that and no joy. What I really want to know is which device in dom0 correlates to the eth0 in domU and do I need to attach an IP address to it. I''m sorry but I just need someone to explain in basic terms how it hangs together. I realise I am probably doing something fundementally wrong here. I just can''t figure out what it is.> > They appear to be on different subnets - are you using an external > router? - if so, make sure you have a default route to the gateway, > otherwise try setting the DomU''s IP to something the in the Dom0''s > network... > > Kent > > > Andrew Olds wrote: > > >Hi please forgive this if it seems a dumb question but I am new to xen and linux. I have Xen running in Centos and another Centos Partition DomU running. > >But I cannot seem to get networking running between 0 and U. > >All the doco appears to assume you know everything about networking bridging and the like. Does anyone have a simple how to step by step on how to get a single dom0 talking to a single DomU. > >Below is the output from ifconfig from dom0 > >eth0 Link encap:Ethernet HWaddr 00:11:11:BD:C0:23 > > inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.0 > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:0 (0.0 b) TX bytes:672 (672.0 b) > > > >lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > UP LOOPBACK RUNNING MTU:16436 Metric:1 > > RX packets:1383 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:1383 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:1417720 (1.3 MiB) TX bytes:1417720 (1.3 MiB) > > > >peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > UP BROADCAST RUNNING NOARP MULTICAST MTU:1500 Metric:1 > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:0 (0.0 b) TX bytes:640 (640.0 b) > > Interrupt:16 > > > >vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:6 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:672 (672.0 b) TX bytes:0 (0.0 b) > > > >xen-br0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.255 > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:6 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:588 (588.0 b) TX bytes:0 (0.0 b) > > > >and domU > >eth0 Link encap:Ethernet HWaddr AA:BB:CC:DD:00:11 > > inet addr:10.1.0.5 Bcast:10.1.0.255 Mask:255.255.255.0 > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:65 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:0 (0.0 b) TX bytes:2730 (2.6 KiB) > > > >lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > UP LOOPBACK RUNNING MTU:16436 Metric:1 > > RX packets:117 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:117 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:10220 (9.9 KiB) TX bytes:10220 (9.9 KiB) > > > >and my config file. > ># -*- mode: python; -*- > >#===========================================================================> ># Python configuration setup for ''xm create''. > ># This script sets the parameters used when a domain is created using ''xm create''. > ># You use a separate script for each domain you want to create, or > ># you can set the parameters for the domain on the xm command line. > >#===========================================================================> > > >#---------------------------------------------------------------------------- > ># Kernel image file. > >kernel = "/boot/vmlinuz-2.6.12-xenU" > > > ># Optional ramdisk. > >ramdisk = "/boot/initrd-2.6.12-xen0" > > > ># The domain build function. Default is ''linux''. > >#builder=''linux'' > > > ># Initial memory allocation (in megabytes) for the new domain. > >memory = 128 > > > ># A name for your domain. All domains must have different names. > >name = "RHL" > > > ># Which CPU to start domain on? > >#cpu = -1 # leave to Xen to pick > > > >#---------------------------------------------------------------------------- > ># Define network interfaces. > > > ># Number of network interfaces. Default is 1. > >nics = 1 > > > ># Optionally define mac and/or bridge for the network interfaces. > ># Random MACs are assigned if not given. > >vif = [ ''mac=aa:bb:cc:dd:00:11, bridge=xen-br0'' ] > > > >#---------------------------------------------------------------------------- > ># Define the disk devices you want the domain to have access to, and > ># what you want them accessible as. > ># Each disk entry is of the form phy:UNAME,DEV,MODE > ># where UNAME is the device, DEV is the device name the domain will see, > ># and MODE is r for read-only, w for read-write. > > > >disk = [ ''phy:/dev/VolGroup00/LogVol00,sda1,w'' ] > > > >#---------------------------------------------------------------------------- > ># Set the kernel command line for the new domain. > ># You only need to define the IP parameters and hostname if the domain''s > ># IP config doesn''t, e.g. in ifcfg-eth0 or via DHCP. > ># You can use ''extra'' to set the runlevel and custom environment > ># variables used by custom rc scripts (e.g. VMID=, usr= ). > > > ># Set if you want dhcp to allocate the IP address. > >#dhcp="dhcp" > ># Set netmask. > >#ipaddr="192.168.0.3" > >#netmask="255.255.255.0" > ># Set default gateway. > >#gateway="192.168.0.1" > ># Set the hostname. > >#hostname= "vm%d" % vmid > >hostname = "RHL" > > > ># Set root device. > >root = "/dev/sda1 ro" > > > ># Root device for nfs. > >#root = "/dev/nfs" > ># The nfs server. > >#nfs_server = ''169.254.1.0'' > ># Root directory on the nfs server. > >#nfs_root = ''/full/path/to/root/directory'' > > > ># Sets runlevel 4. > >extra = "5" > > > >#---------------------------------------------------------------------------- > ># Set according to whether you want the domain restarted when it exits. > ># The default is ''onreboot'', which restarts the domain when it shuts down > ># with exit code reboot. > ># Other values are ''always'', and ''never''. > > > >#restart = ''onreboot'' > > > >#===========================================================================> > > >All I am looking for is a really simple explanation of what all the interfaces do and how to get the doms talking to each other. > > > >Thanks very much > > > > > >_______________________________________________ > >Xen-users mailing list > >Xen-users@lists.xensource.com > >http://lists.xensource.com/xen-users > > > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
If you are using bridging than you should use address from the same network segment as domU. So your dom0 address should be something like 10.0.0.x, where x is not 5. Try to find my answer on suse network problem one month ago. It has attached batch file needed to start xen networking that works for me. by TheR __________________________________ Yahoo! Mail - PC Magazine Editors'' Choice 2005 http://mail.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andrew Olds wrote:> I have tried that and no joy. > What I really want to know is which device in dom0 correlates to the eth0 in domUthe vif (virtual interface)> and do I need to attach an IP address to it.no, dom0 has the vif attached to the bridge, the bridge needs an IP> I''m sorry but I just need someone to explain in basic terms how it hangs together. > I realise I am probably doing something fundementally wrong here. I just can''t figure out what it is. > >>They appear to be on different subnets - are you using an external >>router? - if so, make sure you have a default route to the gateway, >>otherwise try setting the DomU''s IP to something the in the Dom0''s >>network... >>I agree, the IP address of domU should be in the same subnet as dom0 (as you are bridging, not routing) eg. something like 10.0.0.6>> >>>Hi please forgive this if it seems a dumb question but I am new to xen and linux. >>>I have Xen running in Centos and another Centos Partition DomU running. >>>But I cannot seem to get networking running between 0 and U. >>>All the doco appears to assume you know everything about networking bridging and the like. >>>Does anyone have a simple how to step by step on how to get a single dom0 talking to a single DomU.I guess the docs are as simple as it gets :) ... ie. networking becomes simpler with experience>>>All I am looking for is a really simple explanation of what all the interfaces do >>>and how to get the doms talking to each other.here''s my attempt to explain bridging: ===================================================================== Before booting any domUs: ______P_h_y_s_i_c_a_l__M_a_c_h_i_n_e_______ | | | | | | | | | | | | | | | | | | | | | | | _______________________________ | | | | | | | | | ==|=====|eth0 dom0 | | | | | | |_____|_____________________________|_____| ===================================================================== After bringing up a domU: ______P_h_y_s_i_c_a_l__M_a_c_h_i_n_e_______ | | | | | | | _______________ | | | | | | | domUn | | | ___| | | | / |eth0 | | | / | | | | vifn.x |_____________| | | / | | | _______________________________ | | | | | | | | | | | ==|==+==|eth0 dom0 | | | br0 | | | |_____|_____________________________|_____| IN DOM0: - br0 (or xen-br0) is assigned the IP of eth0 - vifn.x is tied to the bridge (br0) - neither vifn.x or eth0 require IP addresses now ===================================================================== Some commands that might help: brctl show ifconfig -a route -n Each of which has an excellent manpage, eg: man brctl Also of help: http://wiki.xensource.com/xenwiki/XenNetworking http://www.siliconvalleyccie.com/linux-hn/network-intro.htm http://bridge.sourceforge.net/faq.html Hope that helps a little, Marcus. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yippee I finally worked it out. Here is what I had to do. Step 1. after booting up do xend stop and xend start. This sets up the basic bridging. (doesn''t do it from boot) Step 2. run network start from /etc/xen/scripts This sets up as shown below in the dom0 ifconfig. Setp 3. Start domU. Step 4 run the following from /etc/xen/scripts ./vif-bridge up domain=RHL vif=vif1.0 bridge=xen-br0 mac="aa:bb:cc:dd:00:11" where vif1.0 equates to the virtual nic for domu as seen in dom0 and mac is the mac address given to the nic in domu from the domu config script. I can now ping everywhere from domu.> > From: Kent Watsen <kent@watsen.net> > Date: 2005/10/06 Thu PM 05:59:05 GMT+13:00 > To: Andrew Olds <aolds@xtra.co.nz> > CC: xen-users@lists.xensource.com > Subject: Re: [Xen-users] DomU networking help please > > > They appear to be on different subnets - are you using an external > router? - if so, make sure you have a default route to the gateway, > otherwise try setting the DomU''s IP to something the in the Dom0''s > network... > > Kent > > > Andrew Olds wrote: > > >Hi please forgive this if it seems a dumb question but I am new to xen and linux. I have Xen running in Centos and another Centos Partition DomU running. > >But I cannot seem to get networking running between 0 and U. > >All the doco appears to assume you know everything about networking bridging and the like. Does anyone have a simple how to step by step on how to get a single dom0 talking to a single DomU. > >Below is the output from ifconfig from dom0 > >eth0 Link encap:Ethernet HWaddr 00:11:11:BD:C0:23 > > inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.0 > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:0 (0.0 b) TX bytes:672 (672.0 b) > > > >lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > UP LOOPBACK RUNNING MTU:16436 Metric:1 > > RX packets:1383 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:1383 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:1417720 (1.3 MiB) TX bytes:1417720 (1.3 MiB) > > > >peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > UP BROADCAST RUNNING NOARP MULTICAST MTU:1500 Metric:1 > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:0 (0.0 b) TX bytes:640 (640.0 b) > > Interrupt:16 > > > >vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:6 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:672 (672.0 b) TX bytes:0 (0.0 b) > > > >xen-br0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.255 > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:6 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:588 (588.0 b) TX bytes:0 (0.0 b) > > > >and domU > >eth0 Link encap:Ethernet HWaddr AA:BB:CC:DD:00:11 > > inet addr:10.1.0.5 Bcast:10.1.0.255 Mask:255.255.255.0 > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:65 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:0 (0.0 b) TX bytes:2730 (2.6 KiB) > > > >lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > UP LOOPBACK RUNNING MTU:16436 Metric:1 > > RX packets:117 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:117 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:10220 (9.9 KiB) TX bytes:10220 (9.9 KiB) > > > >and my config file. > ># -*- mode: python; -*- > >#===========================================================================> ># Python configuration setup for ''xm create''. > ># This script sets the parameters used when a domain is created using ''xm create''. > ># You use a separate script for each domain you want to create, or > ># you can set the parameters for the domain on the xm command line. > >#===========================================================================> > > >#---------------------------------------------------------------------------- > ># Kernel image file. > >kernel = "/boot/vmlinuz-2.6.12-xenU" > > > ># Optional ramdisk. > >ramdisk = "/boot/initrd-2.6.12-xen0" > > > ># The domain build function. Default is ''linux''. > >#builder=''linux'' > > > ># Initial memory allocation (in megabytes) for the new domain. > >memory = 128 > > > ># A name for your domain. All domains must have different names. > >name = "RHL" > > > ># Which CPU to start domain on? > >#cpu = -1 # leave to Xen to pick > > > >#---------------------------------------------------------------------------- > ># Define network interfaces. > > > ># Number of network interfaces. Default is 1. > >nics = 1 > > > ># Optionally define mac and/or bridge for the network interfaces. > ># Random MACs are assigned if not given. > >vif = [ ''mac=aa:bb:cc:dd:00:11, bridge=xen-br0'' ] > > > >#---------------------------------------------------------------------------- > ># Define the disk devices you want the domain to have access to, and > ># what you want them accessible as. > ># Each disk entry is of the form phy:UNAME,DEV,MODE > ># where UNAME is the device, DEV is the device name the domain will see, > ># and MODE is r for read-only, w for read-write. > > > >disk = [ ''phy:/dev/VolGroup00/LogVol00,sda1,w'' ] > > > >#---------------------------------------------------------------------------- > ># Set the kernel command line for the new domain. > ># You only need to define the IP parameters and hostname if the domain''s > ># IP config doesn''t, e.g. in ifcfg-eth0 or via DHCP. > ># You can use ''extra'' to set the runlevel and custom environment > ># variables used by custom rc scripts (e.g. VMID=, usr= ). > > > ># Set if you want dhcp to allocate the IP address. > >#dhcp="dhcp" > ># Set netmask. > >#ipaddr="192.168.0.3" > >#netmask="255.255.255.0" > ># Set default gateway. > >#gateway="192.168.0.1" > ># Set the hostname. > >#hostname= "vm%d" % vmid > >hostname = "RHL" > > > ># Set root device. > >root = "/dev/sda1 ro" > > > ># Root device for nfs. > >#root = "/dev/nfs" > ># The nfs server. > >#nfs_server = ''169.254.1.0'' > ># Root directory on the nfs server. > >#nfs_root = ''/full/path/to/root/directory'' > > > ># Sets runlevel 4. > >extra = "5" > > > >#---------------------------------------------------------------------------- > ># Set according to whether you want the domain restarted when it exits. > ># The default is ''onreboot'', which restarts the domain when it shuts down > ># with exit code reboot. > ># Other values are ''always'', and ''never''. > > > >#restart = ''onreboot'' > > > >#===========================================================================> > > >All I am looking for is a really simple explanation of what all the interfaces do and how to get the doms talking to each other. > > > >Thanks very much > > > > > >_______________________________________________ > >Xen-users mailing list > >Xen-users@lists.xensource.com > >http://lists.xensource.com/xen-users > > > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yes you are all right I had to change to 10.0.0.15 and also see my previous reply about additional steps. Its all working now. Next challenge, try to get VNC working. :)> > From: Marcus Brown <marcusbrutus@internode.on.net> > Date: 2005/10/07 Fri PM 01:02:18 GMT+13:00 > To: Andrew Olds <aolds@xtra.co.nz> > CC: Kent Watsen <kent@watsen.net>, xen-users@lists.xensource.com > Subject: Re: [Xen-users] DomU networking help please > > Andrew Olds wrote: > > I have tried that and no joy. > > What I really want to know is which device in dom0 correlates to the eth0 in domU > > the vif (virtual interface) > > > and do I need to attach an IP address to it. > > no, dom0 has the vif attached to the bridge, the bridge needs an IP > > > I''m sorry but I just need someone to explain in basic terms how it hangs together. > > I realise I am probably doing something fundementally wrong here. I just can''t figure out what it is. > > > >>They appear to be on different subnets - are you using an external > >>router? - if so, make sure you have a default route to the gateway, > >>otherwise try setting the DomU''s IP to something the in the Dom0''s > >>network... > >> > I agree, the IP address of domU should be in the same subnet as dom0 > (as you are bridging, not routing) > eg. something like 10.0.0.6 > > >> > >>>Hi please forgive this if it seems a dumb question but I am new to xen and linux. > >>>I have Xen running in Centos and another Centos Partition DomU running. > >>>But I cannot seem to get networking running between 0 and U. > >>>All the doco appears to assume you know everything about networking bridging and the like. > >>>Does anyone have a simple how to step by step on how to get a single dom0 talking to a single DomU. > > I guess the docs are as simple as it gets :) ... > ie. networking becomes simpler with experience > > >>>All I am looking for is a really simple explanation of what all the interfaces do > >>>and how to get the doms talking to each other. > > here''s my attempt to explain bridging: > > =====================================================================> > Before booting any domUs: > > ______P_h_y_s_i_c_a_l__M_a_c_h_i_n_e_______ > | | > | | > | | > | | > | | > | | > | | > | | > | | > | | > | | > | _______________________________ | > | | | | > | | | | > ==|=====|eth0 dom0 | | > | | | | > |_____|_____________________________|_____| > > > > =====================================================================> > After bringing up a domU: > > ______P_h_y_s_i_c_a_l__M_a_c_h_i_n_e_______ > | | > | | > | | > | _______________ | > | | | | > | | domUn | | > | ___| | | > | / |eth0 | | > | / | | | > | vifn.x |_____________| | > | / | > | | _______________________________ | > | | | | | > | | | | | > ==|==+==|eth0 dom0 | | > | br0 | | | > |_____|_____________________________|_____| > > IN DOM0: > - br0 (or xen-br0) is assigned the IP of eth0 > - vifn.x is tied to the bridge (br0) > - neither vifn.x or eth0 require IP addresses now > > > =====================================================================> > Some commands that might help: > brctl show > ifconfig -a > route -n > > Each of which has an excellent manpage, eg: > man brctl > > Also of help: > http://wiki.xensource.com/xenwiki/XenNetworking > http://www.siliconvalleyccie.com/linux-hn/network-intro.htm > http://bridge.sourceforge.net/faq.html > > > Hope that helps a little, > > Marcus. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
All working and very cool. Here is what I did. Changed the domu address to 10.0.0.15 so in same subnet as dom0. didn''t need to restart xend after all and in fact this adds the dom0 eth0 address to the bridge which although you can ping all around causes major routing probs when trying to use ssh or vnc. so step by step this is what I did. 1. boot dom0 2. /etc/xen/scripts/network start 3 xm create RHL 4 /etc/xen/scripts/vif-bridge up domain=RHL vif=vif1.0 bridge=xen-br0 mac="aa:bb:cc:dd:00:11" and thats it. I can now VNC and even do a full Centos update from within the session. Navigating the X session takes a bit of getting used to but otherwise Xen rocks. Yes you are all right I had to change to 10.0.0.15 and also see my previous reply about additional steps. Its all working now. Next challenge, try to get VNC working. :)> > From: Marcus Brown <marcusbrutus@internode.on.net> > Date: 2005/10/07 Fri PM 01:02:18 GMT+13:00 > To: Andrew Olds <aolds@xtra.co.nz> > CC: Kent Watsen <kent@watsen.net>, xen-users@lists.xensource.com > Subject: Re: [Xen-users] DomU networking help please > > Andrew Olds wrote: > > I have tried that and no joy. > > What I really want to know is which device in dom0 correlates to the eth0 > > in domU > > the vif (virtual interface) > > > and do I need to attach an IP address to it. > > no, dom0 has the vif attached to the bridge, the bridge needs an IP > > > I''m sorry but I just need someone to explain in basic terms how it hangs > > together. > > I realise I am probably doing something fundementally wrong here. I just > > can''t figure out what it is. > > > >>They appear to be on different subnets - are you using an external > >>router? - if so, make sure you have a default route to the gateway, > >>otherwise try setting the DomU''s IP to something the in the Dom0''s > >>network... > >> > I agree, the IP address of domU should be in the same subnet as dom0 > (as you are bridging, not routing) > eg. something like 10.0.0.6 > > >> > >>>Hi please forgive this if it seems a dumb question but I am new to xen and > >>>linux. > >>>I have Xen running in Centos and another Centos Partition DomU running. > >>>But I cannot seem to get networking running between 0 and U. > >>>All the doco appears to assume you know everything about networking > >>>bridging and the like. > >>>Does anyone have a simple how to step by step on how to get a single dom0 > >>>talking to a single DomU. > > I guess the docs are as simple as it gets :) ... > ie. networking becomes simpler with experience > > >>>All I am looking for is a really simple explanation of what all the > >>>interfaces do > >>>and how to get the doms talking to each other. > > here''s my attempt to explain bridging: > > =====================================================================> > Before booting any domUs: > > ______P_h_y_s_i_c_a_l__M_a_c_h_i_n_e_______ > | | > | | > | | > | | > | | > | | > | | > | | > | | > | | > | | > | _______________________________ | > | | | | > | | | | > ==|=====|eth0 dom0 | | > | | | | > |_____|_____________________________|_____| > > > > =====================================================================> > After bringing up a domU: > > ______P_h_y_s_i_c_a_l__M_a_c_h_i_n_e_______ > | | > | | > | | > | _______________ | > | | | | > | | domUn | | > | ___| | | > | / |eth0 | | > | / | | | > | vifn.x |_____________| | > | / | > | | _______________________________ | > | | | | | > | | | | | > ==|==+==|eth0 dom0 | | > | br0 | | | > |_____|_____________________________|_____| > > IN DOM0: > - br0 (or xen-br0) is assigned the IP of eth0 > - vifn.x is tied to the bridge (br0) > - neither vifn.x or eth0 require IP addresses now > > > =====================================================================> > Some commands that might help: > brctl show > ifconfig -a > route -n > > Each of which has an excellent manpage, eg: > man brctl > > Also of help: > http://wiki.xensource.com/xenwiki/XenNetworking > http://www.siliconvalleyccie.com/linux-hn/network-intro.htm > http://bridge.sourceforge.net/faq.html > > > Hope that helps a little, > > Marcus. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users