Hi Yu,

create and configure the interface:

  DBGvpp# create sub-interface  af_packet0 100
  DBGvpp# set int state af_packet0.100 up

  DBGvpp# set int ip addr af_packet0.100 172.16.3.1/24

  DBGvpp# set ip arp af_packet0.100 172.16.3.2 00:00:11:aa:bb:cc


add a route through the sub-interface

  DBGvpp# ip route add 1.1.1.1/32 via 172.16.3.2 af_packet0.100


send ping traffic to match the route through the sub-interface (i'm using linux 
net-namespaces)

  vagrant@localhost:/vpp$ sudo ip netns exec vpp1 ping 1.1.1.1


capture

  vagrant@localhost:~$ sudo tcpdump -e -i vpp1

  01:31:05.746543 02:fe:52:7d:4e:13 (oui Unknown) > 00:00:11:aa:bb:cc (oui 
Unknown), ethertype 802.1Q (0x8100), length 102: vlan 100, p 0, ethertype IPv4, 
172.16.1.2 > 1.1.1.1: ICMP echo request, id 7008, seq 133, length 64


hth,

neale


________________________________
From: [email protected] <[email protected]> on behalf of yu 
scott <[email protected]>
Sent: 28 October 2016 08:46
To: [email protected]
Subject: [vpp-dev] about vlan tag

Hi all
I want to send packet with tag from vpp sub interface which created by "create 
sub-interface  af_packet0 100 "

ping outside_int from sub interface, tcpdump in outside_int .

But I can't see vlan tag in pcap captured by tcpdump.

How to send packet from sub interface with vlan tag like linux vocnfig create 
interface?

Thx

Best Begards



_______________________________________________
vpp-dev mailing list
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to