├── figures ├── cap2 │ ├── 2d.png │ ├── 3d.png │ ├── vnd.png │ ├── xterm.png │ ├── miniedit.png │ ├── graph-mobility.png │ └── topo-wifi.eps ├── cap3 │ ├── vlan.png │ ├── linssid.png │ ├── mptcp.png │ ├── linssid2.png │ ├── xterm-test.png │ ├── ping-wireshark.png │ ├── wireshark-beacons.png │ ├── wireshark-ofproto.png │ ├── wireshark-interface.png │ ├── adhoc-mesh.eps │ ├── qos.eps │ └── dhcp.eps ├── cap4 │ ├── sumo.png │ ├── lowpan.png │ ├── radius.png │ ├── wpan1.png │ ├── aircrack.png │ ├── sflow-rt.png │ ├── snort-h1.png │ ├── usb-dongle.jpg │ ├── beacon-wireshark-controller.png │ └── physical.eps └── cap1 │ └── 802-11-b-channels.jpg ├── README.md └── codes ├── cap4 ├── replayingMobility │ ├── node1.dat │ ├── node2.dat │ ├── node3.dat │ └── node4.dat ├── sta1_.py ├── sta2_.py ├── lowpan.py ├── my-module.py ├── internet.py ├── replayingNetworkConditions │ ├── serverTrace.txt │ └── clientTrace.txt ├── arpspoofing.py ├── authentication.py ├── defaultgw.py ├── hybridVirtualPhysical.py ├── associationControl.py ├── radius.py ├── radiusCode-openflow.py ├── krack-attack.py ├── handover-controller.py ├── forwardingBySSID.py ├── replayingNetworkConditions.py ├── replayingMobility.py ├── handover-controller-beacons.py ├── vanet-sumo.py └── sflow-rt.py ├── cap3 ├── socket_client.py ├── internet.py ├── dhcp.py ├── multipleWlan.py ├── socket_server.py ├── handover.py ├── qos.py ├── wmediumd_3aps.py ├── wmediumd_2aps.py ├── static-routing.py ├── adhoc.py ├── mesh.py ├── bonding.py ├── bgscan.py ├── vlan.py ├── loop.py ├── mptcp.py ├── routerline.py └── rip.py └── extras ├── wep.py ├── 6in4.py └── gre.py /figures/cap2/2d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap2/2d.png -------------------------------------------------------------------------------- /figures/cap2/3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap2/3d.png -------------------------------------------------------------------------------- /figures/cap2/vnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap2/vnd.png -------------------------------------------------------------------------------- /figures/cap3/vlan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/vlan.png -------------------------------------------------------------------------------- /figures/cap4/sumo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/sumo.png -------------------------------------------------------------------------------- /figures/cap2/xterm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap2/xterm.png -------------------------------------------------------------------------------- /figures/cap3/linssid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/linssid.png -------------------------------------------------------------------------------- /figures/cap3/mptcp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/mptcp.png -------------------------------------------------------------------------------- /figures/cap4/lowpan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/lowpan.png -------------------------------------------------------------------------------- /figures/cap4/radius.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/radius.png -------------------------------------------------------------------------------- /figures/cap4/wpan1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/wpan1.png -------------------------------------------------------------------------------- /figures/cap2/miniedit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap2/miniedit.png -------------------------------------------------------------------------------- /figures/cap3/linssid2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/linssid2.png -------------------------------------------------------------------------------- /figures/cap4/aircrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/aircrack.png -------------------------------------------------------------------------------- /figures/cap4/sflow-rt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/sflow-rt.png -------------------------------------------------------------------------------- /figures/cap4/snort-h1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/snort-h1.png -------------------------------------------------------------------------------- /figures/cap3/xterm-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/xterm-test.png -------------------------------------------------------------------------------- /figures/cap4/usb-dongle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/usb-dongle.jpg -------------------------------------------------------------------------------- /figures/cap2/graph-mobility.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap2/graph-mobility.png -------------------------------------------------------------------------------- /figures/cap3/ping-wireshark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/ping-wireshark.png -------------------------------------------------------------------------------- /figures/cap1/802-11-b-channels.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap1/802-11-b-channels.jpg -------------------------------------------------------------------------------- /figures/cap3/wireshark-beacons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/wireshark-beacons.png -------------------------------------------------------------------------------- /figures/cap3/wireshark-ofproto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/wireshark-ofproto.png -------------------------------------------------------------------------------- /figures/cap3/wireshark-interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap3/wireshark-interface.png -------------------------------------------------------------------------------- /figures/cap4/beacon-wireshark-controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ramonfontes/mn-wifi-book-en/master/figures/cap4/beacon-wireshark-controller.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Errata 2 | 3 | 4 | | Location | Problem | Reported by | Date Reported | 5 | |------------|:-----:|--------|-------| 6 | | p. 94 | __--no-bridge__ should be __--client-isolation__ | José Soler - joss@fotonik.dtu.dk | 2021-07-02 | 7 | -------------------------------------------------------------------------------- /codes/cap4/replayingMobility/node1.dat: -------------------------------------------------------------------------------- 1 | 10 1 2 | 11 2 3 | 12 3 4 | 13 4 5 | 14 5 6 | 15 6 7 | 16 7 8 | 17 8 9 | 18 9 10 | 19 10 11 | 20 11 12 | 21 12 13 | 22 13 14 | 23 14 15 | 24 15 16 | 25 16 17 | 26 17 18 | 27 18 19 | 28 19 20 | 29 20 21 | 30 21 22 | 31 22 23 | 32 23 24 | 33 24 25 | 34 25 26 | 35 26 27 | 36 27 28 | 37 28 29 | 38 29 30 | 39 30 31 | 40 31 32 | 41 32 33 | 42 33 34 | 43 34 35 | 44 35 36 | 45 36 37 | 46 37 38 | 47 38 39 | 48 39 40 | 49 40 41 | 50 41 42 | 51 42 43 | 52 43 44 | 53 44 45 | 54 45 46 | 55 46 47 | 56 47 48 | 57 48 49 | 58 49 50 | 59 50 51 | -------------------------------------------------------------------------------- /codes/cap4/replayingMobility/node2.dat: -------------------------------------------------------------------------------- 1 | 100 90 2 | 99 89 3 | 98 88 4 | 97 87 5 | 96 86 6 | 95 85 7 | 94 84 8 | 93 83 9 | 92 82 10 | 91 81 11 | 90 80 12 | 89 79 13 | 88 78 14 | 87 77 15 | 86 76 16 | 85 75 17 | 84 74 18 | 83 73 19 | 82 72 20 | 81 71 21 | 80 70 22 | 79 69 23 | 78 68 24 | 77 67 25 | 76 66 26 | 75 65 27 | 74 64 28 | 73 63 29 | 72 62 30 | 71 61 31 | 70 60 32 | 69 59 33 | 68 58 34 | 67 57 35 | 66 56 36 | 65 55 37 | 64 54 38 | 63 53 39 | 62 52 40 | 61 51 41 | 60 50 42 | 59 49 43 | 58 48 44 | 57 47 45 | 56 46 46 | 55 45 47 | 54 44 48 | 53 43 49 | 52 42 50 | 51 41 51 | -------------------------------------------------------------------------------- /codes/cap4/replayingMobility/node3.dat: -------------------------------------------------------------------------------- 1 | 110 1 2 | 111 2 3 | 112 3 4 | 113 4 5 | 114 5 6 | 115 6 7 | 116 7 8 | 117 8 9 | 118 9 10 | 119 10 11 | 120 11 12 | 121 12 13 | 122 13 14 | 123 14 15 | 124 15 16 | 125 16 17 | 126 17 18 | 127 18 19 | 128 19 20 | 129 20 21 | 130 21 22 | 131 22 23 | 132 23 24 | 133 24 25 | 134 25 26 | 135 26 27 | 136 27 28 | 137 28 29 | 138 29 30 | 139 30 31 | 140 31 32 | 141 32 33 | 142 33 34 | 143 34 35 | 144 35 36 | 145 36 37 | 146 37 38 | 147 38 39 | 148 39 40 | 149 40 41 | 150 41 42 | 151 42 43 | 152 43 44 | 153 44 45 | 154 45 46 | 155 46 47 | 156 47 48 | 157 48 49 | 158 49 50 | 159 50 51 | -------------------------------------------------------------------------------- /codes/cap4/replayingMobility/node4.dat: -------------------------------------------------------------------------------- 1 | 120 1 2 | 121 2 3 | 122 3 4 | 123 4 5 | 124 5 6 | 125 6 7 | 126 7 8 | 127 8 9 | 128 9 10 | 129 10 11 | 130 11 12 | 131 12 13 | 132 13 14 | 133 14 15 | 134 15 16 | 135 16 17 | 136 17 18 | 137 18 19 | 138 19 20 | 139 20 21 | 140 21 22 | 141 22 23 | 142 23 24 | 143 24 25 | 144 25 26 | 145 26 27 | 146 27 28 | 147 28 29 | 148 29 30 | 149 30 31 | 150 31 32 | 151 32 33 | 152 33 34 | 153 34 35 | 154 35 36 | 155 36 37 | 156 37 38 | 157 38 39 | 158 39 40 | 159 40 41 | 160 41 42 | 161 42 43 | 162 43 44 | 163 44 45 | 164 45 46 | 165 46 47 | 166 47 48 | 167 48 49 | 168 49 50 | 169 50 51 | -------------------------------------------------------------------------------- /codes/cap3/socket_client.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import socket 3 | 4 | 5 | def client(): 6 | host = '127.0.0.1' 7 | port = 12345 # Make sure it's within the > 1024 $$ <65535 range 8 | message = '' 9 | while message != 'q' and message != 'exit': 10 | s = socket.socket() 11 | s.connect((host, port)) 12 | if sys.version_info.major == 3: 13 | message = input('-> ') 14 | else: 15 | message = raw_input('-> ') 16 | s.send(str(message).encode('utf-8')) 17 | data = s.recv(1024).decode('utf-8') 18 | print('Received from server: ' + data) 19 | s.close() 20 | 21 | 22 | if __name__ == '__main__': 23 | client() 24 | -------------------------------------------------------------------------------- /codes/cap4/sta1_.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from scapy.all import * 8 | import os 9 | 10 | def pkt_callback(pkt): 11 | broadcast = "ff:ff:ff:ff:ff:ff" 12 | addr1 = "02:00:00:00:00:00" 13 | if pkt.haslayer(Dot11): 14 | extra = pkt.notdecoded 15 | signal = -(256 - ord(extra[-4:-3])) 16 | if str(pkt.addr1) == addr1: 17 | msg = "vehicle: %s / transmitter: %s / signal: %s" % (pkt.addr1, pkt.addr2, signal) 18 | packet = IP(src="10.0.0.1", dst="10.0.0.100")/TCP(sport=8000, dport=6653)/msg 19 | send(packet, verbose=0) 20 | 21 | sniff(iface="mon0", prn=pkt_callback) 22 | -------------------------------------------------------------------------------- /codes/cap4/sta2_.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from scapy.all import * 8 | import os 9 | 10 | def pkt_callback(pkt): 11 | broadcast = "ff:ff:ff:ff:ff:ff" 12 | addr1 = "02:00:00:00:01:00" 13 | if pkt.haslayer(Dot11): 14 | extra = pkt.notdecoded 15 | signal = -(256 - ord(extra[-4:-3])) 16 | if str(pkt.addr1) == addr2: 17 | msg = "vehicle: %s / transmitter: %s / signal: %s" % (pkt.addr1, pkt.addr2, signal) 18 | packet = IP(src="10.0.0.2", dst="10.0.0.100")/TCP(sport=8000, dport=6653)/msg 19 | send(packet, verbose=0) 20 | 21 | sniff(iface="mon0", prn=pkt_callback) 22 | -------------------------------------------------------------------------------- /codes/cap4/lowpan.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.cli import CLI 10 | from mn_wifi.net import Mininet_wifi 11 | 12 | 13 | def topology(): 14 | "Create a network." 15 | net = Mininet_wifi(iot_module='fakelb') 16 | # iot_module: fakelb or mac802154_hwsim 17 | # mac802154_hwsim is only supported from kernel 4.18 18 | 19 | info("*** Creating nodes\n") 20 | net.addSensor('sensor1', ip6='2001::1/64', panid='0xbeef') 21 | net.addSensor('sensor2', ip6='2001::2/64', panid='0xbeef') 22 | net.addSensor('sensor3', ip6='2001::3/64', panid='0xbeef') 23 | 24 | info("*** Configuring nodes\n") 25 | net.configureWifiNodes() 26 | 27 | info("*** Starting network\n") 28 | net.build() 29 | 30 | info("*** Running CLI\n") 31 | CLI(net) 32 | 33 | info("*** Stopping network\n") 34 | net.stop() 35 | 36 | 37 | if __name__ == '__main__': 38 | setLogLevel('info') 39 | topology() 40 | -------------------------------------------------------------------------------- /codes/cap4/my-module.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | 'This example creates a simple network topology with 1 AP and 2 stations' 4 | 5 | import sys 6 | 7 | from mininet.log import setLogLevel, info 8 | from mn_wifi.cli import CLI 9 | from mn_wifi.net import Mininet_wifi 10 | 11 | 12 | def topology(): 13 | "Create a network." 14 | net = Mininet_wifi() 15 | 16 | info("*** Creating nodes\n") 17 | ap1 = net.addAccessPoint('ap1', ssid="simpletopo", mode="g", channel="5") 18 | sta1 = net.addStation('sta1') 19 | sta2 = net.addStation('sta2') 20 | 21 | info("*** Starting a new module\n") 22 | net.setModule('./mac80211_hwsim.ko') 23 | 24 | info("*** Configuring wifi nodes\n") 25 | net.configureWifiNodes() 26 | 27 | info("*** Associating Stations\n") 28 | net.addLink(sta1, ap1) 29 | net.addLink(sta2, ap1) 30 | 31 | info("*** Starting network\n") 32 | net.build() 33 | ap1.start([]) 34 | 35 | info("*** Running CLI\n") 36 | CLI(net) 37 | 38 | info("*** Stopping network\n") 39 | net.stop() 40 | 41 | 42 | if __name__ == '__main__': 43 | setLogLevel('info') 44 | topology() 45 | -------------------------------------------------------------------------------- /codes/cap3/internet.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import OVSKernelAP 10 | from mn_wifi.link import wmediumd 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | 14 | 15 | def topology(): 16 | "Create a network." 17 | net = Mininet_wifi(controller=Controller) 18 | 19 | info("*** Creating nodes\n") 20 | ap1 = net.addAccessPoint('ap1', ssid='new-ssid', mode='g', 21 | channel='1', position='10,10,0') 22 | net.addStation('sta1', position='10,20,0') 23 | c1 = net.addController('c1', controller=Controller) 24 | 25 | info("*** Configuring wifi nodes\n") 26 | net.configureWifiNodes() 27 | 28 | info("*** Starting network\n") 29 | net.build() 30 | net.addNAT().configDefault() 31 | c1.start() 32 | ap1.start([c1]) 33 | 34 | info("*** Running CLI\n") 35 | CLI(net) 36 | 37 | info("*** Stopping network\n") 38 | net.stop() 39 | 40 | 41 | if __name__ == '__main__': 42 | setLogLevel('info') 43 | topology() 44 | -------------------------------------------------------------------------------- /codes/cap4/internet.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import OVSKernelAP 10 | from mn_wifi.link import wmediumd 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | 14 | 15 | def topology(): 16 | "Create a network." 17 | net = Mininet_wifi(controller=Controller) 18 | 19 | info("*** Creating nodes\n") 20 | ap1 = net.addAccessPoint('ap1', ssid='new-ssid', mode='g', 21 | channel='1', position='10,10,0') 22 | net.addStation('sta1', position='10,20,0') 23 | c1 = net.addController('c1', controller=Controller) 24 | 25 | info("*** Configuring wifi nodes\n") 26 | net.configureWifiNodes() 27 | 28 | info("*** Starting network\n") 29 | net.build() 30 | net.addNAT().configDefault() 31 | c1.start() 32 | ap1.start([c1]) 33 | 34 | info("*** Running CLI\n") 35 | CLI(net) 36 | 37 | info("*** Stopping network\n") 38 | net.stop() 39 | 40 | 41 | if __name__ == '__main__': 42 | setLogLevel('info') 43 | topology() 44 | -------------------------------------------------------------------------------- /codes/cap4/replayingNetworkConditions/serverTrace.txt: -------------------------------------------------------------------------------- 1 | 0 0 0 0 0.719447 2 | 1 2025908 0 0 0.980924 3 | 2 3339557 0 0 0.99843 4 | 3 3027147 0 0 0.999795 5 | 4 3338112 0 0 0.99861 6 | 5 3248741 0 0 0.998815 7 | 6 3135533 0 0 0.998874 8 | 7 3167932 0 0 0.999527 9 | 8 3340880 0 0 0.999 10 | 9 3099055 0 0 0.999738 11 | 10 3208066 0 0 0.999157 12 | 11 3235881 0 0 0.998524 13 | 12 3101028 0 0 0.980029 14 | 13 3259126 0 0 0.997975 15 | 14 3323429 0 0 0.998732 16 | 15 3111584 0 0 0.996949 17 | 16 3283853 0 0 0.999298 18 | 17 3097571 0 0 0.996643 19 | 18 3256052 0 0 0.998672 20 | 19 3309242 0 0 0.998609 21 | 20 3100830 0 0 0.999639 22 | 21 3285310 0 0 0.999672 23 | 22 3315237 0 0 0.99933 24 | 23 3062580 0 0 0.999155 25 | 24 3187553 0 0 0.999207 26 | 25 3294084 0 0 0.997781 27 | 26 3203150 0 0 0.999735 28 | 27 3318909 0 0 0.999017 29 | 28 3151911 0 0 0.999687 30 | 29 3282695 0 0 0.999268 31 | 30 3255924 0 0 0.998311 32 | 31 3110961 0 0 0.999803 33 | 32 3264288 0 0 0.998938 34 | 33 3235827 0 0 0.997293 35 | 34 3212848 0 0 0.999285 36 | 35 3193445 0 0 0.998181 37 | 36 3260257 0 0 0.99909 38 | 37 3255568 0 0 0.984039 39 | 38 3268249 0 0 0.998089 40 | 39 3220446 0 0 0.998108 41 | 40 3079554 0 0 0.999079 42 | 41 3261055 0 0 0.999592 43 | 42 3313526 0 0 0.99327 44 | 43 3080927 0 0 0.992444 45 | 44 3329531 0 0 0 46 | -------------------------------------------------------------------------------- /codes/cap4/replayingNetworkConditions/clientTrace.txt: -------------------------------------------------------------------------------- 1 | 0 0 0 0 0.005518 2 | 1 2025908 0 0 0.999753 3 | 2 3339557 0 0 0.999731 4 | 3 3027147 0 0 0.998137 5 | 4 3338112 0 0 0.997007 6 | 5 3248741 0 0 0.992928 7 | 6 3135533 0 0 0.998179 8 | 7 3167932 0 0 0.998589 9 | 8 3340880 0 0 0.998032 10 | 9 3099055 0 0 0.999461 11 | 10 3208066 0 0 0.99414 12 | 11 3235881 0 0 0.972299 13 | 12 3101028 0 0 0.99601 14 | 13 3259126 0 0 0.998402 15 | 14 3323429 0 0 0.998603 16 | 15 3111584 0 0 0.997586 17 | 16 3283853 0 0 0.99877 18 | 17 3097571 0 0 0.998192 19 | 18 3256052 0 0 0.999225 20 | 19 3309242 0 0 0.997875 21 | 20 3100830 0 0 0.99778 22 | 21 3285310 0 0 0.998379 23 | 22 3315237 0 0 0.998741 24 | 23 3062580 0 0 0.998333 25 | 24 3187553 0 0 0.995722 26 | 25 3294084 0 0 0.998257 27 | 26 3203150 0 0 0.998466 28 | 27 3318909 0 0 0.997319 29 | 28 3151911 0 0 0.998867 30 | 29 3282695 0 0 0.998144 31 | 30 3255924 0 0 0.998451 32 | 31 3110961 0 0 0.999005 33 | 32 3264288 0 0 0.997952 34 | 33 3235827 0 0 0.997563 35 | 34 3212848 0 0 0.99884 36 | 35 3193445 0 0 0.997473 37 | 36 3260257 0 0 0.999835 38 | 37 3255568 0 0 0.999696 39 | 38 3268249 0 0 0.999426 40 | 39 3220446 0 0 0.998454 41 | 40 3079554 0 0 0.997704 42 | 41 3261055 0 0 0.998926 43 | 42 3313526 0 0 0.999808 44 | 43 3080927 0 0 0.997815 45 | 44 3329531 0 0 0 46 | -------------------------------------------------------------------------------- /codes/cap4/arpspoofing.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import OVSKernelAP 10 | from mn_wifi.link import wmediumd 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | 14 | 15 | def topology(): 16 | "Create a network." 17 | net = Mininet_wifi(controller=Controller) 18 | 19 | info("*** Creating nodes\n") 20 | ap1 = net.addAccessPoint('ap1', ssid='new-ssid', mode='g', 21 | channel='1', position='10,10,0', 22 | failMode="standalone") 23 | net.addStation('sta1', position='10,20,0') 24 | net.addStation('sta2', position='10,30,0') 25 | 26 | info("*** Configuring wifi nodes\n") 27 | net.configureWifiNodes() 28 | 29 | info("*** Starting network\n") 30 | net.build() 31 | net.addNAT().configDefault() 32 | ap1.start([]) 33 | 34 | info("*** Running CLI\n") 35 | CLI(net) 36 | 37 | info("*** Stopping network\n") 38 | net.stop() 39 | 40 | 41 | if __name__ == '__main__': 42 | setLogLevel('info') 43 | topology() 44 | -------------------------------------------------------------------------------- /codes/extras/wep.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | '''@author: Ramon Fontes 4 | @email: ramon.fontes@imd.ufrn.br''' 5 | 6 | from mininet.log import setLogLevel, info 7 | from mn_wifi.cli import CLI 8 | from mn_wifi.net import Mininet_wifi 9 | 10 | 11 | def topology(): 12 | "Create a network." 13 | net = Mininet_wifi() 14 | 15 | info("*** Creating nodes\n") 16 | sta1 = net.addStation('sta1', passwd='1234567891a', encrypt='wep') 17 | sta2 = net.addStation('sta2', passwd='123456789a', encrypt='wep') 18 | sta3 = net.addStation('sta3', passwd='123456789a', encrypt='wep') 19 | ap1 = net.addAccessPoint('ap1', ssid="simplewifi", mode="g", channel="1", 20 | passwd='123456789a', encrypt='wep', 21 | failMode="standalone", datapath='user') 22 | 23 | info("*** Configuring wifi nodes\n") 24 | net.configureWifiNodes() 25 | 26 | info("*** Associating Stations\n") 27 | net.addLink(sta1, ap1) 28 | net.addLink(sta2, ap1) 29 | net.addLink(sta3, ap1) 30 | 31 | info("*** Starting network\n") 32 | net.build() 33 | ap1.start([]) 34 | 35 | info("*** Running CLI\n") 36 | CLI(net) 37 | 38 | info("*** Stopping network\n") 39 | net.stop() 40 | 41 | 42 | if __name__ == '__main__': 43 | setLogLevel('info') 44 | topology() 45 | -------------------------------------------------------------------------------- /codes/cap4/authentication.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import UserAP 10 | from mn_wifi.cli import CLI 11 | from mn_wifi.net import Mininet_wifi 12 | 13 | 14 | def topology(): 15 | "Create a network." 16 | net = Mininet_wifi(controller=Controller, accessPoint=UserAP) 17 | 18 | info("*** Creating nodes\n") 19 | sta1 = net.addStation('sta1', passwd='123456789a', encrypt='wpa2') 20 | sta2 = net.addStation('sta2') 21 | ap1 = net.addAccessPoint('ap1', ssid="ap1-ssid", mode="g", channel="1", 22 | passwd='123456789a', encrypt='wpa2', 23 | failMode="standalone") 24 | 25 | info("*** Configuring wifi nodes\n") 26 | net.configureWifiNodes() 27 | 28 | info("*** Associating Stations\n") 29 | net.addLink(sta1, ap1) 30 | 31 | info("*** Starting network\n") 32 | net.build() 33 | ap1.start([]) 34 | 35 | info("*** Running CLI\n") 36 | CLI(net) 37 | 38 | info("*** Stopping network\n") 39 | net.stop() 40 | 41 | 42 | if __name__ == '__main__': 43 | setLogLevel('info') 44 | topology() 45 | -------------------------------------------------------------------------------- /codes/cap3/dhcp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.log import setLogLevel, info 8 | from mn_wifi.cli import CLI 9 | from mn_wifi.net import Mininet_wifi 10 | 11 | 12 | def topology(): 13 | 14 | net = Mininet_wifi() 15 | 16 | info("*** Creating nodes\n") 17 | net.addStation('sta1', mac='00:00:00:00:00:02', ip='0/0', position='30,60,0') 18 | ap1 = net.addAccessPoint('ap1', ssid='new-ssid', mode='g', channel='1', 19 | position='50,50,0', failMode='standalone') 20 | h1 = net.addHost('h1', ip='192.168.11.1/24', inNamespace=False) 21 | 22 | net.setPropagationModel(model="logDistance", exp=4.5) 23 | 24 | info("*** Configuring wifi nodes\n") 25 | net.configureWifiNodes() 26 | 27 | info("*** Creating links\n") 28 | net.addLink(ap1, h1) 29 | 30 | net.plotGraph(max_x=100, max_y=100) 31 | 32 | info("*** Starting network\n") 33 | net.build() 34 | ap1.start([]) 35 | 36 | h1.cmd("echo 1 > /proc/sys/net/ipv4/ip_forward") 37 | 38 | info("*** Running CLI\n") 39 | CLI(net) 40 | 41 | info("*** Stopping network\n") 42 | net.stop() 43 | 44 | if __name__ == '__main__': 45 | setLogLevel('info') 46 | topology() 47 | 48 | -------------------------------------------------------------------------------- /codes/cap3/multipleWlan.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from __future__ import print_function 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.cli import CLI 10 | from mn_wifi.net import Mininet_wifi 11 | from mn_wifi.link import adhoc 12 | 13 | 14 | def topology(): 15 | "Create a network." 16 | net = Mininet_wifi() 17 | 18 | info("*** Creating nodes\n") 19 | sta1 = net.addStation('sta1', wlans=2) 20 | sta2 = net.addStation('sta2') 21 | ap1 = net.addAccessPoint('ap1', ssid='ssid_1', mode='g', channel='5', 22 | failMode="standalone") 23 | 24 | info("*** Configuring wifi nodes\n") 25 | net.configureWifiNodes() 26 | 27 | info("*** Associating...\n") 28 | net.addLink(ap1, sta1) 29 | net.addLink(sta1, intf='sta1-wlan0', cls=adhoc, ssid='adhoc1') 30 | net.addLink(sta2, intf='sta2-wlan0', cls=adhoc, ssid='adhoc1') 31 | 32 | info("*** Starting network\n") 33 | net.build() 34 | ap1.start([]) 35 | 36 | info("*** Addressing...\n") 37 | sta1.setIP('192.168.10.1/24', intf="sta1-wlan1") 38 | sta2.setIP('192.168.10.2/24', intf="sta2-wlan0") 39 | 40 | info("*** Running CLI\n") 41 | CLI(net) 42 | 43 | info("*** Stopping network\n") 44 | net.stop() 45 | 46 | 47 | if __name__ == '__main__': 48 | setLogLevel('info') 49 | topology() 50 | -------------------------------------------------------------------------------- /codes/cap4/defaultgw.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.cli import CLI 10 | from mn_wifi.net import Mininet_wifi 11 | 12 | 13 | def topology(): 14 | "Create a network." 15 | net = Mininet_wifi() 16 | 17 | info("*** Creating nodes\n") 18 | sta1 = net.addStation('sta1', ip='192.168.0.1/24') 19 | sta2 = net.addStation('sta2', ip='192.168.1.1/24') 20 | r1 = net.addStation('r1', wlans=2) 21 | 22 | info("*** Configuring wifi nodes\n") 23 | net.configureWifiNodes() 24 | 25 | r1.setMasterMode(intf='r1-wlan0', ssid='r1-ssid1', channel='1', mode='n') 26 | r1.setMasterMode(intf='r1-wlan1', ssid='r1-ssid2', channel='6', mode='n') 27 | 28 | info("*** Starting network\n") 29 | net.build() 30 | 31 | r1.cmd('sysctl net.ipv4.ip_forward=1') 32 | r1.cmd('ifconfig r1-wlan0 192.168.0.100') 33 | r1.cmd('ifconfig r1-wlan1 192.168.1.100') 34 | r1.cmd('ip route add to 192.168.1.1 via 192.168.1.100') 35 | r1.cmd('ip route add to 192.168.0.1 via 192.168.0.100') 36 | sta1.cmd('iw dev sta1-wlan0 connect r1-ssid1') 37 | sta2.cmd('iw dev sta2-wlan0 connect r1-ssid2') 38 | 39 | info("*** Running CLI\n") 40 | CLI(net) 41 | 42 | info("*** Stopping network\n") 43 | net.stop() 44 | 45 | 46 | if __name__ == '__main__': 47 | setLogLevel('info') 48 | topology() 49 | -------------------------------------------------------------------------------- /codes/cap3/socket_server.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | 'Setting position of the nodes and enable sockets' 4 | 5 | from mininet.log import setLogLevel, info 6 | from mn_wifi.cli import CLI 7 | from mn_wifi.net import Mininet_wifi 8 | 9 | 10 | def topology(): 11 | 12 | net = Mininet_wifi() 13 | 14 | info("*** Creating nodes\n") 15 | net.addStation('sta1', mac='00:00:00:00:00:02', ip='10.0.0.1/8', 16 | position='30,60,0') 17 | net.addStation('sta2', mac='00:00:00:00:00:03', ip='10.0.0.2/8', 18 | position='70,30,0') 19 | ap1 = net.addAccessPoint('ap1', ssid='new-ssid', mode='g', channel='1', 20 | failMode="standalone", position='50,50,0') 21 | h1 = net.addHost('h1', ip='10.0.0.3/8') 22 | 23 | net.setPropagationModel(model="logDistance", exp=4.5) 24 | 25 | info("*** Configuring wifi nodes\n") 26 | net.configureWifiNodes() 27 | 28 | info("*** Creating links\n") 29 | net.addLink(ap1, h1) 30 | 31 | info("*** Starting network\n") 32 | net.addNAT(linkTo='ap1').configDefault() 33 | net.build() 34 | ap1.start([]) 35 | 36 | # set_socket_ip: localhost must be replaced by ip address 37 | # of the network interface of your system 38 | # The same must be done with socket_client.py 39 | info("*** Starting Socket Server\n") 40 | net.socketServer(ip='127.0.0.1', port=12345) 41 | 42 | info("*** Running CLI\n") 43 | CLI(net) 44 | 45 | info("*** Stopping network\n") 46 | net.stop() 47 | 48 | 49 | if __name__ == '__main__': 50 | setLogLevel('info') 51 | topology() 52 | -------------------------------------------------------------------------------- /codes/cap4/hybridVirtualPhysical.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.log import setLogLevel, info 8 | from mininet.node import Controller 9 | from mn_wifi.node import OVSAP, physicalAP 10 | from mn_wifi.net import Mininet_wifi 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.link import wmediumd 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(): 17 | "Create a network." 18 | net = Mininet_wifi(controller=Controller) 19 | 20 | usbDongleIface = 'wlxf4f26d193319' 21 | 22 | info("*** Creating nodes\n") 23 | sta1 = net.addStation('sta1', mac='00:00:00:00:00:01', 24 | ip='192.168.0.1/24', position='10,10,0') 25 | phyap1 = net.addAccessPoint('phyap1', ssid='ssid-ap1', 26 | mode='g', channel='1', 27 | position='50,50,0', phywlan=usbDongleIface, 28 | cls=physicalAP) 29 | c0 = net.addController( 'c0' ) 30 | 31 | info("*** Configuring Propagation Model\n") 32 | net.setPropagationModel(model="logDistance", exp=3.5) 33 | 34 | info("*** Configuring wifi nodes\n") 35 | net.configureWifiNodes() 36 | 37 | net.plotGraph(max_x=240, max_y=240) 38 | 39 | info("*** Starting network\n") 40 | net.build() 41 | c0.start() 42 | phyap1.start([c0]) 43 | 44 | info("*** Running CLI\n") 45 | CLI(net) 46 | 47 | info("*** Stopping network\n") 48 | net.stop() 49 | 50 | 51 | if __name__ == '__main__': 52 | setLogLevel('info') 53 | topology() 54 | -------------------------------------------------------------------------------- /codes/cap3/handover.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import OVSKernelAP 10 | from mn_wifi.cli import CLI 11 | from mn_wifi.net import Mininet_wifi 12 | 13 | 14 | def topology(): 15 | "Create a network." 16 | net = Mininet_wifi(controller=Controller, accessPoint=OVSKernelAP) 17 | 18 | info("*** Creating nodes\n") 19 | sta1 = net.addStation('sta1', position='10,10,0') 20 | ap1 = net.addAccessPoint('ap1', ssid='ssid-ap1', mode='g', channel='1', 21 | position='15,30,0', range=30) 22 | ap2 = net.addAccessPoint('ap2', ssid='ssid-ap2', mode='g', channel='6', 23 | position='55,30,0', range=30) 24 | s3 = net.addSwitch('s3') 25 | h1 = net.addHost('h1') 26 | c1 = net.addController('c1', controller=Controller) 27 | 28 | net.setPropagationModel(model="logDistance", exp=5) 29 | 30 | info("*** Configuring wifi nodes\n") 31 | net.configureWifiNodes() 32 | 33 | info("*** Creating links\n") 34 | net.addLink(ap1, s3) 35 | net.addLink(ap2, s3) 36 | net.addLink(s3, h1) 37 | 38 | net.plotGraph(max_x=100, max_y=100) 39 | 40 | info("*** Starting network\n") 41 | net.build() 42 | c1.start() 43 | ap1.start([c1]) 44 | ap2.start([c1]) 45 | s3.start([c1]) 46 | 47 | info("*** Running CLI\n") 48 | CLI(net) 49 | 50 | info("*** Stopping network\n") 51 | net.stop() 52 | 53 | 54 | if __name__ == '__main__': 55 | setLogLevel('info') 56 | topology() 57 | -------------------------------------------------------------------------------- /codes/cap3/qos.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | import sys 8 | 9 | from mininet.node import Controller, RemoteController 10 | from mininet.log import setLogLevel, info 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | 14 | 15 | def topology(qos): 16 | "Create a network." 17 | net = Mininet_wifi(controller=RemoteController) 18 | 19 | info("*** Creating nodes\n") 20 | sta1 = net.addStation('sta1', position='10,10,0') 21 | h1 = net.addHost('h1') 22 | ap1 = net.addAccessPoint('ap1', ssid="simplewifi", position='10,20,0', 23 | mode="g", channel="5", protocols='OpenFlow13', 24 | datapath='user') 25 | c0 = net.addController('c0') 26 | 27 | info("*** Configuring wifi nodes\n") 28 | net.configureWifiNodes() 29 | 30 | info("*** Associating Stations\n") 31 | net.addLink(sta1, ap1) 32 | net.addLink(h1, ap1) 33 | 34 | info("*** Starting network\n") 35 | net.build() 36 | c0.start() 37 | ap1.start([c0]) 38 | 39 | if qos: 40 | ap1.cmdPrint('ovs-ofctl -O OpenFlow13 add-meter ap1 ' 41 | '\'meter=1,kbps,bands=type=drop,rate=5000\'') 42 | ap1.cmdPrint('ovs-ofctl -O OpenFlow13 add-flow ap1 ' 43 | '\'priority=1,in_port=1 action=meter:1,2\'') 44 | ap1.cmdPrint('ovs-ofctl -O OpenFlow13 add-flow ap1 ' 45 | '\'priority=1,in_port=2 action=meter:1,1\'') 46 | 47 | info("*** Running CLI\n") 48 | CLI(net) 49 | 50 | info("*** Stopping network\n") 51 | net.stop() 52 | 53 | 54 | if __name__ == '__main__': 55 | setLogLevel('info') 56 | qos = True if '-q' in sys.argv else False 57 | topology(qos) 58 | -------------------------------------------------------------------------------- /codes/cap3/wmediumd_3aps.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import OVSKernelAP 10 | from mn_wifi.link import wmediumd 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(): 17 | "Create a network." 18 | net = Mininet_wifi(controller=Controller, link=wmediumd, 19 | accessPoint=OVSKernelAP, wmediumd_mode=interference, 20 | noise_th=-91, fading_cof=3) 21 | 22 | info("*** Creating nodes\n") 23 | ap1 = net.addAccessPoint('ap1', ssid='ap1', mode='n', 24 | channel='1', position='15,30,0') 25 | ap2 = net.addAccessPoint('ap2', ssid='ap2', mode='n', 26 | channel='6', position='35,30,0') 27 | ap3 = net.addAccessPoint('ap3', ssid='ap3', mode='n', 28 | channel='11', position='55,30,0') 29 | net.addStation('sta1', mac='00:00:00:00:00:10', ip='10.0.0.1/8', 30 | position='30,30,0') 31 | 32 | info("*** Configuring Propagation Model\n") 33 | net.setPropagationModel(model="logDistance", exp=5) 34 | 35 | info("*** Configuring wifi nodes\n") 36 | net.configureWifiNodes() 37 | 38 | net.plotGraph(max_x=100, max_y=100) 39 | 40 | info("*** Starting network\n") 41 | net.build() 42 | ap1.start([]) 43 | ap2.start([]) 44 | ap3.start([]) 45 | 46 | info("*** Running CLI\n") 47 | CLI(net) 48 | 49 | info("*** Stopping network\n") 50 | net.stop() 51 | 52 | 53 | if __name__ == '__main__': 54 | setLogLevel('info') 55 | topology() 56 | -------------------------------------------------------------------------------- /codes/cap3/wmediumd_2aps.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import OVSKernelAP 10 | from mn_wifi.link import wmediumd 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(): 17 | "Create a network." 18 | net = Mininet_wifi(controller=Controller, link=wmediumd, 19 | accessPoint=OVSKernelAP, wmediumd_mode=interference, 20 | noise_th=-91, fading_cof=3) 21 | 22 | info("*** Creating nodes\n") 23 | ap1 = net.addAccessPoint('ap1', ssid='ap1', mode='n', channel='1', 24 | position='15,30,0') 25 | ap2 = net.addAccessPoint('ap2', ssid='ap2', mode='n', channel='2', 26 | position='55,30,0') 27 | net.addStation('sta1', mac='00:00:00:00:00:02', ip='10.0.0.1/8', 28 | position='1,20,0') 29 | net.addStation('sta2', mac='00:00:00:00:00:03', ip='10.0.0.2/8', 30 | position='20,50,0') 31 | c1 = net.addController('c1', controller=Controller) 32 | 33 | info("*** Configuring Propagation Model\n") 34 | net.setPropagationModel(model="logDistance", exp=5) 35 | 36 | info("*** Configuring wifi nodes\n") 37 | net.configureWifiNodes() 38 | 39 | net.plotGraph(max_x=100, max_y=100) 40 | 41 | info("*** Starting network\n") 42 | net.build() 43 | c1.start() 44 | ap1.start([c1]) 45 | ap2.start([c1]) 46 | 47 | info("*** Running CLI\n") 48 | CLI(net) 49 | 50 | info("*** Stopping network\n") 51 | net.stop() 52 | 53 | 54 | if __name__ == '__main__': 55 | setLogLevel('info') 56 | topology() 57 | -------------------------------------------------------------------------------- /codes/cap4/associationControl.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.cli import CLI 10 | from mn_wifi.net import Mininet_wifi 11 | 12 | 13 | def topology(): 14 | "Create a network." 15 | net = Mininet_wifi(controller=Controller, ac_method='ssf') 16 | 17 | info("*** Creating nodes\n") 18 | net.addStation('sta1', mac='00:00:00:00:00:02', ip='10.0.0.2/8', position='20,50,0') 19 | net.addStation('sta2', mac='00:00:00:00:00:03', ip='10.0.0.3/8', position='25,50,0') 20 | net.addStation('sta3', mac='00:00:00:00:00:04', ip='10.0.0.4/8', position='35,50,0') 21 | net.addStation('sta4', mac='00:00:00:00:00:05', ip='10.0.0.5/8', position='40,50,0') 22 | net.addStation('sta5', mac='00:00:00:00:00:06', ip='10.0.0.6/8', position='45,50,0') 23 | ap1 = net.addAccessPoint('ap1', ssid='ssid-ap1', mode='g', channel='1', 24 | position='50,50,0') 25 | ap2 = net.addAccessPoint('ap2', ssid='ssid-ap2', mode='g', channel='6', 26 | position='70,50,0', range=30) 27 | c1 = net.addController('c1') 28 | 29 | net.setPropagationModel(model="logDistance", exp=5) 30 | 31 | info("*** Configuring wifi nodes\n") 32 | net.configureWifiNodes() 33 | 34 | info("*** Associating and Creating links\n") 35 | net.addLink(ap1, ap2) 36 | 37 | net.plotGraph(max_x=120, max_y=120) 38 | 39 | info("*** Starting network\n") 40 | net.build() 41 | c1.start() 42 | ap1.start([c1]) 43 | ap2.start([c1]) 44 | 45 | info("*** Running CLI\n") 46 | CLI(net) 47 | 48 | info("*** Stopping network\n") 49 | net.stop() 50 | 51 | 52 | if __name__ == '__main__': 53 | setLogLevel('info') 54 | topology() 55 | -------------------------------------------------------------------------------- /codes/cap3/static-routing.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.cli import CLI 10 | from mn_wifi.net import Mininet_wifi 11 | 12 | 13 | def topology(): 14 | "Create a network." 15 | net = Mininet_wifi() 16 | 17 | info("*** Creating nodes\n") 18 | sta1 = net.addStation('sta1', ip='192.168.0.1/24') 19 | sta2 = net.addStation('sta2', ip='192.168.1.1/24') 20 | r1 = net.addStation('r1') 21 | r2 = net.addStation('r2') 22 | 23 | info("*** Configuring wifi nodes\n") 24 | net.configureWifiNodes() 25 | 26 | r1.setMasterMode(intf='r1-wlan0', ssid='r1-ssid', 27 | channel='1', mode='n2') 28 | r2.setMasterMode(intf='r2-wlan0', ssid='r2-ssid', 29 | channel='1', mode='n2') 30 | 31 | info("*** Creating Links\n") 32 | net.addLink(r1, r2) 33 | 34 | info("*** Starting network\n") 35 | net.build() 36 | 37 | r1.cmd('sysctl net.ipv4.ip_forward=1') 38 | r2.cmd('sysctl net.ipv4.ip_forward=1') 39 | r1.cmd('ifconfig r1-wlan0 192.168.0.100') 40 | r1.cmd('ifconfig r1-eth1 10.0.0.1') 41 | r2.cmd('ifconfig r2-wlan0 192.168.1.100') 42 | r2.cmd('ifconfig r2-eth1 10.0.0.2') 43 | #r1.cmd('ip route add to 192.168.1.1 via 10.0.0.2') 44 | #r2.cmd('ip route add to 192.168.0.1 via 10.0.0.1') 45 | sta1.cmd('iw dev sta1-wlan0 connect r1-ssid') 46 | sta2.cmd('iw dev sta2-wlan0 connect r2-ssid') 47 | sta1.cmd('route add default gw 192.168.0.100') 48 | sta2.cmd('route add default gw 192.168.1.100') 49 | 50 | info("*** Running CLI\n") 51 | CLI(net) 52 | 53 | info("*** Stopping network\n") 54 | net.stop() 55 | 56 | 57 | if __name__ == '__main__': 58 | setLogLevel('info') 59 | topology() 60 | -------------------------------------------------------------------------------- /codes/cap3/adhoc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | import sys 8 | 9 | from mininet.log import setLogLevel, info 10 | from mn_wifi.link import wmediumd, adhoc 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(autoTxPower): 17 | "Create a network." 18 | net = Mininet_wifi(link=wmediumd, wmediumd_mode=interference) 19 | 20 | info("*** Creating nodes\n") 21 | if autoTxPower: 22 | sta1 = net.addStation('sta1', position='10,10,0', range=100) 23 | sta2 = net.addStation('sta2', position='50,10,0', range=100) 24 | sta3 = net.addStation('sta3', position='90,10,0', range=100) 25 | else: 26 | sta1 = net.addStation('sta1', position='10,10,0') 27 | sta2 = net.addStation('sta2', position='50,10,0') 28 | sta3 = net.addStation('sta3', position='90,10,0') 29 | 30 | net.setPropagationModel(model="logDistance", exp=4) 31 | 32 | info("*** Configuring wifi nodes\n") 33 | net.configureWifiNodes() 34 | 35 | info("*** Creating links\n") 36 | net.addLink(sta1, intf='sta1-wlan0', cls=adhoc, ssid='adhocNet', 37 | mode='g', channel=5, ht_cap='HT40+') 38 | net.addLink(sta2, intf='sta2-wlan0', cls=adhoc, ssid='adhocNet', 39 | mode='g', channel=5) 40 | net.addLink(sta3, intf='sta3-wlan0', cls=adhoc, ssid='adhocNet', 41 | mode='g', channel=5, ht_cap='HT40+') 42 | 43 | info("*** Starting network\n") 44 | net.build() 45 | 46 | info("*** Running CLI\n") 47 | CLI(net) 48 | 49 | info("*** Stopping network\n") 50 | net.stop() 51 | 52 | 53 | if __name__ == '__main__': 54 | setLogLevel('info') 55 | autoTxPower = True if '-a' in sys.argv else False 56 | topology(autoTxPower) 57 | -------------------------------------------------------------------------------- /codes/cap4/radius.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import UserAP 10 | from mn_wifi.cli import CLI 11 | from mn_wifi.net import Mininet_wifi 12 | from mn_wifi.link import wmediumd 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(): 17 | "Create a network." 18 | net = Mininet_wifi(controller=Controller, accessPoint=UserAP, 19 | link=wmediumd, wmediumd_mode=interference) 20 | 21 | info("*** Creating nodes\n") 22 | sta1 = net.addStation('sta1', radius_passwd='sdnteam', 23 | encrypt='wpa2', radius_identity='joe', 24 | position='110,120,0') 25 | sta2 = net.addStation('sta2', radius_passwd='hello', 26 | encrypt='wpa2', radius_identity='bob', 27 | position='200,100,0') 28 | ap1 = net.addAccessPoint('ap1', ssid='simplewifi', 29 | authmode='8021x', mode='a', channel='36', 30 | encrypt='wpa2', position='150,100,0') 31 | c0 = net.addController('c0', controller=Controller, 32 | ip='127.0.0.1', port=6653) 33 | 34 | info("*** Configuring Propagation Model\n") 35 | net.setPropagationModel(model="logDistance", exp=3.5) 36 | 37 | info("*** Configuring wifi nodes\n") 38 | net.configureWifiNodes() 39 | 40 | info("*** Associating Stations\n") 41 | net.addLink(sta1, ap1) 42 | net.addLink(sta2, ap1) 43 | 44 | net.plotGraph(max_x=300, max_y=300) 45 | 46 | info("*** Starting network\n") 47 | net.build() 48 | c0.start() 49 | ap1.start([c0]) 50 | 51 | info("*** Running CLI\n") 52 | CLI(net) 53 | 54 | info("*** Stopping network\n") 55 | net.stop() 56 | 57 | 58 | if __name__ == '__main__': 59 | setLogLevel('info') 60 | topology() 61 | -------------------------------------------------------------------------------- /codes/cap3/mesh.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | import sys 8 | 9 | from mininet.log import setLogLevel, info 10 | from mn_wifi.link import wmediumd, mesh 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(mobility): 17 | "Create a network." 18 | net = Mininet_wifi(link=wmediumd, wmediumd_mode=interference) 19 | 20 | info("*** Creating nodes\n") 21 | if mobility: 22 | sta1 = net.addStation('sta1') 23 | sta2 = net.addStation('sta2') 24 | sta3 = net.addStation('sta3') 25 | else: 26 | sta1 = net.addStation('sta1', position='10,10,0') 27 | sta2 = net.addStation('sta2', position='50,10,0') 28 | sta3 = net.addStation('sta3', position='90,10,0') 29 | 30 | info("*** Configuring Propagation Model\n") 31 | net.setPropagationModel(model="logDistance", exp=4) 32 | 33 | info("*** Configuring wifi nodes\n") 34 | net.configureWifiNodes() 35 | 36 | info("*** Creating links\n") 37 | net.addLink(sta1, cls=mesh, ssid='meshNet', 38 | intf='sta1-wlan0', channel=5) #, passwd='thisisreallysecret') 39 | net.addLink(sta2, cls=mesh, ssid='meshNet', 40 | intf='sta2-wlan0', channel=5) #, passwd='thisisreallysecret') 41 | net.addLink(sta3, cls=mesh, ssid='meshNet', 42 | intf='sta3-wlan0', channel=5) #, passwd='thisisreallysecret') 43 | 44 | if mobility: 45 | net.plotGraph(max_x=100, max_y=100) 46 | net.startMobility(time=0, model='RandomDirection', 47 | max_x=100, max_y=100, 48 | min_v=0.5, max_v=0.8, seed=20) 49 | 50 | net.plotGraph(max_x=100, max_y=100) 51 | 52 | info("*** Starting network\n") 53 | net.build() 54 | 55 | info("*** Running CLI\n") 56 | CLI(net) 57 | 58 | info("*** Stopping network\n") 59 | net.stop() 60 | 61 | 62 | if __name__ == '__main__': 63 | setLogLevel('info') 64 | mobility = True if '-m' in sys.argv else False 65 | topology(mobility) 66 | -------------------------------------------------------------------------------- /codes/cap3/bonding.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from __future__ import print_function 8 | import sys, os 9 | 10 | from mininet.node import OVSKernelSwitch, Controller, RemoteController 11 | from mininet.log import setLogLevel, info 12 | from mn_wifi.cli import CLI 13 | from mn_wifi.net import Mininet_wifi 14 | 15 | 16 | def topology(broadcast): 17 | "Create a network." 18 | if broadcast: 19 | net = Mininet_wifi(controller=Controller) 20 | else: 21 | net = Mininet_wifi(controller=RemoteController) 22 | 23 | info("*** Creating nodes\n") 24 | s1 = net.addSwitch('s1') 25 | h1 = net.addHost('h1') 26 | h2 = net.addHost('h2') 27 | h3 = net.addHost('h3') 28 | c1 = net.addController('c1') 29 | 30 | info("*** Configuring wifi nodes\n") 31 | net.configureWifiNodes() 32 | 33 | info("*** Associating...\n") 34 | net.addLink(s1, h1, bw=10) 35 | net.addLink(s1, h1, bw=10) 36 | net.addLink(s1, h2) 37 | net.addLink(s1, h3) 38 | 39 | info("*** Starting network\n") 40 | net.build() 41 | c1.start() 42 | s1.start([c1]) 43 | 44 | if broadcast: 45 | h1.cmd('modprobe bonding mode=3') 46 | else: 47 | h1.cmd('modprobe bonding mode=4') 48 | h1.cmd('ip link add bond0 type bond') 49 | h1.cmd('ip link set bond0 address 00:00:00:11:22:33') 50 | h1.cmd('ip link set h1-eth0 down') 51 | h1.cmd('ip link set h1-eth0 address 00:00:00:00:00:11') 52 | h1.cmd('ip link set h1-eth0 master bond0') 53 | h1.cmd('ip link set h1-eth1 down') 54 | h1.cmd('ip link set h1-eth1 address 00:00:00:00:00:22') 55 | h1.cmd('ip link set h1-eth1 master bond0') 56 | h1.cmd('ip addr add 10.0.0.1/8 dev bond0') 57 | h1.cmd('ip addr del 10.0.0.1/8 dev h1-eth0') 58 | h1.cmd('ip link set bond0 up') 59 | 60 | info("*** Running CLI\n") 61 | CLI(net) 62 | 63 | os.system('rmmod bonding') 64 | 65 | info("*** Stopping network\n") 66 | net.stop() 67 | 68 | 69 | if __name__ == '__main__': 70 | setLogLevel('info') 71 | broadcast = True if '-b' in sys.argv else False 72 | topology(broadcast) 73 | -------------------------------------------------------------------------------- /codes/extras/6in4.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | """@author: Ramon Fontes 4 | @email: ramon.fontes@imd.ufrn.br""" 5 | 6 | from mininet.log import setLogLevel, info 7 | from mininet.cli import CLI 8 | from mininet.net import Mininet 9 | 10 | 11 | def topology(): 12 | "Create a network." 13 | net = Mininet() 14 | 15 | info("*** Creating nodes\n") 16 | h1 = net.addHost('h1', ip='10.0.0.1/8') 17 | h2 = net.addHost('h2', ip='192.168.0.1/24') 18 | r1 = net.addHost('r1') 19 | r2 = net.addHost('r2') 20 | 21 | info("*** Creating Links\n") 22 | net.addLink(h1, r1) 23 | net.addLink(h2, r2) 24 | net.addLink(r1, r2) 25 | 26 | info("*** Starting network\n") 27 | net.build() 28 | 29 | r1.cmd('sysctl net.ipv4.ip_forward=1') 30 | r2.cmd('sysctl net.ipv4.ip_forward=1') 31 | 32 | r1.cmd('sysctl net.ipv6.conf.all.forwarding=1') 33 | r2.cmd('sysctl net.ipv6.conf.all.forwarding=1') 34 | 35 | r1.cmd('ifconfig r1-eth0 10.0.0.2/8') 36 | r2.cmd('ifconfig r2-eth0 192.168.0.2/24') 37 | 38 | r1.cmd('ifconfig r1-eth1 172.16.0.1/30') 39 | r2.cmd('ifconfig r2-eth1 172.16.0.2/30') 40 | r1.cmd('route add -net 192.168.0.0/24 gw 172.16.0.2') 41 | r2.cmd('route add -net 10.0.0.0/8 gw 172.16.0.1') 42 | 43 | h1.cmd('ip -6 addr add 2001::2/64 dev h1-eth0') 44 | h2.cmd('ip -6 addr add 2002::2/64 dev h2-eth0') 45 | 46 | r1.cmd('ip -6 addr add 2001::1/64 dev r1-eth0') 47 | r2.cmd('ip -6 addr add 2002::1/64 dev r2-eth0') 48 | 49 | r1.cmd('ip tunnel add tun6to4 mode sit ttl 254 local 172.16.0.1 remote 172.16.0.2') 50 | r1.cmd('ip link set dev tun6to4 up') 51 | r1.cmd('ip addr add 2005::1/64 dev tun6to4') 52 | r1.cmd('ip route add 2002::/64 via 2005::2') 53 | 54 | r2.cmd('ip tunnel add tun6to4 mode sit ttl 254 local 172.16.0.2 remote 172.16.0.1') 55 | r2.cmd('ip link set dev tun6to4 up') 56 | r2.cmd('ip addr add 2005::2/64 dev tun6to4') 57 | r2.cmd('ip route add 2001::/64 via 2005::1') 58 | 59 | h1.cmd('ip -6 route add 2002::2 via 2001::1') 60 | h2.cmd('ip -6 route add 2001::2 via 2002::1') 61 | 62 | info("*** Running CLI\n") 63 | CLI(net) 64 | 65 | info("*** Stopping network\n") 66 | net.stop() 67 | 68 | 69 | if __name__ == '__main__': 70 | setLogLevel('info') 71 | topology() 72 | -------------------------------------------------------------------------------- /codes/cap3/bgscan.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import UserAP 10 | from mn_wifi.link import wmediumd 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(): 17 | "Create a network." 18 | net = Mininet_wifi(controller=Controller, accessPoint=UserAP, 19 | link=wmediumd, wmediumd_mode=interference) 20 | 21 | info("*** Creating nodes\n") 22 | net.addStation('sta1', position='15,20,0', bgscan_threshold=-60, 23 | s_inverval=5, l_interval=10) 24 | ap1 = net.addAccessPoint('ap1', mac='00:00:00:00:00:01', ssid="handover", 25 | mode="g", channel="1", passwd='123456789a', 26 | encrypt='wpa2', position='10,30,0') 27 | ap2 = net.addAccessPoint('ap2', mac='00:00:00:00:00:02', ssid="handover", 28 | mode="g", channel="6", passwd='123456789a', 29 | encrypt='wpa2', position='60,30,0') 30 | ap3 = net.addAccessPoint('ap3', mac='00:00:00:00:00:03', ssid="handover", 31 | mode="g", channel="1", passwd='123456789a', 32 | encrypt='wpa2', position='120,100,0') 33 | c1 = net.addController('c1') 34 | 35 | info("*** Configuring Propagation Model\n") 36 | net.setPropagationModel(model="logDistance", exp=3.5) 37 | 38 | info("*** Configuring wifi nodes\n") 39 | net.configureWifiNodes() 40 | 41 | info("*** Creating links\n") 42 | net.addLink(ap1, ap2) 43 | net.addLink(ap2, ap3) 44 | 45 | net.plotGraph(min_x=-100, min_y=-100, max_x=200, max_y=200) 46 | 47 | info("*** Starting network\n") 48 | net.build() 49 | c1.start() 50 | ap1.start([c1]) 51 | ap2.start([c1]) 52 | ap3.start([c1]) 53 | 54 | info("*** Running CLI\n") 55 | CLI(net) 56 | 57 | info("*** Stopping network\n") 58 | net.stop() 59 | 60 | 61 | if __name__ == '__main__': 62 | setLogLevel('info') 63 | topology() 64 | -------------------------------------------------------------------------------- /codes/cap3/vlan.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | import sys 8 | 9 | from mininet.node import Controller 10 | from mininet.log import setLogLevel, info 11 | from mn_wifi.node import OVSKernelAP 12 | from mn_wifi.cli import CLI 13 | from mn_wifi.net import Mininet_wifi 14 | 15 | 16 | def topology(): 17 | "Create a network." 18 | net = Mininet_wifi(controller=Controller) 19 | 20 | info("*** Creating nodes\n") 21 | sta1 = net.addStation('sta1') 22 | sta2 = net.addStation('sta2') 23 | sta3 = net.addStation('sta3') 24 | sta4 = net.addStation('sta4') 25 | ap1 = net.addAccessPoint('ap1', ssid="ssid-ap1", 26 | mode="g", channel="5", 27 | failMode="standalone") 28 | ap2 = net.addAccessPoint('ap2', ssid="ssid-ap2", 29 | mode="g", channel="11", 30 | failMode="standalone") 31 | 32 | info("*** Configuring wifi nodes\n") 33 | net.configureWifiNodes() 34 | 35 | info("*** Associating Stations\n") 36 | net.addLink(ap1, ap2) 37 | net.addLink(sta1, ap1) 38 | net.addLink(sta2, ap1) 39 | net.addLink(sta3, ap2) 40 | net.addLink(sta4, ap2) 41 | 42 | info("*** Starting network\n") 43 | net.build() 44 | ap1.start([]) 45 | ap2.start([]) 46 | 47 | sta1.cmd("ip link add link sta1-wlan0 name sta1-wlan0.10 type vlan id 10") 48 | sta2.cmd("ip link add link sta2-wlan0 name sta2-wlan0.10 type vlan id 10") 49 | sta3.cmd("ip link add link sta3-wlan0 name sta3-wlan0.20 type vlan id 20") 50 | sta4.cmd("ip link add link sta4-wlan0 name sta4-wlan0.20 type vlan id 20") 51 | 52 | sta1.cmd("route del -net 10.0.0.0 netmask 255.0.0.0") 53 | sta2.cmd("route del -net 10.0.0.0 netmask 255.0.0.0") 54 | sta3.cmd("route del -net 10.0.0.0 netmask 255.0.0.0") 55 | sta4.cmd("route del -net 10.0.0.0 netmask 255.0.0.0") 56 | 57 | sta1.cmd("ifconfig sta1-wlan0.10 10.0.0.1") 58 | sta2.cmd("ifconfig sta2-wlan0.10 10.0.0.2") 59 | sta3.cmd("ifconfig sta3-wlan0.20 10.0.0.3") 60 | sta4.cmd("ifconfig sta4-wlan0.20 10.0.0.4") 61 | 62 | info("*** Running CLI\n") 63 | CLI(net) 64 | 65 | info("*** Stopping network\n") 66 | net.stop() 67 | 68 | 69 | if __name__ == '__main__': 70 | setLogLevel('info') 71 | topology() 72 | -------------------------------------------------------------------------------- /codes/cap4/radiusCode-openflow.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import RemoteController, UserSwitch 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import UserAP 10 | from mn_wifi.cli import CLI 11 | from mn_wifi.net import Mininet_wifi 12 | from mn_wifi.link import wmediumd 13 | from mn_wifi.wmediumdConnector import interference 14 | import os 15 | 16 | 17 | def topology(): 18 | "Create a network." 19 | net = Mininet_wifi(link=wmediumd, wmediumd_mode=interference) 20 | 21 | info("*** Creating nodes\n") 22 | net.addStation( 'sta1', ip='192.168.0.1', 23 | radius_passwd='sdnteam', encrypt='wpa2', 24 | radius_identity='joe', position='110,120,0' ) 25 | net.addStation( 'sta2', ip='192.168.0.2', 26 | radius_passwd='hello', encrypt='wpa2', 27 | radius_identity='bob', position='200,100,0' ) 28 | ap1 = net.addStation( 'ap1', ip='192.168.0.100', 29 | position='150,100,0' ) 30 | h1 = net.addHost('h1', ip='10.0.0.100/8') 31 | s1 = net.addSwitch('s1') 32 | c0 = net.addController('c0', controller=RemoteController, 33 | ip='127.0.0.1', port=6653 ) 34 | 35 | info("*** Configuring Propagation Model\n") 36 | net.setPropagationModel(model="logDistance", exp=3.5) 37 | 38 | info("*** Configuring wifi nodes\n") 39 | net.configureWifiNodes() 40 | 41 | ap1.setMasterMode(intf='ap1-wlan0', ssid='ap1-ssid', channel='1', 42 | mode='n', authmode='8021x', encrypt='wpa2', 43 | radius_server='10.0.0.100') 44 | 45 | info("*** Associating Stations\n") 46 | net.addLink(ap1, s1) 47 | net.addLink(s1, h1) 48 | 49 | info("*** Starting network\n") 50 | net.build() 51 | c0.start() 52 | s1.start([c0]) 53 | 54 | ap1.cmd('ifconfig ap1-eth2 10.0.0.200') 55 | ap1.cmd('ifconfig ap1-wlan0 0') 56 | 57 | h1.cmdPrint('rc.radiusd start') 58 | ap1.cmd('echo 1 > /proc/sys/net/ipv4/ip_forward') 59 | #s1.cmd('ovs-ofctl add-flow s1 in_port=1,priority=65535,' 60 | #dl_type=0x800,nw_proto=17,tp_dst=1812,actions=2,controller') 61 | 62 | info("*** Running CLI\n") 63 | CLI(net) 64 | 65 | os.system('pkill radiusd') 66 | 67 | info("*** Stopping network\n") 68 | net.stop() 69 | 70 | 71 | if __name__ == '__main__': 72 | setLogLevel('info') 73 | topology() 74 | -------------------------------------------------------------------------------- /codes/cap4/krack-attack.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | __author__ = "Ramon Fontes, Hedertone Almeida, and Christian Rothenberg" 4 | __credits__ = ["https://github.com/vanhoefm/krackattacks-test-ap-ft"] 5 | 6 | from mininet.node import RemoteController 7 | from mininet.log import setLogLevel, info 8 | from mn_wifi.net import MininetWithControlWNet 9 | from mn_wifi.node import UserAP 10 | from mn_wifi.cli import CLI 11 | from mn_wifi.link import wmediumd 12 | from mn_wifi.wmediumdConnector import interference 13 | import os 14 | 15 | 16 | def topology(): 17 | 18 | info("*** Shutting down any controller running on port 6653\n") 19 | os.system('sudo fuser -k 6653/tcp') 20 | 21 | "Create a network." 22 | net = MininetWithControlWNet(controller=RemoteController, accessPoint=UserAP, 23 | link=wmediumd, wmediumd_mode=interference, 24 | inNamespace=True) 25 | 26 | info("*** Creating nodes\n") 27 | net.addStation('sta1', ip='10.0.0.1/8', position='20,0,0', inNamespace=False) 28 | ap1 = net.addAccessPoint('ap1', mac='02:00:00:00:00:01', ssid="handover", mode="g", 29 | channel="1", ieee80211r='yes', mobility_domain='a1b2', 30 | passwd='123456789a', encrypt='wpa2', position='10,30,0', 31 | inNamespace=True) 32 | ap2 = net.addAccessPoint('ap2', mac='02:00:00:00:00:02', ssid="handover", mode="g", 33 | channel="6", ieee80211r='yes', mobility_domain='a1b2', 34 | passwd='123456789a', encrypt='wpa2', position='100,30,0', 35 | inNamespace=True) 36 | c1 = net.addController('c1', controller=RemoteController, port=6653) 37 | 38 | info("*** Configuring Propagation Model\n") 39 | net.setPropagationModel(model="logDistance", exp=3.5) 40 | 41 | info("*** Configuring wifi nodes\n") 42 | net.configureWifiNodes() 43 | 44 | info("*** Linking nodes\n") 45 | net.addLink(ap1, ap2) 46 | 47 | 'plotting graph' 48 | net.plotGraph(min_x=-100, min_y=-100, max_x=200, max_y=200) 49 | 50 | info("*** Starting network\n") 51 | net.build() 52 | c1.start() 53 | ap1.start([c1]) 54 | ap2.start([c1]) 55 | 56 | ap1.cmd('ifconfig ap1-wlan1 10.0.0.101/8') 57 | ap2.cmd('ifconfig ap2-wlan1 10.0.0.102/8') 58 | os.system('ip link set hwsim0 up') 59 | 60 | info("*** Running CLI\n") 61 | CLI(net) 62 | 63 | info("*** Stopping network\n") 64 | net.stop() 65 | 66 | if __name__ == '__main__': 67 | setLogLevel('info') 68 | topology() 69 | -------------------------------------------------------------------------------- /codes/cap4/handover-controller.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import RemoteController 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import UserAP 10 | from mn_wifi.link import wmediumd 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(): 17 | "Create a network." 18 | net = Mininet_wifi(controller=RemoteController, accessPoint=UserAP, 19 | link=wmediumd, wmediumd_mode=interference) 20 | 21 | info("*** Creating nodes\n") 22 | sta1 = net.addStation('sta1', position='15,20,0') 23 | sta2 = net.addStation('sta2', position='35,20,0') 24 | ap1 = net.addAccessPoint('ap1', mac='00:00:00:00:00:01', ssid="handover", 25 | mode="g", channel="1", passwd='123456789a', 26 | encrypt='wpa2', position='10,30,0') 27 | ap2 = net.addAccessPoint('ap2', mac='00:00:00:00:00:02', ssid="handover", 28 | mode="g", channel="6", passwd='123456789a', 29 | encrypt='wpa2', position='60,30,0') 30 | ap3 = net.addAccessPoint('ap3', mac='00:00:00:00:00:03', ssid="handover", 31 | mode="g", channel="1", passwd='123456789a', 32 | encrypt='wpa2', position='120,100,0') 33 | h1 = net.addHost('h1') 34 | h2 = net.addHost('h2') 35 | h3 = net.addHost('h3') 36 | c1 = net.addController('c1', controller=RemoteController) 37 | 38 | info("*** Configuring Propagation Model\n") 39 | net.setPropagationModel(model="logDistance", exp=3.5) 40 | 41 | info("*** Configuring wifi nodes\n") 42 | net.configureWifiNodes() 43 | 44 | info("*** Creating links\n") 45 | net.addLink(ap1, ap2) 46 | net.addLink(ap2, ap3) 47 | net.addLink(h1, ap1) 48 | net.addLink(h2, ap2) 49 | net.addLink(h3, ap3) 50 | 51 | net.plotGraph(min_x=-100, min_y=-100, max_x=200, max_y=200) 52 | 53 | info("*** Starting network\n") 54 | net.build() 55 | c1.start() 56 | ap1.start([c1]) 57 | ap2.start([c1]) 58 | ap3.start([c1]) 59 | 60 | sta1.cmd('wpa_cli -i sta1-wlan0 roam 00:00:00:00:00:01') 61 | sta2.cmd('wpa_cli -i sta2-wlan0 roam 00:00:00:00:00:01') 62 | sta1.cmd('./sta1_2.py &') 63 | sta2.cmd('./sta2_2.py &') 64 | 65 | info("*** Running CLI\n") 66 | CLI(net) 67 | 68 | info("*** Stopping network\n") 69 | net.stop() 70 | 71 | 72 | if __name__ == '__main__': 73 | setLogLevel('info') 74 | topology() 75 | -------------------------------------------------------------------------------- /codes/cap4/forwardingBySSID.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mn_wifi.net import Mininet_wifi 8 | from mn_wifi.node import OVSAP 9 | from mn_wifi.cli import CLI 10 | from mininet.node import Controller 11 | from mininet.log import setLogLevel, info 12 | 13 | 14 | def topology(): 15 | "Create a network." 16 | net = Mininet_wifi( controller=Controller, autoAssociation=False ) 17 | 18 | info("*** Creating nodes\n") 19 | sta1 = net.addStation('sta1', position='10,60,0') 20 | sta2 = net.addStation('sta2', position='20,15,0') 21 | sta3 = net.addStation('sta3', position='10,25,0') 22 | sta4 = net.addStation('sta4', position='50,30,0') 23 | sta5 = net.addStation('sta5', position='45,65,0') 24 | ap1 = net.addAccessPoint('ap1', vssids=4, ssid=['ssid,ssid1,ssid2,ssid3,ssid4'], 25 | mode="g", channel="1", position='30,40,0') 26 | c0 = net.addController('c0', controller=Controller) 27 | 28 | net.setPropagationModel(model='logDistance', exp=4) 29 | 30 | info("*** Configuring wifi nodes\n") 31 | net.configureWifiNodes() 32 | 33 | "plotting graph" 34 | net.plotGraph(max_x=100, max_y=100) 35 | 36 | info("*** Starting network\n") 37 | net.build() 38 | c0.start() 39 | ap1.start([c0]) 40 | 41 | sta1.setRange(15) 42 | sta2.setRange(15) 43 | sta3.setRange(15) 44 | sta4.setRange(15) 45 | sta5.setRange(15) 46 | 47 | sta1.cmd('iw dev %s connect %s %s' 48 | % (sta1.params['wlan'][0], ap1.wintfs[1].ssid, 49 | ap1.wintfs[1].mac)) 50 | sta2.cmd('iw dev %s connect %s %s' 51 | % (sta2.params['wlan'][0], ap1.wintfs[2].ssid, 52 | ap1.wintfs[2].mac)) 53 | sta3.cmd('iw dev %s connect %s %s' 54 | % (sta3.params['wlan'][0], ap1.wintfs[2].ssid, 55 | ap1.wintfs[2].mac)) 56 | sta4.cmd('iw dev %s connect %s %s' 57 | % (sta4.params['wlan'][0], ap1.wintfs[3].ssid, 58 | ap1.wintfs[3].mac)) 59 | sta5.cmd('iw dev %s connect %s %s' 60 | % (sta5.params['wlan'][0], ap1.wintfs[4].ssid, 61 | ap1.wintfs[4].mac)) 62 | 63 | ap1.cmd('ovs-ofctl add-flow ap1 in_port=2,actions=3') 64 | ap1.cmd('ovs-ofctl add-flow ap1 in_port=3,actions=2') 65 | ap1.cmd('ovs-ofctl add-flow ap1 in_port=4,actions=5') 66 | ap1.cmd('ovs-ofctl add-flow ap1 in_port=5,actions=4') 67 | 68 | info("*** Running CLI\n") 69 | CLI( net ) 70 | 71 | info("*** Stopping network\n") 72 | net.stop() 73 | 74 | if __name__ == '__main__': 75 | setLogLevel( 'info' ) 76 | topology() 77 | -------------------------------------------------------------------------------- /codes/cap3/loop.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | import sys 8 | 9 | from mininet.log import setLogLevel, info 10 | from mn_wifi.cli import CLI 11 | from mn_wifi.net import Mininet_wifi 12 | from mn_wifi.node import OVSBridgeAP 13 | 14 | 15 | def topology(stp): 16 | 17 | net = Mininet_wifi(accessPoint=OVSBridgeAP) 18 | 19 | info("*** Creating nodes\n") 20 | sta1 = net.addStation('sta1', mac='00:00:00:00:00:02', ip='10.0.0.1/8', 21 | position='100,101,0') 22 | sta2 = net.addStation('sta2', mac='00:00:00:00:00:03', ip='10.0.0.2/8', 23 | position='50,51,0') 24 | sta3 = net.addStation('sta3', mac='00:00:00:00:00:04', ip='10.0.0.3/8', 25 | position='150,51,0') 26 | if stp: 27 | ap1 = net.addAccessPoint('ap1', ssid='new-ssid1', mode='g', channel='1', 28 | failMode="standalone", position='100,100,0', 29 | stp=True) 30 | ap2 = net.addAccessPoint('ap2', ssid='new-ssid2', mode='g', channel='1', 31 | failMode="standalone", position='50,50,0', 32 | stp=True) 33 | ap3 = net.addAccessPoint('ap3', ssid='new-ssid3', mode='g', channel='1', 34 | failMode="standalone", position='150,50,0', 35 | stp=True) 36 | else: 37 | ap1 = net.addAccessPoint('ap1', ssid='new-ssid1', mode='g', channel='1', 38 | failMode="standalone", position='100,100,0') 39 | ap2 = net.addAccessPoint('ap2', ssid='new-ssid2', mode='g', channel='1', 40 | failMode="standalone", position='50,50,0') 41 | ap3 = net.addAccessPoint('ap3', ssid='new-ssid3', mode='g', channel='1', 42 | failMode="standalone", position='150,50,0') 43 | 44 | net.setPropagationModel(model="logDistance", exp=4.5) 45 | 46 | info("*** Configuring wifi nodes\n") 47 | net.configureWifiNodes() 48 | 49 | info("*** Creating links\n") 50 | net.addLink(ap1, sta1) 51 | net.addLink(ap2, sta2) 52 | net.addLink(ap3, sta3) 53 | net.addLink(ap1, ap2) 54 | net.addLink(ap1, ap3) 55 | net.addLink(ap2, ap3) 56 | 57 | net.plotGraph(max_x=300, max_y=300) 58 | 59 | info("*** Starting network\n") 60 | net.build() 61 | ap1.start([]) 62 | ap2.start([]) 63 | ap3.start([]) 64 | 65 | info("*** Running CLI\n") 66 | CLI(net) 67 | 68 | info("*** Stopping network\n") 69 | net.stop() 70 | 71 | 72 | if __name__ == '__main__': 73 | setLogLevel('info') 74 | stp = True if '-s' in sys.argv else False 75 | topology(stp) 76 | -------------------------------------------------------------------------------- /codes/cap4/replayingNetworkConditions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | import os 8 | 9 | from mininet.log import setLogLevel, info 10 | from mininet.node import Controller 11 | from mn_wifi.net import Mininet_wifi 12 | from mn_wifi.cli import CLI 13 | from mn_wifi.replaying import ReplayingNetworkConditions 14 | from sys import version_info as py_version_info 15 | 16 | 17 | def topology(): 18 | "Create a network." 19 | net = Mininet_wifi(controller=Controller) 20 | 21 | info("*** Creating nodes") 22 | sta1 = net.addStation('sta1', mac='00:00:00:00:00:01', 23 | ip='192.168.0.1/24', 24 | position='47.28,50,0') 25 | sta2 = net.addStation('sta2', mac='00:00:00:00:00:02', 26 | ip='192.168.0.2/24', 27 | position='54.08,50,0') 28 | ap3 = net.addAccessPoint('ap3', ssid='ap-ssid3', mode='g', 29 | channel='1', position='50,50,0') 30 | c0 = net.addController('c0', controller=Controller, port=6653) 31 | 32 | info("*** Configuring wifi nodes") 33 | net.configureWifiNodes() 34 | 35 | info("*** Starting network") 36 | net.build() 37 | c0.start() 38 | ap3.start([c0]) 39 | 40 | sta1.cmd('iw dev sta1-wlan0 interface add mon0 type monitor &') 41 | sta1.cmd('ifconfig mon0 up &') 42 | sta2.cmd('iw dev sta2-wlan0 interface add mon0 type monitor &') 43 | sta2.cmd('ifconfig mon0 up &') 44 | if py_version_info < (3, 0): 45 | sta2.cmd('pushd ~/Downloads; python -m SimpleHTTPServer 80 &') 46 | else: 47 | sta2.cmd('pushd ~/Downloads; python -m http.server 80 &') 48 | 49 | path = os.path.dirname(os.path.abspath(__file__)) 50 | getTrace(sta1, '%s/replayingNetworkConditions/clientTrace.txt' % path) 51 | getTrace(sta2, '%s/replayingNetworkConditions/serverTrace.txt' % path) 52 | 53 | ReplayingNetworkConditions.addNode(sta1) 54 | ReplayingNetworkConditions.addNode(sta2) 55 | ReplayingNetworkConditions(net) 56 | 57 | info("*** Running CLI") 58 | CLI( net ) 59 | 60 | info("*** Stopping network") 61 | net.stop() 62 | 63 | 64 | def getTrace(sta, file): 65 | 66 | file = open(file, 'r') 67 | raw_data = file.readlines() 68 | file.close() 69 | 70 | sta.time = [] 71 | sta.bw = [] 72 | sta.loss = [] 73 | sta.delay = [] 74 | sta.latency = [] 75 | 76 | for data in raw_data: 77 | line = data.split() 78 | sta.time.append(float(line[0])) #First Column = Time 79 | sta.bw.append(((float(line[1]))/1000000)/2) #Second Column = BW 80 | sta.loss.append(float(line[2])) #second Column = LOSS 81 | sta.latency.append(float(line[3])) #Second Column = LATENCY 82 | 83 | if __name__ == '__main__': 84 | setLogLevel( 'info' ) 85 | topology() 86 | -------------------------------------------------------------------------------- /codes/cap4/replayingMobility.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | import os 7 | import sys 8 | 9 | from mininet.node import Controller 10 | from mininet.log import setLogLevel, info 11 | from mn_wifi.replaying import ReplayingMobility 12 | from mn_wifi.node import OVSAP 13 | from mn_wifi.cli import CLI 14 | from mn_wifi.net import Mininet_wifi 15 | from mn_wifi.link import wmediumd, adhoc 16 | from mn_wifi.wmediumdConnector import interference 17 | 18 | 19 | def topology(args): 20 | "Create a network." 21 | net = Mininet_wifi(link=wmediumd, wmediumd_mode=interference) 22 | 23 | info("*** Creating nodes\n") 24 | sta1 = net.addStation('sta1', mac='00:00:00:00:00:02', 25 | ip='10.0.0.1/8', speed=4) 26 | sta2 = net.addStation('sta2', mac='00:00:00:00:00:03', 27 | ip='10.0.0.2/8', speed=6) 28 | sta3 = net.addStation('sta3', mac='00:00:00:00:00:04', 29 | ip='10.0.0.3/8', speed=3) 30 | sta4 = net.addStation('sta4', mac='00:00:00:00:00:05', 31 | ip='10.0.0.4/8', speed=3) 32 | ap1 = net.addAccessPoint('ap1', ssid='new-ssid', 33 | mode='g', channel='1', 34 | position='45,45,0') 35 | c1 = net.addController('c1', controller=Controller) 36 | 37 | info("*** Configuring Propagation Model\n") 38 | net.setPropagationModel(model="logDistance", exp=4.5) 39 | 40 | info("*** Configuring wifi nodes\n") 41 | net.configureNodes() 42 | 43 | info("*** Creating links\n") 44 | net.addLink(sta3, cls=adhoc, intf='sta3-wlan0', ssid='adhocNet') 45 | net.addLink(sta4, cls=adhoc, intf='sta4-wlan0', ssid='adhocNet') 46 | 47 | net.isReplaying = True 48 | path = os.path.dirname(os.path.abspath(__file__)) 49 | getTrace(sta1, '%s/replayingMobility/node1.dat' % path) 50 | getTrace(sta2, '%s/replayingMobility/node2.dat' % path) 51 | getTrace(sta3, '%s/replayingMobility/node3.dat' % path) 52 | getTrace(sta4, '%s/replayingMobility/node4.dat' % path) 53 | 54 | if '-p' in args: 55 | net.plotGraph(max_x=200, max_y=200) 56 | 57 | info("*** Starting network\n") 58 | net.build() 59 | c1.start() 60 | ap1.start([c1]) 61 | 62 | info("*** Replaying Mobility\n") 63 | ReplayingMobility(net) 64 | 65 | info("*** Running CLI\n") 66 | CLI(net) 67 | 68 | info("*** Stopping network\n") 69 | net.stop() 70 | 71 | 72 | def getTrace(sta, file_): 73 | file_ = open(file_, 'r') 74 | raw_data = file_.readlines() 75 | file_.close() 76 | 77 | sta.p = [] 78 | pos = (-1000, 0, 0) 79 | sta.position = pos 80 | 81 | for data in raw_data: 82 | line = data.split() 83 | x = line[0] # First Column 84 | y = line[1] # Second Column 85 | pos = float(x), float(y), 0 86 | sta.p.append(pos) 87 | 88 | 89 | if __name__ == '__main__': 90 | setLogLevel('info') 91 | topology(sys.argv) 92 | -------------------------------------------------------------------------------- /codes/cap4/handover-controller-beacons.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import RemoteController, UserSwitch 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.node import UserAP 10 | from mn_wifi.link import wmediumd 11 | from mn_wifi.cli import CLI 12 | from mn_wifi.net import Mininet_wifi 13 | from mn_wifi.wmediumdConnector import interference 14 | 15 | 16 | def topology(): 17 | "Create a network." 18 | net = Mininet_wifi(controller=RemoteController, accessPoint=UserAP, 19 | switch=UserSwitch, link=wmediumd, 20 | wmediumd_mode=interference) 21 | 22 | info("*** Creating nodes\n") 23 | sta1 = net.addStation('sta1', position='15,20,0') 24 | sta2 = net.addStation('sta2', position='35,20,0') 25 | ap1 = net.addAccessPoint('ap1', mac='00:00:00:00:00:01', ssid="handover", 26 | mode="g", channel="1", passwd='123456789a', 27 | encrypt='wpa2', position='10,30,0') 28 | ap2 = net.addAccessPoint('ap2', mac='00:00:00:00:00:02', ssid="handover", 29 | mode="g", channel="6", passwd='123456789a', 30 | encrypt='wpa2', position='60,30,0') 31 | ap3 = net.addAccessPoint('ap3', mac='00:00:00:00:00:03', ssid="handover", 32 | mode="g", channel="1", passwd='123456789a', 33 | encrypt='wpa2', position='120,100,0') 34 | s4 = net.addSwitch('s4') 35 | h1 = net.addHost('h1') 36 | controller_ = net.addHost('con', ip='10.0.0.100/8', inNamespace=False) 37 | c1 = net.addController('c1', controller=RemoteController, ip='127.0.0.1') 38 | 39 | info("*** Configuring Propagation Model\n") 40 | net.setPropagationModel(model="logDistance", exp=3.5) 41 | 42 | info("*** Configuring wifi nodes\n") 43 | net.configureWifiNodes() 44 | 45 | net.plotGraph(max_x=300, max_y=300) 46 | 47 | info("*** Creating links\n") 48 | net.addLink(h1, ap1) 49 | net.addLink(s4, ap1) 50 | net.addLink(s4, ap2) 51 | net.addLink(s4, ap3) 52 | net.addLink(s4, controller_) 53 | 54 | info("*** Starting network\n") 55 | net.build() 56 | net.addNAT().configDefault() 57 | c1.start() 58 | ap1.start([c1]) 59 | ap2.start([c1]) 60 | ap3.start([c1]) 61 | s4.start([c1]) 62 | 63 | sta1.cmd('iw dev sta1-wlan0 interface add mon0 type monitor') 64 | sta1.cmd('ifconfig mon0 up') 65 | sta2.cmd('iw dev sta2-wlan0 interface add mon0 type monitor') 66 | sta2.cmd('ifconfig mon0 up') 67 | sta1.cmd('wpa_cli -i sta1-wlan0 roam 00:00:00:00:00:01') 68 | sta2.cmd('wpa_cli -i sta2-wlan0 roam 00:00:00:00:00:01') 69 | sta1.cmd('./sta1_1.py &') 70 | sta2.cmd('./sta2_1.py &') 71 | 72 | info("*** Running CLI\n") 73 | CLI(net) 74 | 75 | info("*** Stopping network\n") 76 | net.stop() 77 | 78 | 79 | if __name__ == '__main__': 80 | setLogLevel('info') 81 | topology() 82 | -------------------------------------------------------------------------------- /codes/cap3/mptcp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.log import setLogLevel, info 8 | from mininet.node import Controller 9 | from mn_wifi.net import Mininet_wifi 10 | from mn_wifi.cli import CLI 11 | import sys 12 | 13 | 14 | def topology(is_mptcp): 15 | "Create a network." 16 | net = Mininet_wifi( controller=Controller ) 17 | 18 | info("*** Creating nodes\n") 19 | sta1 = net.addStation('sta1', wlans=2, position='51,10,0') 20 | ap1 = net.addAccessPoint('ap1', mac='00:00:00:00:00:02', ssid='ssid_ap1', 21 | mode='g', channel='6', position='55,17,0') 22 | ap2 = net.addAccessPoint('ap2', mac='00:00:00:00:00:03', 23 | ssid='ssid_ap2', mode='n', channel='1', 24 | position='50,11,0') 25 | r1 = net.addHost('r1', mac='00:00:00:00:00:04') 26 | h1 = net.addHost('h1', mac='00:00:00:00:00:10') 27 | c1 = net.addController('c1') 28 | 29 | info("*** Configuring wifi nodes\n") 30 | net.configureWifiNodes() 31 | 32 | info("*** Associating and Creating links\n") 33 | net.addLink(ap1, sta1, 0, 0) 34 | net.addLink(ap2, sta1, 0, 1) 35 | net.addLink(ap1, r1, bw=1000) 36 | net.addLink(ap2, r1, bw=1000) 37 | net.addLink(r1, h1, bw=100) 38 | net.addLink(r1, h1, bw=100) 39 | 40 | info("*** Starting network\n") 41 | net.build() 42 | c1.start() 43 | ap1.start([c1]) 44 | ap2.start([c1]) 45 | 46 | r1.cmd('ifconfig r1-eth0 10.0.0.1/24') 47 | r1.cmd('ifconfig r1-eth1 10.0.1.1/24') 48 | r1.cmd('ifconfig r1-eth2 10.0.2.1/24') 49 | r1.cmd('ifconfig r1-eth3 10.0.3.1/24') 50 | 51 | h1.cmd('ifconfig h1-eth0 10.0.2.2/24') 52 | h1.cmd('ifconfig h1-eth1 10.0.3.2/24') 53 | 54 | sta1.cmd('ifconfig sta1-wlan0 10.0.0.2/24') 55 | sta1.cmd('ifconfig sta1-wlan1 10.0.1.2/24') 56 | 57 | sta1.cmd("ip rule add from 10.0.0.2 table 1") 58 | sta1.cmd("ip rule add from 10.0.1.2 table 2") 59 | sta1.cmd("ip route add 10.0.0.0/24 dev sta1-wlan0 scope link table 1") 60 | sta1.cmd("ip route add default via 10.0.0.1 dev sta1-wlan0 table 1") 61 | sta1.cmd("ip route add 10.0.1.0/24 dev sta1-wlan1 scope link table 2") 62 | sta1.cmd("ip route add default via 10.0.1.1 dev sta1-wlan1 table 2") 63 | sta1.cmd("ip route add default scope global nexthop via 10.0.0.1 dev sta1-wlan0") 64 | 65 | h1.cmd("ip rule add from 10.0.2.2 table 1") 66 | h1.cmd("ip rule add from 10.0.3.2 table 2") 67 | h1.cmd("ip route add 10.0.2.0/24 dev h1-eth0 scope link table 1") 68 | h1.cmd("ip route add default via 10.0.2.1 dev h1-eth0 table 1") 69 | h1.cmd("ip route add 10.0.3.0/24 dev h1-eth1 scope link table 2") 70 | h1.cmd("ip route add default via 10.0.3.1 dev h1-eth1 table 2") 71 | h1.cmd("ip route add default scope global nexthop via 10.0.2.1 dev h1-eth0") 72 | 73 | r1.cmd('sysctl -w net.ipv4.ip_forward=1') 74 | 75 | if not is_mptcp: 76 | sta1.cmd('iw dev sta1-wlan1 disconnect') 77 | 78 | info("*** Running CLI\n") 79 | CLI( net ) 80 | 81 | info("*** Stopping network\n") 82 | net.stop() 83 | 84 | if __name__ == '__main__': 85 | setLogLevel( 'info' ) 86 | is_mptcp = True if '-m' in sys.argv else False 87 | topology(is_mptcp) 88 | -------------------------------------------------------------------------------- /codes/cap4/vanet-sumo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | import os 8 | 9 | from mininet.node import Controller 10 | from mininet.log import setLogLevel, info 11 | from mn_wifi.node import UserAP 12 | from mn_wifi.cli import CLI 13 | from mn_wifi.net import Mininet_wifi 14 | from mn_wifi.sumo.runner import sumo 15 | from mn_wifi.link import wmediumd, mesh 16 | from mn_wifi.wmediumdConnector import interference 17 | 18 | 19 | def topology(): 20 | "Create a network." 21 | net = Mininet_wifi(controller=Controller, accessPoint=UserAP, 22 | link=wmediumd, wmediumd_mode=interference) 23 | 24 | info("*** Creating nodes\n") 25 | cars = [] 26 | for id in range(0, 10): 27 | cars.append(net.addCar('car%s' % (id+1), wlans=2, bgscan_threshold=-45, 28 | s_inverval=5, l_interval=10, bgscan_module="simple")) 29 | 30 | e1 = net.addAccessPoint('e1', ssid='vanet-ssid', mac='00:00:00:11:00:01', 31 | mode='g', channel='1', passwd='123456789a', 32 | encrypt='wpa2', position='3279.02,3736.27,0') 33 | e2 = net.addAccessPoint('e2', ssid='vanet-ssid', mac='00:00:00:11:00:02', 34 | mode='g', channel='6', passwd='123456789a', 35 | encrypt='wpa2', position='2320.82,3565.75,0') 36 | e3 = net.addAccessPoint('e3', ssid='vanet-ssid', mac='00:00:00:11:00:03', 37 | mode='g', channel='11', passwd='123456789a', 38 | encrypt='wpa2', position='2806.42,3395.22,0') 39 | e4 = net.addAccessPoint('e4', ssid='vanet-ssid', mac='00:00:00:11:00:04', 40 | mode='g', channel='1', passwd='123456789a', 41 | encrypt='wpa2', position='3332.62,3253.92,0') 42 | e5 = net.addAccessPoint('e5', ssid='vanet-ssid', mac='00:00:00:11:00:05', 43 | mode='g', channel='6', passwd='123456789a', 44 | encrypt='wpa2', position='2887.62,2935.61,0') 45 | e6 = net.addAccessPoint('e6', ssid='vanet-ssid', mac='00:00:00:11:00:06', 46 | mode='g', channel='11', passwd='123456789a', 47 | encrypt='wpa2', position='2351.68,3083.40,0') 48 | c1 = net.addController('c1') 49 | 50 | info("*** Configuring Propagation Model\n") 51 | net.setPropagationModel(model="logDistance", exp=2) 52 | 53 | info("*** Configuring wifi nodes\n") 54 | net.configureWifiNodes() 55 | 56 | net.addLink(e1, e2) 57 | net.addLink(e2, e3) 58 | net.addLink(e3, e4) 59 | net.addLink(e4, e5) 60 | net.addLink(e5, e6) 61 | for car in cars: 62 | net.addLink(car, intf=car.params['wlan'][1], 63 | cls=mesh, ssid='mesh-ssid', channel=5) 64 | 65 | net.useExternalProgram(program=sumo, port=8813, 66 | config_file='map.sumocfg') 67 | 68 | info("*** Starting network\n") 69 | net.build() 70 | c1.start() 71 | e1.start([c1]) 72 | e2.start([c1]) 73 | e3.start([c1]) 74 | e4.start([c1]) 75 | e5.start([c1]) 76 | e6.start([c1]) 77 | 78 | for car in cars: 79 | car.setIP('192.168.0.%s/24' % (int(cars.index(car))+1), 80 | intf='%s-wlan0' % car) 81 | car.setIP('192.168.1.%s/24' % (int(cars.index(car))+1), 82 | intf='%s-mp1' % car) 83 | 84 | info("*** Running CLI\n") 85 | CLI(net) 86 | 87 | info("*** Stopping network\n") 88 | net.stop() 89 | 90 | 91 | if __name__ == '__main__': 92 | setLogLevel('info') 93 | topology() 94 | -------------------------------------------------------------------------------- /codes/extras/gre.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | """ 4 | Example of GRE Tunnel 5 | """ 6 | 7 | from mininet.net import Mininet 8 | from mininet.cli import CLI 9 | from mininet.log import setLogLevel 10 | 11 | 12 | def topology(): 13 | 14 | "Create a network." 15 | net = Mininet() 16 | 17 | print("*** Creating nodes") 18 | h1 = net.addHost('h1', mac='00:00:00:00:00:01') 19 | h2 = net.addHost('h2', mac='00:00:00:00:00:02', ip='192.168.10.1/24') 20 | h3 = net.addHost('h3', mac='00:00:00:00:00:03', ip='192.168.10.2/24') 21 | h4 = net.addHost('h4', mac='00:00:00:00:00:04', ip='192.168.10.3/24') 22 | h5 = net.addHost('h5', mac='00:00:00:00:00:05') 23 | h6 = net.addHost('h6', mac='00:00:00:00:00:06', ip='192.168.20.1/24') 24 | h7 = net.addHost('h7', mac='00:00:00:00:00:07', ip='192.168.20.2/24') 25 | h8 = net.addHost('h8', mac='00:00:00:00:00:08', ip='192.168.20.3/24') 26 | h9 = net.addHost('h9', mac='00:00:00:00:00:09', ip='140.116.172.1/24') 27 | h10 = net.addHost('h10', mac='00:00:00:00:00:0A', ip='140.116.172.2/24') 28 | 29 | print("*** Creating links") 30 | net.addLink(h1, h2) 31 | net.addLink(h1, h3, intfName1='h1-eth1') 32 | net.addLink(h1, h4, intfName1='h1-eth2') 33 | net.addLink(h5, h6) 34 | net.addLink(h5, h7, intfName1='h5-eth1') 35 | net.addLink(h5, h8, intfName1='h5-eth2') 36 | net.addLink(h9, h10) 37 | net.addLink(h9, h1, intfName1='h9-eth1', intfName2='h1-eth3') 38 | net.addLink(h10, h5, intfName1='h10-eth1', intfName2='h5-eth3') 39 | 40 | print("*** Building network") 41 | net.build() 42 | 43 | print("*** Adding some commands") 44 | h1.cmd("sudo ifconfig h1-eth0 0") 45 | h1.cmd("sudo ifconfig h1-eth1 0") 46 | h1.cmd("sudo ifconfig h1-eth2 0") 47 | h1.cmd("sudo ifconfig h1-eth3 0") 48 | h1.cmd("sudo brctl addbr mybr") 49 | h1.cmd("sudo brctl addif mybr h1-eth0") 50 | h1.cmd("sudo brctl addif mybr h1-eth1") 51 | h1.cmd("sudo brctl addif mybr h1-eth2") 52 | h1.cmd("sudo brctl addif mybr h1-eth3") 53 | h1.cmd("sudo ifconfig mybr up") 54 | h5.cmd("sudo ifconfig h5-eth0 0") 55 | h5.cmd("sudo ifconfig h5-eth1 0") 56 | h5.cmd("sudo ifconfig h5-eth2 0") 57 | h5.cmd("sudo ifconfig h5-eth3 0") 58 | h5.cmd("sudo brctl addbr mybr2") 59 | h5.cmd("sudo brctl addif mybr2 h5-eth0") 60 | h5.cmd("sudo brctl addif mybr2 h5-eth1") 61 | h5.cmd("sudo brctl addif mybr2 h5-eth2") 62 | h5.cmd("sudo brctl addif mybr2 h5-eth3") 63 | h5.cmd("sudo ifconfig mybr2 up") 64 | h9.cmd("sudo echo 1 > /proc/sys/net/ipv4/ip_forward") 65 | h10.cmd("sudo echo 1 > /proc/sys/net/ipv4/ip_forward") 66 | h9.cmd("sudo ifconfig h9-eth1 192.168.10.254 netmask 255.255.255.0") 67 | h10.cmd("sudo ifconfig h10-eth1 192.168.20.254 netmask 255.255.255.0") 68 | 69 | # No NAT setting: 192.168.10.0/24 can not talk to 192.168.20.0 70 | # configure gre tunnel 71 | h9.cmd("sudo ip tunnel add netb mode gre remote 140.116.172.2 local 140.116.172.1 ttl 255") 72 | h9.cmd("sudo ip addr add 192.168.10.253 dev netb") 73 | h9.cmd("sudo ifconfig netb up") 74 | h9.cmd("sudo ip route add 192.168.20.0/24 via 192.168.10.253") 75 | h10.cmd("sudo ip tunnel add neta mode gre remote 140.116.172.1 local 140.116.172.2 ttl 255") 76 | h10.cmd("sudo ip addr add 192.168.20.253 dev neta") 77 | h10.cmd("sudo ifconfig neta up") 78 | h10.cmd("sudo ip route add 192.168.10.0/24 via 192.168.20.253") 79 | h2.cmd("sudo ip route add 192.168.20.0/24 via 192.168.10.253") 80 | h3.cmd("sudo ip route add 192.168.20.0/24 via 192.168.10.253") 81 | h4.cmd("sudo ip route add 192.168.20.0/24 via 192.168.10.253") 82 | h6.cmd("sudo ip route add 192.168.10.0/24 via 192.168.20.253") 83 | h7.cmd("sudo ip route add 192.168.10.0/24 via 192.168.20.253") 84 | h8.cmd("sudo ip route add 192.168.10.0/24 via 192.168.20.253") 85 | 86 | print("*** Running CLI") 87 | CLI(net) 88 | 89 | print("*** Stopping network") 90 | net.stop() 91 | 92 | 93 | if __name__ == '__main__': 94 | setLogLevel('info') 95 | topology() 96 | -------------------------------------------------------------------------------- /codes/cap4/sflow-rt.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # autor: Ramon dos Reis Fontes 4 | # book: Wireless Network Emulation with Mininet-WiFi 5 | # github: https://github.com/ramonfontes/mn-wifi-book-en 6 | 7 | from mininet.node import Controller 8 | from mininet.log import setLogLevel, info 9 | from mn_wifi.link import wmediumd, mesh 10 | from mn_wifi.cli import CLI 11 | from mn_wifi.net import Mininet_wifi 12 | from mn_wifi.wmediumdConnector import interference 13 | from json import dumps 14 | from requests import put 15 | from mininet.util import quietRun 16 | from os import listdir, environ 17 | import re 18 | 19 | 20 | def topology(): 21 | "Create a network." 22 | net = Mininet_wifi(link=wmediumd, wmediumd_mode=interference) 23 | 24 | info("*** Creating nodes\n") 25 | sta1 = net.addStation('sta1', mac='00:00:00:00:00:11', position='1,1,0') 26 | sta2 = net.addStation('sta2', mac='00:00:00:00:00:12', position='31,11,0') 27 | ap1 = net.addAccessPoint('ap1', wlans=2, ssid=['ssid1','mesh'], position='10,10,0') 28 | ap2 = net.addAccessPoint('ap2', wlans=2, ssid=['ssid2','mesh'], position='30,10,0') 29 | ap3 = net.addAccessPoint('ap3', wlans=2, ssid=['ssid3','mesh'], position='50,10,0') 30 | c0 = net.addController('c0') 31 | 32 | info("*** Configuring wifi nodes\n") 33 | net.configureWifiNodes() 34 | 35 | info("*** Associating Stations\n") 36 | net.addLink(sta1, ap1) 37 | net.addLink(sta2, ap2) 38 | 39 | info("*** Creating mesh links\n") 40 | net.addLink(ap1, intf='ap1-wlan2', cls=mesh, ssid='mesh-ssid', channel=5) 41 | net.addLink(ap2, intf='ap2-wlan2', cls=mesh, ssid='mesh-ssid', channel=5) 42 | net.addLink(ap3, intf='ap3-wlan2', cls=mesh, ssid='mesh-ssid', channel=5) 43 | 44 | info("*** Building network\n") 45 | net.build() 46 | c0.start() 47 | ap1.start([c0]) 48 | ap2.start([c0]) 49 | ap3.start([c0]) 50 | 51 | ap1.cmd('iw dev %s-mp2 interface add %s-mon0 type monitor' % 52 | (ap1.name, ap1.name)) 53 | ap2.cmd('iw dev %s-mp2 interface add %s-mon0 type monitor' % 54 | (ap2.name, ap2.name)) 55 | ap1.cmd('ifconfig %s-mon0 up' % ap1.name) 56 | ap2.cmd('ifconfig %s-mon0 up' % ap2.name) 57 | 58 | ifname='enp2s0' # have to be changed to your own iface! 59 | collector = environ.get('COLLECTOR','127.0.0.1') 60 | sampling = environ.get('SAMPLING','10') 61 | polling = environ.get('POLLING','10') 62 | sflow = 'ovs-vsctl -- --id=@sflow create sflow agent=%s target=%s ' \ 63 | 'sampling=%s polling=%s --' % (ifname,collector,sampling,polling) 64 | 65 | for ap in net.aps: 66 | sflow += ' -- set bridge %s sflow=@sflow' % ap 67 | info(' '.join([ap.name for ap in net.aps])) 68 | quietRun(sflow) 69 | 70 | agent = '127.0.0.1' 71 | topo = {'nodes':{}, 'links':{}} 72 | for ap in net.aps: 73 | topo['nodes'][ap.name] = {'agent':agent, 'ports':{}} 74 | 75 | path = '/sys/devices/virtual/mac80211_hwsim/' 76 | for child in listdir(path): 77 | dir_ = '/sys/devices/virtual/mac80211_hwsim/'+'%s' % child+'/net/' 78 | for child_ in listdir(dir_): 79 | node = child_[:3] 80 | if node in topo['nodes']: 81 | ifindex = open(dir_+child_+'/ifindex').read().split('\n',1)[0] 82 | topo['nodes'][node]['ports'][child_] = {'ifindex': ifindex} 83 | 84 | path = '/sys/devices/virtual/net/' 85 | for child in listdir(path): 86 | parts = re.match('(^.+)-(.+)', child) 87 | if parts is None: continue 88 | if parts.group(1) in topo['nodes']: 89 | ifindex = open(path+child+'/ifindex').read().split('\n',1)[0] 90 | topo['nodes'][parts.group(1)]['ports'][child] = {'ifindex': ifindex} 91 | 92 | linkName = '%s-%s' % (ap1.name, ap2.name) 93 | topo['links'][linkName] = {'node1': ap1.name, 'port1': 'ap1-mp2', 94 | 'node2': ap2.name, 'port2': 'ap2-mp2'} 95 | linkName = '%s-%s' % (ap2.name, ap3.name) 96 | topo['links'][linkName] = {'node1': ap2.name, 'port1': 'ap2-mp2', 97 | 'node2': ap3.name, 'port2': 'ap3-mp2'} 98 | linkName = '%s-%s' % (ap1.name, ap2.name) 99 | topo['links'][linkName] = {'node1': ap1.name, 'port1': ap1.wintfs[0].name, 100 | 'node2': ap2.name, 'port2': ap2.wintfs[0].name} 101 | 102 | put('http://127.0.0.1:8008/topology/json',data=dumps(topo)) 103 | 104 | info("*** Running CLI\n") 105 | CLI(net) 106 | 107 | info("*** Stopping network\n") 108 | net.stop() 109 | 110 | 111 | if __name__ == '__main__': 112 | setLogLevel('info') 113 | topology() 114 | -------------------------------------------------------------------------------- /codes/cap3/routerline.py: -------------------------------------------------------------------------------- 1 | """router topology example 2 | 3 | chain of routers between two hosts 4 | 5 | h1---r1---r2-...-rN---h2 6 | 7 | Subnets are 10.0.0 to 10.0.N 8 | The last IPv4 address byte (host byte) is 2 on the left and 1 on the right, for routers. 9 | ri-eth0 is the interface on the left and ri-eth1 is on the right. IPv4 addresses look like: 10 | 10.0.[k-1].2--r[k]--10.0.k.1 11 | 12 | """ 13 | 14 | from mininet.net import Mininet 15 | from mininet.node import Node, OVSKernelSwitch, Controller, RemoteController 16 | from mininet.cli import CLI 17 | from mininet.link import TCLink 18 | from mininet.topo import Topo 19 | from mininet.log import setLogLevel, info 20 | import argparse 21 | 22 | ENABLE_LEFT_TO_RIGHT_ROUTING = True # tell all routers how to get to h2 23 | ENABLE_RIGHT_TO_LEFT_ROUTING = True # ditto for h1 24 | ENABLE_RIP = True # enable RIPv2; rip.py must be in same directory 25 | 26 | class LinuxRouter( Node ): # from the Mininet library 27 | "A Node with IP forwarding enabled." 28 | 29 | def config( self, **params ): 30 | super( LinuxRouter, self).config( **params ) 31 | # Enable forwarding on the router 32 | info ('enabling forwarding on ', self) 33 | self.cmd( 'sysctl net.ipv4.ip_forward=1' ) 34 | 35 | def terminate( self ): 36 | self.cmd( 'sysctl net.ipv4.ip_forward=0' ) 37 | super( LinuxRouter, self ).terminate() 38 | 39 | 40 | class RTopo(Topo): 41 | def __init__(self, **kwargs): 42 | super(RTopo, self).__init__(**kwargs) 43 | for key in kwargs: 44 | if key == 'N': N=kwargs[key] 45 | 46 | h1 = self.addHost( 'h1', ip=ip(0,10,24), defaultRoute='via '+ ip(0,2) ) 47 | h2 = self.addHost( 'h2', ip=ip(N,10,24), defaultRoute='via '+ ip(N,1) ) 48 | 49 | rlist = [] 50 | for i in range(1,N+1): 51 | ri = self.addHost('r'+str(i), cls=LinuxRouter) 52 | rlist.append(ri) 53 | 54 | self.addLink( h1, rlist[0], intfName1 = 'h1-eth0', intfName2 = 'r1-eth0') 55 | for i in range(1,N): # link from ri to r[i+1] 56 | self.addLink(rlist[i-1], rlist[i], inftname1 = 'r'+str(i)+'-eth1', inftname2 = 'r'+str(i+1)+'-eth0') 57 | self.addLink( rlist[N-1], h2, intfName1 = 'r'+str(N)+'-eth1', intfName2 = 'h2-eth0') 58 | 59 | 60 | def main(): 61 | parser = argparse.ArgumentParser() 62 | parser.add_argument('-N', '--N', type=int) 63 | args = parser.parse_args() 64 | if args.N is None: N = 3 65 | else: N = args.N 66 | rtopo = RTopo(N=N) 67 | 68 | net = Mininet(topo = rtopo, link=TCLink, autoSetMacs = True) 69 | net.start() 70 | 71 | # now configure the router IPv4 addresses, using the ip() function below 72 | for i in range(1, N+1): 73 | r = net['r'+str(i)] 74 | left_intf = 'r'+str(i)+'-eth0' 75 | right_intf = 'r'+str(i)+'-eth1' 76 | r.cmd('ifconfig ' + left_intf + ' ' + ip(i-1, 2, 24)) 77 | r.cmd('ifconfig ' + right_intf + ' ' +ip(i, 1, 24)) 78 | rp_disable(r) 79 | 80 | h1 = net['h1'] 81 | h2 = net['h2'] 82 | h1.cmd('/usr/sbin/sshd') 83 | h2.cmd('/usr/sbin/sshd') 84 | for i in range(1, N+1): 85 | r = net['r'+str(i)] 86 | r.cmd('/usr/sbin/sshd') 87 | if ENABLE_RIP: r.cmd('python3 rip.py &') 88 | 89 | if ENABLE_LEFT_TO_RIGHT_ROUTING: 90 | for i in range(1,N): 91 | r = net['r'+str(i)] 92 | right_intf = 'r' + str(i) + '-eth1' 93 | r.cmd('ip route add to ' + ip(N,0,24) + ' via ' + ip(i,2) + ' dev ' + right_intf) 94 | 95 | # ONE-WAY routing from h2 to h1 96 | if ENABLE_RIGHT_TO_LEFT_ROUTING: 97 | for i in range(2,N+1): 98 | r = net['r'+str(i)] 99 | left_intf = 'r' + str(i) + '-eth0' 100 | r.cmd('ip route add to ' + ip(0,0,24) + ' via ' + ip(i-1,1) + ' dev ' + left_intf) 101 | 102 | CLI( net) 103 | net.stop() 104 | 105 | # The following generates IP addresses from a subnet number and a host number 106 | # ip(4,2) returns 10.0.4.2, and ip(4,2,24) returns 10.0.4.2/24 107 | def ip(subnet,host,prefix=None): 108 | addr = '10.0.'+str(subnet)+'.' + str(host) 109 | if prefix is not None: addr = addr + '/' + str(prefix) 110 | return addr 111 | 112 | # For some examples we need to disable the default blocking of forwarding of packets with no reverse path 113 | def rp_disable(host): 114 | ifaces = host.cmd('ls /proc/sys/net/ipv4/conf') 115 | ifacelist = ifaces.split() # default is to split on whitespace 116 | for iface in ifacelist: 117 | if iface != 'lo': host.cmd('sysctl net.ipv4.conf.' + iface + '.rp_filter=0') 118 | 119 | 120 | setLogLevel('info') # 'info' is normal; 'debug' is for when there are problems 121 | main() 122 | 123 | """ 124 | Manual routing commands for N=3 125 | 126 | r1: ip route add to 10.0.3.0/24 via 10.0.1.2 dev r1-eth1 127 | r2: ip route add to 10.0.3.0/24 via 10.0.2.2 dev r2-eth2 128 | 129 | r1: route add -net 10.0.3.0/24 gw 10.0.1.2 130 | r2: route add -net 10.0.3.0/24 gw 10.0.2.2 131 | 132 | r3: ip route add to 10.0.0.0/24 via 10.0.2.1 dev r3-eth0 133 | r2: ip route add to 10.0.0.0/24 via 10.0.1.1 dev r2-eth0 134 | 135 | r3: route add -net 10.0.0.0/24 gw 10.0.2.1 136 | r2: route add -net 10.0.0.0/24 gw 10.0.1.1 137 | 138 | """ 139 | 140 | -------------------------------------------------------------------------------- /figures/cap3/adhoc-mesh.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-3.0 EPSF-3.0 2 | %%Creator: cairo 1.15.10 (http://cairographics.org) 3 | %%CreationDate: Sun Mar 31 23:37:53 2019 4 | %%Pages: 1 5 | %%DocumentData: Clean7Bit 6 | %%LanguageLevel: 2 7 | %%BoundingBox: 0 3 347 75 8 | %%EndComments 9 | %%BeginProlog 10 | 50 dict begin 11 | /q { gsave } bind def 12 | /Q { grestore } bind def 13 | /cm { 6 array astore concat } bind def 14 | /w { setlinewidth } bind def 15 | /J { setlinecap } bind def 16 | /j { setlinejoin } bind def 17 | /M { setmiterlimit } bind def 18 | /d { setdash } bind def 19 | /m { moveto } bind def 20 | /l { lineto } bind def 21 | /c { curveto } bind def 22 | /h { closepath } bind def 23 | /re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto 24 | 0 exch rlineto 0 rlineto closepath } bind def 25 | /S { stroke } bind def 26 | /f { fill } bind def 27 | /f* { eofill } bind def 28 | /n { newpath } bind def 29 | /W { clip } bind def 30 | /W* { eoclip } bind def 31 | /BT { } bind def 32 | /ET { } bind def 33 | /BDC { mark 3 1 roll /BDC pdfmark } bind def 34 | /EMC { mark /EMC pdfmark } bind def 35 | /cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def 36 | /Tj { show currentpoint cairo_store_point } bind def 37 | /TJ { 38 | { 39 | dup 40 | type /stringtype eq 41 | { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse 42 | } forall 43 | currentpoint cairo_store_point 44 | } bind def 45 | /cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore 46 | cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def 47 | /Tf { pop /cairo_font exch def /cairo_font_matrix where 48 | { pop cairo_selectfont } if } bind def 49 | /Td { matrix translate cairo_font_matrix matrix concatmatrix dup 50 | /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point 51 | /cairo_font where { pop cairo_selectfont } if } bind def 52 | /Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def 53 | cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def 54 | /g { setgray } bind def 55 | /rg { setrgbcolor } bind def 56 | /d1 { setcachedevice } bind def 57 | /cairo_data_source { 58 | CairoDataIndex CairoData length lt 59 | { CairoData CairoDataIndex get /CairoDataIndex CairoDataIndex 1 add def } 60 | { () } ifelse 61 | } def 62 | /cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def 63 | /cairo_image { image cairo_flush_ascii85_file } def 64 | /cairo_imagemask { imagemask cairo_flush_ascii85_file } def 65 | %%EndProlog 66 | %%BeginSetup 67 | %%BeginResource: font f-0-0 68 | %!FontType1-1.1 f-0-0 1.0 69 | 11 dict begin 70 | /FontName /f-0-0 def 71 | /PaintType 0 def 72 | /FontType 1 def 73 | /FontMatrix [0.001 0 0 0.001 0 0] readonly def 74 | /FontBBox {0 -9 524 724 } readonly def 75 | /Encoding 256 array 76 | 0 1 255 {1 index exch /.notdef put} for 77 | dup 49 /one put 78 | dup 50 /two put 79 | dup 51 /three put 80 | dup 97 /a put 81 | dup 115 /s put 82 | dup 116 /t put 83 | readonly def 84 | currentdict end 85 | currentfile eexec 86 | f983ef0097ece636fb4a96c74d26ab84185f6dfa4a16a7a1c27bbe3f1156aea698df336d20b467 87 | b10e7f33846656653c5ac6962759d3056cbdb3190bac614b984bf5a132dc418192443014ba63de 88 | 800d392b6fea026574bb2535fd7bb5338f35bf15a88ea328fdaa49670c7852e3d060f3c5d6b07f 89 | 2ef6d0f22646c5d18e19a2ae3ee120390f6dd96f76dcf1e127de5e9299077a00c17c0d71e36e5b 90 | 9d5ec58fceda57739a6a4214d4b79d6c48d2784b60c320323c7acddddf34db833cac0cf109f799 91 | 69d114a330d372e5c978a66acc84e3fe5557f6240856a013ffaa0199444e5c5036f775eba4a5c5 92 | 8cde66cf604b9aca2178431127b8a1ff7ed633a65c04600af5f573483112251ca5d188dea508ed 93 | e1b2455317d2f89946db9171817b252ef4aed3b4d1e2d956531eb1466794df0aef957dbdb95b75 94 | 3dda45c9c7c4389a1ba848f9fdecc660ed2143ef4e3b94779e6327b9154305c013790282c67abe 95 | 62dc8ecc30f99aa2bcf31cf659261edf7afd346ab00d374e121f870f8a8164d730675d1f1be471 96 | 23f54ffd99e91acdffea69e5a38069f5273937b0369e79a68f0e5ddfb2f31b71f9de86fdc2ae31 97 | 231d697776f95d022e4379ca3f176eb97a91828b9a8fc5c3ca75458f1e7cdfa8126c0d189ab536 98 | 8ff41481d62a1fceed043ab17fe8766ad80b411216fa14b77f8725861006c4b4203b88dd34f76d 99 | cc3e4b94117b323c849b7313344ec177af24fec7b2190126087435d778cce467b2a78c76bc01da 100 | 5ad8bfadfaaeba7b51e7bd1d962fe0ab484a99493f111446ba8df32e300687b335441a883a04d2 101 | 61554d944f952cf875b2d3d72ee2c4952e701f7857d135904d418d3356d828dacbed106663b042 102 | aa4de96d97e09cd2718d4598c1a3c76bf012ff167a8f34a0448e6e70c7cca61d6c9e2394b01afe 103 | 9e021edb982464355a7249e81482646f03accf06ac026f47cf199e4a67d6da4b4da4e99e125474 104 | 621d61b461e7a11a1a22c8cbd3d1a3a068069eaa55a091d54141e9e671d8da530e56068c09e046 105 | 9416c151b90f47b9412510573bca049c3428c1a6f57f53a48ab1322635a67006b68af794069309 106 | ec1c192fd956818a457c406e5f1f232517aad5bd7081c19761d232bf2ab6d0bbb0027a0fcb6fb4 107 | 4f80bb7b27d886ceb7f454c729df24ccf371af07e40590af8994e6389ae27783269f2b47b7d111 108 | 583d8dfef98318f58bad08ff58fb96379629485375ed3bfbfdf1b2eea252036f27db29601750fe 109 | b01b0bd09238b962c497e365f6ab75d4afc86bc2d286b9df199f90df5b3385a28100fe0903c3d1 110 | cdb41445c2c5677b185c1af4587628bc73b5578e3fc6b100d4d6626382af6470a5b08dd4a51ef9 111 | 47313d26fac728e0328f7a34df795890e6b39740ca595b1565e66ade8e9c124e9b3eb88cb5f183 112 | 9041e22a49483d62dab45ca8e426a45bab4674e47a125300ca78581aa9f454a5b0dca289e96759 113 | ec88759ee14078eb9a60c30ef3399f449de75acbffc0a7a77ce8e5193dd01aa6dac800ead23ee5 114 | 3b00a20cf8abecace48e435567886d64e40ec63663b678f71d4c0d8405eec446c119502a5a9411 115 | cad33dd7a7ebf62580c313ab9cafa31de7a34e5684c7031c93560000000000000000000000000000000000000000000000000000000000000000 116 | 0000000000000000000000000000000000000000000000000000000000000000 117 | 0000000000000000000000000000000000000000000000000000000000000000 118 | 0000000000000000000000000000000000000000000000000000000000000000 119 | 0000000000000000000000000000000000000000000000000000000000000000 120 | 0000000000000000000000000000000000000000000000000000000000000000 121 | 0000000000000000000000000000000000000000000000000000000000000000 122 | 0000000000000000000000000000000000000000000000000000000000000000 123 | cleartomark 124 | %%EndResource 125 | %%BeginResource: font f-1-0 126 | %!FontType1-1.1 f-1-0 1.0 127 | 11 dict begin 128 | /FontName /f-1-0 def 129 | /PaintType 0 def 130 | /FontType 1 def 131 | /FontMatrix [0.001 0 0 0.001 0 0] readonly def 132 | /FontBBox {-8 -20 513 729 } readonly def 133 | /Encoding 256 array 134 | 0 1 255 {1 index exch /.notdef put} for 135 | dup 46 /period put 136 | dup 47 /slash put 137 | dup 48 /zero put 138 | dup 49 /one put 139 | dup 50 /two put 140 | dup 51 /three put 141 | dup 56 /eight put 142 | readonly def 143 | currentdict end 144 | currentfile eexec 145 | f983ef0097ece636fb4a96c74d26ab84185f6dfa4a16a7a1c27bbe3f1156aea698df336d20b467 146 | b10e7f33846656653c5ac6962759d3056cbdb3190bac614b984bf5a132dc418192443014ba63de 147 | 800d392b6fea026574bb2535fd7bb5338f35bf15a88ea328fdaa49670c7852e3d060f3c5d6b07f 148 | 2ef6d0f22646c5d18e19a2ae3ee120390f6dd96f76dcf1e127de5e9299077a00c17c0d71e36e5b 149 | 9d5ec58fceda57739a6a4214d4b79d6c48d2784b60c320323c7acddddf34db833cac0cf109f799 150 | 69d114a330d372e5c978a66acc84e3fe5557f6240856a013ffaa0199444e5c5036f775eba4a5c5 151 | 8cde66cf604b9aca2178431127b8a1ff7ed633a65c04600af5f573483112251ca40352c6e2284e 152 | 344947523a70f7b109147467f7576cb1df156dca2f25ccb577c1669626620a11e5cb8b1ed6eed3 153 | 78ed5d4d5cee5f581a6f455a258d68abb03ae9ec44c0cc68012de2fdd5c86ff3457dfda6badf7a 154 | ab0294f3d15f2e4ed9ba5a63ee0231305b5a620d567a8a1905f3867dbf22d5aac47e7e0cacfcd1 155 | 14b0faa0cba2e5666354b42657c44467e25bc4769d2caa9042ab215196c54f5e2df01c0bde6a20 156 | b3bfe1a5e3dce5d01f11ab7ffab0524c4a981194303f9dffa58028e3ee9b5aae5e621a6ce4034e 157 | e02d8c2ead361b1dbd9d37757076670c2d78cc322fc9647d51f8f2a8dc27b54b92b25077bea592 158 | 14d05f327d83c0cb7fe7d75df0a0f530880d4e7d9b6be2c2b137fa4d06353d09e46bbf22a41ba3 159 | f73cdcad65bef99cba2cd4d6d1a09f836f1d38b87059270230d1c5a249534f8b67243f9ad40aea 160 | 926335ca5b5b65e9cbf279a5dcb240685cf1cd8e1788e7426ea93c726732557c60cfccc2d4a9be 161 | 679111eda5ccf8997b445a9475302566f73fc1ffe477bf42a1a514504ca3030319270ec31e449d 162 | f3581758500e1427cafadf3b75f785a89c05c42ad7459b9d5064aecbe074842ecbeebc7009381b 163 | 06a9c1a1cc88aaaeebd60fe9a26babfc3a1cb8484976bd954aed76e0d4855b72f2dff34d61494c 164 | 2615cb37057aec227707380f78ba1fe4fe30d8439ad5cf75aba0286fc31ebbdd1518c94e7d039f 165 | e9807024d5cb3a9b91762fddeb37e94b0addc6733a25394cc4e3cfc14aa4f098e691cd887fffdf 166 | b68258f8dcdee37471fe2652f08dd921c00ed42845d0666203a3868da6b7c505e1e7fa3b6a003c 167 | 0f750fb43a0677d8a64009bfb106204594215569cc163349fe4b701e84e1d1c15fa740a0aec005 168 | 5e951df4ae9540d6543abff36771a3164a000872ba6d181b57de4a119b4e8794720222132e99f7 169 | f08ea84ab5925c58e9417c48dd5ca335d0d192b70d835179394c1b99754018dc12e666ed7ed369 170 | 8477716d67995b88c4e4379c7ec554205fde4ca4adf85bcf6b1f9d8113f194fbaef0c9059ca476 171 | 94a85b8a5791b69155eec801297cb00803cee94fe00f6b05f7af5c0928f17155dad9f91cdb9f4b 172 | e0bf2f9d315d948b09be5c64d24022cc71a37a0f7a68d225195b0fc6ff1c9ea05f963d8ab83245 173 | fc8a962524f0787b6f983b479feb68125ca2e9ffb90876863f13cc0000000000000000000000000000000000000000000000000000000000000000 174 | 0000000000000000000000000000000000000000000000000000000000000000 175 | 0000000000000000000000000000000000000000000000000000000000000000 176 | 0000000000000000000000000000000000000000000000000000000000000000 177 | 0000000000000000000000000000000000000000000000000000000000000000 178 | 0000000000000000000000000000000000000000000000000000000000000000 179 | 0000000000000000000000000000000000000000000000000000000000000000 180 | 0000000000000000000000000000000000000000000000000000000000000000 181 | cleartomark 182 | %%EndResource 183 | %%EndSetup 184 | %%Page: 1 1 185 | %%BeginPageSetup 186 | %%PageBoundingBox: 0 3 347 75 187 | %%EndPageSetup 188 | q 0 3 347 72 rectclip 189 | 1 0 0 -1 0 79 cm q 190 | 0 g 191 | 0.75 w 192 | 0 J 193 | 0 j 194 | [ 2.25 2.25] 0 d 195 | 10 M q 1 0 0 1 0 0 cm 196 | 63.996 39.75 m 146.496 39.75 l S Q 197 | 0.8 g 198 | 10.934 47.301 m 64.828 47.301 l 75.473 60.375 l 0.473 60.375 l h 199 | 12.848 19.125 m 62.723 19.125 l 64.199 46.98 l 11.371 46.98 l h 200 | 12.848 19.125 m f 201 | 0.407843 0.505882 0.701961 rg 202 | 1.425 w 203 | 1 j 204 | [] 0.0 d 205 | q 1 0 0 1 0 0 cm 206 | 10.934 47.301 m 64.828 47.301 l 75.473 60.375 l 0.473 60.375 l h 207 | 12.848 19.125 m 62.723 19.125 l 64.199 46.98 l 11.371 46.98 l h 208 | 12.848 19.125 m S Q 209 | q 1 0 0 1 0 0 cm 210 | 13.215 50.551 m 63.465 50.551 l 9.891 54.129 m 66.789 54.129 l 24.301 57.336 211 | m 50.16 57.336 l S Q 212 | 1 g 213 | 15.285 21.621 m 60.359 21.621 l 61.613 44.484 l 13.957 44.484 l h 214 | 15.285 21.621 m f 215 | 0 0.4 0.8 rg 216 | BT 217 | 10.5 0 0 -10.5 26.73123 75.622501 Tm 218 | /f-0-0 1 Tf 219 | [(st)-7(a1)]TJ 220 | ET 221 | 0 g 222 | 0.75 w 223 | 0 j 224 | [ 2.25 2.25] 0 d 225 | q 1 0 0 1 0 0 cm 226 | 198.996 39.75 m 281.496 39.75 l S Q 227 | 0.8 g 228 | 145.934 47.301 m 199.828 47.301 l 210.473 60.375 l 135.473 60.375 l h 229 | 147.848 19.125 m 197.723 19.125 l 199.199 46.98 l 146.371 46.98 l h 230 | 147.848 19.125 m f 231 | 0.407843 0.505882 0.701961 rg 232 | 1.425 w 233 | 1 j 234 | [] 0.0 d 235 | q 1 0 0 1 0 0 cm 236 | 145.934 47.301 m 199.828 47.301 l 210.473 60.375 l 135.473 60.375 l h 237 | 147.848 19.125 m 197.723 19.125 l 199.199 46.98 l 146.371 46.98 l h 238 | 147.848 19.125 m S Q 239 | q 1 0 0 1 0 0 cm 240 | 148.215 50.551 m 198.465 50.551 l 144.891 54.129 m 201.789 54.129 l 159.301 241 | 57.336 m 185.16 57.336 l S Q 242 | 1 g 243 | 150.285 21.621 m 195.359 21.621 l 196.613 44.484 l 148.957 44.484 l h 244 | 150.285 21.621 m f 245 | 0 0.4 0.8 rg 246 | BT 247 | 10.5 0 0 -10.5 161.731236 75.622501 Tm 248 | /f-0-0 1 Tf 249 | [(st)-7(a2)]TJ 250 | ET 251 | 0.8 g 252 | 280.934 47.301 m 334.828 47.301 l 345.473 60.375 l 270.473 60.375 l h 253 | 282.848 19.125 m 332.723 19.125 l 334.199 46.98 l 281.371 46.98 l h 254 | 282.848 19.125 m f 255 | 0.407843 0.505882 0.701961 rg 256 | q 1 0 0 1 0 0 cm 257 | 280.934 47.301 m 334.828 47.301 l 345.473 60.375 l 270.473 60.375 l h 258 | 282.848 19.125 m 332.723 19.125 l 334.199 46.98 l 281.371 46.98 l h 259 | 282.848 19.125 m S Q 260 | q 1 0 0 1 0 0 cm 261 | 283.215 50.551 m 333.465 50.551 l 279.891 54.129 m 336.789 54.129 l 294.301 262 | 57.336 m 320.16 57.336 l S Q 263 | 1 g 264 | 285.285 21.621 m 330.359 21.621 l 331.613 44.484 l 283.957 44.484 l h 265 | 285.285 21.621 m f 266 | 0 0.4 0.8 rg 267 | BT 268 | 10.5 0 0 -10.5 296.731224 75.622501 Tm 269 | /f-0-0 1 Tf 270 | [(st)-7(a3)]TJ 271 | ET 272 | 0 g 273 | BT 274 | 10.5 0 0 -10.5 14.25 12.75 Tm 275 | /f-1-0 1 Tf 276 | [(10.0.0.1/8)]TJ 277 | 12.785714 0.0714286 Td 278 | [(10.0.0.2/8)]TJ 279 | 12.857143 -0.0714286 Td 280 | [(10.0.0.3/8)]TJ 281 | ET 282 | Q Q 283 | showpage 284 | %%Trailer 285 | end 286 | %%EOF 287 | -------------------------------------------------------------------------------- /codes/cap3/rip.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | # simple implementation of RIPv2 4 | # no split horizon, no triggered updates, no hold down 5 | # In the language of RFC 2453, there are no request messages, only updates. 6 | # We avoid using threads. 7 | # ALL update messages are sent via multicast; there is no "neighbor discovery" 8 | 9 | import socket 10 | import os 11 | import time 12 | import select 13 | import struct 14 | import fcntl 15 | import subprocess 16 | #import netifaces 17 | 18 | MADDR = '224.0.0.9' 19 | MPORT = 520 # used as both source and destination port 20 | UPDATE_INTERVAL = 10 # seconds; 5-10 is good when run from an xterm 21 | SOCK_SIZE = 2048 22 | READ_TIMEOUT = 1.0 23 | #IP_MULTICAST_LOOP = 34 24 | #IP_MULTICAST_IF = 32 25 | RIP_ENTRY_SIZE = 20 26 | RIP_HEADER_SIZE = 4 27 | 28 | # RIP flags 29 | UPDATECMD = 2 30 | TEXTMSGCMD = 3 # for the send_update2() demo option, below 31 | VER_RIP2 = 2 32 | 33 | # do we actually make calls to change the system forwarding tables? 34 | MODTABLES = True 35 | 36 | """ 37 | header word: command(1), version(1), zero(2). As bytes: [2,2,0,0] 38 | rip_entry: AF(2), route_tag(2), IP_addr(4), mask(4), next_hop(4), metric(4) 39 | """ 40 | 41 | 42 | # arriving RIPv2 messages are parsed into class RipEntry objects 43 | 44 | class RipEntry: 45 | def __init__(self, af, tag, ipaddr, mask, nexthop, metric): 46 | self.af_ = af # must be socket.AF_INET (=2) 47 | self.tag_ = tag # must be zero 48 | self.ipaddr_ = ipaddr # in 32-bit numeric format 49 | self.mask_ = mask # in 32-bit numeric format 50 | self.nexthop_ = nexthop # zero means send to neighbor that advertised route 51 | self.metric_ = metric 52 | def ipaddr(self): return self.ipaddr_ 53 | def mask(self): return self.mask_ 54 | def metric(self): return self.metric_ 55 | def nexthop(self): return self.nexthop_ 56 | def af(self): return self.af_ 57 | def tag(self): return self.tag_ 58 | 59 | # TableKey is the key to the shadow routing table RTable 60 | class TableKey: 61 | def __init__(self, ipaddrn, netmaskn): # ipaddrn and netmaskn as 32-bit integers 62 | self.ipaddrn_ = ipaddrn 63 | self.netmaskn_ = netmaskn 64 | def ipaddr(self): return self.ipaddrn_ 65 | def netmask(self): return self.netmaskn_ 66 | def __hash__(self): 67 | return hash(self.ipaddrn_) ^ hash(self.netmaskn_) 68 | def __eq__(self, other): 69 | if isinstance(other, self.__class__): 70 | return self.ipaddrn_ == other.ipaddrn_ and self.netmaskn_ == other.netmaskn_ 71 | else: 72 | return False 73 | 74 | class TableValue: 75 | def __init__(self, interface, nexthop, metric): 76 | self.interface_ = interface # never used here; might be needed for poison reverse 77 | self.nexthop_ = nexthop # in dotted-quad string format 78 | # zero means send to neighbor that advertised route 79 | self.metric_ = metric 80 | def interface(self): return self.interface_ 81 | def nexthop(self): return self.nexthop_ 82 | def metric(self): return self.metric_ 83 | 84 | # RTable is our current dictionary of pairs, a shadow copy of the real forwarding table 85 | 86 | RTable = {} 87 | 88 | 89 | def main(): 90 | IFADDRS = getifaddrdict() 91 | myInterfaces = list(IFADDRS.keys()) 92 | myIPaddrs = list(map(lambda x: x[0], IFADDRS.values())) 93 | print('interfaces:', list(IFADDRS.keys())) 94 | print('ipaddrs:', list(map(lambda x: x[0], IFADDRS.values()))) 95 | 96 | socks = createMcastSockets(IFADDRS) 97 | 98 | starttime = time.time() 99 | next_update_time = starttime 100 | while True: 101 | if time.time() >= next_update_time: 102 | next_update_time += UPDATE_INTERVAL 103 | send_update(socks) 104 | ready_sockets,_,_ = select.select(socks, [], [], READ_TIMEOUT) 105 | if ready_sockets == []: continue # READ_TIMEOUT occurred 106 | for s in ready_sockets: # normally just one socket 107 | try: 108 | msg,src = s.recvfrom(SOCK_SIZE) 109 | except socket.timeout: 110 | msg = None 111 | if msg == None: continue 112 | (saddr,sport) = src # saddr is in dotted-quad-string format 113 | 114 | if saddr in myIPaddrs: 115 | print('received update message from self, via IP address {}'.format(saddr)) 116 | continue 117 | 118 | if not validate_header(msg, saddr): continue 119 | riplist = parse_msg(msg, saddr) 120 | ### print('RIPmsg list of length {} received from {}'.format(len(riplist), saddr)) 121 | update_tables(riplist, saddr) 122 | 123 | # The following returns a dictionary mapping interface names to their IPv4 address (or first such address, if there are more than one). 124 | 125 | def getifaddrdict(): 126 | myInterfaces = os.listdir('/sys/class/net/') # now use SIOCGIFADDR, SIOCGIFNETMASK 127 | myInterfaces.remove('lo') # we don't want to multicast to ourself! 128 | ifaddrs = {} 129 | for intf in myInterfaces: 130 | ifaddrs[intf] = get_ip_info(intf) 131 | return ifaddrs 132 | 133 | # get first IP address and netmask of an interface, in dotted-quad format 134 | def get_ip_info(intf): 135 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 136 | SIOCGIFADDR = 0x8915 # from /usr/include/linux/sockios.h 137 | SIOCGIFNETMASK = 0x891b 138 | intfpack = struct.pack('256s', bytes(intf, 'ascii')) 139 | # ifreq, below, is like struct ifreq in /usr/include/linux/if.h 140 | ifreq = fcntl.ioctl(s.fileno(), SIOCGIFADDR, intfpack) 141 | ipaddrn = ifreq[20:24] # 20 is the offset of the IP addr in ifreq 142 | ipaddr = socket.inet_ntoa(ipaddrn) 143 | netmaskn = fcntl.ioctl(s.fileno(), SIOCGIFNETMASK, intfpack)[20:24] 144 | netmask = socket.inet_ntoa(netmaskn) 145 | return (ipaddr, netmask) 146 | 147 | # create and configure a socket for each (non-loopback) interface 148 | def createMcastSockets(ifaddrs): 149 | socks = [] 150 | for intf in ifaddrs: 151 | (ipaddr, netmask) = ifaddrs[intf] 152 | ipaddrn = aton(ipaddr) # convert to 32-bit numeric format 153 | netmaskn= aton(netmask) 154 | subnetn = ipaddrn & netmaskn 155 | RTable[TableKey(subnetn, netmaskn)] = TableValue(intf, None, 1) 156 | print ('interface: '+intf) 157 | print('ipaddr of {} is {}/{}'.format(intf, ipaddr, slash(netmaskn))) 158 | sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) 159 | sock.settimeout(READ_TIMEOUT) 160 | # The following sets the IP header TTL value. 1 means Do Not Forward 161 | sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 1) 162 | sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # prevents "address already in use" errors when we call sock.bind below 163 | # The next call makes the socket RECEIVE only on the specified interface 164 | sock.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, bytes(intf, 'ascii')) 165 | # The following prevents transmitted packets from being delivered back to the sender 166 | sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_LOOP, False) 167 | # The next call makes the socket TRANSMIT only on the specified interface 168 | # socket.inet_aton() returns a bytestring, not an integer 169 | # No apparent change if this is omitted, because of the subsequent call 170 | sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, socket.inet_aton(ipaddr)) 171 | # next call is for joining a multicast group; it is essential for communication. 172 | try: 173 | addrpair = socket.inet_aton(MADDR)+ socket.inet_aton(ipaddr) 174 | sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, addrpair) 175 | except OSError as ose: 176 | print('IP_ADD_MEMBERSHIP failed: {}'.format(ose)) 177 | sock.bind((MADDR, MPORT)) # (MADDR,MPORT) is our multicast group 178 | socks.append(sock) 179 | return socks 180 | 181 | # update_sender is the IP address in dotted-quad string form of the sender of this update 182 | def update_tables(riplist, update_sender): 183 | global RTable 184 | for entry in riplist: 185 | if entry.af() != socket.AF_INET: continue 186 | if entry.tag()!= 0: continue; 187 | if entry.nexthop()!= 0: continue 188 | ipaddrn = entry.ipaddr() # n for numeric form 189 | netmaskn = entry.mask() 190 | ipaddr = ntoa(ipaddrn) 191 | netmask = ntoa(netmaskn) 192 | if ipaddrn != (ipaddrn & netmaskn): 193 | print ('warning: address {} inconsistent with mask {}'.format(ipaddr, netmask)) 194 | cost = entry.metric() 195 | TK = TableKey(ipaddrn, netmaskn) 196 | if TK in RTable: # we have an existing entry for this destination 197 | TVal = RTable[TK] 198 | currentcost = TVal.metric() 199 | currentnexthop = TVal.nexthop() 200 | newcost = entry.metric() + 1 201 | if newcost < currentcost: # lower-cost route 202 | interface = None 203 | RTable[TK] = TableValue(interface, update_sender, newcost) 204 | call_list = ['/sbin/route', 'change', '-net', ipaddr, 'netmask', netmask, 'gw', update_sender] 205 | print ('updating route to {}/{}'.format(ipaddr, slash(aton(netmask)))) 206 | if MODTABLES: subprocess.call(call_list) 207 | elif newcost > currentcost and currentnexthop == update_sender: # next_hop increase 208 | interface = None 209 | RTable[TK] = TableValue(interface, update_sender, newcost) 210 | call_list = ['/sbin/route', 'change', '-net', ipaddr, 'netmask', netmask, 'gw', update_sender] 211 | print ('updating route to {}/{}'.format(ipaddr, slash(aton(netmask)))) 212 | if MODTABLES: subprocess.call(call_list) 213 | else: # this is a new destination 214 | interface = None 215 | cost = entry.metric() + 1 216 | RTable[TK] = TableValue(interface, update_sender, cost) 217 | call_list = ['/sbin/route', 'add', '-net', ipaddr, 'netmask', netmask, 'gw', update_sender] 218 | print ('adding route to new destination {}/{}'.format(ipaddr, slash(aton(netmask)))) 219 | if MODTABLES: subprocess.call(call_list) 220 | 221 | 222 | def send_update(socks): 223 | buf = struct.pack('>BBh', UPDATECMD, VER_RIP2, 0) # two unsigned bytes and a halfword, in network byte order 224 | for dest in RTable: 225 | ipaddrn = dest.ipaddr() 226 | netmaskn = dest.netmask() 227 | cost = RTable[dest].metric() 228 | buf += struct.pack('>HHIIII', socket.AF_INET,0, ipaddrn,netmaskn,0,cost) 229 | for s in socks: 230 | s.sendto(buf, (MADDR, MPORT)) 231 | 232 | # The following alternative send_update is used to send demonstration text messages instead of RIP updates 233 | def send_update2(socks): 234 | buf = struct.pack('>BBh', TEXTMSGCMD, VER_RIP2, 0) # two unsigned bytes and a halfword, in network byte order 235 | buf += 'here is the multicast message'.encode('utf-8') 236 | print('sending multicast message') 237 | for s in socks: 238 | s.sendto(buf, (MADDR, MPORT)) 239 | 240 | 241 | def parse_msg(msg, src): 242 | offset = RIP_HEADER_SIZE; 243 | riplist = [] 244 | while len(msg)-offset >= RIP_ENTRY_SIZE: 245 | (af, tag, ipaddr, mask, nexthop, metric) = struct.unpack_from('>HHIIII', msg, offset) 246 | offset += RIP_ENTRY_SIZE 247 | if af != socket.AF_INET: 248 | continue 249 | riplist.append(RipEntry(af, tag, ipaddr, mask, nexthop, metric)) 250 | return riplist 251 | 252 | def validate_header(msg, src): 253 | (command, version, zero) = struct.unpack_from('>BBh', msg, 0) 254 | if command==UPDATECMD and version == VER_RIP2 and zero==0: 255 | return True 256 | elif command == TEXTMSGCMD: 257 | print('text message from {}: {}'.format(src, msg[4:].decode('utf-8'))) 258 | return False 259 | else: 260 | print('received unknown RIPv2 message') 261 | return False 262 | 263 | 264 | # def aton(ip): return int(socket.inet_aton(ip).encode('hex'),16) 265 | 266 | # converts a netmask in 32-bit format to a slash number, eg 0xfffff000 -> /20 267 | def slash(maskn): 268 | i = 0 269 | while maskn & 0xffffffff != 0: 270 | maskn = maskn << 1 271 | i += 1 272 | return i 273 | 274 | def aton(ip): 275 | return struct.unpack(">I", socket.inet_aton(ip))[0] 276 | 277 | def ntoa(ip): 278 | return socket.inet_ntoa(struct.pack(">I", ip)) 279 | 280 | 281 | main() 282 | -------------------------------------------------------------------------------- /figures/cap3/qos.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-3.0 EPSF-3.0 2 | %%Creator: cairo 1.15.10 (http://cairographics.org) 3 | %%CreationDate: Sun Mar 31 23:49:38 2019 4 | %%Pages: 1 5 | %%DocumentData: Clean7Bit 6 | %%LanguageLevel: 2 7 | %%BoundingBox: 0 4 283 85 8 | %%EndComments 9 | %%BeginProlog 10 | 50 dict begin 11 | /q { gsave } bind def 12 | /Q { grestore } bind def 13 | /cm { 6 array astore concat } bind def 14 | /w { setlinewidth } bind def 15 | /J { setlinecap } bind def 16 | /j { setlinejoin } bind def 17 | /M { setmiterlimit } bind def 18 | /d { setdash } bind def 19 | /m { moveto } bind def 20 | /l { lineto } bind def 21 | /c { curveto } bind def 22 | /h { closepath } bind def 23 | /re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto 24 | 0 exch rlineto 0 rlineto closepath } bind def 25 | /S { stroke } bind def 26 | /f { fill } bind def 27 | /f* { eofill } bind def 28 | /n { newpath } bind def 29 | /W { clip } bind def 30 | /W* { eoclip } bind def 31 | /BT { } bind def 32 | /ET { } bind def 33 | /BDC { mark 3 1 roll /BDC pdfmark } bind def 34 | /EMC { mark /EMC pdfmark } bind def 35 | /cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def 36 | /Tj { show currentpoint cairo_store_point } bind def 37 | /TJ { 38 | { 39 | dup 40 | type /stringtype eq 41 | { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse 42 | } forall 43 | currentpoint cairo_store_point 44 | } bind def 45 | /cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore 46 | cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def 47 | /Tf { pop /cairo_font exch def /cairo_font_matrix where 48 | { pop cairo_selectfont } if } bind def 49 | /Td { matrix translate cairo_font_matrix matrix concatmatrix dup 50 | /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point 51 | /cairo_font where { pop cairo_selectfont } if } bind def 52 | /Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def 53 | cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def 54 | /g { setgray } bind def 55 | /rg { setrgbcolor } bind def 56 | /d1 { setcachedevice } bind def 57 | /cairo_data_source { 58 | CairoDataIndex CairoData length lt 59 | { CairoData CairoDataIndex get /CairoDataIndex CairoDataIndex 1 add def } 60 | { () } ifelse 61 | } def 62 | /cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def 63 | /cairo_image { image cairo_flush_ascii85_file } def 64 | /cairo_imagemask { imagemask cairo_flush_ascii85_file } def 65 | %%EndProlog 66 | %%BeginSetup 67 | %%BeginResource: font f-0-0 68 | %!FontType1-1.1 f-0-0 1.0 69 | 11 dict begin 70 | /FontName /f-0-0 def 71 | /PaintType 0 def 72 | /FontType 1 def 73 | /FontMatrix [0.001 0 0 0.001 0 0] readonly def 74 | /FontBBox {-12 -217 776 745 } readonly def 75 | /Encoding 256 array 76 | 0 1 255 {1 index exch /.notdef put} for 77 | dup 47 /slash put 78 | dup 49 /one put 79 | dup 50 /two put 80 | dup 53 /five put 81 | dup 77 /M put 82 | dup 97 /a put 83 | dup 98 /b put 84 | dup 99 /c put 85 | dup 101 /e put 86 | dup 104 /h put 87 | dup 105 /i put 88 | dup 112 /p put 89 | dup 115 /s put 90 | dup 116 /t put 91 | readonly def 92 | currentdict end 93 | currentfile eexec 94 | f983ef0097ece636fb4a96c74d26ab84185f6dfa4a16a7a1c27bbe3f1156aea698df336d20b467 95 | b10e7f33846656653c5ac6962759d3056cbdb3190bac614b984bf5a132dc418192443014ba63de 96 | 800d392b6fea026574bb2535fd7bb5338f35bf15a88ea328fdaa49670c7852e3d060f3c5d6b07f 97 | 2ef6d0f22646c5d18e19a2ae3ee120390f6dd96f76dcf1e127de5e9299077a00c17c0d71e36e5b 98 | 9d5ec58fceda57739a6a4214d4b79d6c48d2784b60c320323c7acddddf34db833cac0cf109f799 99 | 69d114a330d372e5c978a66acc84e3fe5557f6240856a013ffaa0199444e5c5036f775eba4a5c5 100 | 8cde66cf604b9aca2178431127b8a1ff7ed633a65c04600af5f573483112251caca0829f5fa523 101 | 94d1d13e531ca63f8db4384673433fdb13b6fe358787d7b5695918c2b3c3d62be104241bf6fe78 102 | 8ae83398182301b871be304012384cfcbaadd2317aaaae1c6da16e5d46ba83c0fb1c7a5b772554 103 | e4ff6bb9eb00dfe6eee567a1b31379ce0da6da5f86232ecae18c7f0773ec757a7c6e3ad073545e 104 | 4a0f0ba9c67449f1b76ed3448e6ae46a0228174dfaf0a67344dada542a6559457c536cad2bbe4e 105 | 6e3c525413c4b4151bd0fcbd837e3d246c896e2f6ba5bf09133b0740a396bc2e8ca9f0c20d2d4d 106 | 6f088082d695768f75fac686eb6a3ea9c7ee8f029f5180e30338d84e5c993fcf0434a6203e415f 107 | b1caa2dd251028c698e7d99078221490fb4c2ba222ed9204fe679f50de507e8855f65852bebb23 108 | 662dace8703fac89e48d63dce96699e3b1ba627f9244c107352614c0b6c5316c3984f326f39cd4 109 | ae2bc2ffe60b60dd681759159b3d2fd5dfcc94eeb5035daa65b528d333c31dc1823c2a5525f1c3 110 | 521232bbbf2b75a6c7aabfb525d4a125f34eb38f9059b8f0de8fd40477fd72a892ab9b7c290230 111 | cb474f1a65878dfc721495cee9b0b5bbde65a1965cc59d5b088528f5e7638c785a4235383cea4d 112 | e0491639818037f08474f8ca796b591b0fae83ac725637c2cd360aa2c7842fcaed2e37d5902ee8 113 | 8b9e65cd9d648ddcb4ea6a4b0d45bbe0ecced08c8ba3b94cf6e1e115da6bdbdef0f4e7cbcff705 114 | 4cee407a6ee54b5b8d271f851b4d92aec5366c0249765890f904d68fd687b333d6be7962f91116 115 | 2b8f4029637393e77eb01e043ca7ca83148e11907aadca100a15adcac6b9b08c0609ebb768f35e 116 | 7566e85877d35bec68520950008b3a2265a1800148cfaf5d3d193f73733dd8d2fabb966966f833 117 | f48f883737c75b1ae2b59fc6ba228869f8a0d148e0df91a6fa5f779a9ea1194f8040a2c678ea46 118 | 3e40f0c0e93258264198a06b783afa95962e94fcadd48301a45614e91a6a86abbde463025f2611 119 | e6cd790213c2b8cd98099024c6b03488fb23289d840d38ebb54da644a2a00f2ed721d0a902f21c 120 | 5f50321be62cdf5a53e8ad326b042c285b6bf60ce79f011f77da84931b6a12a26b464f86f15be8 121 | 61f6ae8a7cc006b29f911373295256327d31e24e0f28eb4ff2a151eadf21710aec0e74bd883a8c 122 | 0f3df6aba46e30ad7068285d28346f5a98fa61db5227a02965a9199fd37a07a5a0225f9680a0a6 123 | 3c69fb6e00260edced9ac20e7a3e4880097d8417648502ca750418d9f7050d80c250d540c90e08 124 | fffb6812a9dc0c8ffb35b1681307952f40282911686a6f937d06c0470f71b9a0210b7df8cfa73f 125 | 7b416a52072cb3daa27a07e8c9a0af4d9c5b929bf0b666c5ea4138b4385d08c47834b30f5e7ad7 126 | 730fb7179fec0f2e440622eb34b4e3dd2dadcf7311f4d1d44254e2ee26b36a39d4aa63404dc19e 127 | da8f0ff10ef0e7009357ab2b43b0d006822d453ca35f8bbc5c1181e50dc645c34c20d185a9cea2 128 | 6d1dcca43ac30bdec7493b847dd5832be4bc29741201f3b326c4c8e3e743cad5db9a5d2a0011a0 129 | fa8d8353b71cdca284ecbe38c7462c4c64c710889cfac79d38046848693fe120236b930c462c37 130 | 9400749fe1341b34057870e9ce6ff7a447e10b693fdda6c3709837a2559358e568fdcb065c3fb2 131 | 4cc91efd75c6df92f23bf23dff6ab88eb0bb4af47b0642dda30f199765fb1f4cc3fba50d3b1272 132 | 312c7f2b69d8d214bd9a80b5c3d52f2ff0cf70eb634b3a4376be587097b3d57f46be2104a96e50 133 | f14b5adec247e9efc959d65739a29ddad519702ade7bc08fc1f76beb7016eab91aeb8a145bb536 134 | 2a85323ee7e9b5c3cf9a5d622f00814a76400ec6f13eb8beeada42a141e350de35ae6ffe22ecf6 135 | 607f1ed30619636f8c2070523a8eceee0dbd82686aba5060ed0945ed319fa1f5882ae3520ff74e 136 | 7b0aa56535c4028d88eff1cf725c93d0606e3965be9eed044be8a8e863aa86ba7f387d56ae748f 137 | 921b8e4c92810639b80aba8f40101ab5a9ffe75ec3ccaddfc18ca55d195edb547e4268df636261 138 | f4bc052a0606fbedd7b433e35c3ebaefb734377951ea91ea069acd4ef488b92ee81389602be867 139 | 8d9619a18a3186189719215752f8d5b6882a26ff0c4ba95e72fab561082929dbd421c3b90d7c6c 140 | 63fd6cc0995de0a2795bf0aaa6c5a9316ecb8f20a06552913a02434fc2e4030da1dc7634a8ac19 141 | bfcbb535a27d4fc359855eaf0cbdd56cd7b5198552b1423499117a314571630fbf23d46c8e6cb3 142 | 1a5dee94f617e18718c684b871e549eabf1a53ca5948ad0000000000000000000000000000000000000000000000000000000000000000 143 | 0000000000000000000000000000000000000000000000000000000000000000 144 | 0000000000000000000000000000000000000000000000000000000000000000 145 | 0000000000000000000000000000000000000000000000000000000000000000 146 | 0000000000000000000000000000000000000000000000000000000000000000 147 | 0000000000000000000000000000000000000000000000000000000000000000 148 | 0000000000000000000000000000000000000000000000000000000000000000 149 | 0000000000000000000000000000000000000000000000000000000000000000 150 | cleartomark 151 | %%EndResource 152 | %%EndSetup 153 | %%Page: 1 1 154 | %%BeginPageSetup 155 | %%PageBoundingBox: 0 4 283 85 156 | %%EndPageSetup 157 | q 0 4 283 81 rectclip 158 | 1 0 0 -1 0 85 cm q 159 | 0 g 160 | 0.75 w 161 | 0 J 162 | 0 j 163 | [ 2.25 2.25] 0 d 164 | 10 M q 1 0 0 1 0 0 cm 165 | 48.879 37.629 m 142.875 21.375 l S Q 166 | 0.8 g 167 | 8.594 44.879 m 49.02 44.879 l 57 57 l 0.75 57 l h 168 | 10.035 18.75 m 47.438 18.75 l 48.547 44.578 l 8.926 44.578 l h 169 | 10.035 18.75 m f 170 | 0.407843 0.505882 0.701961 rg 171 | 1.11 w 172 | 1 j 173 | [] 0.0 d 174 | q 1 0 0 1 0 0 cm 175 | 8.594 44.879 m 49.02 44.879 l 57 57 l 0.75 57 l h 176 | 10.035 18.75 m 47.438 18.75 l 48.547 44.578 l 8.926 44.578 l h 177 | 10.035 18.75 m S Q 178 | q 1 0 0 1 0 0 cm 179 | 10.312 47.895 m 47.992 47.895 l 7.816 51.203 m 50.488 51.203 l 18.621 54.188 180 | m 38.016 54.188 l S Q 181 | 1 g 182 | 11.863 21.066 m 45.668 21.066 l 46.613 42.262 l 10.867 42.262 l h 183 | 11.863 21.066 m f 184 | 0 0.4 0.8 rg 185 | BT 186 | 12 0 0 -12 16.126408 73.747501 Tm 187 | /f-0-0 1 Tf 188 | [(st)-7(a2)]TJ 189 | ET 190 | 0 g 191 | 0.75 w 192 | 0 j 193 | q 1 0 0 1 0 0 cm 194 | 232.629 42.621 m 142.629 51.375 l S Q 195 | 0.8 g 196 | 233.863 21.375 m 246.734 21.375 l 247.285 21.375 247.727 21.816 247.727 197 | 22.363 c 247.727 57.031 l 247.727 57.578 247.285 58.02 246.734 58.02 c 198 | 233.863 58.02 l 233.316 58.02 232.875 57.578 232.875 57.031 c 232.875 22.363 199 | l 232.875 21.816 233.316 21.375 233.863 21.375 c h 200 | 233.863 21.375 m f 201 | 0.407843 0.505882 0.701961 rg 202 | 0.99 w 203 | 4 M q 1 0 0 1 0 0 cm 204 | 233.863 21.375 m 246.734 21.375 l 247.285 21.375 247.727 21.816 247.727 205 | 22.363 c 247.727 57.031 l 247.727 57.578 247.285 58.02 246.734 58.02 c 206 | 233.863 58.02 l 233.316 58.02 232.875 57.578 232.875 57.031 c 232.875 22.363 207 | l 232.875 21.816 233.316 21.375 233.863 21.375 c h 208 | 233.863 21.375 m S Q 209 | 1 j 210 | 10 M q 1 0 0 1 0 0 cm 211 | 232.875 27.48 m 247.727 27.48 l 232.875 39.699 m 247.727 39.699 l S Q 212 | 0.8 g 213 | 242.773 24.426 39.602 27.48 re f 214 | 0.407843 0.505882 0.701961 rg 215 | 0 j 216 | 4 M q 1 0 0 1 0 0 cm 217 | 242.773 24.426 39.602 27.48 re S Q 218 | 0.8 g 219 | 257.625 51.906 9.898 6.105 re f 220 | 0.407843 0.505882 0.701961 rg 221 | q 1 0 0 1 0 0 cm 222 | 257.625 51.906 9.898 6.105 re S Q 223 | 0.8 g 224 | 250.199 57.406 m 274.949 57.406 l 279.898 64.125 l 245.25 64.125 l h 225 | 250.199 57.406 m f 226 | 0.407843 0.505882 0.701961 rg 227 | 1 j 228 | 10 M q 1 0 0 1 0 0 cm 229 | 250.199 57.406 m 274.949 57.406 l 279.898 64.125 l 245.25 64.125 l h 230 | 250.199 57.406 m S Q 231 | q 1 0 0 1 0 0 cm 232 | 257.129 62.594 m 266.039 62.594 l 250.695 60.766 m 270 60.766 l 251.684 233 | 58.934 m 269.504 58.934 l 270.988 58.934 m 274.453 58.934 l 271.98 60.766 234 | m 275.445 60.766 l 272.969 62.594 m 276.434 62.594 l S Q 235 | 1 g 236 | 244.262 26.258 36.133 23.82 re f 237 | 236.113 43.125 m 236.113 43.801 235.672 44.348 235.125 44.348 c 234.578 238 | 44.348 234.137 43.801 234.137 43.125 c 234.137 42.449 234.578 41.902 235.125 239 | 41.902 c 235.672 41.902 236.113 42.449 236.113 43.125 c h 240 | 236.113 43.125 m f 241 | 0 0.4 0.8 rg 242 | BT 243 | 12 0 0 -12 249.927177 80.872501 Tm 244 | /f-0-0 1 Tf 245 | (h1)Tj 246 | ET 247 | 0.8 g 248 | 112.035 37.941 m 161.715 37.941 l 163.535 37.941 165 39.406 165 41.227 249 | c 165 51.082 l 165 52.902 163.535 54.367 161.715 54.367 c 112.035 54.367 250 | l 110.215 54.367 108.75 52.902 108.75 51.082 c 108.75 41.227 l 108.75 39.406 251 | 110.215 37.941 112.035 37.941 c h 252 | 112.035 37.941 m f 253 | 0.407843 0.505882 0.701961 rg 254 | 1.125 w 255 | 0 j 256 | 4 M q 1 0 0 1 0 0 cm 257 | 112.035 37.941 m 161.715 37.941 l 163.535 37.941 165 39.406 165 41.227 258 | c 165 51.082 l 165 52.902 163.535 54.367 161.715 54.367 c 112.035 54.367 259 | l 110.215 54.367 108.75 52.902 108.75 51.082 c 108.75 41.227 l 108.75 39.406 260 | 110.215 37.941 112.035 37.941 c h 261 | 112.035 37.941 m S Q 262 | 0.8 g 263 | 114.375 54.375 45 2.625 re f 264 | 0.407843 0.505882 0.701961 rg 265 | q 1 0 0 1 0 0 cm 266 | 114.375 54.375 45 2.625 re S Q 267 | 0.8 g 268 | 146.438 37.941 m 146.723 8.371 l 146.871 8.102 147.141 7.934 147.422 7.934 269 | c 147.703 7.934 147.969 8.102 148.125 8.371 c 148.41 37.941 l h 270 | 146.438 37.941 m f 271 | 0.407843 0.505882 0.701961 rg 272 | 10 M q 1 0 0 1 0 0 cm 273 | 146.438 37.941 m 146.723 8.371 l 146.871 8.102 147.141 7.934 147.422 7.934 274 | c 147.703 7.934 147.969 8.102 148.125 8.371 c 148.41 37.941 l h 275 | 146.438 37.941 m S Q 276 | 1 g 277 | 163.125 46.125 m 163.125 49.027 161.109 51.383 158.625 51.383 c 156.141 278 | 51.383 154.125 49.027 154.125 46.125 c 154.125 43.223 156.141 40.867 158.625 279 | 40.867 c 161.109 40.867 163.125 43.223 163.125 46.125 c h 280 | 163.125 46.125 m f 281 | 152.25 40.875 m 152.25 41.602 151.746 42.188 151.125 42.188 c 150.504 42.188 282 | 150 41.602 150 40.875 c 150 40.148 150.504 39.562 151.125 39.562 c 151.746 283 | 39.562 152.25 40.148 152.25 40.875 c h 284 | 152.25 40.875 m f 285 | 152.25 51.375 m 152.25 52.102 151.746 52.688 151.125 52.688 c 150.504 52.688 286 | 150 52.102 150 51.375 c 150 50.648 150.504 50.062 151.125 50.062 c 151.746 287 | 50.062 152.25 50.648 152.25 51.375 c h 288 | 152.25 51.375 m f 289 | 152.25 46.125 m 152.25 46.852 151.746 47.438 151.125 47.438 c 150.504 47.438 290 | 150 46.852 150 46.125 c 150 45.398 150.504 44.812 151.125 44.812 c 151.746 291 | 44.812 152.25 45.398 152.25 46.125 c h 292 | 152.25 46.125 m f 293 | 147 49.125 m 147 49.852 146.496 50.438 145.875 50.438 c 145.254 50.438 294 | 144.75 49.852 144.75 49.125 c 144.75 48.398 145.254 47.812 145.875 47.812 295 | c 146.496 47.812 147 48.398 147 49.125 c h 296 | 147 49.125 m f 297 | 141.75 49.125 m 141.75 49.852 141.246 50.438 140.625 50.438 c 140.004 50.438 298 | 139.5 49.852 139.5 49.125 c 139.5 48.398 140.004 47.812 140.625 47.812 299 | c 141.246 47.812 141.75 48.398 141.75 49.125 c h 300 | 141.75 49.125 m f 301 | 137.25 49.125 m 137.25 49.852 136.746 50.438 136.125 50.438 c 135.504 50.438 302 | 135 49.852 135 49.125 c 135 48.398 135.504 47.812 136.125 47.812 c 136.746 303 | 47.812 137.25 48.398 137.25 49.125 c h 304 | 137.25 49.125 m f 305 | 132.75 49.125 m 132.75 49.852 132.246 50.438 131.625 50.438 c 131.004 50.438 306 | 130.5 49.852 130.5 49.125 c 130.5 48.398 131.004 47.812 131.625 47.812 307 | c 132.246 47.812 132.75 48.398 132.75 49.125 c h 308 | 132.75 49.125 m f 309 | 127.5 49.125 m 127.5 49.852 126.996 50.438 126.375 50.438 c 125.754 50.438 310 | 125.25 49.852 125.25 49.125 c 125.25 48.398 125.754 47.812 126.375 47.812 311 | c 126.996 47.812 127.5 48.398 127.5 49.125 c h 312 | 127.5 49.125 m f 313 | 123 49.125 m 123 49.852 122.496 50.438 121.875 50.438 c 121.254 50.438 314 | 120.75 49.852 120.75 49.125 c 120.75 48.398 121.254 47.812 121.875 47.812 315 | c 122.496 47.812 123 48.398 123 49.125 c h 316 | 123 49.125 m f 317 | 117.75 49.125 m 117.75 49.852 117.246 50.438 116.625 50.438 c 116.004 50.438 318 | 115.5 49.852 115.5 49.125 c 115.5 48.398 116.004 47.812 116.625 47.812 319 | c 117.246 47.812 117.75 48.398 117.75 49.125 c h 320 | 117.75 49.125 m f 321 | 113.25 49.125 m 113.25 49.852 112.746 50.438 112.125 50.438 c 111.504 50.438 322 | 111 49.852 111 49.125 c 111 48.398 111.504 47.812 112.125 47.812 c 112.746 323 | 47.812 113.25 48.398 113.25 49.125 c h 324 | 113.25 49.125 m f 325 | 110.438 42.539 m 113.812 42.539 l 113.812 44.512 l 112.688 44.512 l 112.688 326 | 45.172 l 111.562 45.172 l 111.562 44.512 l 110.438 44.512 l h 327 | 115.223 42.539 m 118.598 42.539 l 118.598 44.512 l 117.473 44.512 l 117.473 328 | 45.172 l 116.348 45.172 l 116.348 44.512 l 115.223 44.512 l h 329 | 120 42.539 m 123.375 42.539 l 123.375 44.512 l 122.25 44.512 l 122.25 45.172 330 | l 121.125 45.172 l 121.125 44.512 l 120 44.512 l h 331 | 124.785 42.539 m 128.16 42.539 l 128.16 44.512 l 127.035 44.512 l 127.035 332 | 45.172 l 125.91 45.172 l 125.91 44.512 l 124.785 44.512 l h 333 | 129.562 42.539 m 132.938 42.539 l 132.938 44.512 l 131.812 44.512 l 131.812 334 | 45.172 l 130.688 45.172 l 130.688 44.512 l 129.562 44.512 l h 335 | 134.348 42.539 m 137.723 42.539 l 137.723 44.512 l 136.598 44.512 l 136.598 336 | 45.172 l 135.473 45.172 l 135.473 44.512 l 134.348 44.512 l h 337 | 139.125 42.539 m 142.5 42.539 l 142.5 44.512 l 141.375 44.512 l 141.375 338 | 45.172 l 140.25 45.172 l 140.25 44.512 l 139.125 44.512 l h 339 | 143.91 42.539 m 147.285 42.539 l 147.285 44.512 l 146.16 44.512 l 146.16 340 | 45.172 l 145.035 45.172 l 145.035 44.512 l 143.91 44.512 l h 341 | 143.91 42.539 m f 342 | 0.407843 0.505882 0.701961 rg 343 | q 1 0 0 1 0 0 cm 344 | 159.375 44.844 m 160.5 46.156 l 159.375 47.477 l 155.438 46.156 m 160.5 345 | 46.156 l S Q 346 | 0.8 g 347 | 150.262 4.629 m 151.5 6.816 151.5 9.66 150.262 11.859 c 149.414 11.199 348 | l 150.359 9.473 150.359 7.266 149.414 5.551 c h 349 | 152.512 2.656 m 154.754 5.992 154.754 10.688 152.512 14.023 c 151.664 13.238 350 | l 153.586 10.379 153.586 6.367 151.664 3.512 c h 351 | 154.762 0.75 m 158.16 5.031 158.16 11.648 154.762 15.93 c 153.914 15.141 352 | l 157.027 11.332 157.027 5.348 153.914 1.539 c h 353 | 144.637 4.629 m 143.398 6.816 143.398 9.66 144.637 11.859 c 145.477 11.199 354 | l 144.539 9.473 144.539 7.266 145.477 5.551 c h 355 | 142.387 2.656 m 140.113 6.008 140.113 10.738 142.387 14.094 c 143.227 13.172 356 | l 141.375 10.344 141.375 6.406 143.227 3.578 c h 357 | 140.137 0.816 m 136.777 5.094 136.777 11.656 140.137 15.93 c 140.977 15.141 358 | l 137.91 11.34 137.91 5.398 140.977 1.605 c h 359 | 140.137 0.816 m f 360 | 0.407843 0.505882 0.701961 rg 361 | q 1 0 0 1 0 0 cm 362 | 150.262 4.629 m 151.5 6.816 151.5 9.66 150.262 11.859 c 149.414 11.199 363 | l 150.359 9.473 150.359 7.266 149.414 5.551 c h 364 | 152.512 2.656 m 154.754 5.992 154.754 10.688 152.512 14.023 c 151.664 13.238 365 | l 153.586 10.379 153.586 6.367 151.664 3.512 c h 366 | 154.762 0.75 m 158.16 5.031 158.16 11.648 154.762 15.93 c 153.914 15.141 367 | l 157.027 11.332 157.027 5.348 153.914 1.539 c h 368 | 144.637 4.629 m 143.398 6.816 143.398 9.66 144.637 11.859 c 145.477 11.199 369 | l 144.539 9.473 144.539 7.266 145.477 5.551 c h 370 | 142.387 2.656 m 140.113 6.008 140.113 10.738 142.387 14.094 c 143.227 13.172 371 | l 141.375 10.344 141.375 6.406 143.227 3.578 c h 372 | 140.137 0.816 m 136.777 5.094 136.777 11.656 140.137 15.93 c 140.977 15.141 373 | l 137.91 11.34 137.91 5.398 140.977 1.605 c h 374 | 140.137 0.816 m S Q 375 | 0 0.4 0.8 rg 376 | BT 377 | 12 0 0 -12 125.837345 73.747501 Tm 378 | /f-0-0 1 Tf 379 | (ap1)Tj 380 | ET 381 | 1 0 0 rg 382 | BT 383 | 10.460044 -0.915135 -0.915135 -10.460044 173.056008 44.802011 Tm 384 | /f-0-0 1 Tf 385 | [(5Mbits)-3(/sec)]TJ 386 | 10.340481 -1.823306 -1.823306 -10.340481 66.073647 31.550189 Tm 387 | [(5Mbits)-3(/sec)]TJ 388 | ET 389 | Q Q 390 | showpage 391 | %%Trailer 392 | end 393 | %%EOF 394 | -------------------------------------------------------------------------------- /figures/cap2/topo-wifi.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-3.0 EPSF-3.0 2 | %%Creator: cairo 1.15.10 (http://cairographics.org) 3 | %%CreationDate: Sun Mar 31 23:08:15 2019 4 | %%Pages: 1 5 | %%DocumentData: Clean7Bit 6 | %%LanguageLevel: 2 7 | %%BoundingBox: 0 3 366 89 8 | %%EndComments 9 | %%BeginProlog 10 | 50 dict begin 11 | /q { gsave } bind def 12 | /Q { grestore } bind def 13 | /cm { 6 array astore concat } bind def 14 | /w { setlinewidth } bind def 15 | /J { setlinecap } bind def 16 | /j { setlinejoin } bind def 17 | /M { setmiterlimit } bind def 18 | /d { setdash } bind def 19 | /m { moveto } bind def 20 | /l { lineto } bind def 21 | /c { curveto } bind def 22 | /h { closepath } bind def 23 | /re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto 24 | 0 exch rlineto 0 rlineto closepath } bind def 25 | /S { stroke } bind def 26 | /f { fill } bind def 27 | /f* { eofill } bind def 28 | /n { newpath } bind def 29 | /W { clip } bind def 30 | /W* { eoclip } bind def 31 | /BT { } bind def 32 | /ET { } bind def 33 | /BDC { mark 3 1 roll /BDC pdfmark } bind def 34 | /EMC { mark /EMC pdfmark } bind def 35 | /cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def 36 | /Tj { show currentpoint cairo_store_point } bind def 37 | /TJ { 38 | { 39 | dup 40 | type /stringtype eq 41 | { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse 42 | } forall 43 | currentpoint cairo_store_point 44 | } bind def 45 | /cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore 46 | cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def 47 | /Tf { pop /cairo_font exch def /cairo_font_matrix where 48 | { pop cairo_selectfont } if } bind def 49 | /Td { matrix translate cairo_font_matrix matrix concatmatrix dup 50 | /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point 51 | /cairo_font where { pop cairo_selectfont } if } bind def 52 | /Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def 53 | cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def 54 | /g { setgray } bind def 55 | /rg { setrgbcolor } bind def 56 | /d1 { setcachedevice } bind def 57 | /cairo_data_source { 58 | CairoDataIndex CairoData length lt 59 | { CairoData CairoDataIndex get /CairoDataIndex CairoDataIndex 1 add def } 60 | { () } ifelse 61 | } def 62 | /cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def 63 | /cairo_image { image cairo_flush_ascii85_file } def 64 | /cairo_imagemask { imagemask cairo_flush_ascii85_file } def 65 | %%EndProlog 66 | %%BeginSetup 67 | %%BeginResource: font f-0-0 68 | %!FontType1-1.1 f-0-0 1.0 69 | 11 dict begin 70 | /FontName /f-0-0 def 71 | /PaintType 0 def 72 | /FontType 1 def 73 | /FontMatrix [0.001 0 0 0.001 0 0] readonly def 74 | /FontBBox {0 -217 574 724 } readonly def 75 | /Encoding 256 array 76 | 0 1 255 {1 index exch /.notdef put} for 77 | dup 48 /zero put 78 | dup 49 /one put 79 | dup 50 /two put 80 | dup 97 /a put 81 | dup 99 /c put 82 | dup 112 /p put 83 | dup 115 /s put 84 | dup 116 /t put 85 | readonly def 86 | currentdict end 87 | currentfile eexec 88 | f983ef0097ece636fb4a96c74d26ab84185f6dfa4a16a7a1c27bbe3f1156aea698df336d20b467 89 | b10e7f33846656653c5ac6962759d3056cbdb3190bac614b984bf5a132dc418192443014ba63de 90 | 800d392b6fea026574bb2535fd7bb5338f35bf15a88ea328fdaa49670c7852e3d060f3c5d6b07f 91 | 2ef6d0f22646c5d18e19a2ae3ee120390f6dd96f76dcf1e127de5e9299077a00c17c0d71e36e5b 92 | 9d5ec58fceda57739a6a4214d4b79d6c48d2784b60c320323c7acddddf34db833cac0cf109f799 93 | 69d114a330d372e5c978a66acc84e3fe5557f6240856a013ffaa0199444e5c5036f775eba4a5c5 94 | 8cde66cf604b9aca2178431127b8a1ff7ed633a65c04600af5f573483112251caca658d82a0c29 95 | 1150a1fcd2cec791a6642ed2e687f1b4142049983dbd399743d35021fdf628893dc4c732911f0d 96 | ca56cfae0b6dc929ceb5356a9cd88c2616e071f7ad3d87d5adc65d9580b7f6a74e8886c99a0ad0 97 | 736bb6e6420c765bd8df5240820ddf5dce99584a82ebc2970dac78bb6eaa81aeed2655e9a13509 98 | 2decf1183414d53fde3ec4bfa60e6f29692e08ff0c3d65d8ec75845811a3775678ae89dec99509 99 | f36e6e4ce9d62a006ce831699e19bbcf0b0d22b3be34e3ba9233e1a792cf4c6ffadac4cfea7fc3 100 | 14037c7e13f343875cc584bdc898775ebeeb8576a07be8baed10f13497b79f62829f9e0c625b24 101 | fa19211c81752a2ab62c306ba2d2d5acb8602296fe34728abcf9cff2117d3f7c20d9063fe3ada6 102 | e10c715e7869c1effdd2ce05c9548004fa135a67ca5b9cd8f4c884c4fcff3a4fccb12b0f88eecd 103 | 00d2fdb20ca98b46ec347f1911afcfbfc4d84e917b8bce22124a046bb9806002f59457ffdfa7bf 104 | b69f5be1b8fefc904c857cb1d18a88660c0201fa34269f51e51f2b5c8c37509e0e7e98c25fd5c0 105 | 69b1829810af7e6b5acd473cb7cc3b50587adab5b8a6d81ae8959a70e75d54c2c9f5ae970f27e6 106 | c939222d99b9fef707dc8d93de028d8d19ad7d241421975668461d6efe8ee62f1ea787f5d86313 107 | d9b6589e17ac3947870ba3088b0ace33b93e3bcf1649f61d6bd1d2a72d85c5c33b5f605f184982 108 | c8e6f18580430e5a8ca6207478e14206f7a6c6b08ddad581b632af81e775a0b39e3e89fdcfdb8a 109 | a3cc68560b929dfc98502cb9b1c99c687703fee54896966530cd28147876d450224127e5fc5a53 110 | e295f62ece332606f4548d8d5c5437013f84aaa22f93857df693d9da8276deddbbf2e894448ed5 111 | fb45d3d6457b52b555a19689725c074018e8a6cc35e0bd79f4a14ff0b0d54cd15abf5408730a1c 112 | 2a45664b4e00d27c2e86b6ffcb518d91ee1409c70146b1c9106f6fcbb9f11fcfdf8e026d9e7195 113 | 99f7573ca183d5035a01f0599a2bead687efa36dec92dc33a489e8b3c6cdc6d3b8e82f6631b2de 114 | b75fd97051d4758327fd9742d5a2e34899c4092326bc3c4b633fc022ed00aaf8d9b618441f28b1 115 | 8e4d4f86b65499d85b72432dd015cd06738e70a59708728f0c4bd0e4057ea9b01df7c6e0e6e35d 116 | 5b10b8c7059504c7e77445ab4b43a257b3e655091f3288dca13d8ecc8c69b5998b1fd908ec1d7d 117 | 4ef8d0e2709acb7f611965d4fd5faf437b155e527c902203dec998c2e2dfcb2f333a75fa44fabe 118 | 5839e4e1f9e4870d5d3d6e7ac3f1ca8c05b8ed87d01fba93e81973df6be3dac725453b139c5a56 119 | 64a638cd141172ffc0f5f94a730b22d281fff895bbac096d0901318897eba31c6fa3b050ec42de 120 | a77f0daf064c6cc9730a1779a7785171953b596e076c881b067387a8837019e938282113797284 121 | b8ec3828b29e2cf4886c726549df6e0340fab247d18450f8577bb8985cb42a07f61b4a3d771cfa 122 | 9d0fe9a23b7f37ff950c20437ef7e214c2091cce57d26850070000000000000000000000000000000000000000000000000000000000000000 123 | 0000000000000000000000000000000000000000000000000000000000000000 124 | 0000000000000000000000000000000000000000000000000000000000000000 125 | 0000000000000000000000000000000000000000000000000000000000000000 126 | 0000000000000000000000000000000000000000000000000000000000000000 127 | 0000000000000000000000000000000000000000000000000000000000000000 128 | 0000000000000000000000000000000000000000000000000000000000000000 129 | 0000000000000000000000000000000000000000000000000000000000000000 130 | cleartomark 131 | %%EndResource 132 | %%EndSetup 133 | %%Page: 1 1 134 | %%BeginPageSetup 135 | %%PageBoundingBox: 0 3 366 89 136 | %%EndPageSetup 137 | q 0 3 366 86 rectclip 138 | 1 0 0 -1 0 89 cm q 139 | 0 g 140 | 0.75 w 141 | 0 J 142 | 0 j 143 | [ 2.25 2.25] 0 d 144 | 10 M q 1 0 0 1 0 0 cm 145 | 301.02 44.73 m 226.125 19.875 l S Q 146 | 0.8 g 147 | 300.336 51.801 m 354.234 51.801 l 364.875 64.875 l 289.875 64.875 l h 148 | 302.25 23.625 m 352.125 23.625 l 353.609 51.48 l 300.773 51.48 l h 149 | 302.25 23.625 m f 150 | 0.407843 0.505882 0.701961 rg 151 | 1.425 w 152 | 1 j 153 | [] 0.0 d 154 | q 1 0 0 1 0 0 cm 155 | 300.336 51.801 m 354.234 51.801 l 364.875 64.875 l 289.875 64.875 l h 156 | 302.25 23.625 m 352.125 23.625 l 353.609 51.48 l 300.773 51.48 l h 157 | 302.25 23.625 m S Q 158 | q 1 0 0 1 0 0 cm 159 | 302.625 55.051 m 352.867 55.051 l 299.297 58.629 m 356.191 58.629 l 313.703 160 | 61.836 m 339.57 61.836 l S Q 161 | 1 g 162 | 304.688 26.121 m 349.762 26.121 l 351.023 48.984 l 303.359 48.984 l h 163 | 304.688 26.121 m f 164 | 0 0.4 0.8 rg 165 | BT 166 | 12 0 0 -12 314.941406 82.0725 Tm 167 | /f-0-0 1 Tf 168 | [(st)-7(a2)]TJ 169 | ET 170 | 0 g 171 | 0.75 w 172 | 0 j 173 | [ 2.25 2.25] 0 d 174 | q 1 0 0 1 0 0 cm 175 | 65.301 47.949 m 211.125 23.625 l S Q 176 | 0.8 g 177 | 11.586 55.551 m 65.484 55.551 l 76.125 68.625 l 1.125 68.625 l h 178 | 13.5 27.375 m 63.375 27.375 l 64.859 55.23 l 12.023 55.23 l h 179 | 13.5 27.375 m f 180 | 0.407843 0.505882 0.701961 rg 181 | 1.425 w 182 | 1 j 183 | [] 0.0 d 184 | q 1 0 0 1 0 0 cm 185 | 11.586 55.551 m 65.484 55.551 l 76.125 68.625 l 1.125 68.625 l h 186 | 13.5 27.375 m 63.375 27.375 l 64.859 55.23 l 12.023 55.23 l h 187 | 13.5 27.375 m S Q 188 | q 1 0 0 1 0 0 cm 189 | 13.875 58.801 m 64.117 58.801 l 10.547 62.379 m 67.441 62.379 l 24.953 190 | 65.586 m 50.82 65.586 l S Q 191 | 1 g 192 | 15.938 29.871 m 61.012 29.871 l 62.273 52.734 l 14.609 52.734 l h 193 | 15.938 29.871 m f 194 | 0 0.4 0.8 rg 195 | BT 196 | 12 0 0 -12 26.191406 85.8225 Tm 197 | /f-0-0 1 Tf 198 | [(st)-7(a1)]TJ 199 | ET 200 | 0 g 201 | 0.75 w 202 | 0 j 203 | q 1 0 0 1 0 0 cm 204 | 126.375 65.094 m 211.125 42.375 l S Q 205 | 0.8 g 206 | 115.875 27.375 21 37.5 re f 207 | 0.407843 0.505882 0.701961 rg 208 | 4 M q 1 0 0 1 0 0 cm 209 | 115.875 27.375 21 37.5 re S Q 210 | q 1 0 0 1 0 0 cm 211 | 117.137 28.5 18.477 35.25 re S Q 212 | 0.8 g 213 | 117.137 31.875 m 135.613 31.875 l 117.137 35.25 m 135.613 35.25 l 117.137 214 | 38.625 m 135.613 38.625 l 117.137 42 m 135.613 42 l 117.137 45.375 m 135.613 215 | 45.375 l 117.137 52.125 m 135.613 52.125 l 117.137 55.5 m 135.613 55.5 216 | l 117.137 62.25 m 135.613 62.25 l f 217 | 0.407843 0.505882 0.701961 rg 218 | 10 M q 1 0 0 1 0 0 cm 219 | 117.137 31.875 m 135.613 31.875 l 117.137 35.25 m 135.613 35.25 l 117.137 220 | 38.625 m 135.613 38.625 l 117.137 42 m 135.613 42 l 117.137 45.375 m 135.613 221 | 45.375 l 117.137 52.125 m 135.613 52.125 l 117.137 55.5 m 135.613 55.5 222 | l 117.137 62.25 m 135.613 62.25 l S Q 223 | 1 g 224 | 118.816 29.625 1.258 0.75 re f 225 | 120.914 29.625 1.262 0.75 re f 226 | 123.016 29.625 1.258 0.75 re f 227 | 133.754 30.375 m 133.754 30.688 133.473 30.938 133.125 30.938 c 132.777 228 | 30.938 132.496 30.688 132.496 30.375 c 132.496 30.062 132.777 29.812 133.125 229 | 29.812 c 133.473 29.812 133.754 30.062 133.754 30.375 c h 230 | 133.754 30.375 m f 231 | 118.816 33 1.258 0.75 re f 232 | 120.914 33 1.262 0.75 re f 233 | 123.016 33 1.258 0.75 re f 234 | 133.754 33.375 m 133.754 33.688 133.473 33.938 133.125 33.938 c 132.777 235 | 33.938 132.496 33.688 132.496 33.375 c 132.496 33.062 132.777 32.812 133.125 236 | 32.812 c 133.473 32.812 133.754 33.062 133.754 33.375 c h 237 | 133.754 33.375 m f 238 | 118.816 36.375 1.258 0.75 re f 239 | 120.914 36.375 1.262 0.75 re f 240 | 123.016 36.375 1.258 0.75 re f 241 | 133.754 37.125 m 133.754 37.438 133.473 37.688 133.125 37.688 c 132.777 242 | 37.688 132.496 37.438 132.496 37.125 c 132.496 36.812 132.777 36.562 133.125 243 | 36.562 c 133.473 36.562 133.754 36.812 133.754 37.125 c h 244 | 133.754 37.125 m f 245 | 118.816 39.75 1.258 0.75 re f 246 | 120.914 39.75 1.262 0.75 re f 247 | 123.016 39.75 1.258 0.75 re f 248 | 133.754 40.125 m 133.754 40.438 133.473 40.688 133.125 40.688 c 132.777 249 | 40.688 132.496 40.438 132.496 40.125 c 132.496 39.812 132.777 39.562 133.125 250 | 39.562 c 133.473 39.562 133.754 39.812 133.754 40.125 c h 251 | 133.754 40.125 m f 252 | 118.816 43.125 1.258 0.75 re f 253 | 120.914 43.125 1.262 0.75 re f 254 | 123.016 43.125 1.258 0.75 re f 255 | 133.754 43.875 m 133.754 44.188 133.473 44.438 133.125 44.438 c 132.777 256 | 44.438 132.496 44.188 132.496 43.875 c 132.496 43.562 132.777 43.312 133.125 257 | 43.312 c 133.473 43.312 133.754 43.562 133.754 43.875 c h 258 | 133.754 43.875 m f 259 | 118.816 46.5 1.258 4.5 re f 260 | 120.914 46.5 1.262 4.5 re f 261 | 123.016 46.5 1.258 4.5 re f 262 | 133.754 46.875 m 133.754 47.188 133.473 47.438 133.125 47.438 c 132.777 263 | 47.438 132.496 47.188 132.496 46.875 c 132.496 46.562 132.777 46.312 133.125 264 | 46.312 c 133.473 46.312 133.754 46.562 133.754 46.875 c h 265 | 133.754 46.875 m f 266 | 118.816 53.25 1.258 0.75 re f 267 | 120.914 53.25 1.262 0.75 re f 268 | 123.016 53.25 1.258 0.75 re f 269 | 133.754 53.625 m 133.754 53.938 133.473 54.188 133.125 54.188 c 132.777 270 | 54.188 132.496 53.938 132.496 53.625 c 132.496 53.312 132.777 53.062 133.125 271 | 53.062 c 133.473 53.062 133.754 53.312 133.754 53.625 c h 272 | 133.754 53.625 m f 273 | 118.816 56.625 1.258 4.5 re f 274 | 120.914 56.625 1.262 4.5 re f 275 | 123.016 56.625 1.258 4.5 re f 276 | 133.754 57.375 m 133.754 57.688 133.473 57.938 133.125 57.938 c 132.777 277 | 57.938 132.496 57.688 132.496 57.375 c 132.496 57.062 132.777 56.812 133.125 278 | 56.812 c 133.473 56.812 133.754 57.062 133.754 57.375 c h 279 | 133.754 57.375 m f 280 | 125.113 46.5 1.262 4.5 re f 281 | 127.215 46.5 1.262 4.5 re f 282 | 125.113 56.625 1.262 4.5 re f 283 | 127.215 56.625 1.262 4.5 re f 284 | 0 0.4 0.8 rg 285 | BT 286 | 12 0 0 -12 119.320313 82.0725 Tm 287 | /f-0-0 1 Tf 288 | (c0)Tj 289 | ET 290 | 0.8 g 291 | 167.594 43.273 m 235.156 43.273 l 237.215 43.273 238.875 44.934 238.875 292 | 46.996 c 238.875 58.172 l 238.875 60.23 237.215 61.891 235.156 61.891 c 293 | 167.594 61.891 l 165.535 61.891 163.875 60.23 163.875 58.172 c 163.875 294 | 46.996 l 163.875 44.934 165.535 43.273 167.594 43.273 c h 295 | 167.594 43.273 m f 296 | 0.407843 0.505882 0.701961 rg 297 | 1.4925 w 298 | 4 M q 1 0 0 1 0 0 cm 299 | 167.594 43.273 m 235.156 43.273 l 237.215 43.273 238.875 44.934 238.875 300 | 46.996 c 238.875 58.172 l 238.875 60.23 237.215 61.891 235.156 61.891 c 301 | 167.594 61.891 l 165.535 61.891 163.875 60.23 163.875 58.172 c 163.875 302 | 46.996 l 163.875 44.934 165.535 43.273 167.594 43.273 c h 303 | 167.594 43.273 m S Q 304 | 0.8 g 305 | 171.375 61.898 60 2.977 re f 306 | 0.407843 0.505882 0.701961 rg 307 | q 1 0 0 1 0 0 cm 308 | 171.375 61.898 60 2.977 re S Q 309 | 0.8 g 310 | 214.125 43.273 m 214.5 9.766 l 214.711 9.449 215.062 9.262 215.438 9.262 311 | c 215.812 9.262 216.164 9.449 216.375 9.766 c 216.75 43.273 l h 312 | 214.125 43.273 m f 313 | 0.407843 0.505882 0.701961 rg 314 | 10 M q 1 0 0 1 0 0 cm 315 | 214.125 43.273 m 214.5 9.766 l 214.711 9.449 215.062 9.262 215.438 9.262 316 | c 215.812 9.262 216.164 9.449 216.375 9.766 c 216.75 43.273 l h 317 | 214.125 43.273 m S Q 318 | 1 g 319 | 235.875 52.875 m 235.875 56.164 233.188 58.832 229.875 58.832 c 226.562 320 | 58.832 223.875 56.164 223.875 52.875 c 223.875 49.586 226.562 46.918 229.875 321 | 46.918 c 233.188 46.918 235.875 49.586 235.875 52.875 c h 322 | 235.875 52.875 m f 323 | 221.625 46.875 m 221.625 47.699 220.953 48.363 220.125 48.363 c 219.297 324 | 48.363 218.625 47.699 218.625 46.875 c 218.625 46.051 219.297 45.387 220.125 325 | 45.387 c 220.953 45.387 221.625 46.051 221.625 46.875 c h 326 | 221.625 46.875 m f 327 | 221.625 58.125 m 221.625 58.949 220.953 59.613 220.125 59.613 c 219.297 328 | 59.613 218.625 58.949 218.625 58.125 c 218.625 57.301 219.297 56.637 220.125 329 | 56.637 c 220.953 56.637 221.625 57.301 221.625 58.125 c h 330 | 221.625 58.125 m f 331 | 221.625 52.875 m 221.625 53.699 220.953 54.363 220.125 54.363 c 219.297 332 | 54.363 218.625 53.699 218.625 52.875 c 218.625 52.051 219.297 51.387 220.125 333 | 51.387 c 220.953 51.387 221.625 52.051 221.625 52.875 c h 334 | 221.625 52.875 m f 335 | 214.875 55.875 m 214.875 56.699 214.203 57.363 213.375 57.363 c 212.547 336 | 57.363 211.875 56.699 211.875 55.875 c 211.875 55.051 212.547 54.387 213.375 337 | 54.387 c 214.203 54.387 214.875 55.051 214.875 55.875 c h 338 | 214.875 55.875 m f 339 | 208.125 55.875 m 208.125 56.699 207.453 57.363 206.625 57.363 c 205.797 340 | 57.363 205.125 56.699 205.125 55.875 c 205.125 55.051 205.797 54.387 206.625 341 | 54.387 c 207.453 54.387 208.125 55.051 208.125 55.875 c h 342 | 208.125 55.875 m f 343 | 202.125 55.875 m 202.125 56.699 201.453 57.363 200.625 57.363 c 199.797 344 | 57.363 199.125 56.699 199.125 55.875 c 199.125 55.051 199.797 54.387 200.625 345 | 54.387 c 201.453 54.387 202.125 55.051 202.125 55.875 c h 346 | 202.125 55.875 m f 347 | 195.375 55.875 m 195.375 56.699 194.703 57.363 193.875 57.363 c 193.047 348 | 57.363 192.375 56.699 192.375 55.875 c 192.375 55.051 193.047 54.387 193.875 349 | 54.387 c 194.703 54.387 195.375 55.051 195.375 55.875 c h 350 | 195.375 55.875 m f 351 | 189.375 55.875 m 189.375 56.699 188.703 57.363 187.875 57.363 c 187.047 352 | 57.363 186.375 56.699 186.375 55.875 c 186.375 55.051 187.047 54.387 187.875 353 | 54.387 c 188.703 54.387 189.375 55.051 189.375 55.875 c h 354 | 189.375 55.875 m f 355 | 182.625 55.875 m 182.625 56.699 181.953 57.363 181.125 57.363 c 180.297 356 | 57.363 179.625 56.699 179.625 55.875 c 179.625 55.051 180.297 54.387 181.125 357 | 54.387 c 181.953 54.387 182.625 55.051 182.625 55.875 c h 358 | 182.625 55.875 m f 359 | 176.625 55.875 m 176.625 56.699 175.953 57.363 175.125 57.363 c 174.297 360 | 57.363 173.625 56.699 173.625 55.875 c 173.625 55.051 174.297 54.387 175.125 361 | 54.387 c 175.953 54.387 176.625 55.051 176.625 55.875 c h 362 | 176.625 55.875 m f 363 | 169.875 55.875 m 169.875 56.699 169.203 57.363 168.375 57.363 c 167.547 364 | 57.363 166.875 56.699 166.875 55.875 c 166.875 55.051 167.547 54.387 168.375 365 | 54.387 c 169.203 54.387 169.875 55.051 169.875 55.875 c h 366 | 169.875 55.875 m f 367 | 166.125 48.488 m 170.625 48.488 l 170.625 50.723 l 169.125 50.723 l 169.125 368 | 51.473 l 167.625 51.473 l 167.625 50.723 l 166.125 50.723 l h 369 | 172.5 48.488 m 177 48.488 l 177 50.723 l 175.5 50.723 l 175.5 51.473 l 370 | 174 51.473 l 174 50.723 l 172.5 50.723 l h 371 | 178.875 48.488 m 183.375 48.488 l 183.375 50.723 l 181.875 50.723 l 181.875 372 | 51.473 l 180.375 51.473 l 180.375 50.723 l 178.875 50.723 l h 373 | 185.25 48.488 m 189.75 48.488 l 189.75 50.723 l 188.25 50.723 l 188.25 374 | 51.473 l 186.75 51.473 l 186.75 50.723 l 185.25 50.723 l h 375 | 191.625 48.488 m 196.125 48.488 l 196.125 50.723 l 194.625 50.723 l 194.625 376 | 51.473 l 193.125 51.473 l 193.125 50.723 l 191.625 50.723 l h 377 | 198 48.488 m 202.5 48.488 l 202.5 50.723 l 201 50.723 l 201 51.473 l 199.5 378 | 51.473 l 199.5 50.723 l 198 50.723 l h 379 | 204.375 48.488 m 208.875 48.488 l 208.875 50.723 l 207.375 50.723 l 207.375 380 | 51.473 l 205.875 51.473 l 205.875 50.723 l 204.375 50.723 l h 381 | 210.75 48.488 m 215.25 48.488 l 215.25 50.723 l 213.75 50.723 l 213.75 382 | 51.473 l 212.25 51.473 l 212.25 50.723 l 210.75 50.723 l h 383 | 210.75 48.488 m f 384 | 0.407843 0.505882 0.701961 rg 385 | q 1 0 0 1 0 0 cm 386 | 231.375 51.098 m 232.875 52.59 l 231.375 54.074 l 226.125 52.59 m 232.875 387 | 52.59 l S Q 388 | 0.8 g 389 | 219.227 5.52 m 220.875 8.004 220.875 11.227 219.227 13.711 c 218.102 12.969 390 | l 219.352 11.012 219.352 8.512 218.102 6.562 c h 391 | 222.227 3.285 m 225.219 7.066 225.219 12.391 222.227 16.172 c 221.102 15.277 392 | l 223.648 12.039 223.648 7.492 221.102 4.254 c h 393 | 225.227 1.125 m 229.746 5.977 229.746 13.477 225.227 18.328 c 224.102 17.438 394 | l 228.238 13.117 228.238 6.336 224.102 2.016 c h 395 | 211.727 5.52 m 210.074 8.004 210.074 11.227 211.727 13.711 c 212.852 12.969 396 | l 211.598 11.012 211.598 8.512 212.852 6.562 c h 397 | 208.727 3.285 m 205.695 7.078 205.695 12.449 208.727 16.246 c 209.852 15.203 398 | l 207.375 11.992 207.375 7.539 209.852 4.328 c h 399 | 205.727 1.199 m 201.246 6.047 201.246 13.484 205.727 18.328 c 206.852 17.438 400 | l 202.754 13.133 202.754 6.398 206.852 2.094 c h 401 | 205.727 1.199 m f 402 | 0.407843 0.505882 0.701961 rg 403 | q 1 0 0 1 0 0 cm 404 | 219.227 5.52 m 220.875 8.004 220.875 11.227 219.227 13.711 c 218.102 12.969 405 | l 219.352 11.012 219.352 8.512 218.102 6.562 c h 406 | 222.227 3.285 m 225.219 7.066 225.219 12.391 222.227 16.172 c 221.102 15.277 407 | l 223.648 12.039 223.648 7.492 221.102 4.254 c h 408 | 225.227 1.125 m 229.746 5.977 229.746 13.477 225.227 18.328 c 224.102 17.438 409 | l 228.238 13.117 228.238 6.336 224.102 2.016 c h 410 | 211.727 5.52 m 210.074 8.004 210.074 11.227 211.727 13.711 c 212.852 12.969 411 | l 211.598 11.012 211.598 8.512 212.852 6.562 c h 412 | 208.727 3.285 m 205.695 7.078 205.695 12.449 208.727 16.246 c 209.852 15.203 413 | l 207.375 11.992 207.375 7.539 209.852 4.328 c h 414 | 205.727 1.199 m 201.246 6.047 201.246 13.484 205.727 18.328 c 206.852 17.438 415 | l 202.754 13.133 202.754 6.398 206.852 2.094 c h 416 | 205.727 1.199 m S Q 417 | 0 0.4 0.8 rg 418 | BT 419 | 12 0 0 -12 190.652344 82.0725 Tm 420 | /f-0-0 1 Tf 421 | (ap1)Tj 422 | ET 423 | Q Q 424 | showpage 425 | %%Trailer 426 | end 427 | %%EOF 428 | -------------------------------------------------------------------------------- /figures/cap3/dhcp.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-3.0 EPSF-3.0 2 | %%Creator: cairo 1.15.10 (http://cairographics.org) 3 | %%CreationDate: Sun Mar 31 23:40:15 2019 4 | %%Pages: 1 5 | %%DocumentData: Clean7Bit 6 | %%LanguageLevel: 2 7 | %%BoundingBox: 2 2 331 110 8 | %%EndComments 9 | %%BeginProlog 10 | 50 dict begin 11 | /q { gsave } bind def 12 | /Q { grestore } bind def 13 | /cm { 6 array astore concat } bind def 14 | /w { setlinewidth } bind def 15 | /J { setlinecap } bind def 16 | /j { setlinejoin } bind def 17 | /M { setmiterlimit } bind def 18 | /d { setdash } bind def 19 | /m { moveto } bind def 20 | /l { lineto } bind def 21 | /c { curveto } bind def 22 | /h { closepath } bind def 23 | /re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto 24 | 0 exch rlineto 0 rlineto closepath } bind def 25 | /S { stroke } bind def 26 | /f { fill } bind def 27 | /f* { eofill } bind def 28 | /n { newpath } bind def 29 | /W { clip } bind def 30 | /W* { eoclip } bind def 31 | /BT { } bind def 32 | /ET { } bind def 33 | /BDC { mark 3 1 roll /BDC pdfmark } bind def 34 | /EMC { mark /EMC pdfmark } bind def 35 | /cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def 36 | /Tj { show currentpoint cairo_store_point } bind def 37 | /TJ { 38 | { 39 | dup 40 | type /stringtype eq 41 | { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse 42 | } forall 43 | currentpoint cairo_store_point 44 | } bind def 45 | /cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore 46 | cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def 47 | /Tf { pop /cairo_font exch def /cairo_font_matrix where 48 | { pop cairo_selectfont } if } bind def 49 | /Td { matrix translate cairo_font_matrix matrix concatmatrix dup 50 | /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point 51 | /cairo_font where { pop cairo_selectfont } if } bind def 52 | /Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def 53 | cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def 54 | /g { setgray } bind def 55 | /rg { setrgbcolor } bind def 56 | /d1 { setcachedevice } bind def 57 | /cairo_data_source { 58 | CairoDataIndex CairoData length lt 59 | { CairoData CairoDataIndex get /CairoDataIndex CairoDataIndex 1 add def } 60 | { () } ifelse 61 | } def 62 | /cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def 63 | /cairo_image { image cairo_flush_ascii85_file } def 64 | /cairo_imagemask { imagemask cairo_flush_ascii85_file } def 65 | %%EndProlog 66 | %%BeginSetup 67 | %%BeginResource: font f-0-0 68 | %!FontType1-1.1 f-0-0 1.0 69 | 11 dict begin 70 | /FontName /f-0-0 def 71 | /PaintType 0 def 72 | /FontType 1 def 73 | /FontMatrix [0.001 0 0 0.001 0 0] readonly def 74 | /FontBBox {0 -217 574 729 } readonly def 75 | /Encoding 256 array 76 | 0 1 255 {1 index exch /.notdef put} for 77 | dup 49 /one put 78 | dup 97 /a put 79 | dup 104 /h put 80 | dup 112 /p put 81 | dup 115 /s put 82 | dup 116 /t put 83 | readonly def 84 | currentdict end 85 | currentfile eexec 86 | f983ef0097ece636fb4a96c74d26ab84185f6dfa4a16a7a1c27bbe3f1156aea698df336d20b467 87 | b10e7f33846656653c5ac6962759d3056cbdb3190bac614b984bf5a132dc418192443014ba63de 88 | 800d392b6fea026574bb2535fd7bb5338f35bf15a88ea328fdaa49670c7852e3d060f3c5d6b07f 89 | 2ef6d0f22646c5d18e19a2ae3ee120390f6dd96f76dcf1e127de5e9299077a00c17c0d71e36e5b 90 | 9d5ec58fceda57739a6a4214d4b79d6c48d2784b60c320323c7acddddf34db833cac0cf109f799 91 | 69d114a330d372e5c978a66acc84e3fe5557f6240856a013ffaa0199444e5c5036f775eba4a5c5 92 | 8cde66cf604b9aca2178431127b8a1ff7ed633a65c04600af5f573483112251ca5d188dea508ed 93 | e1b2455317d2f89946db9171817b252ef4aed3b4d1e2d956531eb1466794df0aef957dbdb95b75 94 | 3dda45c9c7c4389a1ba848f9fdecc660ed2143ef4e3b94779e6327b9154305c013790282c67abe 95 | 62dc8ecc30f99aa2bcf31cf659261edf7afd346ab00d374e121f870f8a8164d730675d1f1be471 96 | 23f54ffd99e91acdffea69e5a38069f5273937b0369e79a68f0e5ddfb2f31b71f9de86fdc2ae31 97 | 231d697776f95d022e4379ca3f176eb97a91828b9a8fc5c3ca75458f1e7cdfa8126c0d189ab536 98 | 8ff41481d62a1fceed043ab17fe8766ad80b411216fa14b77f8725861006c4b4203b88dd34f76d 99 | cc3e4b94117b323c849b7313344ec177af24fec7b2190126087435d778cce467b2a78c76bc01da 100 | 5ad8bfadfaaeba7b51e7bd1d962fe0ab484a99493f111446ba8df32e300687b335441a883a04d2 101 | 61554d944f952cf875b2d3d72ee2c4952e701f7857d135904d418d3356d828dacbed106663b042 102 | aa4de96d97e09cd2718d4598c1a3c76bf012ff167a8f34a0448e6e70c7cca61d6c9e2394b01afe 103 | 9e021edb982464355a7249e81482646f03accf06ac026f47cf199e4a67d6da4b4da4e99e125474 104 | 621d61b461e7a11a1a22c8cbd3d1a3a068069eaa55a091d54141e9e671d8da530e56068c09e046 105 | 9416c151b90f47b9412510573bca049c3428c1a6f57f53a48ab1322635a67006b68af794069309 106 | ec1c1933c8dafb8d21d9bfe25248e93c08162bbf6f33927a25ff5b295feaf99945181dfe04b209 107 | 5ca1a3c8e0d3a7b3962476a575197ee551dab85527c476294d22ad28985c008e20d2b500ad0dcc 108 | 3956b098da7fb1475f56d29cae5043582860c2cb401489dfd9745881121af3adcf37f9ad59726e 109 | d868015544f092a2f71f8069b8c077f370f0a779e08621842b684227d9c45ed23a42855ec302fa 110 | 59d1f32c29536b94bf73660492367b1dff44d4cdd417fc09334d6e4ea7841157e2f48d28849e2d 111 | 08887e82230d56d5fa4083696c51379c5e20a91cc52fb3a869dd488b2c26a503809a2c9d9884b6 112 | cd42f5582afe3d9b0a317ccd8df746f1ab2c3bc23fcbd5eb6bcab34d3c2f0fdd9221b6d986d50b 113 | 1d1e9aa9a508deeccce0d5efaeb77e3ee6d558434397a2a7f1826351af5479a0a21c3940e14ccf 114 | 878b0000000000000000000000000000000000000000000000000000000000000000 115 | 0000000000000000000000000000000000000000000000000000000000000000 116 | 0000000000000000000000000000000000000000000000000000000000000000 117 | 0000000000000000000000000000000000000000000000000000000000000000 118 | 0000000000000000000000000000000000000000000000000000000000000000 119 | 0000000000000000000000000000000000000000000000000000000000000000 120 | 0000000000000000000000000000000000000000000000000000000000000000 121 | 0000000000000000000000000000000000000000000000000000000000000000 122 | cleartomark 123 | %%EndResource 124 | %%BeginResource: font f-1-0 125 | %!FontType1-1.1 f-1-0 1.0 126 | 11 dict begin 127 | /FontName /f-1-0 def 128 | /PaintType 0 def 129 | /FontType 1 def 130 | /FontMatrix [0.001 0 0 0.001 0 0] readonly def 131 | /FontBBox {0 -212 677 747 } readonly def 132 | /Encoding 256 array 133 | 0 1 255 {1 index exch /.notdef put} for 134 | dup 32 /space put 135 | dup 40 /parenleft put 136 | dup 41 /parenright put 137 | dup 67 /C put 138 | dup 68 /D put 139 | dup 72 /H put 140 | dup 80 /P put 141 | dup 83 /S put 142 | dup 101 /e put 143 | dup 105 /i put 144 | dup 108 /l put 145 | dup 110 /n put 146 | dup 114 /r put 147 | dup 116 /t put 148 | dup 118 /v put 149 | readonly def 150 | currentdict end 151 | currentfile eexec 152 | f983ef0097ece636fb4a96c74d26ab84185f6dfa4a16a7a1c27bbe3f1156aea698df336d20b467 153 | b10e7f33846656653c5ac6962759d3056cbdb3190bac614b984bf5a132dc418192443014ba63de 154 | 800d392b6fea026574bb2535fd7bb5338f35bf15a88ea328fdaa49670c7852e3d060f3c5d6b07f 155 | 2ef6d0f22646c5d18e19a2ae3ee120390f6dd96f76dcf1e127de5e9299077a00c17c0d71e36e5b 156 | 9d5ec58fceda57739a6a4214d4b79d6c48d2784b60c320323c7acddddf34db833cac0cf109f799 157 | 69d114a330d372e5c978a66acc84e3fe5557f6240856a013ffaa0199444e5c5036f775eba4a5c5 158 | 8cde66cf604b9aca2178431127b8a1ff7ed633a65c04600af5f573483112251caca150208b29c9 159 | 45bb0ad7b93c575816162477f50bbd3d5120149671fec3c1353b559859c6318f2c65b4d2810905 160 | fd463c145657c709573f27fc9448d0179d6ba9283c269d2e64ceee344118e6b56f0ed9b3547919 161 | 5b001943328158c72288e85b67ae89f3fa3a1dc6230722b1eede19e23ffe0d6fd16db722700f54 162 | 836b21a9f1d2aaeb74dff504bbfc3a10f60aa52f893f9e747602141b99aba647cc828a6f5cecfb 163 | f8c2f7ede2aa68f2529b91f0eee047567635bb6a6af823a7b963f7ebc1b0cb6853775032a0b1e0 164 | 9d2f18204402c4b5ba8ad80c8aae5755c3056c135e8b572b060a94e885a3d7e4312a3f37221642 165 | 96a0fae044d3c8edb9a2c228d26cd2ecfb6f399b0acd512ad5111cb00b9a3302d81099f834ac59 166 | f92caffe52014cd29aee13a27751830277da5ff98f187125f8a038cefa487e623ee1ab6ab6f629 167 | d9424c1e35fbcba74148eaaaa7117c09de8bb691b6a2626f27fbb6001a3c32bcafde7930992164 168 | 9afa70c4bb2109fba1e369be125df5afa7ea4e19128dc7513e1262d39f3c1e94d0dc2baae18d8d 169 | 3fe48674f1037aa7277cd4851c59d786ee6751d1aa3d2aeb2052116e397f8d8b13ede3cda13adf 170 | 0223da6c54728ef492f6a879fb2faaa8ba34a407ff97b39c766c847f148b549e3ec823e5d890b0 171 | fff535caaf9ac714defa95fac2497d146aaa8c2562bdde57fdbf533b4957b8fa3133eb5cdc2b14 172 | 78b661be4e1421d593c39cff6cb13363068f5425b1561979297ec2710e3f20c1198fcf89127232 173 | ad114d2fcecebfba91a4aa08922aef593f0912260d8d35cfc2aa413fb11e0dfecfdd620d6728d6 174 | 80560af3179af24943dc5f36c4762f862a6b6421aa56aa59712e55b9cade6147f4a84790c5d0bb 175 | 1d63fd39bd3733002af6ec640604e1338a9938578078a8e417c08e36cd3dc7734cc8413f5257c7 176 | 8b8f08c855c16d412702a7c87120d0da446f0c4ecf5e271cff040f68d86602c11947635df8d4bf 177 | 870d6bfc7bdebb1f51f558c6fd7ea5e2405f30bfbd8b03648c9232cabe6e965a087d868f3e70eb 178 | 76812b5d3f7c4cd93e3772741ed21cee7fc7d9e210558a1b4915fede0bbff7acd3da80884cea7b 179 | 1ab4eebffa762df7e5c9750c1eab068b3b64f9f0a095376e3e81d7eb456bae730a018f97a03e30 180 | 287343fdf7ba83621f41648bb24dfc13c9d23384676c7441d62b97cab5b3f925eaf40667eeb267 181 | ffc940ebadec042383121dc93e72aa9c925b497dd07b573c1ec868180e821c6555bb8212d562a0 182 | c1dcb3c888bb5f39a41d2e0c84ab4cf5b2d9c14a8197e149375c52d3e9254d2e52dbcda7f02586 183 | bbeb1d99ca283adf4e0bcd560915d786ece3806693c6c41638685c2842364193660667b78c1b5c 184 | 69dc9941de08f2ebfdddc4c3d814c5241a38cca3234966c85ded198dee38e80c6013df90ac3f9a 185 | cfb18d9ae01cc012093c37ae527564ea53be664b69967ee4942a0d5f6b77b4e00b478ce1490f1d 186 | d617316e05560378f626839a534cf7d5cdac30485c06a78b68be233eabfa7104e488e5b2cd312e 187 | 7fa09c66135e11de300672bed531aac9ba5d236464437b8d9a413be8e39183a3ccdc389eeb7c4c 188 | bca97db3934067ead548c060c27d489a78a82b371f22373543a2c18439dbf8caa755adbefaf4db 189 | 80dbf442fd7b24409a277748fa9a724d53c79c98ad1ce7e692e71d5ce6bbed27edd0e22ea31502 190 | 83db61d4f18749576a24a7c47bbc043cf59f71050250d126f9257e05bf828c0c93faea6b72f7f1 191 | 7f1957b2e5ac5bf8fb61cf481d988590cbe9c39c6bc3bc234363bb21fd54bd788ee1a985077f53 192 | 6bf326b53b33730245ae6296ebbce74fb0bba8b849cf63f32acb95d74ab14da0c2ae852a877e67 193 | 3fbebe7182ae63a5e1b6a88ad3f493ac2fdefc00610543c148817d1b6e10e673a29f5b16305ee1 194 | 4c5589311845fb6a4c660b80dc23415663ce0eae0c1593940200de48ff951da2a608c004ef36f3 195 | a41e102349dcfe0de701cb918c0ebfe66b90eb1b23d14356e8806e3a3b4d0000000000000000000000000000000000000000000000000000000000000000 196 | 0000000000000000000000000000000000000000000000000000000000000000 197 | 0000000000000000000000000000000000000000000000000000000000000000 198 | 0000000000000000000000000000000000000000000000000000000000000000 199 | 0000000000000000000000000000000000000000000000000000000000000000 200 | 0000000000000000000000000000000000000000000000000000000000000000 201 | 0000000000000000000000000000000000000000000000000000000000000000 202 | 0000000000000000000000000000000000000000000000000000000000000000 203 | cleartomark 204 | %%EndResource 205 | %%EndSetup 206 | %%Page: 1 1 207 | %%BeginPageSetup 208 | %%PageBoundingBox: 2 2 331 110 209 | %%EndPageSetup 210 | q 2 2 329 108 rectclip 211 | 1 0 0 -1 0 110 cm q 212 | 0 g 213 | 0.75 w 214 | 0 J 215 | 0 j 216 | [ 2.25 2.25] 0 d 217 | 10 M q 1 0 0 1 0 0 cm 218 | 266.574 44.469 m 190.02 1.02 l S Q 219 | 0.8 g 220 | 265.559 51.801 m 319.453 51.801 l 330.098 64.875 l 255.098 64.875 l h 221 | 267.473 23.625 m 317.348 23.625 l 318.824 51.48 l 265.996 51.48 l h 222 | 267.473 23.625 m f 223 | 0.407843 0.505882 0.701961 rg 224 | 1.425 w 225 | 1 j 226 | [] 0.0 d 227 | q 1 0 0 1 0 0 cm 228 | 265.559 51.801 m 319.453 51.801 l 330.098 64.875 l 255.098 64.875 l h 229 | 267.473 23.625 m 317.348 23.625 l 318.824 51.48 l 265.996 51.48 l h 230 | 267.473 23.625 m S Q 231 | q 1 0 0 1 0 0 cm 232 | 267.84 55.051 m 318.09 55.051 l 264.516 58.629 m 321.414 58.629 l 278.926 233 | 61.836 m 304.785 61.836 l S Q 234 | 1 g 235 | 269.91 26.121 m 314.984 26.121 l 316.238 48.984 l 268.582 48.984 l h 236 | 269.91 26.121 m f 237 | 0 0.4 0.8 rg 238 | BT 239 | 10.5 0 0 -10.5 281.40873 80.017502 Tm 240 | /f-0-0 1 Tf 241 | [(st)-7(a1)]TJ 242 | ET 243 | 0 g 244 | 0.75 w 245 | 0 j 246 | q 1 0 0 1 0 0 cm 247 | 68.25 49.875 m 171.914 50.16 l S Q 248 | 0.8 g 249 | 9.449 23.543 m 25.051 23.543 l 25.715 23.543 26.25 24.078 26.25 24.742 250 | c 26.25 67.344 l 26.25 68.008 25.715 68.543 25.051 68.543 c 9.449 68.543 251 | l 8.785 68.543 8.25 68.008 8.25 67.344 c 8.25 24.742 l 8.25 24.078 8.785 252 | 23.543 9.449 23.543 c h 253 | 9.449 23.543 m f 254 | 0.407843 0.505882 0.701961 rg 255 | 1.2 w 256 | 4 M q 1 0 0 1 0 0 cm 257 | 9.449 23.543 m 25.051 23.543 l 25.715 23.543 26.25 24.078 26.25 24.742 258 | c 26.25 67.344 l 26.25 68.008 25.715 68.543 25.051 68.543 c 9.449 68.543 259 | l 8.785 68.543 8.25 68.008 8.25 67.344 c 8.25 24.742 l 8.25 24.078 8.785 260 | 23.543 9.449 23.543 c h 261 | 9.449 23.543 m S Q 262 | 1 j 263 | 10 M q 1 0 0 1 0 0 cm 264 | 8.25 31.043 m 26.25 31.043 l 8.25 46.043 m 26.25 46.043 l S Q 265 | 0.8 g 266 | 20.25 27.293 48 33.75 re f 267 | 0.407843 0.505882 0.701961 rg 268 | 0 j 269 | 4 M q 1 0 0 1 0 0 cm 270 | 20.25 27.293 48 33.75 re S Q 271 | 0.8 g 272 | 38.25 61.043 12 7.5 re f 273 | 0.407843 0.505882 0.701961 rg 274 | q 1 0 0 1 0 0 cm 275 | 38.25 61.043 12 7.5 re S Q 276 | 0.8 g 277 | 29.25 67.793 m 59.25 67.793 l 65.25 76.043 l 23.25 76.043 l h 278 | 29.25 67.793 m f 279 | 0.407843 0.505882 0.701961 rg 280 | 1 j 281 | 10 M q 1 0 0 1 0 0 cm 282 | 29.25 67.793 m 59.25 67.793 l 65.25 76.043 l 23.25 76.043 l h 283 | 29.25 67.793 m S Q 284 | q 1 0 0 1 0 0 cm 285 | 37.648 74.168 m 48.449 74.168 l 29.852 71.918 m 53.25 71.918 l 31.051 69.668 286 | m 52.648 69.668 l 54.449 69.668 m 58.648 69.668 l 55.648 71.918 m 59.852 287 | 71.918 l 56.852 74.168 m 61.051 74.168 l S Q 288 | 1 g 289 | 22.051 29.543 43.801 29.25 re f 290 | 12.824 49.875 m 12.824 50.703 12.289 51.375 11.625 51.375 c 10.961 51.375 291 | 10.426 50.703 10.426 49.875 c 10.426 49.047 10.961 48.375 11.625 48.375 292 | c 12.289 48.375 12.824 49.047 12.824 49.875 c h 293 | 12.824 49.875 m f 294 | 0 0.4 0.8 rg 295 | BT 296 | 10.5 0 0 -10.5 31.488164 91.185001 Tm 297 | /f-0-0 1 Tf 298 | (h1)Tj 299 | ET 300 | 0.8 g 301 | 132.066 43.273 m 199.629 43.273 l 201.688 43.273 203.348 44.934 203.348 302 | 46.996 c 203.348 58.172 l 203.348 60.23 201.688 61.891 199.629 61.891 c 303 | 132.066 61.891 l 130.008 61.891 128.348 60.23 128.348 58.172 c 128.348 304 | 46.996 l 128.348 44.934 130.008 43.273 132.066 43.273 c h 305 | 132.066 43.273 m f 306 | 0.407843 0.505882 0.701961 rg 307 | 1.4925 w 308 | 0 j 309 | 4 M q 1 0 0 1 0 0 cm 310 | 132.066 43.273 m 199.629 43.273 l 201.688 43.273 203.348 44.934 203.348 311 | 46.996 c 203.348 58.172 l 203.348 60.23 201.688 61.891 199.629 61.891 c 312 | 132.066 61.891 l 130.008 61.891 128.348 60.23 128.348 58.172 c 128.348 313 | 46.996 l 128.348 44.934 130.008 43.273 132.066 43.273 c h 314 | 132.066 43.273 m S Q 315 | 0.8 g 316 | 135.848 61.898 60 2.977 re f 317 | 0.407843 0.505882 0.701961 rg 318 | q 1 0 0 1 0 0 cm 319 | 135.848 61.898 60 2.977 re S Q 320 | 0.8 g 321 | 178.598 43.273 m 178.973 9.766 l 179.176 9.449 179.527 9.262 179.91 9.262 322 | c 180.285 9.262 180.637 9.449 180.848 9.766 c 181.223 43.273 l h 323 | 178.598 43.273 m f 324 | 0.407843 0.505882 0.701961 rg 325 | 10 M q 1 0 0 1 0 0 cm 326 | 178.598 43.273 m 178.973 9.766 l 179.176 9.449 179.527 9.262 179.91 9.262 327 | c 180.285 9.262 180.637 9.449 180.848 9.766 c 181.223 43.273 l h 328 | 178.598 43.273 m S Q 329 | 1 g 330 | 200.625 52.875 m 200.625 56.164 197.938 58.832 194.625 58.832 c 191.312 331 | 58.832 188.625 56.164 188.625 52.875 c 188.625 49.586 191.312 46.918 194.625 332 | 46.918 c 197.938 46.918 200.625 49.586 200.625 52.875 c h 333 | 200.625 52.875 m f 334 | 186.375 46.875 m 186.375 47.699 185.703 48.363 184.875 48.363 c 184.047 335 | 48.363 183.375 47.699 183.375 46.875 c 183.375 46.051 184.047 45.387 184.875 336 | 45.387 c 185.703 45.387 186.375 46.051 186.375 46.875 c h 337 | 186.375 46.875 m f 338 | 186.375 58.125 m 186.375 58.949 185.703 59.613 184.875 59.613 c 184.047 339 | 59.613 183.375 58.949 183.375 58.125 c 183.375 57.301 184.047 56.637 184.875 340 | 56.637 c 185.703 56.637 186.375 57.301 186.375 58.125 c h 341 | 186.375 58.125 m f 342 | 186.375 52.875 m 186.375 53.699 185.703 54.363 184.875 54.363 c 184.047 343 | 54.363 183.375 53.699 183.375 52.875 c 183.375 52.051 184.047 51.387 184.875 344 | 51.387 c 185.703 51.387 186.375 52.051 186.375 52.875 c h 345 | 186.375 52.875 m f 346 | 178.875 55.875 m 178.875 56.699 178.203 57.363 177.375 57.363 c 176.547 347 | 57.363 175.875 56.699 175.875 55.875 c 175.875 55.051 176.547 54.387 177.375 348 | 54.387 c 178.203 54.387 178.875 55.051 178.875 55.875 c h 349 | 178.875 55.875 m f 350 | 172.875 55.875 m 172.875 56.699 172.203 57.363 171.375 57.363 c 170.547 351 | 57.363 169.875 56.699 169.875 55.875 c 169.875 55.051 170.547 54.387 171.375 352 | 54.387 c 172.203 54.387 172.875 55.051 172.875 55.875 c h 353 | 172.875 55.875 m f 354 | 166.125 55.875 m 166.125 56.699 165.453 57.363 164.625 57.363 c 163.797 355 | 57.363 163.125 56.699 163.125 55.875 c 163.125 55.051 163.797 54.387 164.625 356 | 54.387 c 165.453 54.387 166.125 55.051 166.125 55.875 c h 357 | 166.125 55.875 m f 358 | 160.125 55.875 m 160.125 56.699 159.453 57.363 158.625 57.363 c 157.797 359 | 57.363 157.125 56.699 157.125 55.875 c 157.125 55.051 157.797 54.387 158.625 360 | 54.387 c 159.453 54.387 160.125 55.051 160.125 55.875 c h 361 | 160.125 55.875 m f 362 | 153.375 55.875 m 153.375 56.699 152.703 57.363 151.875 57.363 c 151.047 363 | 57.363 150.375 56.699 150.375 55.875 c 150.375 55.051 151.047 54.387 151.875 364 | 54.387 c 152.703 54.387 153.375 55.051 153.375 55.875 c h 365 | 153.375 55.875 m f 366 | 147.375 55.875 m 147.375 56.699 146.703 57.363 145.875 57.363 c 145.047 367 | 57.363 144.375 56.699 144.375 55.875 c 144.375 55.051 145.047 54.387 145.875 368 | 54.387 c 146.703 54.387 147.375 55.051 147.375 55.875 c h 369 | 147.375 55.875 m f 370 | 140.625 55.875 m 140.625 56.699 139.953 57.363 139.125 57.363 c 138.297 371 | 57.363 137.625 56.699 137.625 55.875 c 137.625 55.051 138.297 54.387 139.125 372 | 54.387 c 139.953 54.387 140.625 55.051 140.625 55.875 c h 373 | 140.625 55.875 m f 374 | 134.625 55.875 m 134.625 56.699 133.953 57.363 133.125 57.363 c 132.297 375 | 57.363 131.625 56.699 131.625 55.875 c 131.625 55.051 132.297 54.387 133.125 376 | 54.387 c 133.953 54.387 134.625 55.051 134.625 55.875 c h 377 | 134.625 55.875 m f 378 | 130.598 48.488 m 135.098 48.488 l 135.098 50.723 l 133.598 50.723 l 133.598 379 | 51.473 l 132.098 51.473 l 132.098 50.723 l 130.598 50.723 l h 380 | 136.973 48.488 m 141.473 48.488 l 141.473 50.723 l 139.973 50.723 l 139.973 381 | 51.473 l 138.473 51.473 l 138.473 50.723 l 136.973 50.723 l h 382 | 143.348 48.488 m 147.848 48.488 l 147.848 50.723 l 146.348 50.723 l 146.348 383 | 51.473 l 144.848 51.473 l 144.848 50.723 l 143.348 50.723 l h 384 | 149.723 48.488 m 154.223 48.488 l 154.223 50.723 l 152.723 50.723 l 152.723 385 | 51.473 l 151.223 51.473 l 151.223 50.723 l 149.723 50.723 l h 386 | 156.098 48.488 m 160.598 48.488 l 160.598 50.723 l 159.098 50.723 l 159.098 387 | 51.473 l 157.598 51.473 l 157.598 50.723 l 156.098 50.723 l h 388 | 162.473 48.488 m 166.973 48.488 l 166.973 50.723 l 165.473 50.723 l 165.473 389 | 51.473 l 163.973 51.473 l 163.973 50.723 l 162.473 50.723 l h 390 | 168.848 48.488 m 173.348 48.488 l 173.348 50.723 l 171.848 50.723 l 171.848 391 | 51.473 l 170.348 51.473 l 170.348 50.723 l 168.848 50.723 l h 392 | 175.223 48.488 m 179.723 48.488 l 179.723 50.723 l 178.223 50.723 l 178.223 393 | 51.473 l 176.723 51.473 l 176.723 50.723 l 175.223 50.723 l h 394 | 175.223 48.488 m f 395 | 0.407843 0.505882 0.701961 rg 396 | q 1 0 0 1 0 0 cm 397 | 195.848 51.098 m 197.348 52.59 l 195.848 54.074 l 190.598 52.59 m 197.348 398 | 52.59 l S Q 399 | 0.8 g 400 | 183.699 5.52 m 185.34 8.004 185.34 11.227 183.699 13.711 c 182.574 12.969 401 | l 183.824 11.012 183.824 8.512 182.574 6.562 c h 402 | 186.699 3.285 m 189.691 7.066 189.691 12.391 186.699 16.172 c 185.574 15.277 403 | l 188.121 12.039 188.121 7.492 185.574 4.254 c h 404 | 189.699 1.125 m 194.219 5.977 194.219 13.477 189.699 18.328 c 188.574 17.438 405 | l 192.711 13.117 192.711 6.336 188.574 2.016 c h 406 | 176.199 5.52 m 174.547 8.004 174.547 11.227 176.199 13.711 c 177.324 12.969 407 | l 176.07 11.012 176.07 8.512 177.324 6.562 c h 408 | 173.199 3.285 m 170.168 7.078 170.168 12.449 173.199 16.246 c 174.324 15.203 409 | l 171.848 11.992 171.848 7.539 174.324 4.328 c h 410 | 170.199 1.199 m 165.711 6.047 165.711 13.484 170.199 18.328 c 171.324 17.438 411 | l 167.227 13.133 167.227 6.398 171.324 2.094 c h 412 | 170.199 1.199 m f 413 | 0.407843 0.505882 0.701961 rg 414 | q 1 0 0 1 0 0 cm 415 | 183.699 5.52 m 185.34 8.004 185.34 11.227 183.699 13.711 c 182.574 12.969 416 | l 183.824 11.012 183.824 8.512 182.574 6.562 c h 417 | 186.699 3.285 m 189.691 7.066 189.691 12.391 186.699 16.172 c 185.574 15.277 418 | l 188.121 12.039 188.121 7.492 185.574 4.254 c h 419 | 189.699 1.125 m 194.219 5.977 194.219 13.477 189.699 18.328 c 188.574 17.438 420 | l 192.711 13.117 192.711 6.336 188.574 2.016 c h 421 | 176.199 5.52 m 174.547 8.004 174.547 11.227 176.199 13.711 c 177.324 12.969 422 | l 176.07 11.012 176.07 8.512 177.324 6.562 c h 423 | 173.199 3.285 m 170.168 7.078 170.168 12.449 173.199 16.246 c 174.324 15.203 424 | l 171.848 11.992 171.848 7.539 174.324 4.328 c h 425 | 170.199 1.199 m 165.711 6.047 165.711 13.484 170.199 18.328 c 171.324 17.438 426 | l 167.227 13.133 167.227 6.398 171.324 2.094 c h 427 | 170.199 1.199 m S Q 428 | 0 0.4 0.8 rg 429 | BT 430 | 10.5 0 0 -10.5 156.1558 80.017502 Tm 431 | /f-0-0 1 Tf 432 | (ap1)Tj 433 | ET 434 | 0 g 435 | BT 436 | 10.5 0 0 -10.5 1.875 105.6675 Tm 437 | /f-1-0 1 Tf 438 | [(\(DHC)-3(P Ser)-32(v)19(er\))]TJ 439 | 26.071429 0.72 Td 440 | [(\(Cli)-3(ent\))]TJ 441 | ET 442 | Q Q 443 | showpage 444 | %%Trailer 445 | end 446 | %%EOF 447 | -------------------------------------------------------------------------------- /figures/cap4/physical.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-3.0 EPSF-3.0 2 | %%Creator: cairo 1.15.10 (http://cairographics.org) 3 | %%CreationDate: Sun Mar 31 23:45:38 2019 4 | %%Pages: 1 5 | %%DocumentData: Clean7Bit 6 | %%LanguageLevel: 2 7 | %%BoundingBox: 0 1 305 107 8 | %%EndComments 9 | %%BeginProlog 10 | 50 dict begin 11 | /q { gsave } bind def 12 | /Q { grestore } bind def 13 | /cm { 6 array astore concat } bind def 14 | /w { setlinewidth } bind def 15 | /J { setlinecap } bind def 16 | /j { setlinejoin } bind def 17 | /M { setmiterlimit } bind def 18 | /d { setdash } bind def 19 | /m { moveto } bind def 20 | /l { lineto } bind def 21 | /c { curveto } bind def 22 | /h { closepath } bind def 23 | /re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto 24 | 0 exch rlineto 0 rlineto closepath } bind def 25 | /S { stroke } bind def 26 | /f { fill } bind def 27 | /f* { eofill } bind def 28 | /n { newpath } bind def 29 | /W { clip } bind def 30 | /W* { eoclip } bind def 31 | /BT { } bind def 32 | /ET { } bind def 33 | /BDC { mark 3 1 roll /BDC pdfmark } bind def 34 | /EMC { mark /EMC pdfmark } bind def 35 | /cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def 36 | /Tj { show currentpoint cairo_store_point } bind def 37 | /TJ { 38 | { 39 | dup 40 | type /stringtype eq 41 | { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse 42 | } forall 43 | currentpoint cairo_store_point 44 | } bind def 45 | /cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore 46 | cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def 47 | /Tf { pop /cairo_font exch def /cairo_font_matrix where 48 | { pop cairo_selectfont } if } bind def 49 | /Td { matrix translate cairo_font_matrix matrix concatmatrix dup 50 | /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point 51 | /cairo_font where { pop cairo_selectfont } if } bind def 52 | /Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def 53 | cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def 54 | /g { setgray } bind def 55 | /rg { setrgbcolor } bind def 56 | /d1 { setcachedevice } bind def 57 | /cairo_data_source { 58 | CairoDataIndex CairoData length lt 59 | { CairoData CairoDataIndex get /CairoDataIndex CairoDataIndex 1 add def } 60 | { () } ifelse 61 | } def 62 | /cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def 63 | /cairo_image { image cairo_flush_ascii85_file } def 64 | /cairo_imagemask { imagemask cairo_flush_ascii85_file } def 65 | %%EndProlog 66 | %%BeginSetup 67 | %%BeginResource: font f-0-0 68 | %!FontType1-1.1 f-0-0 1.0 69 | 11 dict begin 70 | /FontName /f-0-0 def 71 | /PaintType 0 def 72 | /FontType 1 def 73 | /FontMatrix [0.001 0 0 0.001 0 0] readonly def 74 | /FontBBox {0 -217 574 729 } readonly def 75 | /Encoding 256 array 76 | 0 1 255 {1 index exch /.notdef put} for 77 | dup 49 /one put 78 | dup 97 /a put 79 | dup 108 /l put 80 | dup 111 /o put 81 | dup 112 /p put 82 | dup 115 /s put 83 | dup 116 /t put 84 | readonly def 85 | currentdict end 86 | currentfile eexec 87 | f983ef0097ece636fb4a96c74d26ab84185f6dfa4a16a7a1c27bbe3f1156aea698df336d20b467 88 | b10e7f33846656653c5ac6962759d3056cbdb3190bac614b984bf5a132dc418192443014ba63de 89 | 800d392b6fea026574bb2535fd7bb5338f35bf15a88ea328fdaa49670c7852e3d060f3c5d6b07f 90 | 2ef6d0f22646c5d18e19a2ae3ee120390f6dd96f76dcf1e127de5e9299077a00c17c0d71e36e5b 91 | 9d5ec58fceda57739a6a4214d4b79d6c48d2784b60c320323c7acddddf34db833cac0cf109f799 92 | 69d114a330d372e5c978a66acc84e3fe5557f6240856a013ffaa0199444e5c5036f775eba4a5c5 93 | 8cde66cf604b9aca2178431127b8a1ff7ed633a65c04600af5f573483112251ca40352c6e2284e 94 | 344947523a70f7b109147467f7576cb1df156dca2f25ccb577c1669626620a11e5cb8b1ed6eed3 95 | 78ed5d514c3f9c0d0e8e06f1934736f81cf8e814dd6acca37b3a62717a9f22b9d09607b44a24c1 96 | 6038fb239c64f04a9bbd1b38cd46b4fdb23ce831bceee3894c742617f2cba3f3cbfe523773cee5 97 | 811c901d5dc01b325510c01e5d44f696924c0d4aa9acf1ff8bba8ee5bbe452a31b2e448c98e620 98 | ef95e84ac1480dff896a70fa7b74fd7684501eb1a3e98a0f4f8c32f4e36371613c63d2b69fd950 99 | a59116a3997fbdbdd076cefc396758225f6cc0604354c8e2e881ea97d733bf7c92e3edce5feb61 100 | 49ba4f263ebdb4e70b64f0d94cfef33fe6658e02b07ffbe80123340daaeaf9b564b7571359bba5 101 | d0234ae48751e7b0f233f12b9795290cf76727fd621bdb9c1872d93f6bff4ee463e31331e340ab 102 | 654bea688b1b6e5f5bf75ccb7fd0b90f6c7a025100b608584ba749d426decbae37cce7e3628248 103 | fcea3c27de50fb8463ae9f3d2d6ecc3aaba588b80bc1a65433c278f5213900ced0e0b52f5436df 104 | 293b42c3b929cfb2fd1c51c91b9efa891140ca9d2be62cb1cd6fc8cdf3ade8f3dde81ab74e2c0a 105 | fcb148baf4786e9b74967e0a172d82244fba90466329991a843e513a5503a807a7747b59636215 106 | 6c366f6885ab81f4d5295b3604268265f67c6809992a798990cb356d03016f3c2e55ab6de03dab 107 | df52fdf73c5beddebb0208a83e16fd42f8e6f7b1c7aa94f1fb401e1b52344cf8ba4a621551aab2 108 | ca7dffbe3d758c589fb22efe5860c8b39f32685905ceb844258cb4cc763a0b546506b9e2e72bbd 109 | 8e2d5e5422427b499bd3d98ffdfdb53067b1bb6e9f8c3fbbeeb8a89bca422c550f5fb17a821ea5 110 | 5d201ddd46fc40c916c65e5de24281bdc1fd6101fffa5cb9f226878e9cba9b6bc5b6f16f8410eb 111 | 5859123e5a3568224b131409c52067536c19c7f050ba73d021c39e071ffd86d9810c7dd54acab4 112 | 22ec004685fcfc3e025758367be44c6171bd111335f1197d5e4e321ecb53ec9d8c01aae68f37f0 113 | b3d185feb8c11c001e4ae7ff25b28dbe8c3e8fd79e0be6e72617d7540f1546ee0189c7a41b7e03 114 | 08a55706055394f4cc606cbde51553e8503804f5f960700271408557da0b285c8eb13f1e17bb59 115 | d9eac78fb3048f5f608953c8d1c727e9e3364c3e7b18512de4474e396726c469399f7947bc19b6 116 | b0b77dd92fa9cb13d0aaa5066ac6206b44b96668450000000000000000000000000000000000000000000000000000000000000000 117 | 0000000000000000000000000000000000000000000000000000000000000000 118 | 0000000000000000000000000000000000000000000000000000000000000000 119 | 0000000000000000000000000000000000000000000000000000000000000000 120 | 0000000000000000000000000000000000000000000000000000000000000000 121 | 0000000000000000000000000000000000000000000000000000000000000000 122 | 0000000000000000000000000000000000000000000000000000000000000000 123 | 0000000000000000000000000000000000000000000000000000000000000000 124 | cleartomark 125 | %%EndResource 126 | %%BeginResource: font f-1-0 127 | %!FontType1-1.1 f-1-0 1.0 128 | 11 dict begin 129 | /FontName /f-1-0 def 130 | /PaintType 0 def 131 | /FontType 1 def 132 | /FontMatrix [0.001 0 0 0.001 0 0] readonly def 133 | /FontBBox {0 -217 929 729 } readonly def 134 | /Encoding 256 array 135 | 0 1 255 {1 index exch /.notdef put} for 136 | dup 32 /space put 137 | dup 40 /parenleft put 138 | dup 41 /parenright put 139 | dup 45 /hyphen put 140 | dup 70 /F put 141 | dup 77 /M put 142 | dup 80 /P put 143 | dup 86 /V put 144 | dup 87 /W put 145 | dup 97 /a put 146 | dup 99 /c put 147 | dup 101 /e put 148 | dup 104 /h put 149 | dup 105 /i put 150 | dup 108 /l put 151 | dup 110 /n put 152 | dup 114 /r put 153 | dup 115 /s put 154 | dup 116 /t put 155 | dup 117 /u put 156 | dup 121 /y put 157 | readonly def 158 | currentdict end 159 | currentfile eexec 160 | f983ef0097ece636fb4a96c74d26ab84185f6dfa4a16a7a1c27bbe3f1156aea698df336d20b467 161 | b10e7f33846656653c5ac6962759d3056cbdb3190bac614b984bf5a132dc418192443014ba63de 162 | 800d392b6fea026574bb2535fd7bb5338f35bf15a88ea328fdaa49670c7852e3d060f3c5d6b07f 163 | 2ef6d0f22646c5d18e19a2ae3ee120390f6dd96f76dcf1e127de5e9299077a00c17c0d71e36e5b 164 | 9d5ec58fceda57739a6a4214d4b79d6c48d2784b60c320323c7acddddf34db833cac0cf109f799 165 | 69d114a330d372e5c978a66acc84e3fe5557f6240856a013ffaa0199444e5c5036f775eba4a5c5 166 | 8cde66cf604b9aca2178431127b8a1ff7ed633a65c04600af5f573483112251caf329e889c1a08 167 | 97df7dd6238f6133484b09ffebc7084acdd2c8895156f5f4605a66d92a9468a4d9c49f49ea2a83 168 | 8da63d8fef6bea69c47dc77742a8c0116b0280be1c8689b5ed2a5745724a459856137f789ca0f5 169 | 3e857c5eaff03a3562fde3ae9af508fae805ff2c20b203e1dd951a908f0dbbe8cc601d174be209 170 | b88a6ddf23bb77ad439b6078fdde38197380e0b5f35b911f9a1c9b34f7a75515864639b1cd630b 171 | 96c79e4c4b8b5cd4d220d9cd208cd8cd5f1b2929263edf288eb697b20f239b5d62ff712faff1b7 172 | d2710d7edbcfb4a518319b5af5be5bf19adad31d59d020b4dd71c3354df0ef14cec6a8f45c5ff7 173 | f877df91b0be559cd1af7d05fab4daf03201610b4bbb68d57325afe8e2f569d3e2005d5612b7ef 174 | 0bba0df788016d687c73f7a674bb17eb5e03ecdfe8b5fe17911b3f97733528d60ae692d3bf9b3b 175 | 97f01691e135ad42bc1d0a634d39c96c32d057e36e673a0592afec3945eb089845046259ea794e 176 | c51fe0d71bf99acd6a551c434e8e5b871466457dd80d0776913e603f46ae92582c3fcb53090685 177 | efcd7a5e1df66a414a907d7917c7620279332a876d4ec3d3da6c53d85c8a2591b866efac368ca4 178 | b47e119413dd9556418fd9251cdc7449e8d38ead0c3d105180c08758933c7c69e2300ebfed95af 179 | e86c468dbbe3b6c1c6d49180710693057fe1a5ab28b48d82b19be1c5d22b9638fc10af744d10df 180 | dacb7dd61466d9f02b232bce084e48dedd9b589fda697a77cd8cccfd6c8b26b4ba98e66f7fdfa1 181 | 8cb1fca7106ff2e3a58c647102af1694aa3c84034b500ecb8d17c29433d9746a7e525a24e54065 182 | a66616cd411bf39cf5b8df3fe99a924bea137865733295c5061abc9d71190f196d0d6c9e72bca7 183 | bbf131fb986bee3947312d47c929dc83a1c94dbf6989d6de1b65004c3b780587257776e68e379e 184 | 4cde903b115d7b0bf525a0f6db9a437f07a4f6a6f91d603aa8e1c41ce50b22670415a461745619 185 | f5fa711679d0177fedb58937b9dfeeef470628c9c6632ddc591019717de33ae6af83e9962770ee 186 | 15bcc1f94e75a6d1d57e3622d30ffd938a93531fb1e9f77b0f4a5adab78eda8de57e9c06dc5d68 187 | 37b4a35b11c9487c991797a65328f6bba65c05c11057f5c78365e0e776ec32e3644e5ceca3baf8 188 | 8ba7ab528bb7239d737b64689c3f65e852a8cbbacca188cd9cc67c5d8a87cf9d8a7ad8f7b213a2 189 | 561eb582f4953d23b717764ac2c5283412ec0212c4d5b344fd581e57012a9139991ffb1b656d5a 190 | b05c42e4043829225f628b07891b071a361a05595e00387c5301886cd5d255e3797affc9af461d 191 | f6e3444385aa3e2f4585e90368c68c28a981eef7e2dd09ca1b2c5761b35c2f1c3361c398dec282 192 | bfd3c80ae1ee0d415c829819c6a68a69faed3c7a5cdcf433f7fe032ff78795c571a1a3f78cec77 193 | 4dfb298ac9a11cc098a65ac17d3ba6e711eaeb36e62e4d19ab3762c316bbe5225d9b3355116820 194 | 9f886eba0f0c692cd097005d15000dc53a44c2ff5c6a7b84f7cde9d5e334c3d72c965d88d4069f 195 | cc194cb9d777c324245a082b3a3a1e9c3a426bc7544b94b33a5d06a9b0b1c67bcd023dc6d07f75 196 | 6aaf963c2807c21305d77f2a5522d83c05b1b80b3d1014e44a587378ef1fd7f53ca3575714e0a6 197 | ed24f74e2974b5b68270acc8dcdd50315553f54d6009f314570bd06f2390d9ed76afddf5584b56 198 | c92cff80b74544a47efbee5f75e8a93e35746e21bb79a191002defcdc2211bedf5cd3ec55d03a7 199 | f1d537d5d65e35b13e8929467284e7e0d8ac7c0633ed19d2a307f662722b7bd2509a89657c38fe 200 | e54c8d7e3c0c4db4df450d25b3f4d4fa5899f378be49c21f93624e6bc11c5f5c97d4ffa64064a8 201 | 3e05e5935fb74f9e63d1d1cf8923b357534894385381aa60d19c8aa1fec031ba80799c697a50d2 202 | 3b2651cb86a11e804ee903bec6ead7bd74c4feafec6adbc09ea6ae309215f49f792adcb7cea125 203 | 5869d104ee3491db071aee8f1eadb1df60c7625a5e5911bd048f5f88942467b96a475a1eb3a0c3 204 | 3e3cc937ac7de3950462318057f849859f407fb7b5f13c037fd478deed67dae809f4a9eede07fe 205 | 74beaaa65f7cb2aed43b17bec3d1ab946fad2f6035e19c4e9df361ae04a7dced9fa22d0e0333d5 206 | 2c774296dd6170f0905663ed29e4daed0451c01dcc92b830efb3d2b269073a673a6d38277bca88 207 | cc44318d1ff71122c833d99b31566dbc0e4378ed4cb95975f2f1dce283b52cb755b0e1fc0a10e7 208 | cfdfbd292b8300131fd3d7ce446bbbcc77188ffc8da3e90f4d4b7f5535b4041597a8a5773046c5 209 | 9e0683a0ba547a63071f7ede5efa316c23f4e44b0a51a26dc6f3e4490bab0fa4877428174fd491 210 | 58a860357134b1298759bb539664f84b58611aed9b31d3af68a88727de7a50d76d6bb80bbbf8ba 211 | 17b50970567b5bb51ff02eff5c6b33e5bf517eb215e0c7bae53e0944a0a28cf9426a776be4db6b 212 | 6b4d2f9c131443e8d403a7e8af3db7e22d4df75abe07285ee2468175078747212a09ebe0926cde 213 | c9e4778d8f6ee7424e14428c0d79b30c67a9c8ac5a19be9f7879aef69c081ba1e5180949810700 214 | f0e511c78c68302ab8203979684dae93a41788ab210e6c87446f761f4daef0ebdd6d62ec5458db 215 | 8dc82944000653ed61d24ecfe5cb132dbb1c997be3c8efbff6afe8f197a4ff1ad2d7b62344fb81 216 | 03a1fe6f84fb56f55e1969c4bbf61c916f5fc7aaf919d620ed2c25d576c44c6a5588348ad03577 217 | 231fcfb0409a86c871b46442d4b2d62c0000000000000000000000000000000000000000000000000000000000000000 218 | 0000000000000000000000000000000000000000000000000000000000000000 219 | 0000000000000000000000000000000000000000000000000000000000000000 220 | 0000000000000000000000000000000000000000000000000000000000000000 221 | 0000000000000000000000000000000000000000000000000000000000000000 222 | 0000000000000000000000000000000000000000000000000000000000000000 223 | 0000000000000000000000000000000000000000000000000000000000000000 224 | 0000000000000000000000000000000000000000000000000000000000000000 225 | cleartomark 226 | %%EndResource 227 | %%EndSetup 228 | %%Page: 1 1 229 | %%BeginPageSetup 230 | %%PageBoundingBox: 0 1 305 107 231 | %%EndPageSetup 232 | q 0 1 305 106 rectclip 233 | 1 0 0 -1 0 108 cm q 234 | 0 g 235 | 0.75 w 236 | 0 J 237 | 0 j 238 | [ 2.25 2.25] 0 d 239 | 10 M q 1 0 0 1 0 0 cm 240 | 240.375 52.125 m 169.875 8.625 l S Q 241 | [ 2.25 2.25] 0 d 242 | q 1 0 0 1 0 0 cm 243 | 18.375 58.875 m 169.875 8.625 l S Q 244 | 0.8 g 245 | 17.684 66.758 m 71.578 66.758 l 82.223 79.824 l 7.223 79.824 l h 246 | 19.598 38.574 m 69.473 38.574 l 70.949 66.434 l 18.121 66.434 l h 247 | 19.598 38.574 m f 248 | 0.407843 0.505882 0.701961 rg 249 | 1.425 w 250 | 1 j 251 | [] 0.0 d 252 | q 1 0 0 1 0 0 cm 253 | 17.684 66.758 m 71.578 66.758 l 82.223 79.824 l 7.223 79.824 l h 254 | 19.598 38.574 m 69.473 38.574 l 70.949 66.434 l 18.121 66.434 l h 255 | 19.598 38.574 m S Q 256 | q 1 0 0 1 0 0 cm 257 | 19.965 70.004 m 70.215 70.004 l 16.641 73.574 m 73.539 73.574 l 31.051 258 | 76.793 m 56.91 76.793 l S Q 259 | 1 g 260 | 22.035 41.078 m 67.109 41.078 l 68.363 63.93 l 20.707 63.93 l h 261 | 22.035 41.078 m f 262 | 0 0.4 0.8 rg 263 | BT 264 | 12 0 0 -12 31.913907 96.697495 Tm 265 | /f-0-0 1 Tf 266 | [(st)-7(a1)]TJ 267 | ET 268 | 0.4 g 269 | 1.5 w 270 | 0 j 271 | q 1 0 0 1 0 0 cm 272 | 0.75 105.285 m 161.625 105.375 l S Q 273 | q 1 0 0 1 0 0 cm 274 | 0.75 1.785 m 161.625 1.875 l S Q 275 | q 1 0 0 1 0 0 cm 276 | 160.875 106.074 m 160.875 1.074 l S Q 277 | q 1 0 0 1 0 0 cm 278 | 1.125 106.074 m 1.125 1.074 l S Q 279 | 0 0.4 0.8 rg 280 | BT 281 | 10.5 0 0 -10.5 5.25 13.305 Tm 282 | /f-1-0 1 Tf 283 | [(Vir)-32(tual \(Mi)-3(nine)7(t-)19(WiFi\))]TJ 284 | ET 285 | 0.8 g 286 | 132.066 50.73 m 199.629 50.73 l 201.688 50.73 203.348 52.391 203.348 54.449 287 | c 203.348 65.625 l 203.348 67.688 201.688 69.344 199.629 69.344 c 132.066 288 | 69.344 l 130.008 69.344 128.348 67.688 128.348 65.625 c 128.348 54.449 289 | l 128.348 52.391 130.008 50.73 132.066 50.73 c h 290 | 132.066 50.73 m f 291 | 0.407843 0.505882 0.701961 rg 292 | 1.4925 w 293 | 4 M q 1 0 0 1 0 0 cm 294 | 132.066 50.73 m 199.629 50.73 l 201.688 50.73 203.348 52.391 203.348 54.449 295 | c 203.348 65.625 l 203.348 67.688 201.688 69.344 199.629 69.344 c 132.066 296 | 69.344 l 130.008 69.344 128.348 67.688 128.348 65.625 c 128.348 54.449 297 | l 128.348 52.391 130.008 50.73 132.066 50.73 c h 298 | 132.066 50.73 m S Q 299 | 0.8 g 300 | 135.848 69.344 60 2.98 re f 301 | 0.407843 0.505882 0.701961 rg 302 | q 1 0 0 1 0 0 cm 303 | 135.848 69.344 60 2.98 re S Q 304 | 0.8 g 305 | 178.598 50.73 m 178.973 17.211 l 179.176 16.906 179.527 16.719 179.91 16.719 306 | c 180.285 16.719 180.637 16.906 180.848 17.211 c 181.223 50.73 l h 307 | 178.598 50.73 m f 308 | 0.407843 0.505882 0.701961 rg 309 | 10 M q 1 0 0 1 0 0 cm 310 | 178.598 50.73 m 178.973 17.211 l 179.176 16.906 179.527 16.719 179.91 16.719 311 | c 180.285 16.719 180.637 16.906 180.848 17.211 c 181.223 50.73 l h 312 | 178.598 50.73 m S Q 313 | 1 g 314 | 200.625 60.375 m 200.625 63.664 197.938 66.332 194.625 66.332 c 191.312 315 | 66.332 188.625 63.664 188.625 60.375 c 188.625 57.086 191.312 54.418 194.625 316 | 54.418 c 197.938 54.418 200.625 57.086 200.625 60.375 c h 317 | 200.625 60.375 m f 318 | 186.375 54.375 m 186.375 55.199 185.703 55.863 184.875 55.863 c 184.047 319 | 55.863 183.375 55.199 183.375 54.375 c 183.375 53.551 184.047 52.887 184.875 320 | 52.887 c 185.703 52.887 186.375 53.551 186.375 54.375 c h 321 | 186.375 54.375 m f 322 | 186.375 65.625 m 186.375 66.449 185.703 67.113 184.875 67.113 c 184.047 323 | 67.113 183.375 66.449 183.375 65.625 c 183.375 64.801 184.047 64.137 184.875 324 | 64.137 c 185.703 64.137 186.375 64.801 186.375 65.625 c h 325 | 186.375 65.625 m f 326 | 186.375 60.375 m 186.375 61.199 185.703 61.863 184.875 61.863 c 184.047 327 | 61.863 183.375 61.199 183.375 60.375 c 183.375 59.551 184.047 58.887 184.875 328 | 58.887 c 185.703 58.887 186.375 59.551 186.375 60.375 c h 329 | 186.375 60.375 m f 330 | 178.875 63.375 m 178.875 64.199 178.203 64.863 177.375 64.863 c 176.547 331 | 64.863 175.875 64.199 175.875 63.375 c 175.875 62.551 176.547 61.887 177.375 332 | 61.887 c 178.203 61.887 178.875 62.551 178.875 63.375 c h 333 | 178.875 63.375 m f 334 | 172.875 63.375 m 172.875 64.199 172.203 64.863 171.375 64.863 c 170.547 335 | 64.863 169.875 64.199 169.875 63.375 c 169.875 62.551 170.547 61.887 171.375 336 | 61.887 c 172.203 61.887 172.875 62.551 172.875 63.375 c h 337 | 172.875 63.375 m f 338 | 166.125 63.375 m 166.125 64.199 165.453 64.863 164.625 64.863 c 163.797 339 | 64.863 163.125 64.199 163.125 63.375 c 163.125 62.551 163.797 61.887 164.625 340 | 61.887 c 165.453 61.887 166.125 62.551 166.125 63.375 c h 341 | 166.125 63.375 m f 342 | 160.125 63.375 m 160.125 64.199 159.453 64.863 158.625 64.863 c 157.797 343 | 64.863 157.125 64.199 157.125 63.375 c 157.125 62.551 157.797 61.887 158.625 344 | 61.887 c 159.453 61.887 160.125 62.551 160.125 63.375 c h 345 | 160.125 63.375 m f 346 | 153.375 63.375 m 153.375 64.199 152.703 64.863 151.875 64.863 c 151.047 347 | 64.863 150.375 64.199 150.375 63.375 c 150.375 62.551 151.047 61.887 151.875 348 | 61.887 c 152.703 61.887 153.375 62.551 153.375 63.375 c h 349 | 153.375 63.375 m f 350 | 147.375 63.375 m 147.375 64.199 146.703 64.863 145.875 64.863 c 145.047 351 | 64.863 144.375 64.199 144.375 63.375 c 144.375 62.551 145.047 61.887 145.875 352 | 61.887 c 146.703 61.887 147.375 62.551 147.375 63.375 c h 353 | 147.375 63.375 m f 354 | 140.625 63.375 m 140.625 64.199 139.953 64.863 139.125 64.863 c 138.297 355 | 64.863 137.625 64.199 137.625 63.375 c 137.625 62.551 138.297 61.887 139.125 356 | 61.887 c 139.953 61.887 140.625 62.551 140.625 63.375 c h 357 | 140.625 63.375 m f 358 | 134.625 63.375 m 134.625 64.199 133.953 64.863 133.125 64.863 c 132.297 359 | 64.863 131.625 64.199 131.625 63.375 c 131.625 62.551 132.297 61.887 133.125 360 | 61.887 c 133.953 61.887 134.625 62.551 134.625 63.375 c h 361 | 134.625 63.375 m f 362 | 130.598 55.941 m 135.098 55.941 l 135.098 58.176 l 133.598 58.176 l 133.598 363 | 58.922 l 132.098 58.922 l 132.098 58.176 l 130.598 58.176 l h 364 | 136.973 55.941 m 141.473 55.941 l 141.473 58.176 l 139.973 58.176 l 139.973 365 | 58.922 l 138.473 58.922 l 138.473 58.176 l 136.973 58.176 l h 366 | 143.348 55.941 m 147.848 55.941 l 147.848 58.176 l 146.348 58.176 l 146.348 367 | 58.922 l 144.848 58.922 l 144.848 58.176 l 143.348 58.176 l h 368 | 149.723 55.941 m 154.223 55.941 l 154.223 58.176 l 152.723 58.176 l 152.723 369 | 58.922 l 151.223 58.922 l 151.223 58.176 l 149.723 58.176 l h 370 | 156.098 55.941 m 160.598 55.941 l 160.598 58.176 l 159.098 58.176 l 159.098 371 | 58.922 l 157.598 58.922 l 157.598 58.176 l 156.098 58.176 l h 372 | 162.473 55.941 m 166.973 55.941 l 166.973 58.176 l 165.473 58.176 l 165.473 373 | 58.922 l 163.973 58.922 l 163.973 58.176 l 162.473 58.176 l h 374 | 168.848 55.941 m 173.348 55.941 l 173.348 58.176 l 171.848 58.176 l 171.848 375 | 58.922 l 170.348 58.922 l 170.348 58.176 l 168.848 58.176 l h 376 | 175.223 55.941 m 179.723 55.941 l 179.723 58.176 l 178.223 58.176 l 178.223 377 | 58.922 l 176.723 58.922 l 176.723 58.176 l 175.223 58.176 l h 378 | 175.223 55.941 m f 379 | 0.407843 0.505882 0.701961 rg 380 | q 1 0 0 1 0 0 cm 381 | 195.848 58.547 m 197.348 60.039 l 195.848 61.531 l 190.598 60.039 m 197.348 382 | 60.039 l S Q 383 | 0.8 g 384 | 183.699 12.969 m 185.34 15.457 185.34 18.676 183.699 21.164 c 182.574 20.414 385 | l 183.824 18.465 183.824 15.969 182.574 14.012 c h 386 | 186.699 10.734 m 189.691 14.52 189.691 19.836 186.699 23.617 c 185.574 387 | 22.727 l 188.121 19.492 188.121 14.941 185.574 11.707 c h 388 | 189.699 8.574 m 194.219 13.434 194.219 20.926 189.699 25.777 c 188.574 389 | 24.887 l 192.711 20.574 192.711 13.785 188.574 9.473 c h 390 | 176.199 12.969 m 174.547 15.457 174.547 18.676 176.199 21.164 c 177.324 391 | 20.414 l 176.07 18.465 176.07 15.969 177.324 14.012 c h 392 | 173.199 10.734 m 170.168 14.527 170.168 19.898 173.199 23.691 c 174.324 393 | 22.648 l 171.848 19.449 171.848 14.984 174.324 11.773 c h 394 | 170.199 8.648 m 165.711 13.492 165.711 20.941 170.199 25.777 c 171.324 395 | 24.887 l 167.227 20.578 167.227 13.852 171.324 9.547 c h 396 | 170.199 8.648 m f 397 | 0.407843 0.505882 0.701961 rg 398 | q 1 0 0 1 0 0 cm 399 | 183.699 12.969 m 185.34 15.457 185.34 18.676 183.699 21.164 c 182.574 20.414 400 | l 183.824 18.465 183.824 15.969 182.574 14.012 c h 401 | 186.699 10.734 m 189.691 14.52 189.691 19.836 186.699 23.617 c 185.574 402 | 22.727 l 188.121 19.492 188.121 14.941 185.574 11.707 c h 403 | 189.699 8.574 m 194.219 13.434 194.219 20.926 189.699 25.777 c 188.574 404 | 24.887 l 192.711 20.574 192.711 13.785 188.574 9.473 c h 405 | 176.199 12.969 m 174.547 15.457 174.547 18.676 176.199 21.164 c 177.324 406 | 20.414 l 176.07 18.465 176.07 15.969 177.324 14.012 c h 407 | 173.199 10.734 m 170.168 14.527 170.168 19.898 173.199 23.691 c 174.324 408 | 22.648 l 171.848 19.449 171.848 14.984 174.324 11.773 c h 409 | 170.199 8.648 m 165.711 13.492 165.711 20.941 170.199 25.777 c 171.324 410 | 24.887 l 167.227 20.578 167.227 13.852 171.324 9.547 c h 411 | 170.199 8.648 m S Q 412 | 1 g 413 | 154.875 78.375 22.5 15 re f 414 | 0 0.4 0.8 rg 415 | BT 416 | 12 0 0 -12 154.749847 89.1975 Tm 417 | /f-0-0 1 Tf 418 | (ap1)Tj 419 | ET 420 | 0.8 g 421 | 239.309 59.301 m 293.203 59.301 l 303.848 72.375 l 228.848 72.375 l h 422 | 241.223 31.125 m 291.098 31.125 l 292.574 58.98 l 239.746 58.98 l h 423 | 241.223 31.125 m f 424 | 0.407843 0.505882 0.701961 rg 425 | 1.425 w 426 | 1 j 427 | q 1 0 0 1 0 0 cm 428 | 239.309 59.301 m 293.203 59.301 l 303.848 72.375 l 228.848 72.375 l h 429 | 241.223 31.125 m 291.098 31.125 l 292.574 58.98 l 239.746 58.98 l h 430 | 241.223 31.125 m S Q 431 | q 1 0 0 1 0 0 cm 432 | 241.59 62.551 m 291.84 62.551 l 238.266 66.129 m 295.164 66.129 l 252.676 433 | 69.336 m 278.535 69.336 l S Q 434 | 1 g 435 | 243.66 33.621 m 288.734 33.621 l 289.988 56.484 l 242.332 56.484 l h 436 | 243.66 33.621 m f 437 | 0 0.4 0.8 rg 438 | BT 439 | 12 0 0 -12 247.679535 89.25 Tm 440 | /f-0-0 1 Tf 441 | [(lap)6(t)8(op)]TJ 442 | 10.5 0 0 -10.5 237 12.6075 Tm 443 | /f-1-0 1 Tf 444 | [(Ph)18(y)10(sical)]TJ 445 | ET 446 | Q Q 447 | showpage 448 | %%Trailer 449 | end 450 | %%EOF 451 | --------------------------------------------------------------------------------