Skip to content

Commit 05bd7ab

Browse files
Merged fix-8routers into master
* add seg6_enabled=1 via sysctl for all routers * change loopback subnet from /128 to /32 for all routers * remove the propagation for routes fd00:: by isis
1 parent 82c15a4 commit 05bd7ab

File tree

21 files changed

+177
-63
lines changed

21 files changed

+177
-63
lines changed

nets/8routers-isis-ipv6/README.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SMART INTRODUCTION LINK ---> https://drive.google.com/file/d/18PumHFw6o3df5-_yPtOVw4Zem8RDEjTr/view?usp=sharing
44

55

6-
```
6+
```text
77
88
In folder nodeconf/
99
- for each host and router one folder
@@ -61,9 +61,67 @@ router - router links:
6161
r6 -r7: fcf0:0:6:7::1/64 r7 - r6: fcf0:0:6:7::2/64
6262
r6 -r8: fcf0:0:6:8::1/64 r8 - r6: fcf0:0:6:8::2/64
6363
r7 -r8: fcf0:0:7:8::1/64 r8 - r7: fcf0:0:7:8::2/64
64+
65+
router localhost
66+
67+
r1 fcff:1::1
68+
r2 fcff:2::1
69+
r3 fcff:3::1
70+
r4 fcff:4::1
71+
r5 fcff:5::1
72+
r6 fcff:6::1
73+
r7 fcff:7::1
74+
r8 fcff:8::1
6475
6576
( The addressing plan is explained in https://docs.google.com/document/d/15giV53fH_eDuWadOxzjPVzlr-a7Rn65MpCbz9QKs7JI/edit )
6677
78+
------Tunnel examples -------------
79+
1) Create a bidirectional tunnel between h11 and h83, passing through router r4
80+
81+
1.1) set tunnel from r1 to r8 for fd00:0:83::/64
82+
83+
on r1: ip -6 route add fd00:0:83::/64 encap seg6 mode encap segs fcff:4::1,fcff:8::1 dev r1-h11
84+
85+
on r8: no explicit decap instruction is needed because net.ipv6.conf.*.seg6_enabled=1
86+
87+
1.2) set tunnel from r8 to r1 for fd00:0:11::/64
88+
89+
on r8: ip -6 route add fd00:0:11::/64 encap seg6 mode encap segs fcff:4::1,fcff:1::1 dev r8-h83
90+
91+
on r1: no explicit decap instruction is needed because net.ipv6.conf.*.seg6_enabled=1
92+
93+
after the tunnel is setup, you can ping from h11 to h83 and viceversa
94+
h11# ping6 fd00:0:83::2
95+
h83# ping6 fd00:0:11::2
96+
97+
on recent versions of Linux kernel (>=5.5) it is also possible to ping the router IP address on
98+
the interface with the host, while on previous ones it was not possible due to a bug in the SRv6
99+
implementation:
100+
h11# ping6 fd00:0:83::1
101+
102+
Note that this is not the suggested approach, the explicit configuration of decap instruction
103+
is preferred, as described hereafter
104+
105+
we use a decap SID in r8 and in r1 with the End.DT6 behavior, the SID used is fcff:8::100
106+
107+
1.3) set tunnel from r1 to r8 for fd00:0:83::/64
108+
109+
on r1: ip -6 route add fd00:0:83::/64 encap seg6 mode encap segs fcff:4::1,fcff:8::100 dev r1-h11
110+
111+
on r8: ip -6 route add fcff:8::100 encap seg6local action End.DT6 table 254 dev r8-h83
112+
113+
1.4) set tunnel from r8 to r1 for fd00:0:11::/64
114+
115+
on r8: ip -6 route add fd00:0:11::/64 encap seg6 mode encap segs fcff:4::1,fcff:1::100 dev r8-h83
116+
117+
on r1: ip -6 route add fcff:1::100 encap seg6local action End.DT6 table 254 dev r1-h11
118+
119+
table 254 corresponds to the "main" routing table, using recent version of ip command
120+
we can use table name instead of table id, for example
121+
on r8: ip -6 route add fcff:8::100 encap seg6local action End.DT6 table main dev r8-h83
122+
123+
124+
67125
------ISIS CONFIGURATION-------------
68126
69127
Install guide and How to get FRR

nets/8routers-isis-ipv6/nodeconf/r1/isisd.conf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ hostname r1
22
password zebra
33
log file nodeconf/r1/isisd.log
44
!
5-
interface r1-h11
6-
ipv6 router isis FOO
7-
ip router isis FOO
8-
isis hello-interval 5
5+
!interface r1-h11
6+
! ipv6 router isis FOO
7+
! ip router isis FOO
8+
! isis hello-interval 5
99
!
10-
interface r1-h12
11-
ipv6 router isis FOO
12-
ip router isis FOO
13-
isis hello-interval 5
10+
!interface r1-h12
11+
!ipv6 router isis FOO
12+
! ip router isis FOO
13+
! isis hello-interval 5
1414
!
15-
interface r1-h13
16-
ipv6 router isis FOO
17-
ip router isis FOO
18-
isis hello-interval 5
15+
!interface r1-h13
16+
! ipv6 router isis FOO
17+
! ip router isis FOO
18+
! isis hello-interval 5
1919
!
2020
interface r1-r2
2121
ipv6 router isis FOO

nets/8routers-isis-ipv6/nodeconf/r1/start.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ $FRR_PATH/zebra -f $PWD/$BASE_DIR/$NODE_NAME/zebra.conf -d -z $PWD/$BASE_DIR/$NO
2525
sleep 1
2626

2727
$FRR_PATH/isisd -f $PWD/$BASE_DIR/$NODE_NAME/isisd.conf -d -z $PWD/$BASE_DIR/$NODE_NAME/zebra.sock -i $PWD/$BASE_DIR/$NODE_NAME/isisd.pid
28+
29+
# enable Segment Routing for IPv6
30+
sysctl -w net.ipv6.conf.all.seg6_enabled=1
31+
for dev in $(ip -o -6 a | awk '{ print $2 }' | grep -v "lo")
32+
do
33+
sysctl -w net.ipv6.conf.$dev.seg6_enabled=1
34+
done

nets/8routers-isis-ipv6/nodeconf/r1/zebra.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface r1-r2
2020
ipv6 address fcf0:0:1:2::1/64
2121
!
2222
interface lo
23-
ipv6 address fcff:1::1/128
23+
ipv6 address fcff:1::1/32
2424
!
2525
ipv6 forwarding
2626
!

nets/8routers-isis-ipv6/nodeconf/r2/start.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ $FRR_PATH/zebra -f $PWD/$BASE_DIR/$NODE_NAME/zebra.conf -d -z $PWD/$BASE_DIR/$NO
2525
sleep 1
2626

2727
$FRR_PATH/isisd -f $PWD/$BASE_DIR/$NODE_NAME/isisd.conf -d -z $PWD/$BASE_DIR/$NODE_NAME/zebra.sock -i $PWD/$BASE_DIR/$NODE_NAME/isisd.pid
28+
29+
# enable Segment Routing for IPv6
30+
sysctl -w net.ipv6.conf.all.seg6_enabled=1
31+
for dev in $(ip -o -6 a | awk '{ print $2 }' | grep -v "lo")
32+
do
33+
sysctl -w net.ipv6.conf.$dev.seg6_enabled=1
34+
done

nets/8routers-isis-ipv6/nodeconf/r2/zebra.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface r2-r7
1717
ipv6 address fcf0:0:2:7::1/64
1818
!
1919
interface lo
20-
ipv6 address fcff:2::1/128
20+
ipv6 address fcff:2::1/32
2121
!
2222
ipv6 forwarding
2323
!

nets/8routers-isis-ipv6/nodeconf/r3/isisd.conf

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ hostname r3
22
password zebra
33
log file nodeconf/r3/isisd.log
44
!
5-
interface r3-h31
6-
ipv6 router isis FOO
7-
ip router isis FOO
8-
isis hello-interval 5
9-
!
10-
interface r3-h32
11-
ipv6 router isis FOO
12-
ip router isis FOO
13-
isis hello-interval 5
14-
!
15-
interface r3-h33
16-
ipv6 router isis FOO
17-
ip router isis FOO
18-
isis hello-interval 5
5+
!interface r3-h31
6+
!ipv6 router isis FOO
7+
! ip router isis FOO
8+
! isis hello-interval 5
9+
!
10+
!interface r3-h32
11+
!ipv6 router isis FOO
12+
! ip router isis FOO
13+
! isis hello-interval 5
14+
!
15+
!interface r3-h33
16+
!ipv6 router isis FOO
17+
! ip router isis FOO
18+
! isis hello-interval 5
1919
!
2020
interface r3-r2
2121
ipv6 router isis FOO

nets/8routers-isis-ipv6/nodeconf/r3/start.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ $FRR_PATH/zebra -f $PWD/$BASE_DIR/$NODE_NAME/zebra.conf -d -z $PWD/$BASE_DIR/$NO
2525
sleep 1
2626

2727
$FRR_PATH/isisd -f $PWD/$BASE_DIR/$NODE_NAME/isisd.conf -d -z $PWD/$BASE_DIR/$NODE_NAME/zebra.sock -i $PWD/$BASE_DIR/$NODE_NAME/isisd.pid
28+
29+
# enable Segment Routing for IPv6
30+
sysctl -w net.ipv6.conf.all.seg6_enabled=1
31+
for dev in $(ip -o -6 a | awk '{ print $2 }' | grep -v "lo")
32+
do
33+
sysctl -w net.ipv6.conf.$dev.seg6_enabled=1
34+
done

nets/8routers-isis-ipv6/nodeconf/r3/zebra.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface r3-r4
2323
ipv6 address fcf0:0:3:4::1/64
2424
!
2525
interface lo
26-
ipv6 address fcff:3::1/128
26+
ipv6 address fcff:3::1/32
2727
!
2828
ipv6 forwarding
2929
!

nets/8routers-isis-ipv6/nodeconf/r4/start.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ $FRR_PATH/zebra -f $PWD/$BASE_DIR/$NODE_NAME/zebra.conf -d -z $PWD/$BASE_DIR/$NO
2525
sleep 1
2626

2727
$FRR_PATH/isisd -f $PWD/$BASE_DIR/$NODE_NAME/isisd.conf -d -z $PWD/$BASE_DIR/$NODE_NAME/zebra.sock -i $PWD/$BASE_DIR/$NODE_NAME/isisd.pid
28+
29+
# enable Segment Routing for IPv6
30+
sysctl -w net.ipv6.conf.all.seg6_enabled=1
31+
for dev in $(ip -o -6 a | awk '{ print $2 }' | grep -v "lo")
32+
do
33+
sysctl -w net.ipv6.conf.$dev.seg6_enabled=1
34+
done

0 commit comments

Comments
 (0)