مدونة بي بي نتوركس

Port Mirroring for SONiC in Verity

In my last blog, I detailed how to use the Verity Packet Capture feature to create a PCAP file and then analyze it locally on your computer or upload it to another analyzer tool. But what if I didn’t want to just download a packet capture file? What if I wanted to monitor the entire network packet stream and have it go to a monitoring device to analyze the information?

One of the new capabilities we have in our latest release 6.4, is the ability to create SPAN, or Switch Port Analyzer, also known as Port Mirroring configurations. This gives you the ability to duplicate one or more source interfaces to a destination interface on a switch, and then have a collector or another server, or even another network be the destination of this duplicated packet information.

In this blog, I will show how to setup a Mirror session, select the destination, and view this traffic all through BE Networks Verity.

So lets say I have the following network topology:

انعكاس المنفذ في Verity

I want to duplicate the traffic coming from my Ubuntu Server to my Windows server. Ubuntu server is connected to port 30 on my سونيك switch and the Windows Server is on port 40 of the SONiC switch. My monitoring server, which I want the duplicate packets to go to is on port 37 of the switch.

In Verity, under the Topology View, when you zoom in on the switch you want to create the Mirror on, there is a new box near the top called Traffic Mirrors:

انعكاس المنفذ في Verity
When we zoom in to this section, we can create the Mirror Session configuration:
انعكاس المنفذ في Verity

We can add multiple rows with the Plus Icon icon and adjust priority with the Plus Icon icon.

The first thing we do is click Plus Icon icon to create a row. Then click the Pencil icon in the top right corner to go into Edit mode. From here, select Enable, and then from the Source Port drop down menu, select port 30, which is the port that the Ubuntu server is connected to. Next select direction. We want both so we select both inbound and outbound boxes. Last, for destination, we select the interface on the switch connected to our monitor server, which is port 37 in this example:

انعكاس المنفذ في Verity

Next, click the Check in the top right corner to save the mirror session. 

The switch will turn green, letting you know that it is sending the configuration to the switch and that it is in the process of updating. Once the switch is back to normal, you will see your session in the box: 

انعكاس المنفذ في Verity

You can see that the Current Count and Active count now both say 1 showing that the device is currently configured and mirroring traffic from port 30 to port 37.

On my monitoring Server, I can now see the packets coming in from the server and see the communications between the Ubuntu and Windows Server. It’s as simple as that.

To remove this configuration, all I have to do is go in and disable the row, and then I can delete it by using the Plus Icon icon to clear the data, and then use the Plus Icon to clear any disabled rows.

It’s as easy as that. Way easier than logging into the switch manually, and then running the risk of configuring it wrong via the CLI!

صورة Luke Williams

لوك ويليامز

قائد المنتج

مع أكثر من 30 عاماً من الخبرة في مجال تكنولوجيا المعلومات، لا يوجد الكثير مما لم يره لوكاس. من إدارة مزود خدمة إنترنت محلي في بلدته في ولاية أيوا عندما كان عمره 16 عامًا إلى إدارة الشبكات وإدارة الخوادم في ثاني أكبر شركة إعلامية صحفية في الولايات المتحدة في عام 2012، إلى تطوير حلول إنترنت الأشياء وشبكات NOS أثناء عمله في Canonical، فهو يتعلم باستمرار ويجرّب تقنيات جديدة لمواكبة متطلبات الأسواق والشركات من التقنيات الجديدة لتلبية احتياجاتها. يشغل حالياً منصب قائد المنتجات في شركة BeyondEdge Networks المتخصصة في الشبكات المفتوحة وSONiC.

ar
اتصل بنا
نحن نحب حقاً التحدث عن الشبكات!