RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1147238 - [RFE] configure the IP for type='user' interface
Summary: [RFE] configure the IP for type='user' interface
Keywords:
Status: CLOSED DUPLICATE of bug 1075520
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-28 10:36 UTC by lcheng
Modified: 2015-05-15 11:44 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-15 11:44:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lcheng 2014-09-28 10:36:37 UTC
Description of problem:
When a guest with two interfaces which are 'user' type, the two virtual NICs are assigned with the same ip in guest.


Version-Release number of selected component (if applicable):
libvirt-1.2.8-3.el7.x86_64
qemu-kvm-1.5.3-73.el7.x86_64
kernel-3.10.0-170.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. In host.
# virsh start a
Domain a started

# virsh dumpxml a | grep interface -A5
    <interface type='user'>
      <mac address='52:54:00:29:ae:b7'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <interface type='user'>
      <mac address='52:56:00:29:AE:99'/>
      <model type='virtio'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </interface>
...

# ps -aux | grep qemu
...
-netdev user,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:29:ae:b7,bus=pci.0,addr=0x3 -netdev user,id=hostnet1 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:56:00:29:ae:99,bus=pci.0,addr=0x6 
...

2. In guest.
[root@localhost ~]# ifconfig
eth38     Link encap:Ethernet  HWaddr 52:54:00:29:AE:B7
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe29:aeb7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10178 (9.9 KiB)  TX bytes:1853 (1.8 KiB)

eth39     Link encap:Ethernet  HWaddr 52:56:00:29:AE:99
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::3656:ff:fe29:aeb7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1955 (1.9 KiB)  TX bytes:1358 (1.3 KiB)

...

Actual results:
As description.

Expected results:
The NICs are assigned with different ip in guest.

Comment 2 Vlad Yasevich 2014-10-01 20:31:55 UTC
This appears to be a configuration issue that is currently not supported by libvirt very well.  Qemu 'user' type network device, also known as SLIRP, has a  qemu built-in configuration that by default uses 10.0.2.0/24 network and provides
10.0.2.15 address to the guest.  This configuration can be changed throught
additional options passed to the '-netdev user' argument, but libvirt doesn't
currently support this.

You can try running this by hand and specifying:
   -netdev user,net=10.0.3.0/24,dhcpstart=10.0.3.15

Re-assigning to livirt for evaluation of support addtional slirp/user related options.

-vlad

Comment 4 Ján Tomko 2015-05-15 11:44:14 UTC

*** This bug has been marked as a duplicate of bug 1075520 ***


Note You need to log in before you can comment on or make changes to this bug.