mirroring traffic between vm [closed]

asked 2015-01-18 05:08:22 -0500

yaroni gravatar image

updated 2015-02-02 12:13:30 -0500

Hi

I run juno rdo packstack all in one. I created a seperate network on 1.2.3.0/24 that is not connected to the external net. I want to mirror traffic from one vm to another on this vm. I want the solution to work also on production setup (not all in one) C:\fakepath\rads.JPG

I can see in the ifconfig the qvo,qvb,qbr,tap for my 2 vm
tap0b448724-0d is for rad2
tapaea6c53c-29 is for rad1

I want to mirror from rad1 to rad2. So by searching from the net i did the following

(my-cloudy)[root@localhost inputs]# ovs-vsctl add-port br-int tap0b448724-0d
(my-cloudy)[root@localhost inputs]# ovs-vsctl add-port br-int tapaea6c53c-29
(my-cloudy)[root@localhost inputs]# ovs-vsctl -- set Bridge br-int mirrors=@m  -- --id=@tap0b448724-0d get Port  tap0b448724-0d -- --id=@tapaea6c53c-29 get Port tapaea6c53c-29 -- --id=@m create Mirror name=mymirror select-dst-port=@tapaea6c53c-29 select-src-port=@tapaea6c53c-29 output-port=@tap0b448724-0d
a54d6966-b33e-4b64-a948-eefa15c850d5
(my-cloudy)[root@localhost inputs]# ovs-vsctl list Bridge br-int
_uuid               : 4d828dda-bf82-47eb-937c-49b3a00fc0b1
controller          : []
datapath_id         : "0000da8d824deb47"
datapath_type       : ""
external_ids        : {}
fail_mode           : secure
flood_vlans         : []
flow_tables         : {}
ipfix               : []
mirrors             : [a54d6966-b33e-4b64-a948-eefa15c850d5]
name                : br-int
netflow             : []
other_config        : {}
ports               : [01136404-75fa-4353-a8e6-c52be026a5a6, 318ab565-515e-45c5-afe1-9865817feb42, 37b1f634-42eb-4c09-b773-66666abdc351, 3f6c04ca-a3c6-4f32-ad6c-c8bbd2236404, 606df555-b2b6-474e-afd7-1f54b7534dc1, 63878890-0caf-490b-a5e9-e933f61687a4, 90272284-cac7-4e13-89e4-80bd5d452829, 9c69b662-86fc-4782-8cfe-e9faf67adc23, a245d77a-049c-49df-93ce-a4278d48d9be, a802a623-6cdb-449b-87fd-84e08e43b989, aca9ad00-715a-4a98-a179-114b0f92d03e, e5a375fd-60fb-4431-ac93-afa9c22b2aff, fc68b5d8-828b-4eb8-8451-314d51c449a4]
protocols           : []
sflow               : []
status              : {}
stp_enable          : false

I sent a trace on tapaea6c53c-29 and saw that it arrived to rad1 but it didn't arrive to rad2. Why?. (tcpreplay -M 10 -i tapaea6c53c-29 ~/mytrace.pcap)

This is the ovs-vsctl output

ovs-vsctl show
c204e021-ff03-4372-a0c8-e7fdf643ae55
    Bridge br-int
        fail_mode: secure
        Port "qvo5f4806a7-fc"
            tag: 9
            Interface "qvo5f4806a7-fc"
        Port "tapaea6c53c-29"
            Interface "tapaea6c53c-29"
        Port "tap8ba80ac8-93"
            tag: 27
            Interface "tap8ba80ac8-93"
                type: internal
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port "qr-3f83a835-10"
            tag: 9
            Interface "qr-3f83a835-10"
                type: internal
        Port "tap0b448724-0d"
            Interface "tap0b448724-0d"
        Port "qvo7fa5eb55-e9"
            tag: 9
            Interface "qvo7fa5eb55-e9"
        Port "qvoaea6c53c-29"
            tag: 27
            Interface "qvoaea6c53c-29"
        Port "qvo0b448724-0d"
            tag: 27
            Interface "qvo0b448724-0d"
        Port "tap1caf66fd-ca"
            tag: 9
            Interface "tap1caf66fd-ca"
                type: internal
        Port "qvo6809345f-8f"
            tag: 9
            Interface "qvo6809345f-8f"
        Port "qvo5971b9b0-c3"
            tag: 9
            Interface "qvo5971b9b0-c3"
        Port br-int
            Interface br-int
                type: internal
    Bridge br-ex
        Port br-ex
            Interface br-ex
                type: internal
        Port "enp3s0f1"
            Interface "enp3s0f1"
        Port "qg-260a866b-a4"
            Interface "qg-260a866b-a4"
                type: internal
    Bridge br-tun
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
        Port br-tun
            Interface br-tun
                type: internal
    ovs_version: "2.1.3"

This is the ifconfig output

br-ex: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.4.250  netmask 255.255.0.0  broadcast 172.16.255.255
        inet6 fe80::6ab5:99ff:fecd:e626  prefixlen 64  scopeid 0x20<link>
        ether 68:b5:99:cd:e6:26  txqueuelen 0  (Ethernet)
        RX packets 49460873  bytes 34634417183 (32.2 GiB)
        RX errors 0  dropped 95878  overruns 0  frame 0
        TX packets 12907733  bytes 2895664946 (2.6 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 68:b5:99:cd:e6:26  txqueuelen 1000  (Ethernet)
        RX packets 54020070  bytes 40669135629 (37.8 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16869072  bytes 3664815495 (3.4 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by rbowen
close date 2016-05-17 07:36:53.716081

Comments

This refers to a version which is now EOL'ed. Please re-open if the question/problem is still relevant in a supported release. Thanks.

rbowen gravatar imagerbowen ( 2016-05-17 07:36:46 -0500 )edit