Hi Pablo,
My configuration and the trace info is shown below:
VPP1:
create host-interface name eth0 mac 00:0c:29:4d:af:8d
  create host-interface name eth4 mac 00:0c:29:4d:af:b5
  set interface state host-eth0 up
  set interface state host-eth4 up
  enable ip6 interface host-eth0
  set interface ip address host-eth0 a::1/64
  enable ip6 interface host-eth4
  set interface ip address host-eth4 2001::1/64
  create loopback interface instance 0
  set interface state loop0 up
  set interface ip address loop0 1::1/128
  ip route add 2::2/128 via ip6-address a::2  host-eth0
  ip route add 3::3/128 via ip6-address a::2  host-eth0
  ip route add b::1/64 via ip6-address a::2  host-eth0
  set sr encaps source addr 1::1       
  sr policy add bsid 1::1:999 next 2::2 next 3::3  
  sr steer l3 2003::1/64 via sr policy bsid 1::1:999   
 
trace:
02:01:10:720008: af-packet-input
  af_packet: hw_if_index 3 next-index 4
    tpacket2_hdr:
      status 0x20000001 len 98 snaplen 98 mac 66 net 80
      sec 0x5a571037 nsec 0x28091fb7 vlan 0
02:01:10:720040: ethernet-input
  IP6: 00:22:12:66:00:33 -> 00:0c:29:4d:af:b5
02:01:10:720068: ip6-input
  ICMP6: 2001::5 -> 2003::5
    tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720075: ip6-lookup
  fib 0 dpo-idx 35 flow hash: 0x00000000
  ICMP6: 2001::5 -> 2003::5
    tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720085: ip6-load-balance
  fib 0 dpo-idx 35 flow hash: 0x00000000
  ICMP6: 2001::5 -> 2003::5       
    tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720089: sr-pl-rewrite-encaps    
  SR-policy-rewrite: src 1::1 dst 2::2
02:01:10:720096: ip6-lookup
  fib 0 dpo-idx 9 flow hash: 0x00000000
  IPV6_ROUTE: 1::1 -> 2::2
    tos 0x00, flow label 0x0, hop limit 64, payload length 140
02:01:10:720097: ip6-rewrite
  tx_sw_if_index 1 adj-idx 9 : ipv6 via a::2 host-eth0: 
000c29198e58000c294daf8d86dd flow hash: 0x00000000
  00000000: 000c29198e58000c294daf8d86dd60000000008c2b3f00010000000000000000
  00000020: 0000000000010002000000000000000000000000000229060402020000002003
  00000040: 0000000000000000000000000005000300000000000000000000000000030002
  00000060: 000000000000000000000000000260000000002c3a3f200100000000
02:01:10:720103: host-eth0-output
  host-eth0
  IP6: 00:0c:29:4d:af:8d -> 00:0c:29:19:8e:58
  IPV6_ROUTE: 1::1 -> 2::2
    tos 0x00, flow label 0x0, hop limit 63, payload length 140



VPP2:
  create host-interface name eth0 mac 00:0c:29:19:8e:58
  create host-interface name eth2 mac 00:0c:29:19:8e:6c
  set interface state host-eth0 up
  set interface state host-eth2 up
  enable ip6 interface host-eth0
  enable ip6 interface host-eth2
  set interface ip address host-eth0 a::2/64
  set interface ip address host-eth2 b::1/64
  create loopback interface instance 0
  set interface state loop0 up
  set interface ip address loop0 2::2/128
  ip route add 1::1/128 via ip6-address a::1  host-eth0
  ip route add 3::3/128 via ip6-address b::2  host-eth2
  sr localsid address 2::2 behavior end   


trace:
00:08:01:715943: af-packet-input 
af_packet: hw_if_index 1 next-index 4 
tpacket2_hdr: 
status 0x20000001 len 178 snaplen 178 mac 66 net 80 
sec 0x5a571fb9 nsec 0x2c338c0a vlan 0 
00:08:01:715969: ethernet-input 
IP6: 00:0c:29:4d:af:8d -> 00:0c:29:19:8e:58 
00:08:01:716017: ip6-input 
IPV6_ROUTE: 1::1 -> 2::2 
tos 0x00, flow label 0x0, hop limit 63, payload length 124 
00:08:01:716022: ip6-lookup 
fib 0 dpo-idx 13 flow hash: 0x00000000 
IPV6_ROUTE: 1::1 -> 2::2 
tos 0x00, flow label 0x0, hop limit 63, payload length 124 
00:08:01:716030: ip6-local 
IPV6_ROUTE: 1::1 -> 2::2 
tos 0x00, flow label 0x0, hop limit 63, payload length 124 
00:08:01:716037: ip6-punt 
IPV6_ROUTE: 1::1 -> 2::2 
tos 0x00, flow label 0x0, hop limit 63, payload length 124 
00:08:01:716044: error-punt 
ip6-input: unknown ip protocol

VPP3:
create host-interface name eth2 mac 00:0c:29:a6:67:7c
  create host-interface name eth5 mac 00:0c:29:a6:67:9a
  set interface state host-eth2 up
  set interface state host-eth5 up
  enable ip6 interface host-eth2
  enable ip6 interface host-eth5
  set interface ip address host-eth2 b::2/64
  set interface ip address host-eth5 2003::1/64
  create loopback interface instance 0
  set interface state loop0 up
  set interface ip address loop0 3::3/128
  ip route add 2::2/128 via ip6-address b::1  host-eth2
  ip route add 1::1/128 via ip6-address b::1  host-eth2
  ip route add a::1/64 via ip6-address b::1  host-eth2

Thanks,
Xyxue

From: Pablo Camarillo (pcamaril)
Date: 2018-01-12 15:56
To: 薛欣颖; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] problem in SRV6
Hi Xyxue,
 
What is your entire config at VPP2?  Looks like a misconfiguration in VPP2.
 
Thanks,
Pablo.
 
 
From: <vpp-dev-boun...@lists.fd.io> on behalf of 薛欣颖 <xy...@fiberhome.com>
Date: Friday, 12 January 2018 at 02:04
To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io>
Subject: [vpp-dev] problem in SRV6
 
 
Hi guys,

I'm testing SRV6 ,there is a problem: the packet was dropped  in the vpp2. More 
info and the configuration is shown below:

TC1-VPP1-VPP2-VPP3-TC2

VPP1:
the host-eth1、host-eth2 ipv6 address 1::1 、 2::2, create a loop int 3::3 , add 
the static routing.
  set sr encaps source addr 1::1       
  sr policy add bsid 1::1:999 next 2::2 next 3::3   
  sr steer l3 2003::1/64 via sr policy bsid 1::1:999 
  
VPP# show sr policies 
SR policies: 
[0].- BSID: 1::1:999 
Behavior: Encapsulation 
Type: Default 
FIB table: 0 
Segment Lists: 
[0].- < 2::2, 3::3 > weight: 1

The packet DIP = 2003::5 could match the sr, the trace info is correct.

VPP2:
sr localsid address 2::2 behavior end

trace info:
00:08:01:715943: af-packet-input 
af_packet: hw_if_index 1 next-index 4 
tpacket2_hdr: 
status 0x20000001 len 178 snaplen 178 mac 66 net 80 
sec 0x5a571fb9 nsec 0x2c338c0a vlan 0 
00:08:01:715969: ethernet-input 
IP6: 00:0c:29:4d:af:8d -> 00:0c:29:19:8e:58 
00:08:01:716017: ip6-input 
IPV6_ROUTE: 1::1 -> 2::2 
tos 0x00, flow label 0x0, hop limit 63, payload length 124 
00:08:01:716022: ip6-lookup 
fib 0 dpo-idx 13 flow hash: 0x00000000 
IPV6_ROUTE: 1::1 -> 2::2 
tos 0x00, flow label 0x0, hop limit 63, payload length 124 
00:08:01:716030: ip6-local 
IPV6_ROUTE: 1::1 -> 2::2 
tos 0x00, flow label 0x0, hop limit 63, payload length 124 
00:08:01:716037: ip6-punt 
IPV6_ROUTE: 1::1 -> 2::2 
tos 0x00, flow label 0x0, hop limit 63, payload length 124 
00:08:01:716044: error-punt 
ip6-input: unknown ip protocol

Is there any problem in my configuration? 

Thanks,
Xyxue


_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to