Hi Neale,

After add the 'mpls local-label add non-eos 33 mpls-lookup-in-table 0 ' on P,  
the mistake still exist.

create host-interface name eth2 mac 00:0c:29:0f:e2:a8 
create host-interface name eth3 mac 00:0c:29:0f:e2:b2 
set interface state host-eth2 up 
set interface state host-eth3 up 
set interface ip address host-eth3 12.1.1.1/24 
mpls table add 0 
set interface mpls host-eth2 enable 
set interface mpls host-eth3 enable 
set interface ip address host-eth2 14.1.1.2/24 
create mpls tunnel out-label 60 via 12.1.1.2 host-eth3 
set interface state mpls-tunnel0 up 
sr mpls policy add bsid 33 next 60 
sr mpls steer l3 23.1.1.0/24 via sr policy bsid 33 
set interface mpls mpls-tunnel0 enable 
mpls local-label add non-eos 33 mpls-lookup-in-table 0           // local-label 
33/non-eos configured

the mistake is the same as before:
00:06:02:539782: af-packet-input 
af_packet: hw_if_index 1 next-index 4 
tpacket2_hdr: 
status 0x20000001 len 86 snaplen 86 mac 66 net 80 
sec 0x5a1e5992 nsec 0x193b68e0 vlan 0 
00:06:02:539813: ethernet-input 
MPLS: 00:0c:29:4d:af:a1 -> 00:0c:29:0f:e2:a8 
00:06:02:539869: mpls-input 
MPLS: next mpls-lookup[1] label 33 ttl 255 
00:06:02:539878: mpls-lookup 
MPLS: next [0], lookup fib index 0, LB index 25 hash 0 label 33 eos 0 
00:06:02:539889: error-drop 
mpls-input: MPLS DROP DPO

Is there any example on SR MPLS configuration  I can get?

Thanks,
Xyxue


 
From: Neale Ranns (nranns)
Date: 2017-11-28 20:29
To: 薛欣颖; Pablo Camarillo (pcamaril); vpp-dev
Subject: Re: [vpp-dev] SR MPLS not effective
Hi Xyxue,
 
Your trace says:
 
00:01:54:346249: mpls-lookup 
MPLS: next [0], lookup fib index 0, LB index 26 hash 0 label 33 eos 0 
 
so the packet required an MPLS lookup on label 33 non-eos. Your config has no 
local-label 33/non-eos configured, so the packet is dropped.
 
/neale
 
 
From: <vpp-dev-boun...@lists.fd.io> on behalf of 薛欣颖 <xy...@fiberhome.com>
Date: Tuesday, 28 November 2017 at 12:20
To: "Pablo Camarillo (pcamaril)" <pcama...@cisco.com>, vpp-dev 
<vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] SR MPLS not effective
 
 
Hi Pablo,

After hearing your advice, I modified my configuration on P:

create host-interface name eth2 mac 00:0c:29:0f:e2:a8 
create host-interface name eth3 mac 00:0c:29:0f:e2:b2 
set interface state host-eth2 up 
set interface state host-eth3 up 
set interface ip address host-eth3 12.1.1.1/24 
mpls table add 0 
set interface mpls host-eth2 enable 
set interface mpls host-eth3 enable 
set interface ip address host-eth2 14.1.1.2/24 
create mpls tunnel out-label 60 via 12.1.1.2 host-eth3 
set interface state mpls-tunnel0 up 
sr mpls policy add bsid 33 next 60                           //exchange the 
out-label to 60
sr mpls steer l3 23.1.1.0/24 via sr policy bsid 33        
set interface mpls mpls-tunnel0 enable

the trace info on P:
00:01:54:346199: af-packet-input 
af_packet: hw_if_index 1 next-index 4 
tpacket2_hdr: 
status 0x20000001 len 86 snaplen 86 mac 66 net 80 
sec 0x5a1d417b nsec 0xdffd3a9 vlan 0 
00:01:54:346226: ethernet-input 
MPLS: 00:0c:29:4d:af:a1 -> 00:0c:29:0f:e2:a8 
00:01:54:346243: mpls-input 
MPLS: next mpls-lookup[1] label 33 ttl 255 
00:01:54:346249: mpls-lookup 
MPLS: next [0], lookup fib index 0, LB index 26 hash 0 label 33 eos 0 
00:01:54:346259: error-drop 
mpls-input: MPLS DROP DPO 

The SR MPLS still not effctive. Is there any example on SR MPLS configuration?

Thanks,
Xyxue


 
From: Pablo Camarillo (pcamaril)
Date: 2017-11-28 18:16
To: 薛欣颖; vpp-dev
Subject: Re: [vpp-dev] SR MPLS not effective
Hi Xyxue,
 
Could you please explain what you want to achieve with this config? Where do 
you want to start your SR policy? 
None of the configs that you described below for P will work.  
 
In the case #1 you are creating a SR policy with BSID 33. Then for any packet 
with incoming label 33 you will push the SID list of the SR policy. However, 
you are also creating an mpls local-label for 33 as well which you do not need.
On top of that, you are configuring the SR policy with SID list < 60 >, but you 
have not set a local-label/route for 60. Hence packet will be dropped.
 
Thanks.
 
Cheers,
Pablo.
 
From: <vpp-dev-boun...@lists.fd.io> on behalf of 薛欣颖 <xy...@fiberhome.com>
Date: Tuesday, 28 November 2017 at 08:08
To: vpp-dev <vpp-dev@lists.fd.io>
Subject: [vpp-dev] SR MPLS not effective
 
 
Hi guys,

I have tried every configuration I can guess. The sr mpls still not effective 
on my vpp.
Can you give me an effective configuration, or can you help figure out the 
error in my configuration?

PE1 - P - PE2

PE1 configuration:
  create host-interface name eth4 mac 00:0c:29:4d:af:b5
  create host-interface name eth2 mac 00:0c:29:4d:af:a1
  set interface state host-eth2 up
  set interface state host-eth4 up
  set interface ip table host-eth4 1
  set interface ip address host-eth2 14.1.1.1/24
  set interface ip address host-eth4 21.1.1.1/24
  create mpls tunnel out-label 33 out-label 53 via 14.1.1.2 host-eth2
  set interface state mpls-tunnel0 up
  mpls table add 0
  set interface mpls host-eth2 enable
  ip route add 23.1.1.1/24 via interface mpls-tunnel0 table 1
  mpls local-label add eos 1053 ip4-lookup-in-table 1
  mpls local-label add non-eos 1060 mpls-lookup-in-table 0

PE2 configuration:
  create host-interface name eth3 mac 00:0c:29:19:8e:76
  create host-interface name eth5 mac 00:0c:29:19:8e:8a
  set interface state host-eth3 up
  set interface state host-eth5 up
  set interface ip address host-eth3 12.1.1.2/24
  set interface ip table host-eth5 1
  set interface ip address host-eth5 23.1.1.1/24
  mpls table add 0
  mpls table add 1
  mpls local-label add non-eos 60 mpls-lookup-in-table 0
  mpls local-label add eos 53 ip4-lookup-in-table 1
  set interface mpls host-eth5 enable
  set interface mpls host-eth3 enable
  create mpls tunnel out-label 1023 out-label 1053 via 12.1.1.1 host-eth3
  set interface state mpls-tunnel0 up
  ip route add 21.1.1.0/24 via interface mpls-tunnel0 table 1
  
P configuration:
(only modify the configuration on P)
1. drop packet.(when decap outer label,can't encap outer label) the 
configuration and trace is following:
 create host-interface name eth2 mac 00:0c:29:0f:e2:a8
  create host-interface name eth3 mac 00:0c:29:0f:e2:b2
  set interface state host-eth2 up
  set interface state host-eth3 up
  set interface ip address host-eth3 12.1.1.1/24
  mpls table add 0
  mpls table add 1
  set interface mpls host-eth2 enable
  set interface mpls host-eth3 enable
  mpls local-label add non-eos 33 mpls-lookup-in-table 0
  set interface ip address host-eth2 14.1.1.2/24
  mpls local-label add eos 53 ip4-lookup-in-table 0
  mpls local-label add eos 1053 ip4-lookup-in-table 0
  mpls local-label add non-eos 1023 mpls-lookup-in-table 0
  sr mpls policy add bsid 33 next 60
  
  00:08:35:510564: af-packet-input
  af_packet: hw_if_index 1 next-index 4
    tpacket2_hdr:
      status 0x20000001 len 86 snaplen 86 mac 66 net 80
      sec 0x5a1cbe94 nsec 0x1ea50e69 vlan 0
00:08:35:510591: ethernet-input
  MPLS: 00:0c:29:4d:af:a1 -> 00:0c:29:0f:e2:a8
00:08:35:510650: mpls-input
  MPLS: next mpls-lookup[1]  label 33 ttl 255
00:08:35:510657: mpls-lookup
  MPLS: next [0], lookup fib index 0, LB index 26 hash 0 label 33 eos 0
00:08:35:510666: error-drop
  mpls-input: MPLS DROP DPO
  
2.replace 'sr mpls policy add bsid 33 next 60' with 'sr mpls policy add bsid 
4001 next 60'. the trace info is following:
00:15:38:655991: af-packet-input                                                
                                                                                
                
  af_packet: hw_if_index 1 next-index 4                                         
                                                                                
                
    tpacket2_hdr:                                                               
                                                                                
                
      status 0x20000001 len 86 snaplen 86 mac 66 net 80                         
                                                                                
                
      sec 0x5a1cc03b nsec 0x1225fbd8 vlan 0                                     
                                                                                
                
00:15:38:656023: ethernet-input                                                 
                                                                                
                
  MPLS: 00:0c:29:4d:af:a1 -> 00:0c:29:0f:e2:a8                                  
                                                                                
                
00:15:38:656089: mpls-input                                                     
                                                                                
                
  MPLS: next mpls-lookup[1]  label 33 ttl 255                                   
                                                                                
                
00:15:38:656100: mpls-lookup                                                    
                                                                                
                
  MPLS: next [6], lookup fib index 0, LB index 26 hash 0 label 33 eos 0         
                                                                                
                
00:15:38:656130: lookup-mpls-dst                                                
                                                                                
                
     fib-index:0 hdr:[53:255:0:eos] load-balance:31                             
                                                                                
                
00:15:38:656137: ip4-mpls-label-disposition                                     
                                                                                
                
  disp:0                                                                        
                                                                                
                
00:15:38:656144: lookup-ip4-dst                                                 
                                                                                
                
     fib-index:0 addr:23.1.1.5 load-balance:1                                   
                                                                                
                
00:15:38:656151: ip4-drop                                                       
                                                                                
                
    ICMP: 21.1.1.5 -> 23.1.1.5                                                  
                                                                                
                
      tos 0x00, ttl 63, length 64, checksum 0x4db1                              
                                                                                
                
      fragment id 0x0001                                                        
                                                                                
                
    ICMP echo_request checksum 0x5f5d                                           
                                                                                
                
00:15:38:656160: error-drop                                                     
                                                                                
                
  ip4-mpls-label-disposition: valid ip4 packets 
  
3.add the mpls tunnel configuration, remove static routing configuration, the 
configuration and trace is following:
create host-interface name eth2 mac 00:0c:29:0f:e2:a8
  create host-interface name eth3 mac 00:0c:29:0f:e2:b2
  set interface state host-eth2 up
  set interface state host-eth3 up
  set interface ip address host-eth3 12.1.1.1/24
  mpls table add 0
  mpls table add 1
  set interface mpls host-eth2 enable
  set interface mpls host-eth3 enable
  mpls local-label add non-eos 33 mpls-lookup-in-table 0
  set interface ip address host-eth2 14.1.1.2/24
  mpls local-label add eos 53 ip4-lookup-in-table 0
  mpls local-label add eos 1053 ip4-lookup-in-table 0
  mpls local-label add non-eos 1023 mpls-lookup-in-table 0
  sr mpls policy add bsid 4001 next 60
  create mpls tunnel out-label 60 out-label 53 via 12.1.1.2 host-eth3
  set interface state mpls-tunnel0 up
  
  00:05:36:319144: af-packet-input
  af_packet: hw_if_index 1 next-index 4
    tpacket2_hdr:
      status 0x20000001 len 86 snaplen 86 mac 66 net 80
      sec 0x5a1cfd63 nsec 0x1dabd081 vlan 0
00:05:36:319169: ethernet-input
  MPLS: 00:0c:29:4d:af:a1 -> 00:0c:29:0f:e2:a8
00:05:36:319225: mpls-input
  MPLS: next mpls-lookup[1]  label 33 ttl 255
00:05:36:319231: mpls-lookup
  MPLS: next [6], lookup fib index 0, LB index 26 hash 0 label 33 eos 0
00:05:36:319238: lookup-mpls-dst
     fib-index:0 hdr:[53:255:0:eos] load-balance:31
00:05:36:319243: ip4-mpls-label-disposition
  disp:0
00:05:36:319249: lookup-ip4-dst
     fib-index:0 addr:23.1.1.5 load-balance:1
00:05:36:319254: ip4-drop
    ICMP: 21.1.1.5 -> 23.1.1.5
      tos 0x00, ttl 63, length 64, checksum 0x4db1
      fragment id 0x0001
    ICMP echo_request checksum 0x5f5d
00:05:36:319260: error-drop
  ip4-mpls-label-disposition: valid ip4 packets

4.only decap the outer label, enable mpls tunnel only one label:
  create host-interface name eth2 mac 00:0c:29:0f:e2:a8
  create host-interface name eth3 mac 00:0c:29:0f:e2:b2
  set interface state host-eth2 up
  set interface state host-eth3 up
  set interface ip address host-eth3 12.1.1.1/24
  mpls table add 0
  mpls table add 1
  set interface mpls host-eth2 enable
  set interface mpls host-eth3 enable
  mpls local-label add non-eos 33 mpls-lookup-in-table 0
  set interface ip address host-eth2 14.1.1.2/24
  create mpls tunnel out-label 60 via 12.1.1.2 host-eth3
  sr mpls policy add bsid 4001 next 60
  set interface state mpls-tunnel0 up
  
  00:06:13:222299: af-packet-input                                              
                                                                                
                  
  af_packet: hw_if_index 1 next-index 4                                         
                                                                                
                
    tpacket2_hdr:                                                               
                                                                                
                
      status 0x20000001 len 86 snaplen 86 mac 66 net 80                         
                                                                                
                
      sec 0x5a1cce7a nsec 0x228cce67 vlan 0                                     
                                                                                
                
00:06:13:222341: ethernet-input                                                 
                                                                                
                
  MPLS: 00:0c:29:4d:af:a1 -> 00:0c:29:0f:e2:a8                                  
                                                                                
                
00:06:13:222441: mpls-input                                                     
                                                                                
                
  MPLS: next mpls-lookup[1]  label 33 ttl 255                                   
                                                                                
                
00:06:13:222456: mpls-lookup                                                    
                                                                                
                
  MPLS: next [6], lookup fib index 0, LB index 26 hash 0 label 33 eos 0         
                                                                                
                
00:06:13:222471: lookup-mpls-dst                                                
                                                                                
                
     fib-index:0 hdr:[53:255:0:eos] load-balance:13                             
                                                                                
                
00:06:13:222485: error-drop                                                     
                                                                                
                
  mpls-input: MPLS DROP DPO  
  
Thanks,
xyxue

  


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

Reply via email to