# qemu - cant ping host secondary address

## mrhe

Hi, 

I have kvm server with one guest with 2 ethernet 10GB emulex card 

eth3 and eth4 are 10GB and going to one switch witn one vlan 

eth3 is add to br1  with no ip

tap1 is add to br1 with no ip

br1 no ip

tap1 is add for kvmguest

```

5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br1 portid 0100000000423831393530353139593131 state UP group default qlen 1000

    link/ether 00:00:c9:xx:xx:xx brd ff:ff:ff:ff:ff:ff

7: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq portid 0200000000423831393530353139593131 state UP group default qlen 1000

    link/ether 00:00:c9:xx:xx:xx brd ff:ff:ff:ff:ff:ff

    inet 172.17.4.38/24 scope global eth4

       valid_lft forever preferred_lft forever

    inet 172.17.4.39/24 scope global secondary eth4

       valid_lft forever preferred_lft forever

 
```

qemu scirpt to run guest :

```
 /usr/local/kvm25/bin/qemu-system-x86_64 -m 6096 -smp 4  -enable-kvm \

-vnc 172.17.10.xx:1  -vga std   -net none -D logFile.log \

-net nic,macaddr=aa:bb:cc:00:00:22,model=virtio,netdev=network1 -netdev tap,script=no,downscript=no,ifname=tap1,id=network1 \

-boot d \

-drive file=node5dev2.raw,index=0,media=disk,format=raw \

-daemonize 
```

before that im creating br0 and br1 and tap0 and tap1 

```
 # brctl show

bridge name     bridge id               STP enabled     interfaces

br1             8000.0000c9e51d5e       no              eth3

                                                                       tap1

```

Now my problem is in guest. When i try to ping 172.17.4.38 ist ok 

```
ping 172.17.4.38

PING 172.17.4.38 (172.17.4.38) 56(84) bytes of data.

64 bytes from 172.17.4.38: icmp_seq=1 ttl=64 time=0.137 ms

```

but when in try to ping second addres timeout

```
ping 172.17.4.39

PING 172.17.4.39 (172.17.4.39) 56(84) bytes of data.

From 172.17.4.37: icmp_seq=1 Destination Host Unreachable
```

tcpdum on host see arp   , and ip of guest is 172.17.4.37 host 172.17.4.38 and 4.39 . NO iptables on host and guest systems

```

 # tcpdump -i eth4 -n host 172.17.4.37

dropped privs to tcpdump

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode

listening on eth4, link-type EN10MB (Ethernet), capture size 262144 bytes

18:36:31.065896 ARP, Request who-has 172.17.4.39 tell 172.17.4.37, length 46

18:36:31.065900 ARP, Reply 172.17.4.39 is-at 00:00:c9:xx:xx:xx, length 28

```

what im doing wrong?

----------

## szatox

You mentioned a VLAN, don't you accidentally block traffic with it?

----------

## mrhe

 *szatox wrote:*   

> You mentioned a VLAN, don't you accidentally block traffic with it?

 

If it would be true I could not ping first addres of eth4 172.17.4.38 but its ok

----------

## StifflerStealth

Hi,

 *Quote:*   

> I have kvm server with one guest with 2 ethernet 10GB emulex card 

 

The way this is worded, it sounds like is that the 2 ethernet cards are being passed to the quest.

However, but the rest of your post, it seems that you have two dual-port ethernet cards on the host. One of the ports is in a bridge and you want the guest to use that bridge to connect to the network?

Some switches do not allow talk-back to the same ethernet port. Since it's a VLan, that may explain why you can't ping one address. Is the the IP address owned by the host that is doing the bridging? I had trouble with this earlier and determined that the bridge was not set up right, but when used a different method, everything worked right. 

However, if the actual VLan switch does not allow this talk-back, then another solution:

If you do have two dual-port ethernet cards on the host, which according to your numbers would be eth1-4, which means there's a eth0. Is eth0 used by the host? If not, you could passthrough the ethernet "card" (if it's a built on motherboard one then it's not really a card) to the guest for use directly. The host would no longer have control over it.

You may need to look at the VLan switch to see how it is set up for my first point about not allowing talk-back to the same ethernet port.

Jon

----------

