Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.76 KB | None | 0 0
  1. lab4
  2.  
  3. R1
  4. ip link set dev eth1 up
  5. ip link set dev eth2 up
  6. ip addr add 10.0.1.1/24 dev eth0
  7. ip addr add 10.0.200.1/24 dev eth1
  8. ip addr add 192.168.0.1/24 dev eth2
  9. sysctl -w net.ipv4.ip_forward=1
  10.  
  11. R2
  12. ip link set dev eth1 up
  13. ip link set dev eth2 up
  14. ip addr add 10.0.1.2/24 dev eth0
  15. ip addr add 10.0.30.1/24 dev eth1
  16. ip addr add 172.16.0.1/24 dev eth2
  17. sysctl -w net.ipv4.ip_forward=1
  18.  
  19. R3
  20. ip link set dev eth1 up
  21. ip link set dev eth2 up
  22. ip addr add 10.0.200.2/24 dev eth0
  23. ip addr add 10.0.30.2/24 dev eth1
  24. ip addr add 192.168.100.1/24 dev eth2
  25. sysctl -w net.ipv4.ip_forward=1
  26.  
  27. A1
  28. ip addr add 192.168.0.2/24 dev eth0
  29. ip route add default via 192.168.0.1
  30.  
  31. B1
  32. ip addr add 172.16.0.2/24 dev eth0
  33. ip route add default via 172.16.0.1
  34.  
  35. C1
  36. ip addr add 192.168.100.3/24 dev eth0
  37. ip route add default via 192.168.100.1
  38.  
  39. R1:
  40. /etc/init.d/quagga start
  41. telnet localhost zebra
  42. sumienniewykonamtocwiczenie
  43. enable
  44. jestemskupionynacwiczeniu
  45. show ip route
  46. ALT + F2
  47. telnet localhost ospfd
  48. uczesienabledach
  49. enable
  50. rozumiemcorobie
  51. ALT + F3
  52. tcpdump -i eth1
  53. ALT + F2
  54. configure terminal
  55. router ospf
  56. redistribute connected
  57. network 192.168.0.0/24 area 0.0.0.0
  58. network 10.0.1.0/24 area 0.0.0.0
  59. network 10.0.200.0/24 area 0.0.0.0
  60. CTRL + Z
  61. write
  62.  
  63. R2:
  64. /etc/init.d/quagga start
  65. telnet localhost zebra
  66. sumienniewykonamtocwiczenie
  67. enable
  68. jestemskupionynacwiczeniu
  69. show ip route
  70. ALT + F2
  71. telnet localhost ospfd
  72. uczesienabledach
  73. enable
  74. rozumiemcorobie
  75. ALT + F3
  76. tcpdump -i eth0
  77. ALT + F2
  78. configure terminal
  79. router ospf
  80. redistribute connected
  81. network 172.16.0.0/24 area 0.0.0.0
  82. network 10.0.1.0/24 area 0.0.0.0
  83. network 10.0.30.0/24 area 0.0.0.0
  84. CTRL + Z
  85. write
  86.  
  87. R3:
  88. /etc/init.d/quagga start
  89. telnet localhost zebra
  90. sumienniewykonamtocwiczenie
  91. enable
  92. jestemskupionynacwiczeniu
  93. show ip route
  94. ALT + F2
  95. telnet localhost ospfd
  96. uczesienabledach
  97. enable
  98. rozumiemcorobie
  99. ALT + F3
  100. tcpdump -i eth1
  101. ALT + F2
  102. configure terminal
  103. router ospf
  104. redistribute connected
  105. network 192.168.100.0/24 area 0.0.0.0
  106. network 10.0.30.0/24 area 0.0.0.0
  107. network 10.0.200.0/24 area 0.0.0.0
  108. CTRL + Z
  109. write
  110.  
  111. lab5
  112.  
  113. R
  114. ifconfig eth2 up
  115. ifconfig eth3 up
  116. sysctl -w net.ipv4.ip_forward=1
  117. ip a add 192.168.56.102/24 dev eth3
  118. ip a add 192.168.0.1/24 dev eth2
  119. A
  120. ip a add 192.168.0.2/24 dev eth0
  121. ip route add default via 192.168.0.1
  122. W
  123. route add 192.168.0.0 mask 255.255.255.0 192.168.56.102
  124. Zmianę ip olać. Jesli trzeba będzie zmienić z linii komend:
  125. netsh int ip set address "VirtualBox Host-Only Network" static 192.168.56.101 255.255.255.0
  126. ipconfig /renew
  127. Zad8
  128. R: tcpdump -i eth2
  129. W: ping 192.168.0.2
  130. Zad9
  131. R: man tc
  132. Zad10
  133. R: tc qdisc add dev eth0 root netem delay 1000ms
  134. W: ping 192.168.0.2
  135. Zad11
  136. R: tcpdump -i eth2
  137. W: ping 192.168.0.2
  138. Zad12
  139. R: tc qdisc change dev eth0 root netem delay 0ms
  140. Zad13
  141. R: iperf -h
  142. Zad14
  143. A: iperf -s
  144. Zad15
  145. W: Odpalamy wireshark i podziwiamy
  146. Zad16
  147. W: odpalamy jperf, łączymy z 192.168.0.2
  148. Zad17
  149. R: tcpdump -i eth2
  150. odczytujemy win z przechwyconego segmentu tcp wysłanego przez A.
  151. Uwaga! Ta wartość nie koniecznie musi pokazywać ilości bajtów, które zmieszczą się jeszcze w buforze. Przy nawiązywaniu połączenia A wysyła do W segment (tak samo w drugą stronę) TCP z ustawionymi znacznikami SYN, ACK i w opcjach jest takie coś jak wscale, które oznacza przesunięcie. U mnie akurat wynosiło ono 2, więc jesli szerokośc okna ma 1400, to będzie to 1400*2^2=5600 bajtów
  152. Zad18
  153. SYN od W
  154. SYN, ACK od A
  155. ACK od W
  156. Zad19
  157. W: Wireshark->statistics->flow graph->tcp flow
  158. Zad20
  159. FIN, ACK od W
  160. ACK od A
  161. FIN, ACK od A
  162. ACK od W
  163. Zad21
  164. Zad22
  165.  
  166. lab7
  167. Zad 0 - Konfiguracja wirtualkui
  168. Włączamy TYLKO jedna karte sieciowa w trybie bridged. dzieki temu nie musimy konfigurować sieci.
  169. ZAd 2
  170. apt-get install wu-ftpd
  171. zad 3,4
  172. /etc/wu-ftpd
  173. /usr/share/doc/wu-ftpd
  174.  
  175. zad 6
  176. dpkg-reconfigure wu-ftpd ;włączamy logowanie anonimowe reszta bez zmian
  177. ip addr show ; Sprawdzamy adres IP naszej wirtualki iłączymy się przez fileZilla. User:
  178. anonymous Pass: tomasz@bilski.pl
  179. zad 7
  180. mkdir /home/ftp/incoming
  181. chmod 0777 /home/ftp/incoming
  182. chown ftp:daemon /home/ftp/incoming
  183. nano /etc/wu-ftpd/ftpaccess
  184. zmieniamy w tych liniach "no" na "yes"
  185. # Some permissions for the anonymous FTP user.
  186. # All the following default to "yes" for everybody
  187. rename no anonymous # rename permission?
  188. delete no anonymous # delete permission?
  189. overwrite no anonymous # overwrite permission?
  190. chmod no anonymous # chmod permission?
  191. umask no anonymous # umask permission?
  192. i dopisujemy linię:
  193. upload /home/ftp /incoming yes ftp daemon 0777
  194. i zapisujemy plik/etc/init.d/wu-ftpd restart
  195.  
  196. zad8 Odbieramy poprzednio nadane uprawnienia
  197. chmod no anonymous # chmod permission?
  198. umask no anonymous # umask permission?
  199. zad9
  200. adduser dupa
  201. zad 10
  202. update-rc.d -f wu-ftpd remove
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement