[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Configure Xen to use IPv4 addressing



Hi Simon, 
Thanks for your time to answer the query. You were right, I had not configured guest devices. However, I tried to do the same but could not get the guests to run with proper network configurations. Could you please guide me as to what I am doing wrong. 

Here is my guest configuration file /etc/xen/tutorial-pv-guest.cfg on the host:

#
# Configuration file for the Xen instance tutorial-pv-guest, created
# by xen-tools 4.4 on Sun May 29 13:05:12 2016.
#

#
#  Kernel + memory size
#


bootloader = '/usr/lib/xen-4.4/bin/pygrub'

vcpus       = '2'
memory      = '512'


#
#  Disk device(s).
#
root        = '/dev/xvda2 ro'
disk        = [
                  'phy:/dev/vg0/tutorial-pv-guest-disk,xvda2,w',
                  'phy:/dev/vg0/tutorial-pv-guest-swap,xvda1,w',
              ]


#
#  Physical volumes
#


#
#  Hostname
#
name        = 'tutorial-pv-guest'

#
#  Networking
#
dhcp        = 'dhcp'
vif         = [ 'mac=00:16:3E:B2:66:08,bridge=xenbr0,ip=192.168.1.3' ]

#
#  Behaviour
#
_on_poweroff_ = 'destroy'
_on_reboot_   = 'restart'
_on_crash_    = 'restart'


Here is my /etc/network/interfaces file on the host: 

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto xenbr0
iface xenbr0 inet static
	bridge_ports eth0
	bridge_stp on
	address 192.168.1.2
	broadcast 192.168.1.255
	netmask 255.255.255.0
	gateway 192.168.1.1

/etc/network/interfaces file on the guest machine: 

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
	address 192.168.1.3
	netmask 255.255.255.0
	gateway 192.168.1.1

# post-up ethtool -K eth0 tx off

#
# The commented out line above will disable TCP checksumming which
# might resolve problems for some users.  It is disabled by default
#

Result of ifconfig on the host: 
$ ifconfig
eth0      Link encap:Ethernet  HWaddr 3c:97:0e:93:ec:1f  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:f2500000-f2520000 

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:65536  Metric:1
          RX packets:410 errors:0 dropped:0 overruns:0 frame:0
          TX packets:410 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:46417 (46.4 KB)  TX bytes:46417 (46.4 KB)

vif2.0    Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff  
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32 errors:0 dropped:0 overruns:0 frame:0
          TX packets:269 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:8408 (8.4 KB)  TX bytes:31065 (31.0 KB)

wlan0     Link encap:Ethernet  HWaddr 00:24:d7:c5:a5:94  
          inet addr:10.192.42.190  Bcast:10.192.63.255  Mask:255.255.224.0
          inet6 addr: fe80::224:d7ff:fec5:a594/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:392 errors:0 dropped:0 overruns:0 frame:0
          TX packets:718 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:58896 (58.8 KB)  TX bytes:65552 (65.5 KB)

xenbr0    Link encap:Ethernet  HWaddr 3c:97:0e:93:ec:1f  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::3e97:eff:fe93:ec1f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:6888 (6.8 KB)  TX bytes:5551 (5.5 KB)

Result of ifconfig on the guest: 

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:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1184 (1.1 KB)  TX bytes:1184 (1.1 KB)

The eth0 interface on the guest fails to start with this configuration. 

Regards 

On Mon, Jun 13, 2016 at 6:49 PM, Simon Hobson <linux@xxxxxxxxxxxxxxxx> wrote:
Naman Agarwal <namanag16@xxxxxxxxx> wrote:

> I am using Xen v4.4.2 on my system. I have two domU's configured on it. Both are linux distro's (Ubuntu 14.04) with one running as a PV guest and other as HVM. Currently, every network interface that Xen uses on Dom0 and DomU are being assigned IPv6 addresses. I want to be able to configure my guests and dom0 to use IPv4 addresses instead. Is there a way to do this?

I suspect you are misreading the information in front of you.

With IPv6, every device with a working IPv6 stack will configure a "link local" address (starts with FE80:...) on every link. If you don't want to use IPv6 you can just ignore these addresses. You'll only see other IPv6 addresses if you configure them - whether that's manually, using self-assigned addresses, or via one of the managed options.
On some OSs, you can turn off IPv6 altogether, though it's not recommended these days as some packages don't work properly if it's not enabled - but they won't really "use" IPv6 unless you configure globally routable addresses.

IPv4 addresses won't appear unless you have configured them. By the way you ask the question, I suspect you've not configured anything and so you don't see any IPv4 addresses.
The host, and each guest, must be configured much the same as a standalone device would need to be configured (eg manually, by DHCP, ...).


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.