LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 06-26-2009, 09:58 PM   #1
I_AM
Member
 
Registered: Mar 2005
Posts: 103

Rep: Reputation: 15
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.
 
Old 06-27-2009, 12:53 AM   #2
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
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.
 
Old 06-27-2009, 08:16 AM   #3
I_AM
Member
 
Registered: Mar 2005
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by scheidel21 View Post
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?
 
Old 06-28-2009, 05:30 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
My thoughts exactly.
 
Old 06-29-2009, 09:25 AM   #5
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
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/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Install Fedora 10 PV DomU at Xen 3.3.1 CentOS 5.2 & Xen 3.3.0 Intrepid Server v LXer Syndicated Linux News 0 01-10-2009 11:40 AM
LXer: Install, Configure, Manage and Administer Xen Servers with New book on Xen LXer Syndicated Linux News 0 01-11-2008 11:41 PM
Information Debian Xen setup/networking scheidel21 Linux - General 0 08-31-2007 02:58 AM
LXer: Managing Xen With Xen-Tools, Xen-Shell, And Argo LXer Syndicated Linux News 0 10-21-2006 11:33 PM
Xen Vs Qemu Networking depam Linux - Software 0 03-04-2006 03:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration