Hi neale,
thanks for you reply. It can work now.
Could you tell me  why need "set ip arp af_packet0.100 172.16.3.2
00:00:11:aa:bb:cc" and "ip route add 1.1.1.1/32 via 172.16.3.2
af_packet0.100"?
what is it theory?

Best Begards

2016-10-28 16:39 GMT+08:00 Neale Ranns (nranns) <nra...@cisco.com>:

> 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:* vpp-dev-boun...@lists.fd.io <vpp-dev-boun...@lists.fd.io> on
> behalf of yu scott <yy316953...@gmail.com>
> *Sent:* 28 October 2016 08:46
> *To:* vpp-dev@lists.fd.io
> *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
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to