# SRGB Modifcation

Load **basic.isis.sr.enabled.cfg**

```
configure
load bootflash:basic.isis.sr.enabled.cfg
commit replace
y
```

SR is already enabled using ISIS.&#x20;

Modify the SRGB on R3 so that the range is 30000-30999. Modify the SRGB on R5 so that the range is 50000-50999. Use two different methods to solve this task.

## Answer <a href="#a7a705bf-9f36-4e28-b808-0604daf69b13" id="a7a705bf-9f36-4e28-b808-0604daf69b13"></a>

```
#R3
segment-routing
 global-block 30000 30999

#R5
router isis 1
 segment-routing global-block 50000 50999
```

## Explanation <a href="#id-5353d6ab-3e95-4542-af72-faed4c697628" id="id-5353d6ab-3e95-4542-af72-faed4c697628"></a>

The SRGB is a local range on each node from which global SIDs are assigned MPLS labels. By default this range is 16,000-23,999. Each node advertises its SRGB into the IGP, allowing for different SRGBs on each node. We can configure the SRGB in two places: globally under SR, and under the individual IGP process.

```
#R3
segment-routing
 global-block 30000 30999

#R5
router isis 1
 segment-routing global-block 50000 50999
```

As you might imagine, this is a heirarchical configuration. The IGP inherits the SRGB from the globally configured block. By configuring the SRGB under the individual IGP, it allows you to use a different SRBG per IGP instance on a single node. The IGP configuration overrides the global configuration.

We can verify the LSD (label switch database) using the following command:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FZwxF8pi98lvwAPGCL91D%2Fimage.png?alt=media&#x26;token=ca3fe07f-c1d2-4814-90e8-2451fb75fe9d" alt=""><figcaption></figcaption></figure></div>

* Labels 0-15 are reserved
  * 0 = IPv4 explicit null
  * 1 = router alert
  * 2 = IPv6 explicit null
  * 3 = IPv4 implicit null
* Labels 16-14999 are used for static labels
* Labels 15000-15999 are the SRLB (by default)
* Labels 16000-23999 are the SRGB (by default)
  * R3 has altered this to 30000-30999 in the screenshot above
* Labels 24000-max are dynamic labels
  * If the SRGB uses up this range, it displaces dynamic labels. So for R3, the dynamic label range is now 24000-29999, 31000-max.

We can verify the default dynamic label min and max values using the following command:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FNnFjcKrZoNMhSjQ97fmS%2Fimage.png?alt=media&#x26;token=1d59cea0-cdb2-421c-ab57-28f8323e6526" alt=""><figcaption></figcaption></figure></div>

#### Verification <a href="#id-1c8fc375-e918-41f1-bf04-6ea7d37f37ec" id="id-1c8fc375-e918-41f1-bf04-6ea7d37f37ec"></a>

We can see the current SRGB used by the ISIS process with the following show command:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FVxTIWyjY9H1St2OVNZmf%2Fimage.png?alt=media&#x26;token=723e62ed-f50a-4df1-9061-a8e45b73aa4e" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FyHXv4ugr0OQBjQ5Rl2Kv%2Fimage.png?alt=media&#x26;token=166764fd-f31f-4703-9ef0-6981bf8273bf" alt=""><figcaption></figcaption></figure></div>

The command **show isis segment-routing label table** displays the local global prefix label values on that particular node. For example, on R3, we see each value as \<R3’s SRGB base> + \<index value>:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FAMtJOzGBBYZPOJcoHYMR%2Fimage.png?alt=media&#x26;token=66c397f9-e682-4fc9-9765-3b636ca173ad" alt=""><figcaption></figcaption></figure></div>

Each node advertises its SRGB into the IGP, which allows all nodes in the IGP to calcualte the correct global label value for a given prefix SID for every other node in the IGP.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F77wNvQPtuCWXPI0u5zqD%2Fimage.png?alt=media&#x26;token=e202c6b9-81d9-400c-bd9a-bc4a0d0d851b" alt=""><figcaption></figcaption></figure></div>

This allows R1 to program a swap for 16007 to 30007, for example:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FHu2xHJwYjfbtPFfPBZR3%2Fimage.png?alt=media&#x26;token=62393d0e-2165-492a-857f-1ee3be47ae78" alt=""><figcaption></figcaption></figure></div>

If we traceroute to this prefix, we see that R1 uses R3’s correct global label, and R3 uses R5’s correct global label:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2Fo9YD6uIIGoH7GAahfrJC%2Fimage.png?alt=media&#x26;token=f6b24462-e063-4a9f-8a93-08924d9de4da" alt=""><figcaption></figcaption></figure></div>

The global SID prefixes no longer are globally signficant in terms of label value. Instead, global SID prefixes are only globally significant in terms of index value. If you retain the default SRGB on all nodes, then global SID prefixes will also have globally significant label values. This is always the preferred deployment method. SR supports non-global SRGBs in the network, but it is always easier to just use the same SRBG on all nodes.
