Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joanne Hugé
re6stnet
Commits
cc56cd2a
Commit
cc56cd2a
authored
Apr 13, 2021
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change ip addresses
parent
51f640de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
40 deletions
+40
-40
demo/demo
demo/demo
+37
-37
demo/miniupnpd.conf
demo/miniupnpd.conf
+1
-1
demo/re6st-registry_global.conf
demo/re6st-registry_global.conf
+1
-1
demo/re6stnet_global.conf
demo/re6stnet_global.conf
+1
-1
No files found.
demo/demo
View file @
cc56cd2a
...
...
@@ -8,8 +8,8 @@ import thread
IPTABLES = 'iptables'
SCREEN = 'screen'
VERBOSE = 4
REGISTRY = '1
0
.0.0.2'
REGISTRY2 = '1
0
.3.0.2'
REGISTRY = '1
93
.0.0.2'
REGISTRY2 = '1
93
.3.0.2'
REGISTRY_SERIAL = '0x120010db80042'
REGISTRY2_SERIAL = '0x120010db80043'
CA_DAYS = 1000
...
...
@@ -29,15 +29,15 @@ with open(os.devnull, "wb") as f:
#
# registry .2------ ------.2 registry2
# | |
#
10.0.0| |10
.3.0
#
193.0.0| |193
.3.0
# .1 | |.1
# ---------------Internet----------------
# |.1 |.1 |.1
# |1
0.1.0 |10.2.0
|
# |1
93.1.0 |193.2.0
|
# |.2 |.2 |
# gateway1 gateway2 s3:1
0
.0.1
# gateway1 gateway2 s3:1
93
.0.1
# |.1 |.1 |.2 |.3 |.4
# s1:1
0.1.1 --s2:10
.2.1-- m6 m7 m8
# s1:1
93.1.1 --s2:193
.2.1-- m6 m7 m8
# |.2 |.3 |.2 |.3 |.4 |.5 |
# m1 m2 m3 m4 m5 m10 m9
#
...
...
@@ -306,26 +306,26 @@ m9_if_0.up = m10_if_0.up = in_if_4.up = r2_if_0.up = True
# Add IPv4 addresses
re_if_0.add_v4_address(address=REGISTRY, prefix_len=24)
r2_if_0.add_v4_address(address=REGISTRY2, prefix_len=24)
in_if_0.add_v4_address(address='1
0
.0.0.1', prefix_len=24)
in_if_1.add_v4_address(address='1
0
.1.0.1', prefix_len=24)
in_if_2.add_v4_address(address='1
0
.2.0.1', prefix_len=24)
in_if_3.add_v4_address(address='1
0
.0.1.1', prefix_len=24)
in_if_0.add_v4_address(address='1
93
.0.0.1', prefix_len=24)
in_if_1.add_v4_address(address='1
93
.1.0.1', prefix_len=24)
in_if_2.add_v4_address(address='1
93
.2.0.1', prefix_len=24)
in_if_3.add_v4_address(address='1
93
.0.1.1', prefix_len=24)
in_if_3.add_v6_address(address='2001:db8::1', prefix_len=48)
g1_if_0.add_v4_address(address='1
0
.1.0.2', prefix_len=24)
g1_if_1.add_v4_address(address='1
0
.1.1.1', prefix_len=24)
g2_if_0.add_v4_address(address='1
0
.2.0.2', prefix_len=24)
g2_if_1.add_v4_address(address='1
0
.2.1.1', prefix_len=24)
m1_if_0.add_v4_address(address='1
0
.1.1.2', prefix_len=24)
m2_if_0.add_v4_address(address='1
0
.1.1.3', prefix_len=24)
m3_if_0.add_v4_address(address='1
0
.2.1.2', prefix_len=24)
m4_if_0.add_v4_address(address='1
0
.2.1.3', prefix_len=24)
m5_if_0.add_v4_address(address='1
0
.2.1.4', prefix_len=24)
m10_if_0.add_v4_address(address='1
0
.2.1.5', prefix_len=24)
m6_if_0.add_v4_address(address='1
0
.0.1.2', prefix_len=24)
m7_if_0.add_v4_address(address='1
0
.0.1.3', prefix_len=24)
m8_if_0.add_v4_address(address='1
0
.0.1.4', prefix_len=24)
g1_if_0.add_v4_address(address='1
93
.1.0.2', prefix_len=24)
g1_if_1.add_v4_address(address='1
93
.1.1.1', prefix_len=24)
g2_if_0.add_v4_address(address='1
93
.2.0.2', prefix_len=24)
g2_if_1.add_v4_address(address='1
93
.2.1.1', prefix_len=24)
m1_if_0.add_v4_address(address='1
93
.1.1.2', prefix_len=24)
m2_if_0.add_v4_address(address='1
93
.1.1.3', prefix_len=24)
m3_if_0.add_v4_address(address='1
93
.2.1.2', prefix_len=24)
m4_if_0.add_v4_address(address='1
93
.2.1.3', prefix_len=24)
m5_if_0.add_v4_address(address='1
93
.2.1.4', prefix_len=24)
m10_if_0.add_v4_address(address='1
93
.2.1.5', prefix_len=24)
m6_if_0.add_v4_address(address='1
93
.0.1.2', prefix_len=24)
m7_if_0.add_v4_address(address='1
93
.0.1.3', prefix_len=24)
m8_if_0.add_v4_address(address='1
93
.0.1.4', prefix_len=24)
m6_if_1.add_v4_address(address='192.168.241.1', prefix_len=24)
in_if_4.add_v4_address(address='1
0
.3.0.1', prefix_len=24)
in_if_4.add_v4_address(address='1
93
.3.0.1', prefix_len=24)
# Add IPv6 addresses to test UDP6 between m8 and m6/m7
m6_if_0.add_v6_address(address='fc42:6::1', prefix_len=16)
...
...
@@ -344,22 +344,22 @@ add_llrtr(re_if_0, in_if_0)
add_llrtr(r2_if_0, in_if_4)
add_llrtr(in_if_0, re_if_0, '2001:db8:42::/48')
add_llrtr(in_if_4, r2_if_0, '2001:db8:43::/48')
registry.add_route(prefix='1
0.0.0.0', prefix_len=8, nexthop='10
.0.0.1')
registry2.add_route(prefix='1
0.0.0.0', prefix_len=8, nexthop='10
.3.0.1')
internet.add_route(prefix='1
0.2.0.0', prefix_len=16, nexthop='10
.2.0.2')
gateway1.add_route(prefix='1
0.0.0.0', prefix_len=8, nexthop='10
.1.0.1')
gateway2.add_route(prefix='1
0.0.0.0', prefix_len=8, nexthop='10
.2.0.1')
registry.add_route(prefix='1
93.0.0.0', prefix_len=8, nexthop='193
.0.0.1')
registry2.add_route(prefix='1
93.0.0.0', prefix_len=8, nexthop='193
.3.0.1')
internet.add_route(prefix='1
93.2.0.0', prefix_len=16, nexthop='193
.2.0.2')
gateway1.add_route(prefix='1
93.0.0.0', prefix_len=8, nexthop='193
.1.0.1')
gateway2.add_route(prefix='1
93.0.0.0', prefix_len=8, nexthop='193
.2.0.1')
for m in machine1, machine2:
m.add_route(nexthop='1
0
.1.1.1')
m.add_route(nexthop='1
93
.1.1.1')
for m in machine3, machine4, machine5, machine10:
m.add_route(prefix='1
0.0.0.0', prefix_len=8, nexthop='10
.2.1.1')
m.add_route(prefix='1
93.0.0.0', prefix_len=8, nexthop='193
.2.1.1')
for m in machine6, machine7, machine8:
m.add_route(prefix='1
0.0.0.0', prefix_len=8, nexthop='10
.0.1.1')
m.add_route(prefix='1
93.0.0.0', prefix_len=8, nexthop='193
.0.1.1')
# Test connectivity first. Run process, hide output and check
# return code
null = file(os.devnull, "r+")
for ip in '1
0.1.1.2', '10.1.1.3', '10.2.1.2', '10
.2.1.3':
for ip in '1
93.1.1.2', '193.1.1.3', '193.2.1.2', '193
.2.1.3':
if machine1.Popen(('ping', '-c1', ip), stdout=null).wait():
print 'Failed to ping %s' % ip
break
...
...
@@ -451,7 +451,7 @@ def new_network(registry, reg_addr, serial, ca):
with new_network(registry, REGISTRY, REGISTRY_SERIAL, 'ca.crt') as new_node:
new_node(machine1, 'm1', '-I%s' % m1_if_0.name)
new_node(machine2, 'm2', '--remote-gateway 1
0
.1.1.1', prefix_len=80)
new_node(machine2, 'm2', '--remote-gateway 1
93
.1.1.1', prefix_len=80)
new_node(machine3, 'm3', '-i%s' % m3_if_0.name)
new_node(machine4, 'm4', '-i%s' % m4_if_0.name)
new_node(machine5, 'm5', '-i%s' % m5_if_0.name)
...
...
@@ -599,8 +599,8 @@ def node_by_ll(addr):
for
a
in
a:
p =
a['prefix_len']
a =
a['address']
if
a
.
startswith
('
1
0
.')
:
if
a
.
startswith
('
1
0
.
42
.')
:
if
a
.
startswith
('
1
93
.')
:
if
a
.
startswith
('
1
93
.
42
.')
:
assert
not
p
%
8
_ll
[
socket
.
inet_ntoa
(
socket
.
inet_aton
(
a
)[
:p
/
8
].
ljust
(
4
,
'\
0
'
))] =
n,
t
...
...
@@ -619,7 +619,7 @@ def route_svg(ipv4, z = 4, default = type('', (), {'short': None})):
for
n
in
nodes:
g =
graph[n]
=
defaultdict
(
list
)
for
r
in
n
.
get_routes
()
:
if
(
r
.
prefix
and
r
.
prefix
.
startswith
('
1
0
.
42
.')
if
ipv4
else
if
(
r
.
prefix
and
r
.
prefix
.
startswith
('
1
93
.
42
.')
if
ipv4
else
r
.
prefix
is
None
or
r
.
prefix
.
startswith
('
2001:db8:
'))
:
try:
g
[
node_by_ll
(
r
.
nexthop
)].
append
(
...
...
demo/miniupnpd.conf
View file @
cc56cd2a
clean_ruleset_interval
=
600
allow
1024
-
65535
1
0
.
0
.
0
.
0
/
8
1024
-
65535
allow
1024
-
65535
1
93
.
0
.
0
.
0
/
8
1024
-
65535
deny
0
-
65535
0
.
0
.
0
.
0
/
0
0
-
65535
demo/re6st-registry_global.conf
View file @
cc56cd2a
...
...
@@ -6,7 +6,7 @@
hello
4
client
-
count
2
tunnel
-
refresh
100
ipv4
1
0
.
42
.
0
.
0
/
16
8
ipv4
1
93
.
42
.
0
.
0
/
16
8
@
registry
ca
ca
.
crt
same
-
country
CN
...
...
demo/re6stnet_global.conf
View file @
cc56cd2a
...
...
@@ -16,7 +16,7 @@
@
m3
pp
1194
tcp
@
m4
ip
1
0
.
2
.
1
.
3
ip
1
93
.
2
.
1
.
3
pp
1194
tcp
default
@
m5
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment