Hi John,
I changed my configuration to that 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 l3 host-eth1
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 gre-output rw
4500005800000000fd2fa5720b0101020b01010100006558
create bridge-domain 1
set interface l2 bridge teb-gre0 1
set interface l2 bridge xcrw0 1
There is an assert :
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6f30e72 in gre_interface_tx_inline (vm=0x7ffff791d1a0
<vlib_global_main>, node=0x7fffb6c87600, frame=0x7fffb676fbc0) at
/home/vpp/build-data/../src/vnet/gre/gre.c:366
366 hw = vnet_get_hw_interface (vnm, sw->hw_if_index);
(gdb) bt
#0 0x00007ffff6f30e72 in gre_interface_tx_inline (vm=0x7ffff791d1a0
<vlib_global_main>, node=0x7fffb6c87600, frame=0x7fffb676fbc0) at
/home/vpp/build-data/../src/vnet/gre/gre.c:366
#1 0x00007ffff6f3126b in gre_interface_tx (vm=0x7ffff791d1a0
<vlib_global_main>, node=0x7fffb6c87600, frame=0x7fffb676fbc0) at
/home/vpp/build-data/../src/vnet/gre/gre.c:412
#2 0x00007ffff769b2aa in dispatch_node (vm=0x7ffff791d1a0 <vlib_global_main>,
node=0x7fffb6c87600, type=VLIB_NODE_TYPE_INTERNAL,
dispatch_state=VLIB_NODE_STATE_POLLING,
frame=0x7fffb676fbc0, last_time_stamp=35926090675277) at
/home/vpp/build-data/../src/vlib/main.c:1010
#3 0x00007ffff769b88d in dispatch_pending_node (vm=0x7ffff791d1a0
<vlib_global_main>, pending_frame_index=4, last_time_stamp=35926090675277)
at /home/vpp/build-data/../src/vlib/main.c:1160
#4 0x00007ffff769daa4 in vlib_main_or_worker_loop (vm=0x7ffff791d1a0
<vlib_global_main>, is_main=1) at /home/vpp/build-data/../src/vlib/main.c:1630
#5 0x00007ffff769db53 in vlib_main_loop (vm=0x7ffff791d1a0 <vlib_global_main>)
at /home/vpp/build-data/../src/vlib/main.c:1649
#6 0x00007ffff769e2ad in vlib_main (vm=0x7ffff791d1a0 <vlib_global_main>,
input=0x7fffb5704fb0) at /home/vpp/build-data/../src/vlib/main.c:1806
#7 0x00007ffff76e0d64 in thread0 (arg=140737346916768) at
/home/vpp/build-data/../src/vlib/unix/main.c:617
#8 0x00007ffff6927560 in clib_calljmp () at
/home/vpp/build-data/../src/vppinfra/longjmp.S:128
#9 0x00007fffffffd350 in ?? ()
#10 0x00007ffff76e1223 in vlib_unix_main (argc=31, argv=0x653800) at
/home/vpp/build-data/../src/vlib/unix/main.c:682
#11 0x0000000000406202 in main (argc=31, argv=0x653800) at
/home/vpp/build-data/../src/vpp/vnet/main.c:241
(gdb)
Is there any examples about xcrw ? Is there any configuration I missed?
Thanks,
Xyxue
From: John Lo (loj)
Date: 2018-05-16 16:02
To: 薛欣颖; Neale Ranns (nranns); vpp-dev
Subject: Re: [vpp-dev] problem in xcrw testing
Hi Xyxue,
The L2 cross connect CLI via either xconnect or xcrw would put the source/input
interface into L2 mode and setup an one-directional cross connect to the
specified peer/output interface. The expectation is there should be a
xcrw/cross connect CLI for the other direction specifying the other interface
as source/input so it will also be in L2 mode.
Hope this help, with regards,
John
From: 薛欣颖 <[email protected]>
Sent: Wednesday, May 16, 2018 3:46 AM
To: John Lo (loj) <[email protected]>; Neale Ranns (nranns) <[email protected]>;
vpp-dev <[email protected]>
Subject: Re: Re: [vpp-dev] problem in xcrw testing
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: [email protected] <[email protected]> On Behalf Of xyxue
Sent: Tuesday, May 15, 2018 8:10 AM
To: Neale Ranns (nranns) <[email protected]>; vpp-dev <[email protected]>
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: 薛欣颖; [email protected]
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: <[email protected]> on behalf of xyxue <[email protected]>
Date: Tuesday, 15 May 2018 at 08:50
To: "[email protected]" <[email protected]>
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