WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Networking problem

Hello, 

I have created the domU with the IP address 192.168.0.4. Here 
what is in the /etc/xen/xmdefconfig file:
=======================================================================
kernel="/boot/vmlinuz-2.6-xen"
memory=512
extra="fastboot"

#network
vif=['']
dhcp="off"
hostname="compnode"
name="compnode"
ip="192.168.0.4"
netmask="255.255.255.0"

ramdisk="/boot/initrd-2.6-xen.img"
disk=['phy:/dev/hda3,sda1,w','phy:/dev/hda5,sda2,w']
root="/dev/sda1 ro"
=======================================================================

In /etc/xen/xend-config.sxp file I have the following lines uncommented:
===============================
(network-script network-nat)
(vif-script vif-nat)
===============================

Then I have created the domU:
#> xm create -c

In domU I see:
#> ifconfig
=========================================================================
eth0      Link encap:Ethernet  HWaddr 00:16:3E:00:20:93
          inet addr:192.168.0.4  Bcast:192.168.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:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:294 (294.0 b)
=========================================================================

In dom0 I see:
#> ifconfig
============================================================================
vif5.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet addr:10.0.5.128  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:5 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:294 (294.0 b)  TX bytes:0 (0.0 b)
============================================================================

When I change the IP address on vif5.0 I am able to ping from dom0 to domU
and in the reverse direction:

#> ifconfig vif5.0 198.162.0.3
#> ifconfig
=========================================================================
vif5.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet addr:198.162.0.3  Bcast:198.162.0.255  Mask:255.255.255.0
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:5 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:294 (294.0 b)  TX bytes:0 (0.0 b)
==========================================================================

[In dom0]
#> ping 198.162.0.4
==========================================================
PING 192.168.0.4 (192.168.0.4) 56(84) bytes of data.
64 bytes from 192.168.0.4: icmp_seq=0 ttl=64 time=5.68 ms
64 bytes from 192.168.0.4: icmp_seq=1 ttl=64 time=0.267 ms
64 bytes from 192.168.0.4: icmp_seq=2 ttl=64 time=0.243 ms
64 bytes from 192.168.0.4: icmp_seq=3 ttl=64 time=0.238 ms
...
==========================================================

[In domU]
#> ping 198.162.0.3
===========================================================
PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.
64 bytes from 192.168.0.3: icmp_seq=0 ttl=64 time=0.235 ms
64 bytes from 192.168.0.3: icmp_seq=1 ttl=64 time=0.590 ms
64 bytes from 192.168.0.3: icmp_seq=2 ttl=64 time=0.649 ms
64 bytes from 192.168.0.3: icmp_seq=3 ttl=64 time=0.212 ms
...
===========================================================

However, when I re-start my domU, the IP address of vifY.0
interface changes to 10.0.Y.128 with netmask 255.255.255.255.

So, the question is: how can I force the vifY.0 have the same
IP address (for example, 192.168.0.3) each time it is created
(with a netmask, different from 255.255.255.255)?

Arsen.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>