Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-26-2009, 10:58 PM
|
#1
|
Member
Registered: Mar 2005
Posts: 103
Rep:
|
Xen install, can't get networking done
I'm playing around with a test server, install Xen on a Centos 5 box.
http://www.howtoforge.org/paravirtua...tos-5.3-x86_64
I've tried two methods to create a vm.
virt-install
and
virt-install -x "ip=xxx.xxx.70.212 gateway=xxx.xxx.70.211 subnet=255.255.255.248"
If I do virt-install, it asks me this:
http://i40.tinypic.com/2m5c8ys.png
Automatic DHCP never works. If I try manual config, I have no idea what to put it. I did try this:
IPv4 address: xxx.xxx.70.212__ / 255.255.255.248_ Gateway: xxx.xxx.70.211___________________________ Name Server: _____________________________________
note: only here in my post am I actually putting "xxx" in the IP for privacy reasons only. The 70.212 is the main server IP that I ssh into.
See 2nd screenshot for error. Same thing with various valid mirrors I tried.
http://i40.tinypic.com/64fqyh.png
This is my ifcfg-eth0 info:
DEVICE=eth0 BOOTPROTO=static IPADDR=xxx.xxx.70.212 NETMASK=255.255.255.248 ONBOOT=yes TYPE=Ethernet
I've tried 2 different mirrors so far, same error.
http://wftp.tu-chemnitz.de/pub/linux.../5.3/os/x86_64
http://mirror.its.uidaho.edu/pub/centos/5/os/x86_64/
My resolvers are just fine too in /etc/resolv.conf
Note, I did not do anything at all. I had a fresh Centos 5 64bit install and then followed that Xen install guideline. That's it.
|
|
|
06-27-2009, 01:53 AM
|
#2
|
Senior Member
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323
Rep: 
|
Have you setup networking properly for xen like bridging your adapter on the host? Look at my post on installing xen on debian on a dv9000z It has some good stuff on networking, and how I configured networking on xen.
|
|
|
06-27-2009, 09:16 AM
|
#3
|
Member
Registered: Mar 2005
Posts: 103
Original Poster
Rep:
|
Quote:
Originally Posted by scheidel21
Have you setup networking properly for xen like bridging your adapter on the host? Look at my post on installing xen on debian on a dv9000z It has some good stuff on networking, and how I configured networking on xen.
|
How about a link to that post?
|
|
|
06-28-2009, 06:30 AM
|
#4
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
My thoughts exactly.
|
|
|
06-29-2009, 10:25 AM
|
#5
|
Senior Member
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323
Rep: 
|
Here is the applicable portion of the post I referred to and also a link to it. As far as defualt bridged networking it has been a while but there should be a xen bridge script and you ahve to make sure that is edited appropriately.
Quote:
Process:domU networking
This was a tricky proposition, while using the ethernet devices as the xen bridge device, works, this is a laptop and thus has wireless and also is almost never plugged into a wire. Changing the netdev to bridge to the wlan0 kills the wireless and requires reboot to fix. Additionally this bridging only works if connected to a network, we want constant networking between our dom0 and domU, so this setup will not work. The answer setup a dummy interface that can be bridged, it is local to the machine and can always be connected. setting up the dummy interface is the easy part.
Code:
#modprobe dummy
#depmod -a dummy
Now edit /etc/modules so that the dummy line looks like this
Quote:
alias dummy0 dummy
Next edit /etc/network/interfaces and add
Quote:
auto dummy0
iface dummy0 inet static
address 192.168.7.1
netmask 255.255.255.0
or something similar with an address and subnet from a private Ipv4 range.
Now we need to setup routing for this interface to our real interface. To accomplish this we use iptables. I do not have a firewall setup on my laptop, lax on security I know but this made things real simple for me. If you do not have a firewall setup all you need do is add the file /etc/network/if-up.d/iptables and fill it with the following.
Quote:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
Since this is done now, we can edit xend-config.sxp and change the netdev used for bridging to dummy0 then reboot the computer. Bringing up the domU you can then edit the IP settings in your domU and provide it with an address from the appropriate subnet. After doing so you will find that you can now ping the dummy interface IP (in my case 192.168.7.1) and the IP of your wlan0 interface, and you can ping from dom0 to domU as well. You should note (at least with the broadcom 4310 and ndiswrapper) that you cannot ping anything outside the laptop interfaces, so no router ping, or anything else on that network. After much fiddling with iptables, and even ebtables I could not get anything to go past the laptop. I would have thought that NATing packets would not give a problem but apparently the wireless card doesn't want to send anything. So after much thought I had an idea, run a proxy server, all requests then would come from the dom0. so apt-get install squid. While you are installing squid, take the time to go to http://www.webmin.com/ and download the webmin package, and install that as well, note you may have to install a few other libraries from the apt repositories as well before webmin will install. I suggest webmin because it offers a great interface for administering squid and other things on the computer via a web page negating the need for text editing configuration files. Now that squid is installed, you may need to set the visual hostname before squid will run, you can set it to the hostname you assigned to the linux box initially if you like this is the easiest. The squid config file is very large and webmin would be a great asset here in helping to configure squid, if you use webmin you will find the visual hostname option under the administrative option section in the squid administration module. Next you need to edit access control, using webmin this is as easy as clicking the access control button. Once in this section add a new client address acl and name it lanhosts then in the from IP box type your network in my case 192.168.7.0 and then add the subnet in my case 255.255.255.0 and click ok. Now we have a rule to allow anything on our fictional dummy network to access our proxy. Next we add a rule to allow this acl. In the proxy restrictions area of the access control page add a proxy restriction and and select the allow radio button and choose the lanhosts acl then click ok, now if all the squid settings were default you should see a proxy restriction above your new one that says deny all, move your new allow lanhosts restriction above this deny all restriction by using the arrow button in the last column of the proxy restrictions area. Finally click save on the page and then restart squid. In your domU configure it to use the proxy server at 192.168.7.1 with port 3128 and wow you have internet access on the domU.
***Note: I attempted to setup dhcp on the dummy interface and dhcp refused to start it kept whining about no subnet declaration for dummy0, though it did exist, Static IP fixed this, I also setup a simple forwarding/caching DNS server in dom0 which allowed me to set the DNS server tab to 192.168.7.1 in the static settings for my domU. ***
|
http://www.linuxquestions.org/questi...orking-581161/
|
|
|
All times are GMT -5. The time now is 09:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|