Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Even newer topology with local trustee in its own LAN
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludovic Barman committed Sep 12, 2018
1 parent 8df4236 commit 03bb716
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 21 deletions.
24 changes: 12 additions & 12 deletions prifi-lib/relay/bufferableRoundManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,20 @@ func (b *BufferableRoundManager) Dump() {
sortedIntMapDump(b.trusteeAckMap)

/*
for i := 0; i < b.nTrustees; i++ {
numberOfCiphersInAdvance := 0
rounds := make([]int, len(b.bufferedTrusteeCiphers[i]))
j := 0
for roundID, _ := range b.bufferedTrusteeCiphers[i] {
if roundID > r {
numberOfCiphersInAdvance += 1
rounds[j] = int(roundID)
j++
for i := 0; i < b.nTrustees; i++ {
numberOfCiphersInAdvance := 0
rounds := make([]int, len(b.bufferedTrusteeCiphers[i]))
j := 0
for roundID, _ := range b.bufferedTrusteeCiphers[i] {
if roundID > r {
numberOfCiphersInAdvance += 1
rounds[j] = int(roundID)
j++
}
}
sort.Ints(rounds)
log.Lvl1("Trustee", i, "has",numberOfCiphersInAdvance, "ciphers in advance", rounds)
}
sort.Ints(rounds)
log.Lvl1("Trustee", i, "has",numberOfCiphersInAdvance, "ciphers in advance", rounds)
}
*/

//log.Lvl1("Buffered MAP Trustees")
Expand Down
12 changes: 9 additions & 3 deletions sda/simulation/deter.ns
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ set trustee_bandwidth 100Mb
set client_bandwidth 1000Mb
set trustee_delay 100ms
set client_delay 10ms
set trusteeinlan_delay 0ms

set lanstr_trustees ""
set lanstr_clients ""
set lanstr_trustees_local ""

# create the Relay
set relay [$ns node]
Expand All @@ -26,6 +28,7 @@ tb-set-node-startcmd $relay /share/t1t2/set_route
tb-set-node-failure-action $relay "nonfatal"
append lanstr_clients "$relay "
append lanstr_trustees "$relay "
append lanstr_trustees_local "$relay "

# create the Trustees
for {set i 0} {$i < $n_trustees} {incr i} {
Expand All @@ -42,7 +45,7 @@ tb-set-node-os $trusteeinlan Ubuntu1404-64-STD
tb-set-hardware $trusteeinlan pc3060
tb-set-node-startcmd $trusteeinlan /share/t1t2/set_route
tb-set-node-failure-action $trusteeinlan "nonfatal"
append lanstr_clients "$trusteeinlan "
append lanstr_trustees_local "$trusteeinlan "

# create the Clients
for {set i 0} {$i < $n_clients} {incr i} {
Expand All @@ -57,14 +60,17 @@ for {set i 0} {$i < $n_clients} {incr i} {

set lanclients [$ns make-lan "$lanstr_clients" $client_bandwidth $client_delay]
set lantrustees [$ns make-lan "$lanstr_trustees" $trustee_bandwidth $trustee_delay]
set lantrusteeslocal [$ns make-lan "$lanstr_trustees_local" $client_bandwidth $trusteeinlan_delay]

# set the relay in both lan
tb-set-ip-lan $relay $lantrustees 10.1.0.254
tb-set-ip-lan $relay $lanclients 10.0.1.254
tb-set-ip-lan $relay $lantrusteeslocal 10.2.0.254

# tell deterlab not to use delays node, but to shape the delays in the hosts (save some nodes)
tb-set-endnodeshaping $lanclients 1
tb-set-endnodeshaping $lantrustees 1
tb-set-endnodeshaping lantrusteeslocal 1

# set the trustee's lan
for {set i 0} {$i < $n_trustees} {incr i} {
Expand All @@ -78,8 +84,8 @@ for {set i 0} {$i < $n_clients} {incr i} {
set ip 10.0.1.[expr {$i + 1}]
tb-set-ip-lan $client($i) $lanclients $ip
}
set ip 10.0.1.250
tb-set-ip-lan $trusteeinlan $lanclients $ip
set ip 10.2.0.250
tb-set-ip-lan $trusteeinlan $lantrusteeslocal $ip

# Do not remove - automatically generated tunnelcode for connectivity
# set tunnel [$ns node]
Expand Down
2 changes: 1 addition & 1 deletion sda/simulation/deter.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MonitorAddress = "users.isi.deterlab.net"
MonitorPort = 10002
Servers = 9
Simulation = "PriFi"
Hosts = 95
Hosts = 94
Debug = 0
RunWait = "10000000ms"
Suite = "Ed25519"
Expand Down
6 changes: 3 additions & 3 deletions sda/simulation/prifi_simul.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Hosts = 95
PayloadSize = 100 # CellSizeUp is automatically computed w.r.t to equivocation protection flag
Hosts = 94
PayloadSize = 100
CellSizeDown = 17500
RelayWindowSize = 5
RelayWindowSize = 7
DCNetType = "Simple"
RelayReportingLimit = 100000
RelayMaxNumberOfConsecutiveFailedRounds = 3
Expand Down
4 changes: 2 additions & 2 deletions sda/simulation/prifi_simul_template.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Hosts = x
PayloadSize = 100
CellSizeDown = 17500
RelayWindowSize = 5
RelayWindowSize = 7
DCNetType = "Simple"
RelayReportingLimit = 100000
RelayMaxNumberOfConsecutiveFailedRounds = 3
Expand All @@ -25,7 +25,7 @@ TrusteeNeverSlowDown = false # Never sleep, even at HALVED rate (useful for full
EquivocationProtectionEnabled = false
SocksServerPort = 8080
SocksClientPort = 8090
TrusteeIPRegexPattern = "(10\\.1\\.0\\.([0-9]+))|(10\\.0\\.1\\.250)"
TrusteeIPRegexPattern = "(10\\.1\\.0\\.([0-9]+))|(10\\.2\\.0\\.250)"
ClientIPRegexPattern = "10\\.0\\.1\\.([0-9]+)"
RelayIPRegexPattern = "10\\.([0-9]+)\\.([0-9]+)\\.254"
OverrideLogLevel = 1
Expand Down

0 comments on commit 03bb716

Please sign in to comment.