Static MPLS configuration

Hello,

How can I statically configure the MPLS forwarding table?

I would like to program the following rules:

  • IP packet with dst 10.255.0.0/24 push label 1000 interface ether1

  • MPLS packet with label 2000 swap 3000 interface ether3

  • MPLS packet with label 4000 pop interface ether4

I have tried to play with local-binding and remote-binding without too much success :frowning:

OSPF is very easy to setup MPLS with LDP.

Do you have a specific reason why static label distribution is required?

Thank you for your answer :slight_smile:

I’m working on an SDN project and this is why I want to manually configure the forwarding table :slight_smile:

I just don’t understand why Mikrotik support RSVP-TE and LDP but not a simple static lsp :sweat_smile:

I’m also curious about this

For static LDP bindings to work, you also need static routes in routing table:

[admin@p3_450] /mpls local-bindings> print 
Flags: X - disabled, A - advertised, D - dynamic, 
L - local-route, G - gateway-route, e - egress 
 #      DST-ADDRESS        LABEL                       PEERS                     
 0   G  10.255.0.0/24      1000                       
 1   G  10.255.1.0/24      1113   
 [admin@p3_450] /mpls local-bindings> .. remote-bindings print 
Flags: X - disabled, A - active, D - dynamic 
 #    DST-ADDRESS        NEXTHOP         LABEL         PEER                      
 0 A  10.255.1.0/24      10.155.125.1    1111  
 [admin@p3_450] /ip route> print 
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 1 ADC  10.155.125.0/24    10.155.125.18   ether1                    0
 2 A S  10.255.0.0/24                      10.155.125.1              1
 3 A S  10.255.1.0/24                      10.155.125.1              1
 [admin@p3_450] /mpls forwarding-table> print 
Flags: H - hw-offload, L - ldp, V - vpls, T - traffic-eng 
 #    IN-LABEL     OUT-LABELS   DESTINATION                    IN NEXTHOP        
 0    expl-null   
 1  L 1000                      10.255.0.0/24                  et 10.155.125.1   
 2  L 1113         1111         10.255.1.0/24                  et 10.155.125.1