Hi John,

The description of 'set interface l2 xcrw' in docs is that 'Add or delete a 
Layer 2 to Layer 3 rewrite cross-connect'.
After put the gre tunnel in l2 mode , there is a 'Layer 2 to Layer 2 rewrite 
cross-connect'. Is there anything wrong in my comprehension?

Thanks,
Xyxue


 
From: John Lo (loj)
Date: 2018-05-15 20:32
To: 薛欣颖; Neale Ranns (nranns); vpp-dev
Subject: Re: [vpp-dev] problem in xcrw testing
The GRE tunnel needs to be put in L2 mode so it can be a valid l2-output 
interface. You can do that by putting the GRE tunnel into a bridge domain, or 
xconnect it to peer interface:
 
vpp# set int l2  bri ?
  set interface l2 bridge                  set interface l2 bridge <interface> 
<bridge-domain-id> [bvi] [shg]
vpp# set int l2 xconnect ?
  set interface l2 xconnect                set interface l2 xconnect 
<interface> <peer interface>
 
Regards,
John
 
From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of xyxue
Sent: Tuesday, May 15, 2018 8:10 AM
To: Neale Ranns (nranns) <nra...@cisco.com>; vpp-dev <vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] problem in xcrw testing
 
 
Hi Neale,
 
After I changed my configuration (the configuration and the trace info is shown 
below) 
 
create host-interface name eth1 mac 00:50:56:3a:32:d2 
create host-interface name eth5 mac 00:50:56:31:35:92
set interface ip address host-eth1 11.1.1.2/24
create gre tunnel src 11.1.1.2 dst 11.1.1.1 teb
set interface l2 xcrw host-eth5 next teb-gre0-output rw 
4500005800000000fd2fa5720b0101020b01010100006558


VPP# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:01:18:847131: af-packet-input
  af_packet: hw_if_index 2 next-index 4
    tpacket2_hdr:
      status 0x20000001 len 78 snaplen 78 mac 66 net 80
      sec 0x5afaa73c nsec 0x2c4032d7 vlan 0
00:01:18:847197: ethernet-input
  IP4: 00:50:56:c0:00:05 -> 00:50:56:c0:00:04
00:01:18:847305: l2-input
  l2-input: sw_if_index 2 dst 00:50:56:c0:00:04 src 00:50:56:c0:00:05
00:01:18:847323: l2-output
  l2-output: sw_if_index 4 dst 00:50:56:c0:00:04 src 00:50:56:c0:00:05 data 08 
00 45 01 00 40 00 01 00 00 40 01
00:01:18:847336: error-drop
  l2-output: L2 Output interface not valid


It doesn't seem to be in effect. Is there something I missed?


Thanks,
Xyxue


 
From: Neale Ranns
Date: 2018-05-15 15:58
To: 薛欣颖; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] problem in xcrw testing
Hi Xyxue,
 
The GRE tunnel needs to be in L2 mode, which in the case of GRE is known as 
‘transparent ethernet bridging’. So:
  create gre tunnel src 11.1.1.2 dst 11.1.1.1 teb
 
/neale


 
 
From: <vpp-dev@lists.fd.io> on behalf of xyxue <xy...@fiberhome.com>
Date: Tuesday, 15 May 2018 at 08:50
To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io>
Subject: [vpp-dev] problem in xcrw testing
 
 
Hi guys,

I’m testing the xcrw . But the packet were 'error-drop'. My configuration and 
trace info is shown below:

create host-interface name eth1 mac 00:50:56:3a:32:d2 
create host-interface name eth5 mac 00:50:56:31:35:92
set interface ip address host-eth1 11.1.1.2/24
create gre tunnel src 11.1.1.2 dst 11.1.1.1
set interface ip address gre0 100.1.1.2/24
VPP# set interface l2 xcrw host-eth5 next gre4-input rw 
4500005800000000fd2fa5720b0101020b01010100006558
VPP# set interface l2 xcrw xcrw0 next host-eth1-output rw 1234

VPP# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:00:22:692356: af-packet-input
  af_packet: hw_if_index 2 next-index 4
    tpacket2_hdr:
      status 0x20000001 len 78 snaplen 78 mac 66 net 80
      sec 0x5af559c7 nsec 0x8bb04a9 vlan 0
00:00:22:692493: ethernet-input
  IP4: 00:50:56:c0:00:05 -> 00:50:56:31:35:92
00:00:22:692706: l2-input
  l2-input: sw_if_index 2 dst 00:50:56:31:35:92 src 00:50:56:c0:00:05
00:00:22:692724: l2-output
  l2-output: sw_if_index 4 dst 00:50:56:31:35:92 src 00:50:56:c0:00:05 data 08 
00 45 01 00 40 00 01 00 00 40 01
00:00:22:692737: l2-xcrw
  L2_XCRW: next index 1 tx_fib_index -1
00:00:22:692753: gre4-input
  GRE: tunnel 0 len 88 src 11.1.1.2 dst 11.1.1.1
00:00:22:692771: error-drop
  gre4-input: GRE input packets dropped due to missing tunnel
  
Is there any problem in my configuration?
  
Thanks,
Xyxue



Reply via email to