Hi,all, I cannot get my network in domain1 work. Here is my configuration: in dom0: I have two network cards, the ip addrs are 141.213.10.110 and 192.168.0.4, respectively. 141.213.10.110 is an external IP and can access internet directly. The gateway should be 141.213.10.1. /etc/xen/vfp: the domain1 configuration file, I created domain1 using ''xm create vmid=1 -f /etc/xen/vfp'' Here is the network setting part: /***************************************************************/ #dhcp="dhcp" ip = "192.168.0.188" netmask = "255.255.255.0" gateway = "141.213.10.104" // I also tried "192.168.0.1" # Set netmask. #netmask# Set default gateway. #gateway# Set the hostname. #hostname= "vm%d" % vmid /***************************************************************/ in dom1: /etc/sysconfig/network-scripts/ifcfg-eth0: /**************************************************************/ DEVICE=eth0 BOOTPROTO=static IPADDR=192.168.0.188 NETMASK=255.255.255.0 ONBOOT=yes TYPE=Ethernet /*************************************************************/ After I started dom1, I can see that the network interface is activated and got the ip "192.168.0.188". But neither can I connect outside from dom1, nor connect to dom1 from outside. What''s wrong with my setting? I don''t know whether that is the gateway setting issue. :( I put my ''netstat -rn'' dumpout info below: /***********************************************************************/ Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo /***********************************************************************/ If anybody knows how to solve this problem, please help. Thanks, Xin ------------------------------------------------------- This SF.Net email is sponsored by: thawte''s Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Keir Fraser
2004-Sep-14 22:48 UTC
Re: [Xen-devel] question about network setting for domain1
You don''t need an ifcfg-eth0 file in dom1. We pass in the IP config on dom1''s command line, and the interface will automatically be set up. What is happening is that your ifcfg-eth0 file is overriding the settings passed in on the command line. Because you do not specify a gateway in the file, no default route is set up and so dom1 cannot send packets outside its subnet. -- Keir> Hi,all, > > I cannot get my network in domain1 work. Here is my configuration: > > in dom0: > > I have two network cards, the ip addrs are 141.213.10.110 and 192.168.0.4, > respectively. 141.213.10.110 is an external IP and can access internet > directly. The gateway should be 141.213.10.1. > > /etc/xen/vfp: the domain1 configuration file, I created domain1 using ''xm > create vmid=1 -f /etc/xen/vfp'' > > Here is the network setting part: > > /***************************************************************/ > #dhcp="dhcp" > ip = "192.168.0.188" > netmask = "255.255.255.0" > gateway = "141.213.10.104" // I also tried "192.168.0.1" > # Set netmask. > #netmask> # Set default gateway. > #gateway> # Set the hostname. > #hostname= "vm%d" % vmid > /***************************************************************/ > > in dom1: > > /etc/sysconfig/network-scripts/ifcfg-eth0: > > /**************************************************************/ > DEVICE=eth0 > BOOTPROTO=static > IPADDR=192.168.0.188 > NETMASK=255.255.255.0 > ONBOOT=yes > TYPE=Ethernet > /*************************************************************/ > > After I started dom1, I can see that the network interface is activated > and got the ip "192.168.0.188". But neither can I connect outside from > dom1, nor connect to dom1 from outside. > > What''s wrong with my setting? I don''t know whether that is the gateway > setting issue. :( I put my ''netstat -rn'' dumpout info below: > > /***********************************************************************/ > Kernel IP routing table > Destination Gateway Genmask Flags MSS Window irtt > Iface > 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 > eth0 > 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 > eth0 > 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 > lo > /***********************************************************************/ > > If anybody knows how to solve this problem, please help. > > Thanks, > > Xin > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte''s Crypto Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > Camcorder. More prizes in the weekly Lunch Hour Challenge. > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xen-devel------------------------------------------------------- This SF.Net email is sponsored by: thawte''s Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Thanks for your help. I followed your instructions and removed all ifcfg-ethX files in dom1. Unfortunately, this does not solve the proble. There must have some other problems. As I said before, my gateway of dom0 is 141.213.10.1. Shall I put it in configuration file of dom1 as the gateway of dom1? If so, the ip addr of dom1 is set to 192.168.0.188, how can it reach the gateway? I am a little bit confused. Xin On Tue, 14 Sep 2004, Keir Fraser wrote:> > You don''t need an ifcfg-eth0 file in dom1. We pass in the IP config on > dom1''s command line, and the interface will automatically be set up. > > What is happening is that your ifcfg-eth0 file is overriding the > settings passed in on the command line. Because you do not specify a > gateway in the file, no default route is set up and so dom1 cannot > send packets outside its subnet. > > -- Keir > > > Hi,all, > > > > I cannot get my network in domain1 work. Here is my configuration: > > > > in dom0: > > > > I have two network cards, the ip addrs are 141.213.10.110 and 192.168.0.4, > > respectively. 141.213.10.110 is an external IP and can access internet > > directly. The gateway should be 141.213.10.1. > > > > /etc/xen/vfp: the domain1 configuration file, I created domain1 using ''xm > > create vmid=1 -f /etc/xen/vfp'' > > > > Here is the network setting part: > > > > /***************************************************************/ > > #dhcp="dhcp" > > ip = "192.168.0.188" > > netmask = "255.255.255.0" > > gateway = "141.213.10.104" // I also tried "192.168.0.1" > > # Set netmask. > > #netmask> > # Set default gateway. > > #gateway> > # Set the hostname. > > #hostname= "vm%d" % vmid > > /***************************************************************/ > > > > in dom1: > > > > /etc/sysconfig/network-scripts/ifcfg-eth0: > > > > /**************************************************************/ > > DEVICE=eth0 > > BOOTPROTO=static > > IPADDR=192.168.0.188 > > NETMASK=255.255.255.0 > > ONBOOT=yes > > TYPE=Ethernet > > /*************************************************************/ > > > > After I started dom1, I can see that the network interface is activated > > and got the ip "192.168.0.188". But neither can I connect outside from > > dom1, nor connect to dom1 from outside. > > > > What''s wrong with my setting? I don''t know whether that is the gateway > > setting issue. :( I put my ''netstat -rn'' dumpout info below: > > > > /***********************************************************************/ > > Kernel IP routing table > > Destination Gateway Genmask Flags MSS Window irtt > > Iface > > 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 > > eth0 > > 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 > > eth0 > > 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 > > lo > > /***********************************************************************/ > > > > If anybody knows how to solve this problem, please help. > > > > Thanks, > > > > Xin > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: thawte''s Crypto Challenge Vl > > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > > Camcorder. More prizes in the weekly Lunch Hour Challenge. > > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/xen-devel >------------------------------------------------------- This SF.Net email is sponsored by: thawte''s Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Keir Fraser
2004-Sep-15 00:57 UTC
Re: [Xen-devel] question about network setting for domain1
> Thanks for your help. > > I followed your instructions and removed all ifcfg-ethX files in dom1. > Unfortunately, this does not solve the proble. There must have some other > problems. > > As I said before, my gateway of dom0 is 141.213.10.1. Shall I put it in > configuration file of dom1 as the gateway of dom1? If so, the ip addr of > dom1 is set to 192.168.0.188, how can it reach the gateway? I am a little > bit confused.Yes, I think so! Your gateway needs to be in the same subnet as dom1. I suggest setting the gateway for dom1 to be 192.168.0.1. Then add that address to your public interface in dom0 (i.e., the one whose primary address is 141.213.10.1) as an ''IP alias''. A common way of doing this is (assuming your public interface is eth0): ifconfig eth0:1 192.168.0.188 up You may also need to add eth0:1 to the bridge in dom0, but probably not. -- Keir ------------------------------------------------------- This SF.Net email is sponsored by: thawte''s Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Yes. It eventually works for me after I put 141.213.10.1 as the gateway in the dom1 configuration file. Thanks a lot for your help. Xin On Wed, 15 Sep 2004, Keir Fraser wrote:> > Thanks for your help. > > > > I followed your instructions and removed all ifcfg-ethX files in dom1. > > Unfortunately, this does not solve the proble. There must have some other > > problems. > > > > As I said before, my gateway of dom0 is 141.213.10.1. Shall I put it in > > configuration file of dom1 as the gateway of dom1? If so, the ip addr of > > dom1 is set to 192.168.0.188, how can it reach the gateway? I am a little > > bit confused. > > Yes, I think so! Your gateway needs to be in the same subnet as dom1. > > I suggest setting the gateway for dom1 to be 192.168.0.1. Then add > that address to your public interface in dom0 (i.e., the one whose > primary address is 141.213.10.1) as an ''IP alias''. > > A common way of doing this is (assuming your public interface is > eth0): > ifconfig eth0:1 192.168.0.188 up > You may also need to add eth0:1 to the bridge in dom0, but probably not. > > -- Keir >------------------------------------------------------- This SF.Net email is sponsored by: thawte''s Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel