Saturday, July 10, 2021

SR-Policy configuration example

 

ISIS 配置

distribute link-state,将IGP的数据库导入SR-TE的数据库中。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
router isis 1
 is-type level-2-only
 net 49.0000.0000.0001.00
 distribute link-state
 address-family ipv4 unicast
  metric-style wide
  mpls traffic-eng level-2-only
  mpls traffic-eng router-id Loopback0
  segment-routing mpls
 !
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 1
  !
 !
SR-Policy 配置-显示路径
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
segment-routing
 traffic-eng
  segment-list SIDLIST1
   index 10 mpls label 16002
   index 20 mpls label 16004
   index 30 mpls label 16006
  !
  segment-list SIDLIST2
   index 10 address ipv4 10.1.3.3
   index 20 address ipv4 10.1.5.5
   index 30 address ipv4 10.1.6.6
  !
  policy POLICY1
   color 20 end-point ipv4 10.1.6.6
   candidate-paths
    preference 50
     explicit segment-list SIDLIST2
     !
    preference 100
     explicit segment-list SIDLIST1
 
  policy POLICY2
   color 40 end-point ipv4 10.1.6.6
   candidate-paths
    preference 100
     explicit segment-list SIDLIST2
Some command

#show segment-routing traffic-eng policy
#show segment-routing traffic-eng policy tabular
#show segment-routing traffic-eng policy private
#show segment-routing traffic-eng forwarding policy detail
#show segment-routing traffic-eng ipv4 topology <<<<

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
RP/0/0/CPU0:R1#show segment-routing traffic-eng policy
Tue Apr 21 11:00:24.054 UTC
 
SR-TE policy database
---------------------
 
Color: 20, End-point: 10.1.6.6
  Name: srte_c_20_ep_10.1.6.6
  Status:
    Admin: up  Operational: up for 02:14:58 (since Apr 21 08:45:26.009)
  Candidate-paths:
    Preference: 100 (configuration) (current)
      Name: POLICY1
      Requested BSID: dynamic
      Explicit: segment-list SIDLIST1 (valid)
        Weight: 1, Metric Type: TE
          16002 [Prefix-SID, 10.1.2.2]
          16004
          16006
    Preference: 50 (configuration)
      Name: POLICY1
      Requested BSID: dynamic
      Explicit: segment-list SIDLIST2 (invalid)
        Weight: 1, Metric Type: TE
  Attributes:
    Binding SID: 24006
    Forward Class: 0
    Steering BGP disabled: no
    IPv6 caps enable: yes
 
Color: 40, End-point: 10.1.6.6
  Name: srte_c_40_ep_10.1.6.6
  Status:
    Admin: up  Operational: up for 00:52:14 (since Apr 21 10:08:09.849)
  Candidate-paths:
    Preference: 100 (configuration) (current)
      Name: POLICY2
      Requested BSID: dynamic
      Explicit: segment-list SIDLIST2 (valid)
        Weight: 1, Metric Type: TE
          16003 [Prefix-SID, 10.1.3.3]
          16005 [Prefix-SID, 10.1.5.5]
          16006 [Prefix-SID, 10.1.6.6]
  Attributes:
    Binding SID: 24009
    Forward Class: 0
    Steering BGP disabled: no
    IPv6 caps enable: yes
           
RP/0/0/CPU0:R1#
RP/0/0/CPU0:R1#            show segment-routing traffic-eng ipv4 topology
Tue Apr 21 11:00:44.163 UTC
 
SR-TE topology database
-----------------------
 
Node 1
  TE router ID: 10.1.1.1
  Host name: R1
  ISIS system ID: 0000.0000.0001 level-2
  ISIS system ID: 0000.0000.0001 level-2
  Prefix SID:
    Prefix 10.1.1.1, label 16001 (regular)
 
  Link[0]: local address 10.1.13.1, remote address 10.1.13.1
    Local node:
      ISIS system ID: 0000.0000.0001 level-2
    Remote node:
      TE router ID: 10.1.1.1
      Host name: R1
      ISIS system ID: 0000.0000.0001 level-2
    Metric: IGP 10, TE 10
    Bandwidth: Total link 125000000, Reservable 0
    Admin-groups: 0x00000000
    Adj SID: 24003 (unprotected)
           
  Link[1]: local address 10.1.12.1, remote address 10.1.12.2
    Local node:
      ISIS system ID: 0000.0000.0001 level-2
    Remote node:
      TE router ID: 10.1.2.2
      Host name: R2
      ISIS system ID: 0000.0000.0002 level-2
    Metric: IGP 10, TE 10
    Bandwidth: Total link 125000000, Reservable 0
    Admin-groups: 0x00000000
    Adj SID: 24001 (unprotected)

No comments:

Post a Comment