Posted on October 26, 2017 9:18 pm
 |  Asked by Nathan Hancock
 |  995 views
RESOLVED
0
0
Print Friendly, PDF & Email

Hello All!

I am attempting to perform a tcpdump on an SVI assigned to a non-default VRF.  When I drop to the Arista Bash CLI and run the ‘ifconfig’ command, I do not see the SVI listed.  I do not see any interface or SVI assigned to a non-default VRF in the list.

Does anyone know how I would view ifconfig details on interfaces assigned to VRFs?

My gear is:
Arista DCS-7050SX-128-F
Software image version: 4.17.1F

2
Posted by Aesha Parikh
Answered on October 26, 2017 9:35 pm

Hi Nathan, 

There are two ways to do it. 

1. You can change the routing-context and then enter bash

SW(config)#routing-context vrf mgmt
SW(config)#bash
Arista Networks EOS shell
[admin@Leaf-1 ~]$ ifconfig

 

2. You can enter bash from the default vrf and run bash commands as below

         sudo ip netns exec ns-<vrf name> bash tcpdump -i vlan3
         sudo ip netns exec ns-<vrf name> bash ifconfig

 

 

0
Posted by Nathan Hancock
Answered on February 16, 2018 5:12 pm

Thanks Aesha,

I used solution 1 you posted and it worked perfectly.  Thank you.

When I tried solution 2, I get an error message.

[nate@leaf2a ~]$ sudo ip netns exec ns-Business bash tcpdump -i vlan51
arp/usr/sbin/tcpdump: /usr/sbin/tcpdump: cannot execute binary file

Any idea why I might be seeing that error?

 

 

0
Posted by Aesha Parikh
Answered on March 2, 2018 8:00 pm

Hi Nathan,

Sorry I mistyped the command in solution 2. You do not need bash keyword there. 

The correct ones are

sudo ip netns exec ns-<vrf name> tcpdump -i vlan3
sudo ip netns exec ns-<vrf name> ifconfig

 

0
Posted by Xin (Kevin) Wang
Answered on March 2, 2018 8:02 pm
Hi Nathan,

You need give a option “-c” if you want to execute the bash command in single line.

bash-4.3# sudo ip netns exec ns-mgt  bash  -c ifconfig

Or you can try this:

bash-4.3# sudo ip netns exec ns-mgt bash

bash-4.3# ifconfig

BR//Kevin

Post your Answer

You must be logged in to post an answer.