cisco-trex installation and configuration

1,771 views
Skip to first unread message

selv...@gmail.com

unread,
Aug 18, 2016, 4:23:05 PM8/18/16
to TRex Traffic Generator
Hi,

My requirement is to install ciscoTrex on openstack. I tried the below methods

Method 1:
extracted the ova file and using the vmdk image available, created a VM in openstack.

tar xvf ciscoTrex.ova

This doesn't work and the VM boot falls into Dracut Emergency Shell.

Method 2:
Created Ubuntu VM and installed ciscoTrex by running the below commands

$wget $WEB_URL/release/latest
$tar -xzvf latest

When I run the below command to identify the ports
sudo ./dpdk_setup_ports.py -s

got the result

Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused=igb_uio

Now my question is, whether this environment given above is supported for cisco-trex installation. I have nowhere seen the driver in the supported list of ciscotrex.

Thanks,
Selvi.V

hanoh haim

unread,
Aug 18, 2016, 4:47:37 PM8/18/16
to selv...@gmail.com, TRex Traffic Generator
Hi, it is possible to do it.

Method 2 is the right way to go. You just need to add more virio NIC interfaces and connect them to the right vSwitch.

Thanks,
Hanoh
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/b27117f4-ed9c-441f-a839-68e94ae1d755%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Hanoh
Sent from my iPhone

selv...@gmail.com

unread,
Aug 23, 2016, 2:29:54 PM8/23/16
to TRex Traffic Generator, selv...@gmail.com
Hi,

Thanks for your reply.

Now I could able to install Trex in ubuntu VM which is in the openstack environment and the VM has 3 interfaces configured.

configured the port and MAC details below
nano /etc/trex_cfg.yaml

After the configuration, ran the below command

$ sudo ./t-rex-64 -f cap2/dns.yaml -d 100 -l 1000

After this if i do ifconfig to check the interfaces i could not locate the details of two interface whose MAC address are configured in the trex_cfg.yaml file.

the default gateway is also removed from the configuration (route -n)

Since i am new to cisco trex, i could not figure out what is the issue here. Could you please help me on this.

Thanks,
Selvi.V

selv...@gmail.com

unread,
Aug 23, 2016, 2:31:42 PM8/23/16
to TRex Traffic Generator, selv...@gmail.com
On Thursday, August 18, 2016 at 4:47:37 PM UTC-4, Hanoch Haim wrote:

Yaroslav Brustinov

unread,
Aug 23, 2016, 2:41:51 PM8/23/16
to selv...@gmail.com, TRex Traffic Generator
Hi,

To return the interfaces to Linux driver, you could use following script:
sudo ./dpdk_nic_bind.py -b <driver name> <pci address>

Thanks,
Yaroslav.

> To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.

>
> To post to this group, send email to trex...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/b27117f4-ed9c-441f-a839-68e94ae1d755%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
>
> HanohSent from my iPhone

Hi,

Thanks for your reply.

Now I could able to install Trex in ubuntu VM which is in the openstack environment and the VM has 3 interfaces configured.

configured the port and MAC details below
nano /etc/trex_cfg.yaml

After the configuration, ran the below command

$ sudo ./t-rex-64 -f cap2/dns.yaml -d 100 -l 1000

After this if i do ifconfig to check the interfaces i could not locate the details of two interface whose MAC address are configured in the trex_cfg.yaml file.

the default gateway is also removed from the configuration (route -n)

Since i am new to cisco trex, i could not figure out what is the issue here. Could you please help me on this.

Thanks,
Selvi.V

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.

Itay Marom

unread,
Aug 23, 2016, 3:07:54 PM8/23/16
to Yaroslav Brustinov, selv...@gmail.com, TRex Traffic Generator
Just to add a bit of explanation (if you are not aware of why you are not able to use Linux tools).

TRex is using DPDK, which replaces the Linux drivers (interrupt based drivers) with another set of drivers (PMD).
When you first start TRex we bind the configured interfaces to DPDK driver and pull out the Linux drivers.

This makes all Linux based tools uselss because the kernel is not aware of the NICs anymore.
(ifconfig, ping and etc.)

What Yaroslav suggested is that you pull out DPDK drivers and return the Linux based drivers - this will allow you
to use all the tools again.

We don't support having the interfaces both usable for TRex and visible from the kernel.
so you need to choose a mode.

Hopes this clarfies a bit.

Thanks,
Itay


For more options, visit https://groups.google.com/d/optout.



--
Itay Marom

selv...@gmail.com

unread,
Aug 24, 2016, 11:38:40 AM8/24/16
to TRex Traffic Generator, y.bru...@gmail.com, selv...@gmail.com
> > To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
>
> >
>
> > To post to this group, send email to trex...@googlegroups.com.
>
> >
>
> > To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/b27117f4-ed9c-441f-a839-68e94ae1d755%40googlegroups.com.
>
> >
>
> > For more options, visit https://groups.google.com/d/optout.
>
> >
>
> >
>
> >
>
> > --
>
> >
>
> >
>
> > HanohSent from my iPhone
>
>
>
> Hi,
>
>
>
> Thanks for your reply.
>
>
>
> Now I could able to install Trex in ubuntu VM which is in the openstack environment and the VM has 3 interfaces configured.
>
>
>
> configured the port and MAC details below
>
> nano /etc/trex_cfg.yaml
>
>
>
> After the configuration, ran the below command
>
>
>
> $ sudo ./t-rex-64 -f cap2/dns.yaml -d 100 -l 1000
>
>
>
> After this if i do ifconfig to check the interfaces i could not locate the details of two interface whose MAC address are configured in the trex_cfg.yaml file.
>
>
>
> the default gateway is also removed from the configuration (route -n)
>
>
>
> Since i am new to cisco trex, i could not figure out what is the issue here. Could you please help me on this.
>
>
>
> Thanks,
>
> Selvi.V
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
>
> To post to this group, send email to trex...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/8ebcb86f-7fd3-4f0c-8fa0-664ee708a7f1%40googlegroups.com.
>
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
>
> To post to this group, send email to trex...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/CAJysGCTo0_zNZSF7AqacLUPi%2Bag6b53fHhKVSVBdSuzHjp0wMQ%40mail.gmail.com.
>
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
> --
>
>
> Itay Marom

Hi,

Thanks for the detailed response.

Yes.. this what happening in my setup as well. Now I am having the below issues

1. Once cisco trex generates the packets, the packets are not reached to the router. Not even ping to that interface is working.

2.My openstack environment is like below

Ubuntu server with cisco trex <----> Neutron Router

The server and the router is connected with the single interface only. So the sending and receiving packets should happen only with that.

Can I configure cisco trex for this kind of setup?

When I looked into the manual it shows the below setup only

http://trex-tgn.cisco.com/trex/doc/images/trex_model.png.

3. Can i use cisco trex for the topology which has service function chain. IT will be like below

ubuntu server with cisco trex <--> router <--> firewall <--> IDS


Thanks,
Selvi.V

selv...@gmail.com

unread,
Aug 24, 2016, 5:19:29 PM8/24/16
to TRex Traffic Generator, y.bru...@gmail.com, selv...@gmail.com
Hi,

Adding to my previous questions,
4. Do we need to customize the dns.yaml / http_simple.yaml files as per our network details (Client and server ip, MAC address, etc.. has been given inside the file)

I am using the below commands to generate the traffic but not sure how to check whether the traffic is generated or not.

./t-rex-64 -f cap2/dns.yaml -d 100 -l 1000
./t-rex-64 -f cap2/http_simple.yaml -d 100 -l 1000 -m 1


Thanks,
Selvi.V
Reply all
Reply to author
Forward
0 new messages