File: start_testing.sh

package info (click to toggle)
openoverlayrouter 1.3.0%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,552 kB
  • sloc: ansic: 42,180; sh: 272; makefile: 268; xml: 11
file content (197 lines) | stat: -rwxr-xr-x 4,648 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
#!/bin/bash

if [ -e /oor/oor.conf ]
then
  cp /oor/oor.conf /etc/oor.conf
  oor -f /etc/oor.conf
  exit
fi

FILE="/etc/oor.conf"

if [ $2 != "xTR" -a $2 != "MN" ] ; then
  echo "OPMODE should be xTR or MN -$2-"
  exit
fi

if [ $3 == "-" ] ; then
  echo "IPMAPRESOLVER is required. Destroy the container and create it again adding this environment parameter"
  exit
fi

if [ $4 == "-" ] ; then
  echo "IPMAPSERVER is required. Destroy the container and create it again adding this environment parameter"
  exit
fi

if [ $5 == "-" ] ; then
  echo "KEYMAPSERVER is required. Destroy the container and create it again adding this environment parameter"
  exit
fi

if [ $8 == "-" -a $9 == "-" ] ; then
  echo "IPV4EIDPREFFIX or/and IPV6EIDPREFFIX are required. Destroy the container and create it again adding these environment parameter"
  echo "$8  $9"
  exit
fi
  
cat > $FILE <<DELIM
################################################
#
# General configuration
#
# debug: Debug levels [0..3]
# map-request-retries: Additional Map-Requests to send per map cache miss
# log-file: Specifies log file used in daemon mode. If it is not specified,  
#   messages are written in syslog file
# ipv6-scope [GLOBAL|SITE]: Scope of the IPv6 address used for the locators. GLOBAL by default

debug                  = $1 
map-request-retries    = 2
log-file               = /var/log/oor.log
ipv6-scope             = GLOBAL

# Define the type of LISP device LISPmob will operate as 
#
# operating-mode can be any of:
# xTR, RTR, MN, MS
#
operating-mode         = $2

# encapsulation: Encapsulation that will use OOR in the data plane. Could be
#   LISP or VXLAN-GPE. LISP is selected by default

encapsulation          = LISP

# RLOC probing configuration
#   rloc-probe-interval: interval at which periodic RLOC probes are sent
#     (seconds). A value of 0 disables RLOC probing
#   rloc-probe-retries: RLOC probe retries before setting the locator with
#     status down. [0..5]
#   rloc-probe-retries-interval: interval at which RLOC probes retries are
#     sent (seconds) [1..rloc-probe-interval]

rloc-probing {
    rloc-probe-interval             = 60
    rloc-probe-retries              = 2
    rloc-probe-retries-interval     = 5
}

# Encapsulated Map-Requests are sent to this Map-Resolver
# You can define several Map-Resolvers, seprated by comma. Encapsulated 
# Map-Request messages will be sent to only one.
#   address: IPv4 or IPv6 address of the map-resolver  

map-resolver        = {
    $3 
}

###############################################
#
# xTR & MN configuration
#

# NAT Traversl configuration. 
#   nat_traversal_support: check if the node is behind NAT.

nat_traversal_support  = off

# Map-Registers are sent to this Map-Server
# You can define several Map-Servers. Map-Register messages will be sent to all
# of them.
#   address: IPv4 or IPv6 address of the map-server
#   key-type: Only 1 supported (HMAC-SHA-1-96)
#   key: password to authenticate with the map-server
#   proxy-reply [on/off]: Configure map-server to Map-Reply on behalf of the xTR

map-server {
        address        = $4
        key-type       = 1
        key            = $5
        proxy-reply    = on
}
DELIM

if [ $6 != "-" ] ; then

cat >> $FILE <<DELIM  
# Proxy for IPv4 EIDs
proxy-etr-ipv4 {
        address     = $6
        priority    = 1
        weight      = 100
}  
DELIM

fi

if [ $7 != "-" ] ; then

cat >> $FILE <<DELIM  
# Proxy for IPv4 EIDs
proxy-etr-ipv6 {
        address     = $7
        priority    = 1
        weight      = 100
}  
DELIM

fi

if [ $6  != "-" -o $7  != "-" ] ; then

cat >> $FILE <<DELIM  
proxy-itrs = {
# LISP beta-network IPv4 PITRs
        69.31.31.98,                 # eqx-ash-pxtr
        129.250.1.63,                # ntt-amer-pxtr
        217.8.98.33,                 # intouch-pxtr-1
        193.162.145.46,              # tdc-pxtr
        158.38.1.92,                 # uninett-pxtr
        203.181.249.172,             # apan-pxtr
        202.51.247.10        
DELIM

fi

if [ $8 != "-" ] ; then

cat >> $FILE <<DELIM  

database-mapping {
    eid-prefix          = $8
    iid                 = 0
    ttl                 = 10
    rloc-iface{
        interface       = eth0
        ip_version      = 4
        priority        = 1
        weight          = 100
    }
}

DELIM

fi

if [ $9 != "-" ] ; then

cat >> $FILE <<DELIM 

database-mapping {
    eid-prefix          = $9
    iid                 = 0
    ttl                 = 10
    rloc-iface{
        interface       = eth0
        ip_version      = 4
        priority        = 1
        weight          = 100
    }
}
 
DELIM

fi

oor -f /etc/oor.conf