Professional Documents
Culture Documents
PNETLAB Store
PNETLab.com
Lab Topology:
Please use the following topology to complete this lab exercise:
https://user.pnetlab.com/store/labs/detail?id=16025164534227
Lab Objective:
The objective of this lab exercise is for you to learn and understand how can you configure
Segment Routing in IGP (OSPF)
Task list:
Task 1: Configure the hostname and IP address for the interface for Routers as topo.
Task 2: Config Segment Routing Global Block for each Router as following table :
Task 3: Config OSPF Routing in 4 Routers and enable Segment Routing on the area of OSPF.
Task 4: Check the reachability between R1 and R4 and analyze the OSPF Database in one of
each Router.
1
Download PNETLab Platform
PNETLAB Store
PNETLab.com
SOLUTION:
Task 1: Configure the hostname and IP address for the interface for Routers as topo.
On R1
!
hostname R1
interface Loopback0
ipv4 address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.12.1 255.255.255.0
!
On R2
!
hostname R2
interface Loopback0
ipv4 address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.12.2 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.23.2 255.255.255.0
!
On R3
!
hostname R3
interface Loopback0
ipv4 address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.23.3 255.255.255.0
!
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.34.3 255.255.255.0
!
On R4
!
hostname R4
interface Loopback0
ipv4 address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.34.4 255.255.255.0
!
2
Download PNETLab Platform
PNETLAB Store
PNETLab.com
Task 2: Config Segment Routing Global Block for each Router as following table :
On R1
!
segment-routing
global-block 16000 23999
!
On R2
!
segment-routing
global-block 24000 31999
!
On R3
!
segment-routing
global-block 32000 39999
!
On R4
!
segment-routing
global-block 40000 47999
!
Task 3: Config OSPF Routing in 4 Routers and enable Segment Routing on the area of OSPF.
On R1
!
router ospf 1
router-id 1.1.1.1
segment-routing mpls
segment-routing forwarding mpls
area 0
interface Loopback0
passive enable
prefix-sid index 1
!
interface GigabitEthernet0/0/0/0
network point-to-point
!
!
!
On R2
!
router ospf 1
segment-routing mpls
segment-routing forwarding mpls
area 0
interface Loopback0
3
Download PNETLab Platform
PNETLAB Store
PNETLab.com
passive enable
prefix-sid index 2
!
interface GigabitEthernet0/0/0/0
network point-to-point
!
interface GigabitEthernet0/0/0/1
network point-to-point
!
!
!
On R3
!
router ospf 1
segment-routing mpls
segment-routing forwarding mpls
area 0
interface Loopback0
passive enable
prefix-sid index 3
!
interface GigabitEthernet0/0/0/1
network point-to-point
!
interface GigabitEthernet0/0/0/2
network point-to-point
!
!
!
On R4
!
router ospf 1
segment-routing mpls
segment-routing forwarding mpls
area 0
interface Loopback0
passive enable
prefix-sid index 4
!
interface GigabitEthernet0/0/0/2
network point-to-point
!
!
!
4
Download PNETLab Platform
PNETLAB Store
PNETLab.com
Task 4: Check the reachability between R1 and R4 and analyze the OSPF Database in one of
each Router.
On R1
RP/0/0/CPU0:R1#ping 4.4.4.4 source loopback0
Sat Oct 10 09:00:10.182 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/27/69 ms
// Oh… Seems we have MPLS Labels, but actually we haven’t configured LDP.
5
Download PNETLab Platform
PNETLAB Store
PNETLab.com
//Okay, Let’s check the OSPF Database and see what’s going on :
6
Download PNETLab Platform
PNETLAB Store
PNETLab.com
//Router Link States is normal, so we could ignore them. The special thing is OSPF Database has
a new LSA type : LSA Type 10. This LSA Type is generated by Router to make the others Router
to know exactly the capabilities of Router about Segment Routing, the prefix-SID index of
Router in Segment Routing domain, the range Global Block of Router… Every information about
Segment Routing will be transport via LSA Type 10.
LS age: 717
Options: (No TOS-capability, DC)
LS Type: Opaque Area Link
Link State ID: 4.0.0.0
Opaque Type: 4
Opaque ID: 0
Advertising Router: 1.1.1.1
LS Seq Number: 80000002
Checksum: 0xc65
Length: 52
7
Download PNETLab Platform
PNETLAB Store
PNETLab.com
// Router 1 informs to the other Router that the Range Size of Global Block is 8000 and the
started label is 16000. We could check the capabilities of other Router via the same command,
but need to specify the adv-router. That is easy!
Let’s check the other LSA.
LS age: 965
Options: (No TOS-capability, DC)
LS Type: Opaque Area Link
Link State ID: 7.0.0.1
Opaque Type: 7
Opaque ID: 1
Advertising Router: 1.1.1.1
LS Seq Number: 80000002
Checksum: 0xe3b1
Length: 44
8
Download PNETLab Platform
PNETLAB Store
PNETLab.com
LS age: 643
Options: (No TOS-capability, DC)
LS Type: Opaque Area Link
Link State ID: 7.0.0.1
Opaque Type: 7
Opaque ID: 1
Advertising Router: 4.4.4.4
LS Seq Number: 80000002
Checksum: 0x6e0c
Length: 44
//We could now understand the meaning of command “prefix-sid index” was configured
before. The Router will inform the SID Index of them to other Router know. This information
will be used to caculate the MPLS Label. Let’s analyze it :
Router R4 will inform to other Router that it has the SID Index = 4 in Segment Routing Domain.
So the others Router wanna reach to R4, it will combine 2 things :
- SID Index of Router R4.
- Global Block Range of Adjacency Router (Because we are analyzing R1, so in this case,
the Adjacency of R1 is R2). R2 is using Global block range is 24000 – 31999.
R1 will use the label 24000 + 4 = 24004 to reach to SID Index 4 (R4). This thing will be proved in
MPLS Table of R1.
The similar thing will happen on R2,R3 and R4 (LSA transfer, caculate label to reach other
Router via Global Block Range of Adjacency Router and SID Index, create MPLS forwarding
table). So now, the function similar to MPLS LDP will be created but we don’t need to use the
signalling protocol as LDP, just need to use the extend LSA type on link-state Routing Protocol.
//R2 will swap label 24004 to 32004. Why ? You could have your own answer if look the Global
Block Range of R3 (Adjacency of R2).
10