IS-IS Redistribution of BGP Routes
Feeding BGP-learned routes into IS-IS uses the same redistribute as connected or static routes, but BGP brings four differences of its own: iBGP-learned routes are not redistributed by default, the BGP MED can be carried over as the IS-IS metric, a large number of routes splits the LSP, and the conditions a route policy can use to narrow the set are limited.
This article checks those four against the RFCs, the ISO standard and IOS XR. How a redistributed route is encoded in the LSP (the X flag in TLV 135, the default metric of 0) is covered in IS-IS Redistribution (connected / static) and is not repeated here.
Where routes from external protocols go
Section 3.1 of RFC 1195 defines what external routes contain:
The routes announced in IP external reachability information entries include all routes to outside of the routing domain. This includes routes learned from OSPF, EGP, RIP, or any other external protocol.
EGP, the predecessor of BGP, is named explicitly. A route redistributed from BGP is one more of these external routes to IS-IS; with wide metrics on IOS XR it goes into TLV 135 with the X flag set.
The same section also defines “Inter-Domain Routing Protocol Information” (TLV 131) so that border routers can find each other, but IS-IS itself does not use it and neither does current BGP practice.
iBGP routes are not redistributed by default
A BGP speaker holds eBGP routes learned from other ASes and iBGP routes learned from peers in its own AS. redistribute bgp on IOS XR picks up only the eBGP-learned routes. To redistribute iBGP routes as well, bgp redistribute-internal must be enabled under router bgp.
Cisco’s Configure Redistribute Internal BGP Routes into IGP (written for IOS 15.1(4)M5) puts it this way:
IBGP learned routes are not forwarded to an IGP routing protocol through the redistribute command.
Use command bgp redistribute-internal under the BGP process on the router that redistributes.
Leaving iBGP out by default avoids loops. iBGP inside an AS normally runs over the IGP. Feeding iBGP routes into that IGP makes two things depend on each other: BGP next hops resolved through the IGP, and IGP routes built from BGP. That can leave a withdrawal unable to propagate.
RP/0/RP0/CPU0:R2(config-bgp)#bgp redistribute-internal ?
<cr> Turning the BGP MED into the IS-IS metric
Without metric, IS-IS advertises redistributed routes with metric 0. For BGP routes, rather than assigning values one by one, it is more natural to use the MED that BGP carried in. IOS XR’s metric-type rib-metric-as-internal takes the metric the route has in the routing table (RIB) as the IS-IS metric. For an eBGP-learned route the RIB metric is the MED, so the MED set by the neighboring AS lands in the LSP as is.
RP/0/RP0/CPU0:R2(config-isis-af)#redistribute bgp 65001 metric-type ?
external Set IS-IS External metric type
internal Set IS-IS Internal metric type
rib-metric-as-external Set IS-IS External metric type and use RIB metric
rib-metric-as-internal Set IS-IS Internal metric type and use RIB metricA receiving router adds that value to its distance to the redistributing router. When two exits redistribute the same destination, the difference in MED moves the exit.
The danger of route count
BGP routes come in a different order of magnitude from IGP routes. As redistributed routes grow, they stop fitting in a single LSP. Section 7.3.4.1 of ISO/IEC 10589:2002 (2nd edition) says:
Because a Link State PDU is limited in size to ReceiveLSPBufferSize, it may not be possible to include information about all of a system’s neighbours in a single LSP. In such cases, a system may use multiple LSPs to convey this information. Each LSP in the set carries the same sourceID field, but sets its own LSP Number field individually.
The LSP Number is one octet (section 9.8), so one system can originate at most 256 LSPs. On IOS XR the fragments appear as R2.00-01 and so on, numbered from -01. Every extra fragment adds flooding and SPF load on every router.
IOS XR has maximum-redistributed-prefixes to cap this in advance. Above the cap it logs a warning and leaves the excess prefixes out of the LSP; it does not just warn and keep advertising.
RP/0/RP0/CPU0:R2(config-isis-af)#maximum-redistributed-prefixes ?
<1-28000> maximum limit on number of redistributed prefixesNarrowing with a route policy
Nobody feeds every BGP route into IS-IS. redistribute bgp <AS> route-policy <name> selects what gets through.
What a policy can match on is limited. On IOS XR each place a route policy attaches (the attach point) exposes its own set of attributes, and IS-IS redistribution does not expose BGP communities. Attaching a policy that matches on a community is rejected at commit. Routes are selected instead by listing destination prefixes in a prefix-set.
prefix-set LAN6
192.168.6.0/24
end-set
!
route-policy BGP-TO-ISIS-PFX
if destination in LAN6 then
pass
else
drop
endif
end-policyVerification on real devices
The test setup
R1 to R4 belong to AS 65001 and sit in a single area, 49.0001, as level-2-only (wide). R2 and R3 are the exits, peering over eBGP with R5 in AS 65005, and R4 advertises its own LAN to R2 over iBGP. R5 does not run IS-IS. The software is XRd 26.1.1.
| Router | Lo | BGP | IS-IS links |
|---|---|---|---|
| R1 | Lo0 1.1.1.1/32 (observer) | none | Gi0/0/0/0 10.1.2.1 (to R2), Gi0/0/0/1 10.1.4.1 (to R4) |
| R2 | Lo0 2.2.2.2/32 | AS 65001. eBGP to R5 (10.2.5.5), iBGP to R4 (4.4.4.4) | Gi0/0/0/0 10.1.2.2 |
| R3 | Lo0 3.3.3.3/32 | AS 65001. eBGP to R5 (10.3.5.5) | Gi0/0/0/0 10.3.4.3 (to R4) |
| R4 | Lo0 4.4.4.4/32, Lo1 192.168.4.1/24 | AS 65001. iBGP to R2. network 192.168.4.0/24 | Gi0/0/0/0 10.1.4.4, Gi0/0/0/1 10.3.4.4 |
| R5 | Lo0 5.5.5.5/32, Lo1 192.168.5.1/24, Lo2 192.168.6.1/24 | AS 65005. eBGP to R2 and R3. Both LANs via network; Lo2 carries community 65005:100 | none. 0.0.0.0/0 to R2 and R3 |
Every link has metric 10, so from R1 the internal cost is 10 to R2 and 20 to R3. R4’s Lo1 is kept out of IS-IS, so R1 can reach it only when R2 redistributes it.
The STEPs
| STEP | Operation | What it confirms |
|---|---|---|
| 0 | No redistribution | R2 holds eBGP-learned and iBGP-learned routes. R1 has none of them and pings fail |
| 1 | redistribute bgp 65001 on R2 and R3 | Only the two eBGP-learned routes enter IS-IS. The iBGP-learned 192.168.4.0/24 does not |
| 2 | bgp redistribute-internal on R2 | 192.168.4.0/24 enters too, but R1 and R2 loop and it is unreachable |
| 3 | R5 sets MED 50 toward R2 and MED 10 toward R3; R2 and R3 switch to rib-metric-as-internal | The LSP metrics become 50 and 10, and R1’s exit moves to R3 |
| 4 | R5 redistributes 300 static routes into BGP | R2’s and R3’s LSPs split into fragments |
| 5 | maximum-redistributed-prefixes 100 on R2 | R2 advertises only 100 and leaves out the rest |
| 6 | Drop the 300 routes; on R2 and R3 confirm a community policy is rejected, then attach a prefix-set policy | Only 192.168.6.0/24 remains |
| 7 | Revert everything (final state) | Matches STEP 0 |
STEP 0: No redistribution
R2 has learned the three LANs over BGP: [200/0] is iBGP from R4 and [20/0] is eBGP from R5. R1 has none of them, and pings fail.
RP/0/RP0/CPU0:R2#show route bgp
Mon Sep 14 18:38:29.877 UTC
B 192.168.4.0/24 [200/0] via 4.4.4.4, 00:11:07
B 192.168.5.0/24 [20/0] via 10.2.5.5, 00:11:07
B 192.168.6.0/24 [20/0] via 10.2.5.5, 00:11:07RP/0/RP0/CPU0:R1#show route 192.168.5.0/24
Mon Sep 14 18:35:18.315 UTC
% Network not in tableSTEP 1: redistribute bgp 65001 on R2 and R3
RP/0/RP0/CPU0:R2#show configuration commit changes last 1
Mon Sep 14 18:46:19.912 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router isis 1
address-family ipv4 unicast
redistribute bgp 65001
!
!
endThe eBGP-learned 192.168.5.0/24 reaches R1, and the traceroute goes from R2 (10.1.2.2) out to R5.
RP/0/RP0/CPU0:R1#traceroute 192.168.5.1 source 1.1.1.1
Mon Sep 14 18:48:27.738 UTC
Type escape sequence to abort.
Tracing the route to 192.168.5.1
1 10.1.2.2 8 msec 5 msec 5 msec
2 10.2.5.5 19 msec * 10 msec The iBGP-learned 192.168.4.0/24 does not appear in R1’s routing table.
RP/0/RP0/CPU0:R1#show route 192.168.4.0/24
Mon Sep 14 18:48:04.177 UTC
% Network not in tableRP/0/RP0/CPU0:R1#ping 192.168.4.1 source 1.1.1.1 count 50 timeout 1
Mon Sep 14 18:48:32.508 UTC
Type escape sequence to abort.
Sending 50, 100-byte ICMP Echos to 192.168.4.1 timeout is 1 seconds:
..................................................
Success rate is 0 percent (0/50)STEP 2: bgp redistribute-internal on R2
RP/0/RP0/CPU0:R2#show configuration commit changes last 1
Mon Sep 14 18:52:23.463 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router bgp 65001
bgp redistribute-internal
!
endR2’s LSP gains 192.168.4.0/24, and R1 learns it through R2. Pings still fail.
RP/0/RP0/CPU0:R1#show route 192.168.4.0/24
Mon Sep 14 18:53:58.974 UTC
Routing entry for 192.168.4.0/24
Known via "isis 1", distance 115, metric 10, type level-2
Installed Sep 14 18:52:24.917 for 00:01:34
Routing Descriptor Blocks
10.1.2.2, from 2.2.2.2, via GigabitEthernet0/0/0/0
Route metric is 10
No advertising protos. RP/0/RP0/CPU0:R1#ping 192.168.4.1 source 1.1.1.1 count 50 timeout 1
Mon Sep 14 18:54:24.767 UTC
Type escape sequence to abort.
Sending 50, 100-byte ICMP Echos to 192.168.4.1 timeout is 1 seconds:
..................................................
Success rate is 0 percent (0/50)A traceroute from R1 shows R2 (10.1.2.2) and R1 (10.1.2.1) alternating.
RP/0/RP0/CPU0:R1#traceroute 192.168.4.1 source 1.1.1.1
Mon Sep 14 18:59:03.472 UTC
Type escape sequence to abort.
Tracing the route to 192.168.4.1
1 10.1.2.2 7 msec 5 msec 5 msec
2 10.1.2.1 51 msec 5 msec 5 msec
3 10.1.2.2 8 msec 7 msec 7 msec
4 10.1.2.1 7 msec 36 msec 8 msec
5 10.1.2.2 11 msec 10 msec 10 msec
6 10.1.2.1 59 msec 10 msec 11 msec
7 10.1.2.2 11 msec 61 msec 12 msec
8 10.1.2.1 11 msec 12 msec 11 msec
9 10.1.2.2 13 msec 12 msec 32 msec
10 10.1.2.1 12 msec 13 msec 13 msec
11 10.1.2.2 15 msec 40 msec 13 msec
12 10.1.2.1 13 msec 13 msec 50 msec
13 10.1.2.2 18 msec 19 msec 18 msec
14 10.1.2.1 18 msec 17 msec 16 msec
15 10.1.2.2 19 msec 18 msec 20 msec
16 10.1.2.1 20 msec 23 msec 21 msec
17 10.1.2.2 24 msec 64 msec 69 msec
18 10.1.2.1 28 msec 24 msec 68 msec
19 10.1.2.2 22 msec 59 msec 22 msec
20 10.1.2.1 21 msec 25 msec 37 msec
21 10.1.2.2 27 msec 26 msec 37 msec
22 10.1.2.1 29 msec 29 msec 29 msec
23 10.1.2.2 32 msec 34 msec 33 msec
24 10.1.2.1 34 msec 35 msec 35 msec
25 10.1.2.2 37 msec 79 msec 38 msec
26 10.1.2.1 41 msec 35 msec 31 msec
27 10.1.2.2 65 msec 32 msec 42 msec
28 10.1.2.1 30 msec 30 msec 47 msec
29 10.1.2.2 32 msec 39 msec 43 msec
30 10.1.2.1 40 msec 43 msec 43 msec R2 resolves this iBGP route’s next hop, 4.4.4.4, through IS-IS, and that path goes through R1. R1 sends the same prefix back to R2, so packets bounce between the two routers. This is why iBGP routes are not redistributed by default.
RP/0/RP0/CPU0:R2#show route 4.4.4.4/32
Mon Sep 14 18:59:10.339 UTC
Routing entry for 4.4.4.4/32
Known via "isis 1", distance 115, metric 20, type level-2
Installed Sep 14 18:26:18.563 for 00:32:51
Routing Descriptor Blocks
10.1.2.1, from 4.4.4.4, via GigabitEthernet0/0/0/0
Route metric is 20
No advertising protos. In the packet (the loop)
No.104 to No.109 in the STEP 2 capture are the first echo R1 sent. Each time the source MAC switches between R1 (52:54:00:14:cd:11) and R2 (52:54:00:c5:fd:24), the TTL drops by one. This echo crossed the link 256 times before its TTL ran out.
frame.number eth.src eth.dst ip.ttl
104 52:54:00:14:cd:11 52:54:00:c5:fd:24 255
105 52:54:00:c5:fd:24 52:54:00:14:cd:11 254
106 52:54:00:14:cd:11 52:54:00:c5:fd:24 253
107 52:54:00:c5:fd:24 52:54:00:14:cd:11 252
108 52:54:00:14:cd:11 52:54:00:c5:fd:24 251
109 52:54:00:c5:fd:24 52:54:00:14:cd:11 250STEP 3: Turning the MED into the IS-IS metric
R5 sets MED 50 toward R2 and MED 10 toward R3.
RP/0/RP0/CPU0:R5#show configuration commit changes last 1
Mon Sep 14 18:59:51.029 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
route-policy TO-R2
if destination in LAN6 then
set community (65005:100)
endif
set med 50
pass
end-policy
!
route-policy TO-R3
if destination in LAN6 then
set community (65005:100)
endif
set med 10
pass
end-policy
!
endIn R2’s and R3’s routing tables, the metric of the eBGP route is the MED itself.
RP/0/RP0/CPU0:R2#show route 192.168.5.0/24
Mon Sep 14 19:03:41.270 UTC
Routing entry for 192.168.5.0/24
Known via "bgp 65001", distance 20, metric 50
Tag 65005, type external
Installed Sep 14 18:59:52.412 for 00:03:48
Routing Descriptor Blocks
10.2.5.5, from 10.2.5.5, BGP external
Route metric is 50, Wt is 1
No advertising protos. RP/0/RP0/CPU0:R3#show route 192.168.5.0/24
Mon Sep 14 19:04:07.758 UTC
Routing entry for 192.168.5.0/24
Known via "bgp 65001", distance 20, metric 10
Tag 65005, type external
Installed Sep 14 18:59:52.412 for 00:04:15
Routing Descriptor Blocks
10.3.5.5, from 10.3.5.5, BGP external
Route metric is 10, Wt is 1
No advertising protos. With R2 and R3 set to rib-metric-as-internal, that value becomes the LSP metric. From R1, the R2 path is 10 + 50 = 60 and the R3 path is 20 + 10 = 30, so the exit moves to R3 and R4 (10.1.4.4) appears in the traceroute.
RP/0/RP0/CPU0:R1#show route 192.168.5.0/24
Mon Sep 14 19:01:43.026 UTC
Routing entry for 192.168.5.0/24
Known via "isis 1", distance 115, metric 30, type level-2
Installed Sep 14 19:00:06.074 for 00:01:37
Routing Descriptor Blocks
10.1.4.4, from 3.3.3.3, via GigabitEthernet0/0/0/1
Route metric is 30
No advertising protos. RP/0/RP0/CPU0:R1#traceroute 192.168.5.1 source 1.1.1.1
Mon Sep 14 19:02:06.064 UTC
Type escape sequence to abort.
Tracing the route to 192.168.5.1
1 10.1.4.4 6 msec 5 msec 5 msec
2 10.3.4.3 18 msec 7 msec 7 msec
3 10.3.5.5 11 msec * 15 msec STEP 4: Pouring in 300 routes
When R5 redistributes 300 static routes (numbered from 10.200.0.0/24) into BGP, R2’s and R3’s LSPs each split into three fragments.
RP/0/RP0/CPU0:R1#show isis database
Mon Sep 14 19:08:14.073 UTC
IS-IS 1 (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL
R1.00-00 * 0x00000009 0xe989 1163 /* 0/0/0
R2.00-00 0x00000009 0x9422 1102 /1200 0/0/0
R2.00-01 0x00000001 0xaaa2 1102 /1200 0/0/0
R2.00-02 0x00000001 0x879d 1102 /1200 0/0/0
R3.00-00 0x00000009 0x7511 1102 /1200 0/0/0
R3.00-01 0x00000001 0x8203 1102 /1200 0/0/0
R3.00-02 0x00000002 0x31ca 1103 /1200 0/0/0
R4.00-00 0x00000008 0x74be 1033 /1200 0/0/0
Total Level-2 LSP count: 8 Local Level-2 LSP count: 1R1 now has 307 IS-IS routes.
RP/0/RP0/CPU0:R1#show route summary
Mon Sep 14 19:08:13.172 UTC
Route Source Routes Backup Deleted Memory(bytes)
connected 2 1 0 600
local 3 0 0 600
application fib_mgr 0 0 0 0
isis 1 307 2 0 61800
dagr 0 0 0 0
Total 312 3 0 63000 In the packet (fragments)
No.10 to No.12 in the STEP 4 capture are R2’s three fragments. No.11 (R2.00-01) has a PDU length of 1479 bytes, cut to fit the 1492-byte LSP MTU, and carries nothing but TLV 135. The area address and hostname are only in -00. Section 7.3.4.3 of ISO/IEC 10589:2002 places the area addresses only in the LSP with LSP Number zero.
PDU length: 1479
Remaining lifetime: 1200
LSP-ID: 0020.0200.2002.00-01
Sequence number: 0x00000001
Checksum: 0xaaa2 [correct]
[Checksum Status: Good]
Type block(0x03): Partition Repair:0, Attached bits:0, Overload bit:0, IS type:3
0... .... = Partition Repair: Not supported
.000 0... = Attachment: 0
.0.. .... = Error metric: Not set
..0. .... = Expense metric: Not set
...0 .... = Delay metric: Not set
0... .... = Default metric: Not set
.... .0.. = Overload bit: Not set
.... ..11 = Type of Intermediate System: Level 2 (3)
Extended IP Reachability (t=135, l=252)STEP 5: Capping at 100
RP/0/RP0/CPU0:R2#show configuration commit changes last 1
Mon Sep 14 19:13:17.493 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router isis 1
address-family ipv4 unicast
maximum-redistributed-prefixes 100
!
!
endAs the commit goes in, R2 logs a warning that the cap is exceeded.
RP/0/RP0/CPU0:R2#show logging start Sep 14 19:10:32
Mon Sep 14 19:16:36.262 UTC
Time Zone UTC, DST disabled
Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)
Console logging: Disabled
Monitor logging: level debugging, 0 messages logged
Trap logging: level informational, 0 messages logged
Buffer logging: level debugging, 205 messages logged
Log Buffer (2097152 bytes):
RP/0/RP0/CPU0:Sep 14 19:10:32.927 UTC: logger[68772]: %OS-SYSLOG-6-LOG_INFO : informational STEP5-BEGIN
RP/0/RP0/CPU0:Sep 14 19:10:33.291 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[11381]: Received disconnect from 10.100.3.1 port 61280:11: disconnected by user
RP/0/RP0/CPU0:Sep 14 19:10:33.291 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[11381]: Disconnected from user cisco 10.100.3.1 port 61280
RP/0/RP0/CPU0:Sep 14 19:12:02.972 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[11542]: Accepted authentication/pam for cisco from 10.100.3.1 port 61361 ssh2
RP/0/RP0/CPU0:Sep 14 19:12:07.903 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[11547]: Received disconnect from 10.100.3.1 port 61361:11: disconnected by user
RP/0/RP0/CPU0:Sep 14 19:12:07.903 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[11547]: Disconnected from user cisco 10.100.3.1 port 61361
RP/0/RP0/CPU0:Sep 14 19:13:12.530 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[11708]: Accepted authentication/pam for cisco from 10.100.3.1 port 61453 ssh2
RP/0/RP0/CPU0:Sep 14 19:13:16.684 UTC: isis[1003]: %ROUTING-ISIS-4-MAX_REDIST_PREFIXES : ISIS (1): Topology IPv4 Unicast level 2 is exceeding the maximum number of redistributed prefixes
RP/0/RP0/CPU0:Sep 14 19:13:16.977 UTC: config[69106]: %MGBL-CONFIG-6-DB_COMMIT : Configuration committed by user 'cisco'. Use 'show configuration commit changes 1000000004' to view the changes.
RP/0/RP0/CPU0:Sep 14 19:13:17.181 UTC: config[69106]: %MGBL-SYS-5-CONFIG_I : Configured from console by cisco on vty0 (10.100.3.1)
RP/0/RP0/CPU0:Sep 14 19:13:19.366 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[11713]: Received disconnect from 10.100.3.1 port 61453:11: disconnected by user
RP/0/RP0/CPU0:Sep 14 19:13:19.366 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[11713]: Disconnected from user cisco 10.100.3.1 port 61453
RP/0/RP0/CPU0:Sep 14 19:16:23.457 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12050]: Accepted authentication/pam for cisco from 10.100.3.1 port 61583 ssh2
RP/0/RP0/CPU0:Sep 14 19:16:32.988 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12055]: Received disconnect from 10.100.3.1 port 61583:11: disconnected by user
RP/0/RP0/CPU0:Sep 14 19:16:32.988 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12055]: Disconnected from user cisco 10.100.3.1 port 61583
RP/0/RP0/CPU0:Sep 14 19:16:33.999 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12205]: Accepted authentication/pam for cisco from 10.100.3.1 port 61587 ssh2 R2’s LSP is back to -00 alone, while R3, with no cap, keeps three fragments. The external prefixes left in R2’s LSP are the 100 from 10.200.0.0/24 to 10.200.99.0/24; the other 203 are no longer advertised.
RP/0/RP0/CPU0:R1#show isis database
Mon Sep 14 19:14:55.384 UTC
IS-IS 1 (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL
R1.00-00 * 0x00000009 0xe989 762 /* 0/0/0
R2.00-00 0x0000000a 0xe39e 1101 /1200 0/0/0
R3.00-00 0x00000009 0x7511 701 /1200 0/0/0
R3.00-01 0x00000001 0x8203 701 /1200 0/0/0
R3.00-02 0x00000002 0x31ca 701 /1200 0/0/0
R4.00-00 0x00000008 0x74be 632 /1200 0/0/0
Total Level-2 LSP count: 6 Local Level-2 LSP count: 1In the packet (the purge)
No.2 and No.3 in the STEP 5 capture are purges: -01 and -02, no longer needed, resent with a lifetime of 0.
PDU length: 40
Remaining lifetime: 0
LSP-ID: 0020.0200.2002.00-01
Sequence number: 0x00000001
[Checksum: [missing]]
[Checksum Status: Not present]
Type block(0x03): Partition Repair:0, Attached bits:0, Overload bit:0, IS type:3
0... .... = Partition Repair: Not supported
.000 0... = Attachment: 0
.0.. .... = Error metric: Not set
..0. .... = Expense metric: Not set
...0 .... = Delay metric: Not set
0... .... = Default metric: Not set
.... .0.. = Overload bit: Not set
.... ..11 = Type of Intermediate System: Level 2 (3)
Purge Originator ID (t=13, l=7)
Type: 13
Length: 7
Number of System IDs: 1
System ID: 0020.0200.2002
Hostname (t=137, l=2)
Type: 137
Length: 2
Hostname: R2STEP 6: Communities cannot narrow it, a prefix-set can
With R5’s 300 routes removed, attaching a policy that selects by community to R2’s redistribution is rejected at commit.
RP/0/RP0/CPU0:R2(config-isis-af)#show configuration failed
Mon Sep 14 19:33:00.372 UTC
!! SEMANTIC ERRORS: This configuration was rejected by
!! the system due to semantic errors. The individual
!! errors with each failed configuration command can be
!! found below.
router isis 1
address-family ipv4 unicast
redistribute bgp 65001 route-policy BGP-TO-ISIS metric-type rib-metric-as-internal
!!% Could not find entry in list: Policy [BGP-TO-ISIS] uses the 'community' attribute. There is no 'community' attribute at the isis redistribution attach point.
!
!
endSwitching to a policy that selects with a prefix-set commits. R3 gets the same configuration.
RP/0/RP0/CPU0:R2#show configuration commit changes last 1
Mon Sep 14 19:33:14.267 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
prefix-set LAN6
192.168.6.0/24
end-set
!
route-policy BGP-TO-ISIS-PFX
if destination in LAN6 then
pass
else
drop
endif
end-policy
!
router isis 1
address-family ipv4 unicast
redistribute bgp 65001 route-policy BGP-TO-ISIS-PFX metric-type rib-metric-as-internal
!
!
endThe only BGP-learned route left on R1 is 192.168.6.0/24.
RP/0/RP0/CPU0:R1#show route 192.168.6.0/24
Mon Sep 14 19:34:58.073 UTC
Routing entry for 192.168.6.0/24
Known via "isis 1", distance 115, metric 30, type level-2
Installed Sep 14 19:33:22.275 for 00:01:35
Routing Descriptor Blocks
10.1.4.4, from 3.3.3.3, via GigabitEthernet0/0/0/1
Route metric is 30
No advertising protos. RP/0/RP0/CPU0:R1#show route 192.168.5.0/24
Mon Sep 14 19:34:57.938 UTC
% Network not in tableRP/0/RP0/CPU0:R1#ping 192.168.6.1 source 1.1.1.1 count 50 timeout 1
Mon Sep 14 19:37:05.081 UTC
Type escape sequence to abort.
Sending 50, 100-byte ICMP Echos to 192.168.6.1 timeout is 1 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (50/50), round-trip min/avg/max = 7/10/45 msSTEP 7: Revert everything
With R2, R3 and R5 reverted, the running-config on all five routers matches STEP 0 and the BGP-learned routes disappear from R1.
RP/0/RP0/CPU0:R1#ping 192.168.6.1 source 1.1.1.1 count 50 timeout 1
Mon Sep 14 19:49:51.876 UTC
Type escape sequence to abort.
Sending 50, 100-byte ICMP Echos to 192.168.6.1 timeout is 1 seconds:
..................................................
Success rate is 0 percent (0/50)Verification configs and show output
Each STEP was captured from all five routers as separate files per router. The verification config is the ..._run.txt (the final state is the one from the last STEP).
| File | Contents |
|---|---|
..._show.txt | show version, show interface description, show route, show route isis, show route bgp, show route <each prefix>, show route summary, the show isis set (interface brief, neighbors, database, database detail, database verbose, topology, route, adjacency-log, spf-log, lsp-log, statistics), and show bgp, show bgp summary, show bgp neighbors, show running-config router bgp |
..._bgp.txt | On the BGP routers, show bgp neighbors <peer> advertised-routes, routes and received routes per peer |
..._log.txt | show logging narrowed to that STEP. A logmsg marker is placed at the start of each STEP and its timestamp passed to show logging start |
..._run.txt | show running-config at that STEP (the verification config for that STEP) |
..._trace.txt | show isis trace all | include UPD_LSP_ACCEPT and show isis trace all | include REDIST |
..._ping.txt | R1 from source 1.1.1.1: ping / traceroute 192.168.5.1, ping 192.168.4.1, ping / traceroute 192.168.6.1. R5 from source 192.168.5.1: ping / traceroute 1.1.1.1. None for R2 to R4 |
..._commit.cfg | What that STEP committed (show configuration commit changes last 1). Absent for routers that changed nothing |
STEP 0: No redistribution
| Router | show | syslog | running-config | trace | ping | bgp | commit |
|---|---|---|---|---|---|---|---|
| R1 | show | log | run | trace | ping | - | - |
| R2 | show | log | run | trace | - | bgp | - |
| R3 | show | log | run | trace | - | bgp | - |
| R4 | show | log | run | trace | - | bgp | - |
| R5 | show | log | run | trace | ping | bgp | - |
STEP 1: redistribute bgp 65001 on R2 and R3
| Router | show | syslog | running-config | trace | ping | bgp | commit |
|---|---|---|---|---|---|---|---|
| R1 | show | log | run | trace | ping | - | - |
| R2 | show | log | run | trace | - | bgp | commit |
| R3 | show | log | run | trace | - | bgp | commit |
| R4 | show | log | run | trace | - | bgp | - |
| R5 | show | log | run | trace | ping | bgp | - |
STEP 2: bgp redistribute-internal on R2
| Router | show | syslog | running-config | trace | ping | bgp | commit |
|---|---|---|---|---|---|---|---|
| R1 | show | log | run | trace | ping | - | - |
| R2 | show | log | run | trace | - | bgp | commit |
| R3 | show | log | run | trace | - | bgp | - |
| R4 | show | log | run | trace | - | bgp | - |
| R5 | show | log | run | trace | ping | bgp | - |
Loop evidence (taken separately before STEP 3): R1 route / cef / traceroute, R2 route / cef / bgp
STEP 3: R5 sets MED 50 toward R2 and MED 10 toward R3; R2 and R3 switch to rib-metric-as-internal
| Router | show | syslog | running-config | trace | ping | bgp | commit |
|---|---|---|---|---|---|---|---|
| R1 | show | log | run | trace | ping | - | - |
| R2 | show | log | run | trace | - | bgp | commit |
| R3 | show | log | run | trace | - | bgp | commit |
| R4 | show | log | run | trace | - | bgp | - |
| R5 | show | log | run | trace | ping | bgp | commit |
STEP 4: R5 redistributes 300 static routes into BGP
| Router | show | syslog | running-config | trace | ping | bgp | commit |
|---|---|---|---|---|---|---|---|
| R1 | show | log | run | trace | ping | - | - |
| R2 | show | log | run | trace | - | bgp | - |
| R3 | show | log | run | trace | - | bgp | - |
| R4 | show | log | run | trace | - | bgp | - |
| R5 | show | log | run | trace | ping | bgp | commit |
STEP 5: maximum-redistributed-prefixes 100 on R2
| Router | show | syslog | running-config | trace | ping | bgp | commit |
|---|---|---|---|---|---|---|---|
| R1 | show | log | run | trace | ping | - | - |
| R2 | show | log | run | trace | - | bgp | commit |
| R3 | show | log | run | trace | - | bgp | - |
| R4 | show | log | run | trace | - | bgp | - |
| R5 | show | log | run | trace | ping | bgp | - |
STEP 6: Drop the 300 routes; on R2 and R3 confirm a community policy is rejected, then attach a prefix-set policy
| Router | show | syslog | running-config | trace | ping | bgp | commit |
|---|---|---|---|---|---|---|---|
| R1 | show | log | run | trace | ping | - | - |
| R2 | show | log | run | trace | - | bgp | commit |
| R3 | show | log | run | trace | - | bgp | commit |
| R4 | show | log | run | trace | - | bgp | - |
| R5 | show | log | run | trace | ping | bgp | commit |
R2’s rejected community policy (show configuration failed): failed
STEP 7: Revert everything (final state)
| Router | show | syslog | running-config | trace | ping | bgp | commit |
|---|---|---|---|---|---|---|---|
| R1 | show | log | run | trace | ping | - | - |
| R2 | show | log | run | trace | - | bgp | commit |
| R3 | show | log | run | trace | - | bgp | commit |
| R4 | show | log | run | trace | - | bgp | - |
| R5 | show | log | run | trace | ping | bgp | commit |
Packet captures were taken per STEP on the R1 - R2 link. The packets quoted above are No.104-109 in STEP 2, No.10-12 in STEP 4 and No.1-3 in STEP 5. STEP 6 has separate files for the first attempt (from removing R5’s 300 routes to R2’s rejected commit) and the redo.
| STEP | R1 - R2 |
|---|---|
| 0 | pcap |
| 1 | pcap |
| 2 | pcap |
| 3 | pcap |
| 4 | pcap |
| 5 | pcap |
| 6 | pcap (first attempt) / pcap (redo) |
| 7 | pcap |
Help taken beforehand in a candidate configuration and discarded with abort (nothing committed): R2 redistribute / maximum-redistributed-prefixes / bgp redistribute-internal, R5 set med
References
| Standard | Title | Summary |
|---|---|---|
| RFC 1195 | Use of OSI IS-IS for Routing in TCP/IP and Dual Environments | Section 3.1 includes routes from “OSPF, EGP, RIP, or any other external protocol” in external routes and defines “Inter-Domain Routing Protocol Information” (TLV 131) for border routers. |
| RFC 7794 | IS-IS Prefix Attributes for Extended IPv4 and IPv6 Reachability | The X flag in section 2.1, set on redistributed prefixes. |
| ISO/IEC 10589:2002 (2nd edition) | Intermediate System to Intermediate System intra-domain routeing information exchange protocol | Section 7.3.4.1 splits information that does not fit one LSP across several, and section 9.8 makes the last octet of the LSP ID the LSP Number. |
| Cisco: Configure Redistribute Internal BGP Routes into IGP | Document ID 200782 | iBGP routes are not passed to an IGP by redistribute by default; bgp redistribute-internal enables it. Written for IOS 15.1(4)M5; the IOS XR behavior is confirmed on the devices in this article. |
| Cisco IP Routing Configuration Guide, IOS XE 17.x | IPv6 Routing: Route Redistribution | Explains that rib-metric-as-internal / rib-metric-as-external under metric-type use the routing table’s metric. |
Related articles
- What Is IS-IS
- IS-IS NSAP Addresses and the NET (System ID)
- IS-IS Level 1 and Level 2 (the hierarchy)
- IS-IS Packet Types and Header Format
- IS-IS Adjacency Formation and States
- IS-IS DIS and the Pseudonode
- IS-IS Network Types (broadcast / point-to-point)
- IS-IS Metrics (narrow and wide)
- IS-IS Authentication (hello-password and lsp-password)
- IS-IS LSPs and the Link-State Database
- The Main IS-IS TLVs
- IS-IS Flooding and LSDB Synchronisation
- IS-IS SPF Computation and Route Selection
- The IS-IS ATT Bit and the Level 1 Default Route
- IS-IS Route Leaking and the Up/Down Bit
- IS-IS Route Summarization
- The IS-IS Overload Bit
- IS-IS Convergence Timers (SPF / LSP Generation)
- IS-IS Redistribution (connected / static)
- IS-IS Redistribution of BGP Routes