Skip to content

Commit fa0068e

Browse files
New topologies (#1)
* Add hdc hosts to the 8routers-isis-ipv6 topology * Fix bug in link creation * Add new topology: 8r-1c-in-band-isis * Add new topology: 8r-1c-out-band-isis * Python 3 compatibility; minor improvements * Improve Python 3 compatibility Authored-by: Carmine Scarpitta <[email protected]>
1 parent 32bf400 commit fa0068e

Some content is hidden

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

98 files changed

+3168
-30
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
.idea/
3+
*.pyc
4+
*.log
5+
*.pid
6+
*.swp

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ reference IPv6 topology with OSPFv3 / FRR
1212
- 8routers-isis-ipv6
1313
reference IPv6 topology with IS-IS / FRR
1414
15+
- 8r-1c-out-band-isis
16+
reference IPv6 topology with IS-IS / FRR and out-of-band controller
17+
18+
- 8r-1c-in-band-isis
19+
reference IPv6 topology with IS-IS / FRR and in-band controller
20+
1521
```
1622

1723
## Installation of FRRouting suite (FRR)

nets/3routers/ospf3r.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def config(self, **kwargs):
3131
Host.config(self, **kwargs)
3232
# Iterate over the interfaces
3333
first = True
34-
for intf in self.intfs.itervalues():
34+
for intf in self.intfs.values():
3535
# Remove any configured address
3636
self.cmd('ifconfig %s 0' %intf.name)
3737
# # For the first one, let's configure the mgmt address
@@ -141,7 +141,7 @@ def simpleTest():
141141
net.start()
142142

143143

144-
print "Dumping host connections"
144+
print("Dumping host connections")
145145
dumpNodeConnections(net.hosts)
146146
#print "Testing network connectivity"
147147
#net.pingAll()

nets/8r-1c-in-band-isis/README.md

Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,292 @@
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+
- one folder for the controller
11+
- host folders contain start.sh for each host
12+
- sets IPv6 address for hosts
13+
- adds IPv6 routing to gateway
14+
- router folders contain
15+
- zebra.conf
16+
- sets for each interface the IPv6 address
17+
- isisd.conf
18+
- contains routing information
19+
- start.sh
20+
- enables IPv6 forwarding
21+
- executes zebra.conf and isisd.conf
22+
- controller folder contains start.sh
23+
- sets IPv6 address for the controller
24+
- adds IPv6 routing to gateway
25+
26+
27+
28+
29+
network:
30+
the network is shown in this link
31+
https://docs.google.com/presentation/d/15w14n_Nf5rE560FluMnw4Wq51pYLvDqG1kEwDvmEHE0/edit#slide=id.g7752c9e8cd_7_4
32+
33+
34+
35+
host - router links:
36+
37+
h11 - r1: fd00:0:11::2/64 r1 - h11: fd00:0:11::1/64
38+
h12 - r1: fd00:0:12::2/64 r1 - h12: fd00:0:12::1/64
39+
h13 - r1: fd00:0:13::2/64 r1 - h13: fd00:0:13::1/64
40+
41+
h31 - r3: fd00:0:31::2/64 r3 - h31: fd00:0:31::1/64
42+
h32 - r3: fd00:0:32::2/64 r3 - h32: fd00:0:32::1/64
43+
h33 - r3: fd00:0:33::2/64 r3 - h33: fd00:0:33::1/64
44+
45+
h51 - r5: fd00:0:51::2/64 r5 - h51: fd00:0:51::1/64
46+
h52 - r5: fd00:0:52::2/64 r5 - h52: fd00:0:52::1/64
47+
h53 - r5: fd00:0:53::2/64 r5 - h53: fd00:0:53::1/64
48+
49+
h81 - r8: fd00:0:81::2/64 r8 - h81: fd00:0:81::1/64
50+
h82 - r8: fd00:0:82::2/64 r8 - h82: fd00:0:82::1/64
51+
h83 - r8: fd00:0:83::2/64 r8 - h83: fd00:0:83::1/64
52+
53+
router - router links:
54+
55+
r1 -r2: fcf0:0:1:2::1/64 r2 - r1: fcf0:0:1:2::2/64
56+
r2 -r3: fcf0:0:2:3::1/64 r3 - r2: fcf0:0:2:3::2/64
57+
r2 -r7: fcf0:0:2:7::1/64 r7 - r2: fcf0:0:2:7::2/64
58+
r3 -r4: fcf0:0:3:4::1/64 r4 - r3: fcf0:0:3:4::2/64
59+
r4 -r5: fcf0:0:4:5::1/64 r5 - r4: fcf0:0:4:5::2/64
60+
r4 -r6: fcf0:0:4:6::1/64 r6 - r4: fcf0:0:4:6::2/64
61+
r5 -r6: fcf0:0:5:6::1/64 r6 - r5: fcf0:0:5:6::2/64
62+
r6 -r7: fcf0:0:6:7::1/64 r7 - r6: fcf0:0:6:7::2/64
63+
r6 -r8: fcf0:0:6:8::1/64 r8 - r6: fcf0:0:6:8::2/64
64+
r7 -r8: fcf0:0:7:8::1/64 r8 - r7: fcf0:0:7:8::2/64
65+
66+
controller - router links:
67+
68+
controller - r2: fcff:2:c::2/48 r2 - controller: fcff:2:c::1/48
69+
70+
router localhost
71+
72+
r1 fcff:1::1
73+
r2 fcff:2::1
74+
r3 fcff:3::1
75+
r4 fcff:4::1
76+
r5 fcff:5::1
77+
r6 fcff:6::1
78+
r7 fcff:7::1
79+
r8 fcff:8::1
80+
81+
( The addressing plan is explained in https://docs.google.com/document/d/15giV53fH_eDuWadOxzjPVzlr-a7Rn65MpCbz9QKs7JI/edit )
82+
83+
------Tunnel examples -------------
84+
1) Create a bidirectional tunnel between h11 and h83, passing through router r4
85+
86+
1.1) set tunnel from r1 to r8 for fd00:0:83::/64
87+
88+
on r1: ip -6 route add fd00:0:83::/64 encap seg6 mode encap segs fcff:4::1,fcff:8::1 dev r1-h11
89+
90+
on r8: no explicit decap instruction is needed because net.ipv6.conf.*.seg6_enabled=1
91+
92+
1.2) set tunnel from r8 to r1 for fd00:0:11::/64
93+
94+
on r8: ip -6 route add fd00:0:11::/64 encap seg6 mode encap segs fcff:4::1,fcff:1::1 dev r8-h83
95+
96+
on r1: no explicit decap instruction is needed because net.ipv6.conf.*.seg6_enabled=1
97+
98+
after the tunnel is setup, you can ping from h11 to h83 and viceversa
99+
h11# ping6 fd00:0:83::2
100+
h83# ping6 fd00:0:11::2
101+
102+
on recent versions of Linux kernel (>=5.5) it is also possible to ping the router IP address on
103+
the interface with the host, while on previous ones it was not possible due to a bug in the SRv6
104+
implementation:
105+
h11# ping6 fd00:0:83::1
106+
107+
Note that this is not the suggested approach, the explicit configuration of decap instruction
108+
is preferred, as described hereafter
109+
110+
we use a decap SID in r8 and in r1 with the End.DT6 behavior, the SID used is fcff:8::100
111+
112+
1.3) set tunnel from r1 to r8 for fd00:0:83::/64
113+
114+
on r1: ip -6 route add fd00:0:83::/64 encap seg6 mode encap segs fcff:4::1,fcff:8::100 dev r1-h11
115+
116+
on r8: ip -6 route add fcff:8::100 encap seg6local action End.DT6 table 254 dev r8-h83
117+
118+
1.4) set tunnel from r8 to r1 for fd00:0:11::/64
119+
120+
on r8: ip -6 route add fd00:0:11::/64 encap seg6 mode encap segs fcff:4::1,fcff:1::100 dev r8-h83
121+
122+
on r1: ip -6 route add fcff:1::100 encap seg6local action End.DT6 table 254 dev r1-h11
123+
124+
table 254 corresponds to the "main" routing table, using recent version of ip command
125+
we can use table name instead of table id, for example
126+
on r8: ip -6 route add fcff:8::100 encap seg6local action End.DT6 table main dev r8-h83
127+
128+
129+
130+
------ISIS CONFIGURATION-------------
131+
132+
Install guide and How to get FRR
133+
134+
The official FRR website is located at https://frrouting.org/ and contains further information, as well as links to additional resources.
135+
136+
Several distributions provide packages for FRR. Check your distribution’s repositories to find out if a suitable version is available.
137+
138+
Daemons Configuration File
139+
140+
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:
141+
142+
zebra=no
143+
bgpd=no
144+
ospfd=no
145+
ospf6d=no
146+
ripd=no
147+
ripngd=no
148+
isisd=yes
149+
pimd=no
150+
ldpd=no
151+
nhrpd=no
152+
eigrpd=no
153+
babeld=no
154+
sharpd=no
155+
staticd=no
156+
pbrd=no
157+
bfdd=no
158+
fabricd=no
159+
160+
....
161+
162+
We have to enable the deamon, so modify the word "isis=no" with "isisd=yes"
163+
164+
165+
----ISIS Configuration----
166+
167+
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.
168+
169+
170+
Each routers contains the files "isisd.conf" "start.sh" "zebra.conf"
171+
172+
173+
The configuration of "zebra.conf" of each routers is for example:
174+
!
175+
hostname r1
176+
log file nodeconf/r1/zebra.log
177+
!
178+
debug zebra events
179+
debug zebra rib
180+
!
181+
interface r1-h11
182+
ipv6 address fd00:0:11::1/64
183+
!
184+
interface r1-h12
185+
ipv6 address fd00:0:12::1/64
186+
!
187+
interface r1-h13
188+
ipv6 address fd00:0:13::1/64
189+
!
190+
interface r1-r2
191+
ipv6 address fcf0:0:1:2::1/64
192+
!
193+
interface lo
194+
ipv6 address fcff:1::1/128
195+
!
196+
ipv6 forwarding
197+
!
198+
line vty
199+
!
200+
201+
202+
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
203+
With the command "ipv6 forwarding" we explicitly enable the ipv6 forwarding
204+
205+
206+
207+
The configuration of "isisd.conf" of each routers is for example:
208+
209+
hostname rx
210+
password XXXX
211+
log file nodeconf/r1/isisd.log
212+
!
213+
interface lo
214+
ipv6 router isis XX
215+
ip router isis XX
216+
isis hello-interval 5
217+
!
218+
interface r1-h1
219+
ipv6 router isis XX
220+
ip router isis XX
221+
isis hello-interval 5
222+
!
223+
interface r1-r2
224+
ipv6 router isis XX
225+
ip router isis XX
226+
isis hello-interval 5
227+
!
228+
interface r1-r3
229+
ipv6 router isis XX
230+
ip router isis XX
231+
isis hello-interval 5
232+
!
233+
router isis XX
234+
net 49.000X.XXXX.XXXX.XXXX.00
235+
is-type level-2-only
236+
metric-style wide
237+
!
238+
line vty
239+
240+
we use the command "ipv6 router isis XX" to use ipv6
241+
the command "isis hello-interval (1-600)
242+
" configure the level 1 hello interval
243+
244+
The command
245+
net XX.XXXX. ... .XXX.XX
246+
Set/Unset network entity title (NET) provided in ISO format.
247+
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:
248+
249+
49—AFI
250+
0001—Area ID
251+
1921.6800.1001—System identifier
252+
00—Selector
253+
254+
The system identifier must be unique within the network.
255+
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.
256+
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.
257+
The last byte (00) is the n-selector.
258+
259+
260+
261+
The command
262+
is-type level-2-only
263+
264+
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.
265+
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.
266+
267+
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
268+
269+
----Configuration of Hosts----
270+
271+
each host has a configuration file called start.sh
272+
Currently IPv6 forwarding is not explicitly enabled in start.sh, we have to configure ipv6 addresses for each hosts
273+
274+
Example of configuration of start.sh
275+
276+
BASE_DIR=/home/user/Progetto/1920-srv6-tutorial/nets/8routers-isis-ipv6/nodeconf
277+
NODE_NAME=h11
278+
GW_NAME=r1
279+
IF_NAME=$NODE_NAME-$GW_NAME
280+
IP_ADDR=fd00:0:11::2/64
281+
GW_ADDR=fd00:0:11::1
282+
283+
ip -6 addr add $IP_ADDR dev $IF_NAME
284+
ip -6 route add default via $GW_ADDR dev $IF_NAME
285+
286+
----Addressing----
287+
288+
the addressing on the links between the hosts hxy and the router x can be
289+
Router interface rx-hxy fd00:0:xy::1/64
290+
Host interface hxy-ry fd00:0:xy::2/64
291+
292+
```

0 commit comments

Comments
 (0)