其他分享
首页 > 其他分享> > IBGP Segment Routing AIGP属性

IBGP Segment Routing AIGP属性

作者:互联网

 

本文只是配置实例,并非实际应用场景,在实际场景用同级别RR之间应为full-mesh连接方式。

 1 RP/0/0/CPU0:R1#show run
 2 Thu Nov 26 14:20:19.667 UTC
 3 Building configuration...
 4 !! IOS XR Configuration 6.1.3
 5 !! Last configuration change at Thu Nov 26 13:59:27 2020 by admin
 6 !
 7 hostname R1
 8 line console
 9  exec-timeout 0 0
10 !
11 interface Loopback0
12  ipv4 address 1.1.1.1 255.255.255.255
13 !
14 interface MgmtEth0/0/CPU0/0
15  shutdown
16 !
17 interface GigabitEthernet0/0/0/0
18  ipv4 address 13.1.1.1 255.255.255.0
19 !
20 interface GigabitEthernet0/0/0/1
21  ipv4 address 14.1.1.1 255.255.255.0
22 !
23 route-policy SID($SID)
24   set label-index $SID
25 end-policy
26 !
27 route-policy AIGP($METRIC)
28   set aigp-metric + $METRIC
29   pass
30 end-policy
31 !
32 router static
33  address-family ipv4 unicast
34   13.1.1.3/32 GigabitEthernet0/0/0/0
35   14.1.1.4/32 GigabitEthernet0/0/0/1
36  !
37 !
38 router bgp 1
39  bgp router-id 1.1.1.1
40  mpls activate
41   interface GigabitEthernet0/0/0/0
42   interface GigabitEthernet0/0/0/1
43  !
44  ibgp policy out enforce-modifications
45  address-family ipv4 unicast
46   maximum-paths ibgp 16
47   network 1.1.1.1/32 route-policy SID(1)
48   allocate-label all
49  !
50  address-family vpnv4 unicast
51   retain route-target all
52  !
53  neighbor-group rr-client
54   cluster-id 12
55   address-family ipv4 labeled-unicast
56    route-reflector-client
57    route-policy AIGP(10) out
58    next-hop-self
59   !
60  !
61  neighbor 5.5.5.5
62   remote-as 1
63   update-source Loopback0
64   address-family vpnv4 unicast
65    route-reflector-client
66   !
67  !
68  neighbor 8.8.8.8
69   remote-as 1
70   update-source Loopback0
71   address-family vpnv4 unicast
72    route-reflector-client
73   !
74  !
75  neighbor 13.1.1.3
76   remote-as 1
77   use neighbor-group rr-client
78  !
79  neighbor 14.1.1.4
80   remote-as 1
81   use neighbor-group rr-client
82  !
83 !
84 segment-routing
85  global-block 16000 23999
86 !
87 end
 1 RP/0/0/CPU0:R2#show run
 2 Thu Nov 26 14:22:51.776 UTC
 3 Building configuration...
 4 !! IOS XR Configuration 6.1.3
 5 !! Last configuration change at Thu Nov 26 13:59:44 2020 by admin
 6 !
 7 hostname R2
 8 line console
 9  exec-timeout 0 0
10 !
11 interface Loopback0
12  ipv4 address 2.2.2.2 255.255.255.255
13 !
14 interface MgmtEth0/0/CPU0/0
15  shutdown
16 !
17 interface GigabitEthernet0/0/0/0
18  ipv4 address 24.1.1.2 255.255.255.0
19 !
20 interface GigabitEthernet0/0/0/1
21  ipv4 address 23.1.1.2 255.255.255.0
22 !
23 route-policy SID($SID)
24   set label-index $SID
25 end-policy
26 !
27 route-policy AIGP($METRIC)
28   set aigp-metric + $METRIC
29   pass
30 end-policy
31 !
32 router static
33  address-family ipv4 unicast
34   23.1.1.3/32 GigabitEthernet0/0/0/1
35   24.1.1.4/32 GigabitEthernet0/0/0/0
36  !
37 !
38 router bgp 1
39  bgp router-id 2.2.2.2
40  mpls activate
41   interface GigabitEthernet0/0/0/0
42   interface GigabitEthernet0/0/0/1
43  !
44  ibgp policy out enforce-modifications
45  address-family ipv4 unicast
46   maximum-paths ibgp 16
47   network 2.2.2.2/32 route-policy SID(2)
48   allocate-label all
49  !
50  address-family vpnv4 unicast
51   retain route-target all
52  !
53  neighbor-group rr-client
54   cluster-id 12
55   address-family ipv4 labeled-unicast
56    route-reflector-client
57    route-policy AIGP(10) out
58    next-hop-self
59   !
60  !
61  neighbor 5.5.5.5
62   remote-as 1
63   update-source Loopback0
64   address-family vpnv4 unicast
65    route-reflector-client
66   !
67  !
68  neighbor 8.8.8.8
69   remote-as 1
70   update-source Loopback0
71   address-family vpnv4 unicast
72    route-reflector-client
73   !
74  !
75  neighbor 23.1.1.3
76   remote-as 1
77   use neighbor-group rr-client
78  !
79  neighbor 24.1.1.4
80   remote-as 1
81   use neighbor-group rr-client
82  !
83 !
84 segment-routing
85  global-block 16000 23999
86 !
87 end
  1 RP/0/0/CPU0:R3#show run
  2 Thu Nov 26 14:23:49.772 UTC
  3 Building configuration...
  4 !! IOS XR Configuration 6.1.3
  5 !! Last configuration change at Thu Nov 26 05:22:12 2020 by admin
  6 !
  7 hostname R3
  8 line console
  9  exec-timeout 0 0
 10 !
 11 interface Loopback0
 12  ipv4 address 3.3.3.3 255.255.255.255
 13 !
 14 interface MgmtEth0/0/CPU0/0
 15  shutdown
 16 !
 17 interface GigabitEthernet0/0/0/0
 18  ipv4 address 13.1.1.3 255.255.255.0
 19 !
 20 interface GigabitEthernet0/0/0/1
 21  ipv4 address 23.1.1.3 255.255.255.0
 22 !
 23 interface GigabitEthernet0/0/0/2
 24  ipv4 address 35.1.1.3 255.255.255.0
 25 !
 26 interface GigabitEthernet0/0/0/3
 27  ipv4 address 36.1.1.3 255.255.255.0
 28 !
 29 interface GigabitEthernet0/0/0/4
 30  ipv4 address 37.1.1.3 255.255.255.0
 31 !
 32 interface GigabitEthernet0/0/0/5
 33  ipv4 address 38.1.1.3 255.255.255.0
 34 !
 35 route-policy SID($SID)
 36   set label-index $SID
 37 end-policy
 38 !
 39 route-policy AIGP($METRIC)
 40   set aigp-metric + $METRIC
 41   pass
 42 end-policy
 43 !
 44 router static
 45  address-family ipv4 unicast
 46   13.1.1.1/32 GigabitEthernet0/0/0/0
 47   23.1.1.2/32 GigabitEthernet0/0/0/1
 48   35.1.1.5/32 GigabitEthernet0/0/0/2
 49   36.1.1.6/32 GigabitEthernet0/0/0/3
 50   37.1.1.7/32 GigabitEthernet0/0/0/4
 51   38.1.1.8/32 GigabitEthernet0/0/0/5
 52  !
 53 !
 54 router bgp 1
 55  bgp router-id 3.3.3.3
 56  bgp cluster-id 34
 57  mpls activate
 58   interface GigabitEthernet0/0/0/0
 59   interface GigabitEthernet0/0/0/1
 60   interface GigabitEthernet0/0/0/2
 61   interface GigabitEthernet0/0/0/3
 62   interface GigabitEthernet0/0/0/4
 63   interface GigabitEthernet0/0/0/5
 64  !
 65  ibgp policy out enforce-modifications
 66  address-family ipv4 unicast
 67   maximum-paths ibgp 16
 68   network 3.3.3.3/32 route-policy SID(3)
 69   allocate-label all
 70  !
 71  neighbor-group ibgp
 72   address-family ipv4 labeled-unicast
 73    route-policy AIGP(10) out
 74    next-hop-self
 75   !
 76  !
 77  neighbor-group rr-client
 78   address-family ipv4 labeled-unicast
 79    route-reflector-client
 80    route-policy AIGP(10) out
 81    next-hop-self
 82   !
 83  !
 84  neighbor 13.1.1.1
 85   remote-as 1
 86   use neighbor-group ibgp
 87  !
 88  neighbor 23.1.1.2
 89   remote-as 1
 90   use neighbor-group ibgp
 91  !
 92  neighbor 35.1.1.5
 93   remote-as 1
 94   use neighbor-group rr-client
 95  !
 96  neighbor 36.1.1.6
 97   remote-as 1
 98   use neighbor-group rr-client
 99  !
100  neighbor 37.1.1.7
101   remote-as 1
102   use neighbor-group rr-client
103  !
104  neighbor 38.1.1.8
105   remote-as 1
106   use neighbor-group rr-client
107  !
108 !
109 segment-routing
110  global-block 16000 23999
111 !
112 end
  1 RP/0/0/CPU0:R4#show run
  2 Thu Nov 26 14:24:23.760 UTC
  3 Building configuration...
  4 !! IOS XR Configuration 6.1.3
  5 !! Last configuration change at Thu Nov 26 05:22:39 2020 by admin
  6 !
  7 hostname R4
  8 line console
  9  exec-timeout 0 0
 10 !
 11 interface Loopback0
 12  ipv4 address 4.4.4.4 255.255.255.255
 13 !
 14 interface MgmtEth0/0/CPU0/0
 15  shutdown
 16 !
 17 interface GigabitEthernet0/0/0/0
 18  ipv4 address 24.1.1.4 255.255.255.0
 19 !
 20 interface GigabitEthernet0/0/0/1
 21  ipv4 address 14.1.1.4 255.255.255.0
 22 !
 23 interface GigabitEthernet0/0/0/2
 24  ipv4 address 45.1.1.4 255.255.255.0
 25 !
 26 interface GigabitEthernet0/0/0/3
 27  ipv4 address 46.1.1.4 255.255.255.0
 28 !
 29 interface GigabitEthernet0/0/0/4
 30  ipv4 address 47.1.1.4 255.255.255.0
 31 !
 32 interface GigabitEthernet0/0/0/5
 33  ipv4 address 48.1.1.4 255.255.255.0
 34 !
 35 route-policy SID($SID)
 36   set label-index $SID
 37 end-policy
 38 !
 39 route-policy AIGP($METRIC)
 40   set aigp-metric + $METRIC
 41   pass
 42 end-policy
 43 !
 44 router static
 45  address-family ipv4 unicast
 46   14.1.1.1/32 GigabitEthernet0/0/0/1
 47   24.1.1.2/32 GigabitEthernet0/0/0/0
 48   45.1.1.5/32 GigabitEthernet0/0/0/2
 49   46.1.1.6/32 GigabitEthernet0/0/0/3
 50   47.1.1.7/32 GigabitEthernet0/0/0/4
 51   48.1.1.8/32 GigabitEthernet0/0/0/5
 52  !
 53 !
 54 router bgp 1
 55  bgp router-id 4.4.4.4
 56  bgp cluster-id 34
 57  mpls activate
 58   interface GigabitEthernet0/0/0/0
 59   interface GigabitEthernet0/0/0/1
 60   interface GigabitEthernet0/0/0/2
 61   interface GigabitEthernet0/0/0/3
 62   interface GigabitEthernet0/0/0/4
 63   interface GigabitEthernet0/0/0/5
 64  !
 65  ibgp policy out enforce-modifications
 66  address-family ipv4 unicast
 67   maximum-paths ibgp 16
 68   network 4.4.4.4/32 route-policy SID(4)
 69   allocate-label all
 70  !
 71  neighbor-group ibgp
 72   address-family ipv4 labeled-unicast
 73    route-policy AIGP(10) out
 74    next-hop-self
 75   !
 76  !
 77  neighbor-group rr-client
 78   address-family ipv4 labeled-unicast
 79    route-reflector-client
 80    route-policy AIGP(10) out
 81    next-hop-self
 82   !
 83  !
 84  neighbor 14.1.1.1
 85   remote-as 1
 86   use neighbor-group ibgp
 87  !
 88  neighbor 24.1.1.2
 89   remote-as 1
 90   use neighbor-group ibgp
 91  !
 92  neighbor 45.1.1.5
 93   remote-as 1
 94   use neighbor-group rr-client
 95  !
 96  neighbor 46.1.1.6
 97   remote-as 1
 98   use neighbor-group rr-client
 99  !
100  neighbor 47.1.1.7
101   remote-as 1
102   use neighbor-group rr-client
103  !
104  neighbor 48.1.1.8
105   remote-as 1
106   use neighbor-group rr-client
107  !
108 !
109 segment-routing
110  global-block 16000 23999
111 !
112 end
  1 RP/0/0/CPU0:R5#show run
  2 Thu Nov 26 14:25:02.537 UTC
  3 Building configuration...
  4 !! IOS XR Configuration 6.1.3
  5 !! Last configuration change at Thu Nov 26 13:56:57 2020 by admin
  6 !
  7 hostname R5
  8 vrf A
  9  address-family ipv4 unicast
 10   import route-target
 11    1:1
 12   !
 13   export route-target
 14    1:1
 15   !
 16  !
 17 !
 18 line console
 19  exec-timeout 0 0
 20 !
 21 interface Loopback0
 22  ipv4 address 5.5.5.5 255.255.255.255
 23 !
 24 interface Loopback1
 25  vrf A
 26  ipv4 address 55.55.55.55 255.255.255.255
 27 !
 28 interface MgmtEth0/0/CPU0/0
 29  shutdown
 30 !
 31 interface GigabitEthernet0/0/0/0
 32  ipv4 address 35.1.1.5 255.255.255.0
 33 !
 34 interface GigabitEthernet0/0/0/1
 35  ipv4 address 45.1.1.5 255.255.255.0
 36 !
 37 route-policy SID($SID)
 38   set label-index $SID
 39 end-policy
 40 !
 41 route-policy AIGP($METRIC)
 42   set aigp-metric + $METRIC
 43   pass
 44 end-policy
 45 !
 46 router static
 47  address-family ipv4 unicast
 48   35.1.1.3/32 GigabitEthernet0/0/0/0
 49   45.1.1.4/32 GigabitEthernet0/0/0/1
 50  !
 51 !
 52 router bgp 1
 53  bgp router-id 5.5.5.5
 54  mpls activate
 55   interface GigabitEthernet0/0/0/0
 56   interface GigabitEthernet0/0/0/1
 57  !
 58  address-family ipv4 unicast
 59   maximum-paths ibgp 16
 60   network 5.5.5.5/32 route-policy SID(5)
 61   allocate-label all
 62  !
 63  address-family vpnv4 unicast
 64  !
 65  neighbor-group ibgp
 66   address-family ipv4 labeled-unicast
 67    route-policy AIGP(10) out
 68    next-hop-self
 69   !
 70  !
 71  neighbor 1.1.1.1
 72   remote-as 1
 73   update-source Loopback0
 74   address-family vpnv4 unicast
 75   !
 76  !
 77  neighbor 2.2.2.2
 78   remote-as 1
 79   update-source Loopback0
 80   address-family vpnv4 unicast
 81   !
 82  !
 83  neighbor 35.1.1.3
 84   remote-as 1
 85   use neighbor-group ibgp
 86  !
 87  neighbor 45.1.1.4
 88   remote-as 1
 89   use neighbor-group ibgp
 90  !
 91  vrf A
 92   rd auto
 93   address-family ipv4 unicast
 94    maximum-paths ibgp 16
 95    network 55.55.55.55/32
 96   !
 97  !
 98 !
 99 segment-routing
100  global-block 16000 23999
101 !
102 end
 1 RP/0/0/CPU0:R6#show run
 2 Thu Nov 26 14:25:32.305 UTC
 3 Building configuration...
 4 !! IOS XR Configuration 6.1.3
 5 !! Last configuration change at Tue Nov 24 12:41:33 2020 by admin
 6 !
 7 hostname R6
 8 line console
 9  exec-timeout 0 0
10 !
11 interface Loopback0
12  ipv4 address 6.6.6.6 255.255.255.255
13 !
14 interface MgmtEth0/0/CPU0/0
15  shutdown
16 !
17 interface GigabitEthernet0/0/0/0
18  ipv4 address 36.1.1.6 255.255.255.0
19 !
20 interface GigabitEthernet0/0/0/1
21  ipv4 address 46.1.1.6 255.255.255.0
22 !
23 route-policy SID($SID)
24   set label-index $SID
25 end-policy
26 !
27 route-policy AIGP($METRIC)
28   set aigp-metric + $METRIC
29   pass
30 end-policy
31 !
32 router static
33  address-family ipv4 unicast
34   36.1.1.3/32 GigabitEthernet0/0/0/0
35   46.1.1.4/32 GigabitEthernet0/0/0/1
36  !
37 !
38 router bgp 1
39  bgp router-id 6.6.6.6
40  mpls activate
41   interface GigabitEthernet0/0/0/0
42   interface GigabitEthernet0/0/0/1
43  !
44  address-family ipv4 unicast
45   maximum-paths ibgp 16
46   network 6.6.6.6/32 route-policy SID(6)
47   allocate-label all
48  !
49  neighbor-group ibgp
50   address-family ipv4 labeled-unicast
51    route-policy AIGP(10) out
52    next-hop-self
53   !
54  !
55  neighbor 36.1.1.3
56   remote-as 1
57   use neighbor-group ibgp
58  !
59  neighbor 46.1.1.4
60   remote-as 1
61   use neighbor-group ibgp
62  !
63 !
64 segment-routing
65  global-block 16000 23999
66 !
67 end
 1 RP/0/0/CPU0:R7#show run
 2 Thu Nov 26 14:26:07.063 UTC
 3 Building configuration...
 4 !! IOS XR Configuration 6.1.3
 5 !! Last configuration change at Tue Nov 24 12:30:47 2020 by admin
 6 !
 7 hostname R7
 8 line console
 9  exec-timeout 0 0
10 !
11 interface Loopback0
12  ipv4 address 7.7.7.7 255.255.255.255
13 !
14 interface MgmtEth0/0/CPU0/0
15  shutdown
16 !
17 interface GigabitEthernet0/0/0/0
18  ipv4 address 37.1.1.7 255.255.255.0
19 !
20 interface GigabitEthernet0/0/0/1
21  ipv4 address 47.1.1.7 255.255.255.0
22 !
23 route-policy SID($SID)
24   set label-index $SID
25 end-policy
26 !
27 route-policy AIGP($METRIC)
28   set aigp-metric + $METRIC
29   pass
30 end-policy
31 !
32 router static
33  address-family ipv4 unicast
34   37.1.1.3/32 GigabitEthernet0/0/0/0
35   47.1.1.4/32 GigabitEthernet0/0/0/1
36  !
37 !
38 router bgp 1
39  bgp router-id 7.7.7.7
40  mpls activate
41   interface GigabitEthernet0/0/0/0
42   interface GigabitEthernet0/0/0/1
43  !
44  address-family ipv4 unicast
45   maximum-paths ibgp 16
46   network 7.7.7.7/32 route-policy SID(7)
47   allocate-label all
48  !
49  neighbor-group ibgp
50   address-family ipv4 labeled-unicast
51    route-policy AIGP(10) out
52    next-hop-self
53   !
54  !
55  neighbor 37.1.1.3
56   remote-as 1
57   use neighbor-group ibgp
58  !
59  neighbor 47.1.1.4
60   remote-as 1
61   use neighbor-group ibgp
62  !
63 !
64 segment-routing
65  global-block 16000 23999
66 !
67 end
  1 RP/0/0/CPU0:R8#show run
  2 Thu Nov 26 14:26:54.729 UTC
  3 Building configuration...
  4 !! IOS XR Configuration 6.1.3
  5 !! Last configuration change at Thu Nov 26 13:58:49 2020 by admin
  6 !
  7 hostname R8
  8 vrf A
  9  address-family ipv4 unicast
 10   import route-target
 11    1:1
 12   !
 13   export route-target
 14    1:1
 15   !
 16  !
 17 !
 18 line console
 19  exec-timeout 0 0
 20 !
 21 interface Loopback0
 22  ipv4 address 8.8.8.8 255.255.255.255
 23 !
 24 interface Loopback1
 25  vrf A
 26  ipv4 address 88.88.88.88 255.255.255.255
 27 !
 28 interface MgmtEth0/0/CPU0/0
 29  shutdown
 30 !
 31 interface GigabitEthernet0/0/0/0
 32  ipv4 address 38.1.1.8 255.255.255.0
 33 !
 34 interface GigabitEthernet0/0/0/1
 35  ipv4 address 48.1.1.8 255.255.255.0
 36 !
 37 route-policy SID($SID)
 38   set label-index $SID
 39 end-policy
 40 !
 41 route-policy AIGP($METRIC)
 42   set aigp-metric + $METRIC
 43   pass
 44 end-policy
 45 !
 46 router static
 47  address-family ipv4 unicast
 48   38.1.1.3/32 GigabitEthernet0/0/0/0
 49   48.1.1.4/32 GigabitEthernet0/0/0/1
 50  !
 51 !
 52 router bgp 1
 53  bgp router-id 8.8.8.8
 54  mpls activate
 55   interface GigabitEthernet0/0/0/0
 56   interface GigabitEthernet0/0/0/1
 57  !
 58  address-family ipv4 unicast
 59   maximum-paths ibgp 16
 60   network 8.8.8.8/32 route-policy SID(8)
 61   allocate-label all
 62  !
 63  address-family vpnv4 unicast
 64  !
 65  neighbor-group ibgp
 66   address-family ipv4 labeled-unicast
 67    route-policy AIGP(10) out
 68    next-hop-self
 69   !
 70  !
 71  neighbor 1.1.1.1
 72   remote-as 1
 73   update-source Loopback0
 74   address-family vpnv4 unicast
 75   !
 76  !
 77  neighbor 2.2.2.2
 78   remote-as 1
 79   update-source Loopback0
 80   address-family vpnv4 unicast
 81   !
 82  !
 83  neighbor 38.1.1.3
 84   remote-as 1
 85   use neighbor-group ibgp
 86  !
 87  neighbor 48.1.1.4
 88   remote-as 1
 89   use neighbor-group ibgp
 90  !
 91  vrf A
 92   rd auto
 93   address-family ipv4 unicast
 94    maximum-paths ibgp 16
 95    network 88.88.88.88/32
 96   !
 97  !
 98 !
 99 segment-routing
100  global-block 16000 23999
101 !
102 end

 

标签:GigabitEthernet0,IBGP,policy,Routing,neighbor,address,interface,Segment,ipv4
来源: https://www.cnblogs.com/chia/p/14044976.html