Skip to content

Commit aa5f67b

Browse files
committed
Merge branch 'topology-8r-1c-srv6-pm' into start-node-managers
2 parents 7432ac6 + 194bd3b commit aa5f67b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2676
-0
lines changed

nets/8r-1c-out-band-isis/etc-hosts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
127.0.0.1 localhost
2+
127.0.1.1 rose-srv6
3+
4+
# The following lines are desirable for IPv6 capable hosts
5+
::1 ip6-localhost ip6-loopback
6+
fe00::0 ip6-localnet
7+
ff00::0 ip6-mcastprefix
8+
ff02::1 ip6-allnodes
9+
ff02::2 ip6-allrouters
10+
11+
# Mininet hosts
12+
fcff:1::1 r1
13+
fcff:2::1 r2
14+
fcff:3::1 r3
15+
fcff:4::1 r4
16+
fcff:5::1 r5
17+
fcff:6::1 r6
18+
fcff:7::1 r7
19+
fcff:8::1 r8
20+
fd00:0:11::2 h11
21+
fd00:0:12::2 h12
22+
fd00:0:13::2 h13
23+
fd00:0:31::2 h31
24+
fd00:0:32::2 h32
25+
fd00:0:33::2 h33
26+
fd00:0:51::2 h51
27+
fd00:0:52::2 h52
28+
fd00:0:53::2 h53
29+
fd00:0:81::2 h81
30+
fd00:0:82::2 h82
31+
fd00:0:83::2 h83
32+
fcff:2:1::2 hdc1
33+
fcff:8:1::2 hdc2
34+
fcff:5:1::2 hdc3
35+
36+
fcfd:0:0:fd::1 controller.m
37+
fcfd:0:0:1::1 r1.m
38+
fcfd:0:0:2::1 r2.m
39+
fcfd:0:0:3::1 r3.m
40+
fcfd:0:0:4::1 r4.m
41+
fcfd:0:0:5::1 r5.m
42+
fcfd:0:0:6::1 r6.m
43+
fcfd:0:0:7::1 r7.m
44+
fcfd:0:0:8::1 r8.m

nets/8r-1c-srv6-pm/.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export WORKSPACE=${HOME}/workspace
2+
export ROSE_SRV6_TUTORIAL=${WORKSPACE}/rose-srv6-tutorial
3+
4+
# Configure SRV6_PFPML_PATH
5+
export SRV6_PFPML_PATH=/opt/srv6-pm-xdp-ebpf/srv6-pfplm

nets/8r-1c-srv6-pm/README.md

Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
1+
# 1920-srv6-tutorial
2+
3+
SMART INTRODUCTION LINK ---> https://drive.google.com/file/d/18PumHFw6o3df5-_yPtOVw4Zem8RDEjTr/view?usp=sharing
4+
5+
6+
```text
7+
8+
In folder nodeconf/
9+
- for each host and router one folder
10+
- host folders contain start.sh for each host
11+
- sets IPv6 address for hosts
12+
- adds IPv6 routing to gateway
13+
- router folders contain
14+
- zebra.conf
15+
- sets for each interface the IPv6 address
16+
- isisd.conf
17+
- contains routing information
18+
- start.sh
19+
- enables IPv6 forwarding
20+
- executes zebra.conf and isisd.conf
21+
22+
23+
24+
25+
network:
26+
the network is shown in this link
27+
https://docs.google.com/presentation/d/15w14n_Nf5rE560FluMnw4Wq51pYLvDqG1kEwDvmEHE0/edit#slide=id.g76160fda07_0_0
28+
29+
and also in this link
30+
https://drive.google.com/file/d/1yzyfgvgWbzPjTttcqA4G41gEGM87tHC5/view?usp=sharing
31+
32+
33+
34+
host - router links:
35+
36+
h11 - r1: fd00:0:11::2/64 r1 - h11: fd00:0:11::1/64
37+
h12 - r1: fd00:0:12::2/64 r1 - h12: fd00:0:12::1/64
38+
h13 - r1: fd00:0:13::2/64 r1 - h13: fd00:0:13::1/64
39+
40+
h31 - r3: fd00:0:31::2/64 r3 - h31: fd00:0:31::1/64
41+
h32 - r3: fd00:0:32::2/64 r3 - h32: fd00:0:32::1/64
42+
h33 - r3: fd00:0:33::2/64 r3 - h33: fd00:0:33::1/64
43+
44+
h51 - r5: fd00:0:51::2/64 r5 - h51: fd00:0:51::1/64
45+
h52 - r5: fd00:0:52::2/64 r5 - h52: fd00:0:52::1/64
46+
h53 - r5: fd00:0:53::2/64 r5 - h53: fd00:0:53::1/64
47+
48+
h81 - r8: fd00:0:81::2/64 r8 - h81: fd00:0:81::1/64
49+
h82 - r8: fd00:0:82::2/64 r8 - h82: fd00:0:82::1/64
50+
h83 - r8: fd00:0:83::2/64 r8 - h83: fd00:0:83::1/64
51+
52+
router - router links:
53+
54+
r1 -r2: fcf0:0:1:2::1/64 r2 - r1: fcf0:0:1:2::2/64
55+
r2 -r3: fcf0:0:2:3::1/64 r3 - r2: fcf0:0:2:3::2/64
56+
r2 -r7: fcf0:0:2:7::1/64 r7 - r2: fcf0:0:2:7::2/64
57+
r3 -r4: fcf0:0:3:4::1/64 r4 - r3: fcf0:0:3:4::2/64
58+
r4 -r5: fcf0:0:4:5::1/64 r5 - r4: fcf0:0:4:5::2/64
59+
r4 -r6: fcf0:0:4:6::1/64 r6 - r4: fcf0:0:4:6::2/64
60+
r5 -r6: fcf0:0:5:6::1/64 r6 - r5: fcf0:0:5:6::2/64
61+
r6 -r7: fcf0:0:6:7::1/64 r7 - r6: fcf0:0:6:7::2/64
62+
r6 -r8: fcf0:0:6:8::1/64 r8 - r6: fcf0:0:6:8::2/64
63+
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
75+
76+
( The addressing plan is explained in https://docs.google.com/document/d/15giV53fH_eDuWadOxzjPVzlr-a7Rn65MpCbz9QKs7JI/edit )
77+
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+
125+
------ISIS CONFIGURATION-------------
126+
127+
Install guide and How to get FRR
128+
129+
The official FRR website is located at https://frrouting.org/ and contains further information, as well as links to additional resources.
130+
131+
Several distributions provide packages for FRR. Check your distribution’s repositories to find out if a suitable version is available.
132+
133+
Daemons Configuration File
134+
135+
After a fresh install, starting FRR will do nothing. This is because daemons must be explicitly enabled by editing a file in your configuration directory. This file is usually located at /etc/frr/ daemons and determines which daemons are activated when issuing a service start / stop command via init or systemd. The file initially looks like this:
136+
137+
zebra=no
138+
bgpd=no
139+
ospfd=no
140+
ospf6d=no
141+
ripd=no
142+
ripngd=no
143+
isisd=yes
144+
pimd=no
145+
ldpd=no
146+
nhrpd=no
147+
eigrpd=no
148+
babeld=no
149+
sharpd=no
150+
staticd=no
151+
pbrd=no
152+
bfdd=no
153+
fabricd=no
154+
155+
....
156+
157+
We have to enable the deamon, so modify the word "isis=no" with "isisd=yes"
158+
159+
160+
----ISIS Configuration----
161+
162+
Common options can be specified (Common Invocation Options) to isisd. isisd needs to acquire interface information from zebra in order to function. Therefore zebra must be running before invoking isisd. Also, if zebra is restarted then isisd must be too.
163+
164+
165+
Each routers contains the files "isisd.conf" "start.sh" "zebra.conf"
166+
167+
168+
The configuration of "zebra.conf" of each routers is for example:
169+
!
170+
hostname r1
171+
log file nodeconf/r1/zebra.log
172+
!
173+
debug zebra events
174+
debug zebra rib
175+
!
176+
interface r1-h11
177+
ipv6 address fd00:0:11::1/64
178+
!
179+
interface r1-h12
180+
ipv6 address fd00:0:12::1/64
181+
!
182+
interface r1-h13
183+
ipv6 address fd00:0:13::1/64
184+
!
185+
interface r1-r2
186+
ipv6 address fcf0:0:1:2::1/64
187+
!
188+
interface lo
189+
ipv6 address fcff:1::1/128
190+
!
191+
ipv6 forwarding
192+
!
193+
line vty
194+
!
195+
196+
197+
In this file we define the interface between the links of router r1 and the hosts that are linked, in particular we also define the interface "lo" of the router
198+
With the command "ipv6 forwarding" we explicitly enable the ipv6 forwarding
199+
200+
201+
202+
The configuration of "isisd.conf" of each routers is for example:
203+
204+
hostname rx
205+
password XXXX
206+
log file nodeconf/r1/isisd.log
207+
!
208+
interface lo
209+
ipv6 router isis XX
210+
ip router isis XX
211+
isis hello-interval 5
212+
!
213+
interface r1-h1
214+
ipv6 router isis XX
215+
ip router isis XX
216+
isis hello-interval 5
217+
!
218+
interface r1-r2
219+
ipv6 router isis XX
220+
ip router isis XX
221+
isis hello-interval 5
222+
!
223+
interface r1-r3
224+
ipv6 router isis XX
225+
ip router isis XX
226+
isis hello-interval 5
227+
!
228+
router isis XX
229+
net 49.000X.XXXX.XXXX.XXXX.00
230+
is-type level-2-only
231+
metric-style wide
232+
!
233+
line vty
234+
235+
we use the command "ipv6 router isis XX" to use ipv6
236+
the command "isis hello-interval (1-600)
237+
" configure the level 1 hello interval
238+
239+
The command
240+
net XX.XXXX. ... .XXX.XX
241+
Set/Unset network entity title (NET) provided in ISO format.
242+
NETs take several forms, depending on your network requirements. NET addresses are hexadecimal and range from 8 octets to 20 octets in length. Generally, the format consists of an authority and format Identifier (AFI), a domain ID, an area ID, a system identifier, and a selector. The simplest format omits the domain ID and is 10 octets long. For example, the NET address 49.0001.1921.6800.1001.00 consists of the following parts:
243+
244+
49—AFI
245+
0001—Area ID
246+
1921.6800.1001—System identifier
247+
00—Selector
248+
249+
The system identifier must be unique within the network.
250+
The first portion of the address is the area number, which is a variable number from 1 through 13 bytes. The first byte of the area number (49) is the authority and format indicator (AFI). The next bytes are the assigned domain (area) identifier, which can be from 0 through 12 bytes. In the examples above, the area identifier is 0001.
251+
The next six bytes form the system identifier. The system identifier can be any six bytes that are unique throughout the entire domain. The system identifier commonly is the media access control (MAC) address.
252+
The last byte (00) is the n-selector.
253+
254+
255+
256+
The command
257+
is-type level-2-only
258+
259+
Level 1 systems route within an area; when the destination is outside an area, they route toward a Level 2 system. Level 2 intermediate systems route between areas and toward other ASs. No IS-IS area functions strictly as a backbone.
260+
Level 1 routers share intra-area routing information, and Level 2 routers share interarea information about IP addresses available within each area. Uniquely, IS-IS routers can act as both Level 1 and Level 2 routers, sharing intra-area routes with other Level 1 routers and interarea routes with other Level 2 routers.
261+
262+
We can choose level 1 or level 2, but its a good idea use level 2 beacause we can route packet out of the networks
263+
264+
----Configuration of Hosts----
265+
266+
each host has a configuration file called start.sh
267+
Currently IPv6 forwarding is not explicitly enabled in start.sh, we have to configure ipv6 addresses for each hosts
268+
269+
Example of configuration of start.sh
270+
271+
BASE_DIR=/home/user/Progetto/1920-srv6-tutorial/nets/8routers-isis-ipv6/nodeconf
272+
NODE_NAME=h11
273+
GW_NAME=r1
274+
IF_NAME=$NODE_NAME-$GW_NAME
275+
IP_ADDR=fd00:0:11::2/64
276+
GW_ADDR=fd00:0:11::1
277+
278+
ip -6 addr add $IP_ADDR dev $IF_NAME
279+
ip -6 route add default via $GW_ADDR dev $IF_NAME
280+
281+
----Addressing----
282+
283+
the addressing on the links between the hosts hxy and the router x can be
284+
Router interface rx-hxy fd00:0:xy::1/64
285+
Host interface hxy-ry fd00:0:xy::2/64
286+
287+
```

nets/8r-1c-srv6-pm/etc-hosts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
127.0.0.1 localhost
2+
127.0.1.1 rose-srv6
3+
4+
# The following lines are desirable for IPv6 capable hosts
5+
::1 ip6-localhost ip6-loopback
6+
fe00::0 ip6-localnet
7+
ff00::0 ip6-mcastprefix
8+
ff02::1 ip6-allnodes
9+
ff02::2 ip6-allrouters
10+
11+
# Mininet hosts
12+
fcff:1::1 r1
13+
fcff:2::1 r2
14+
fcff:3::1 r3
15+
fcff:4::1 r4
16+
fcff:5::1 r5
17+
fcff:6::1 r6
18+
fcff:7::1 r7
19+
fcff:8::1 r8
20+
fd00:0:11::2 h11
21+
fd00:0:12::2 h12
22+
fd00:0:13::2 h13
23+
fd00:0:31::2 h31
24+
fd00:0:32::2 h32
25+
fd00:0:33::2 h33
26+
fd00:0:51::2 h51
27+
fd00:0:52::2 h52
28+
fd00:0:53::2 h53
29+
fd00:0:81::2 h81
30+
fd00:0:82::2 h82
31+
fd00:0:83::2 h83
32+
fcff:2:1::2 hdc1
33+
fcff:8:1::2 hdc2
34+
fcff:5:1::2 hdc3
35+
36+
fcfd:0:0:fd::1 controller.m
37+
fcfd:0:0:1::1 r1.m
38+
fcfd:0:0:2::1 r2.m
39+
fcfd:0:0:3::1 r3.m
40+
fcfd:0:0:4::1 r4.m
41+
fcfd:0:0:5::1 r5.m
42+
fcfd:0:0:6::1 r6.m
43+
fcfd:0:0:7::1 r7.m
44+
fcfd:0:0:8::1 r8.m

0 commit comments

Comments
 (0)