Advertisement
n0g3

Untitled

Dec 6th, 2016
6,835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.34 KB | None | 0 0
  1. > user
  2. # priv
  3. > -> en / enable -> #
  4. # config t
  5.  
  6. hostname / host
  7.  
  8. int / interface
  9. gi gigabit eth
  10. ip add / ip address
  11. no shutdown / no sh
  12. copy running-config startup-conf / cop ru sta
  13.  
  14. ir. protokolllok
  15.  
  16. RIP(v1,v2), OSPF(v2.v3), EIGRP,IGRP
  17. router ospf + process id / pl.: 1
  18. net = network ip-k + hellyetesítő maszk / alhláó inverze area 0 pl. net 192.168.1.2 0.0.0.255 area 0
  19. // passive-interface gi0/1 interface kikapcs asszem
  20.  
  21. line con 0 / konzol config
  22. pass/password
  23. login // mód definiálás
  24. en // enable secret erősebb titkositas // pass is lehet//
  25. sh / show
  26. run / running-config
  27.  
  28. service password-encryption
  29. username / admin secret cisco --> login local
  30.  
  31. távoli , line vty 0 4 // 0 to 4 // login local
  32.  
  33. ---
  34.  
  35. vlan / virtual lann
  36.  
  37. trunk
  38.  
  39. sw mo acc = switch mode acess // switchben
  40. sw acc vlan ...(vlan azonosító) = switchport acess vlan ... ezt arra a portra rakni a switchen amerre kimegy a hálózat
  41. sw mo tru = switchport mode trunk ezt azokra a switch portokra amik trönkön viszik a router portját (router felől vagy tovább másik switchez)
  42.  
  43. routerben , no ip add adott interfacera ha esetleg volt ip rendelve
  44. int gi0/1.5 itt az ötös az al interface - alinterface ugyanaz mint vlan szama ami hozza van
  45. enc / encapsulation enc dot1q 5 -- valami izé ami kell nemtom
  46. uj alhálok ospf ben rogziteni
  47.  
  48. ///
  49.  
  50. sh ip ro /route
  51.  
  52. no ip domain-lookup
  53.  
  54. sh vlan
  55.  
  56.  
  57. ///
  58.  
  59. port sec
  60.  
  61. sw mo acc
  62.  
  63. sw port-security
  64.  
  65. sw port sec maximum
  66.  
  67. sw port sec violation // restrict a syslog
  68.  
  69. ///
  70.  
  71.  
  72. ntp server ...
  73.  
  74. show ntp status
  75.  
  76. ntp update-calendar
  77.  
  78. service timestamps log datetime msec
  79.  
  80. logging host ...
  81.  
  82.  
  83. ssh//
  84.  
  85. conf t ip domain-name ccnasecurity.com
  86. username SSHadmin privilege 15 secret ciscosshpa55
  87. line vty 0 4
  88. login local
  89. transport input ssh
  90. crypto key zeroize rsa
  91. crypto key generate rsa
  92. 1024 - mod
  93. ip ssh time-out 90
  94. exec-timeout 2
  95.  
  96.  
  97.  
  98.  
  99. 1111 1111
  100.  
  101. 0000 0000 0000 0000 0000 0000 0000 0000 0000 (eddig 28 van) 1111
  102. 1111 1111 1111 1111 1111 1111 1111 1111 1111 0000
  103.  
  104. 192.168.200.0 címek 127 ig 00111111
  105.  
  106. 11000000.10101000.11001000.00000000
  107.  
  108.  
  109.  
  110. 0011 1111 64 32 16 8 6 4 2 1 == /26 ez lesz 63 az inverz 255-63 == 192
  111.  
  112.  
  113. access list
  114.  
  115. permit ip from to
  116.  
  117. deny ip from to
  118.  
  119. icmp ping
  120.  
  121.  
  122. Név megadása: Megjegyzés:
  123. Router> felhasználói üzemmód
  124. Router> ena átlépés privilegizált üzemmódba
  125. Router# priv. üzemmód
  126. Router# conf t átlépés globális konfigurációs üzemmódba
  127. Router(config)# globális konfigurációs üzemmód
  128. Router(config)# hostname Name router átnevezése Name-re
  129. Name(config)#
  130.  
  131. Serial port konfigurálása: Megjegyzés:
  132. Name#conf t belépés glob. konf. módba
  133. Name(config)#int interface belépés interfész konfig. módba
  134. pl: Name(config)#int s0/0/1
  135. Name(config-if)#ip addr ip_address
  136. alh_maszk
  137. IP cím porthoz rendelése
  138. pl: Name(config-if)#ip addr 10.1.1.1
  139. 255.255.255.252
  140. Name(config-if)# clockrate ertek Órajel beállítása (kimenő órajel)
  141. pl: Name(config-if)# clockrate 64000
  142. Name(config-if)# no shutdown port aktivizálása
  143. Name(config-if)# encapsulation hdlc felsőszintű adatkapcsolatvezérlés
  144. Name(config-if)# no keepalive ?
  145. Name(config-if)# no loop ?
  146.  
  147. Ethernet port konfigurálása: Megjegyzés:
  148. Name(config)# int interface belépés interfész konfig. módba
  149. pl: Name(config)#int f1/0
  150. Name(config-if)# ip addr ip_addr
  151. subnet_mask
  152. ip cím hozzárendelése a porthoz
  153. pl: Name(config-if)# ip addr 192.168.2.1
  154. 255.255.255.0
  155. Name(config-if)# no shutdown port aktivizálása
  156. DNS lookup kikapcsolása: Megjegyzés:
  157. Name(config)# no ip domain-lookup Kikapcsolja a DNS fordítást (elgépelésnél jó)
  158.  
  159.  
  160. Statikus útvonal beállítása (3
  161. routeren):
  162. Megjegyzés:
  163. R1(config)# ip route 0.0.0.0 0.0.0.0
  164. interface
  165. Minden forgalmat az „interface” interfész felé
  166. továbbít (soros port: S2/0)
  167. R2(config)# ip route 192.168.1.0
  168. 255.255.255.0 s2/0
  169. az ip cím felé címzett adatokat az s2/0-n küldi
  170. tovább
  171. R2(config)# ip route 192.168.3.0
  172. 255.255.255.0 s3/0
  173. az ip cím felé címzett adatokat az s3/0-n küldi
  174. tovább
  175. R3(config)# ip route 0.0.0.0 0.0.0.0
  176. interface
  177. Minden forgalmat az „interface” interfész felé
  178. továbbít (soros port: S3/0)
  179.  
  180. Futó konfig. mentése az indulóba Megyjegyzés:
  181. Name# copy run start Aktív konfiguráció mentése a start-up konfig-ba
  182.  
  183.  
  184. Jelszó beállítások: Megjegyzés:
  185. Name(config)# security passwords minlength
  186. 10
  187. minimum jelszó-hossz beállítása
  188. Name(config)# enable secret
  189. cisco12345
  190. enable jelszó (ena módba lépéskor kéri)
  191. Console port konfigurálása: Megjegyzés:
  192. Name(config)# line con 0 line mód, consol port konfig -> belépés
  193. Name(config-line)# password
  194. ciscoconpass
  195.  
  196.  
  197. konzolporton való belépés jelszava
  198. Name(config-line)# exec-timeout 5 0 munkamenet ideje (5 perc)
  199. Name(config-line)# login bejelentkezésre vonatkoznak ezek a beállítások
  200. Name(config-line)# logging synchronous hibás bejelentkezéskor értesítés érkezik (?)
  201. * Name(config-line)# login local helyileg definiált felhasználókat és jelszavakat
  202. használja (helyi autentikáció)
  203.  
  204.  
  205. Aux port konfigurálása: Megjegyzés:
  206. Name(config)# line aux 0 line mód, aux port konfig -> belépés
  207. Name(config)# password ciscoauxpass jelszó megadása
  208. Name(config)# exec-timeout 5 0 munkamenet ideje
  209. Name(config)# login bejelentkezéskor
  210.  
  211. Telnet port konfigurációja: Megjegyzés:
  212. Name(config)# line vty 0 4 line mód, telnet port konfig -> belépés
  213. Name(config)# password ciscovtypass jelszó megadása
  214. Name(config)# exec-timeout munkamenet ideje
  215. Name(config)# login bejelentkezéskor
  216. Name(config)# service passwordencryption
  217. consol, vty, aux jelszavak titkosítása
  218.  
  219.  
  220. AAA: Megjegyzés:
  221. Name(config)# aaa new-model AAA engedélyezése
  222. Name(config)# aaa authentication login
  223. default local none
  224. alapértelmezett authentikációs lista
  225. létrehozása
  226. Name(config)# aaa authentication login
  227.  
  228.  
  229. TELNET_LINES local
  230. egyedi authetnikációs lista alkamazása a
  231. Telnetes hozzáféréshez a routeren. ha nincs
  232. felhasználónév az adatbázisban, akkor a Telnet
  233. elérhetetlen. kell egy speciális lista, ami nem
  234. az alapértelmezett: TELNET_L
  235.  
  236. ----------------
  237.  
  238.  
  239. R1, R2, R3:
  240.  
  241. en
  242. conf t
  243. hostname ...
  244.  
  245. R1:
  246.  
  247. int gi0/1
  248. no shut
  249. int gi0/1.5
  250. enc dot1q 5
  251. ip add 192.168.6.1 255.255.255.0
  252. int gi0/1.10
  253. enc dot1q 10
  254. ip add 192.168.7.1 255.255.255.0
  255. exit
  256. int s0/0/0
  257. ip add 192.168.2.1 255.255.255.0
  258. no shut
  259. exit
  260. int gi0/2
  261. ip add 192.168.1.1 255.255.255.0
  262. no shut
  263. router ospf 1
  264. net 192.168.1.0 0.0.0.255 area 0
  265. net 192.168.2.0 0.0.0.255 area 0
  266. net 192.168.6.0 0.0.0.255 area 0
  267. net 192.168.7.0 0.0.0.255 area 0
  268. passive gi0/1
  269.  
  270. R2:
  271.  
  272. int s0/0/0
  273. ip add 192.168.2.2 255.255.255.0
  274. clock rate 128000
  275. no shut
  276. exit
  277. int gi0/1
  278. ip add 192.168.5.1 255.255.255.0
  279. no shut
  280. exit
  281. int gi0/2
  282. ip add 192.168.3.2 255.255.255.0
  283. no shut
  284. exit
  285. router ospf 1
  286. net 192.168.2.0 0.0.0.255 area 0
  287. net 192.168.3.0 0.0.0.255 area 0
  288. net 192.168.5.0 0.0.0.255 area 0
  289. passive gi0/1
  290. exit
  291.  
  292. R3:
  293.  
  294. int gi0/0
  295. ip add 192.168.1.2 255.255.255.0
  296. no shut
  297. exit
  298. int gi0/2
  299. ip add 192.168.3.1 255.255.255.0
  300. no shut
  301. exit
  302. int gi0/1
  303. ip add 192.168.4.1 255.255.255.0
  304. no shut
  305. exit
  306. router ospf 1
  307. net 192.168.1.0 0.0.0.255 area 0
  308. net 192.168.3.0 0.0.0.255 area 0
  309. net 192.168.4.0 0.0.0.255 area 0
  310. passive gi0/1
  311. exit
  312.  
  313. S1,S2:
  314.  
  315. vlan 5
  316. exit
  317. vlan 10
  318. exit
  319.  
  320. S1:
  321.  
  322. int range gi0/1-2
  323. sw mo tru
  324. exit
  325. int fa0/1
  326. sw mo acc
  327. sw acc vlan 5
  328. exit
  329.  
  330. S2:
  331.  
  332. int gi0/1
  333. sw mo tru
  334. exit
  335. int fa0/1
  336. sw mo acc
  337. sw acc vlan 10
  338. exit
  339.  
  340. R1:
  341.  
  342. line vty 0 4
  343. login local
  344. transport input ssh
  345. exit
  346.  
  347. ip domain cisco.com
  348. crypto key generate rsa
  349.  
  350. username ssh secret sshpa55
  351.  
  352. ip ssh version 2
  353.  
  354. enable secret enpa55
  355.  
  356. access-list 1 permit host 192.168.6.10
  357.  
  358. line vty 0 4
  359. access-class 1 in
  360. exit
  361.  
  362. S2:
  363.  
  364. int fa0/1
  365. switchport port-security
  366. switchport port-security maximum 1
  367. switchport port-security max-address sticky
  368. switchport port-security violation shutdown
  369.  
  370. exit
  371. int range fa0/2-24
  372. shut
  373. exit
  374. int gi0/2
  375. shut
  376. exit
  377.  
  378. R3:
  379.  
  380. access-list 100 permit icmp 192.168.7.0 0.0.0.255 192.168.4.0 0.0.0.255
  381. access-list 100 deny icmp any any
  382. access-list 100 permit ip any any
  383.  
  384. int gi0/1
  385. ip access-group 100 out
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. --------------
  395.  
  396.  
  397. kapcsolók logikai felbontása virtuális LAN-okra
  398.  
  399.  
  400. en
  401. conf t
  402.  
  403. R1, S1, S2
  404.  
  405. hostname
  406.  
  407. S1,S2:
  408.  
  409. vlan 10
  410. exit
  411. vlan 20
  412. exit
  413. vlan 30
  414. exit
  415.  
  416. S2:
  417.  
  418. int gi0/2 vagy fa0/23
  419. switchport mode trunk
  420. exit
  421.  
  422. S1:
  423.  
  424. int range gi0/1-2
  425. switchport mode trunk
  426. exit
  427.  
  428. vagy
  429.  
  430. int range fa0/23-24
  431. switchport mode trunk
  432. exit
  433.  
  434. S2:
  435.  
  436. int fa0/1
  437. switchport mode access
  438. switchport access vlan 10
  439. exit
  440. int fa0/2
  441. switchport mode access
  442. switchport access vlan 20
  443. exit
  444. int fa0/3
  445. switchport mode access
  446. switchport access vlan 30
  447. exit
  448.  
  449. int gi0/1 vagy int fa0/1
  450. no shut
  451.  
  452. int gi0/1.10 vagy int fa0/1.10
  453. encapsulation dot1q 10
  454. ip address 192.168.1.1 255.255.255.0
  455.  
  456. int gi0/1.20 vagy int fa0/1.20
  457. encapsulation dot1q 20
  458. ip address 192.168.2.1 255.255.255.0
  459.  
  460. int gi0/1.30 vagy int fa0/1.30
  461. encapsulation dot1q 30
  462. ip address 192.168.3.1 255.255.255.0
  463.  
  464. R1:
  465.  
  466. int gi0/1.40 vagy int fa0/1.40
  467. encapsulation dot1q 40
  468. ip address 192.168.4.1 255.255.255.0
  469.  
  470. S1, S2:
  471.  
  472. vlan 40
  473. exit
  474. int vlan 40
  475. ip address 192.168.4.10(11) 255.255.255.0
  476. no shut
  477. exit
  478. ip default-gateway 192.168.4.1
  479.  
  480. R1, S1, S2:
  481.  
  482. service timestamps log datetime msec
  483. logging host 192.168.2.10
  484.  
  485. R1, S1, S2:
  486.  
  487. ssh config
  488.  
  489. username admin secret admin12345
  490. enable secret admin12345
  491. ip domain name cisco.com
  492. crypto key generate rsa (2048)
  493. ip ssh version 2
  494. line vty 0 4
  495. login local
  496. transport input ssh
  497. exit
  498.  
  499. R1:
  500.  
  501. access-list 100 permit tcp 192.168.3.0 0.0.0.255 host 192.168.2.10 eq 80
  502. access-list 100 permit tcp 192.168.3.0 0.0.0.255 host 192.168.2.10 eq 21
  503. access-list 100 deny tcp any host 192.168.2.10 eq 80
  504. access-list 100 deny tcp any host 192.168.2.10 eq 21
  505. access-list 100 permit ip any any
  506.  
  507. int gi0/1.20 vagy int fa0/1.20
  508. ip access-group 100 out
  509. exit
  510.  
  511.  
  512. ----------------
  513.  
  514. R1:
  515.  
  516. int fa0/1
  517. ip add 192.168.1.1 255.255.255.0
  518. no shut
  519. exit
  520.  
  521. int s0/0/0
  522. ip add 10.1.1.1 255.255.255.252
  523. clock rate 128000
  524. no shut
  525. exit
  526.  
  527. R2:
  528.  
  529. int s0/0/0
  530. ip add 10.1.1.2 255.255.255.252
  531. no shut
  532.  
  533. int s0/0/1
  534. ip add 10.2.2.2 255.255.255.252
  535. clock rate 128000
  536. no shut
  537.  
  538. R3:
  539.  
  540. int fa0/1
  541. ip add 192.168.3.1 255.255.255.0
  542. no shut
  543. exit
  544.  
  545. int s0/0/1
  546. ip add 10.2.2.1 255.255.255.252
  547. no shut
  548.  
  549.  
  550. R1, R2, R3:
  551.  
  552. no ip domain-lookup
  553.  
  554. R1:
  555.  
  556. router ospf 101
  557. net 192.168.1.0 0.0.0.255 area 0
  558. net 10.1.1.0 0.0.0.3 area 0
  559. exit
  560.  
  561. R2:
  562.  
  563. router ospf 101
  564. net 10.1.1.0 0.0.0.3 area 0
  565. net 10.2.2.0 0.0.0.3 area 0
  566. exit
  567.  
  568. R3:
  569.  
  570. router ospf 101
  571. net 10.2.2.0 0.0.0.3 area 0
  572. net 192.168.3.0 0.0.0.255 area 0
  573. exit
  574.  
  575. PC1:
  576.  
  577. 192.168.1.3
  578. 255.255.255.0
  579. 192.168.1.1
  580.  
  581. PC2:
  582.  
  583. 192.168.3.3
  584. 255.255.255.0
  585. 192.168.3.1
  586.  
  587. R1, R3:
  588.  
  589. security passwords min-length 10
  590.  
  591. enable secret cisco12345
  592.  
  593. username admin01 secret admin01pass
  594.  
  595. logging synchronous
  596.  
  597. R1, R3:
  598.  
  599. ip domain name ccnasecurity.com
  600. crypto key generate rsa
  601. ip ssh version 2
  602.  
  603. line vty 0 4
  604. login local
  605. transport input ssh
  606. exit
  607.  
  608. R1,R3:
  609.  
  610. crypto isakmp enable
  611. crypto isakmp policy 10
  612.  
  613.  
  614. R1, R2, R3:
  615.  
  616. service password-encryption
  617.  
  618. username admin02 secret admin02pass
  619.  
  620. line con 0
  621. login local
  622. exit
  623.  
  624. R2:
  625.  
  626. username r2admin secret r2adminpass
  627. ip domain name ccnasecurity.com
  628. crypto key generate rsa (1024)
  629. ip ssh version 2
  630. line vty 0 4
  631. login local
  632. transport input ssh
  633. exit
  634.  
  635.  
  636. R1, R2, R3:
  637.  
  638. logging host 192.168.1.3
  639. service timestamps log datetime msec
  640.  
  641. R1,R3:
  642.  
  643. int fa0/0
  644. shut
  645. no shut
  646.  
  647. R1, R2, R3:
  648. line con 0
  649. logging sync
  650. exit
  651.  
  652. S1, S2:
  653.  
  654. int fa0/6 vagy int fa0/18
  655. switchport mode access
  656. switchport port-security
  657. switchport port-security mac-address sticky
  658. switchport port-security maximum 1
  659. switchport port-security violation shutdown
  660. exit
  661.  
  662. S1, S2:
  663.  
  664. int range gi0/1-2
  665. shut
  666. exit
  667.  
  668. S1:
  669.  
  670. int range fa0/1-4
  671. shut
  672. exit
  673.  
  674. int range fa0/7-24
  675. shut
  676. exit
  677.  
  678. S2:
  679.  
  680. int range fa0/1-4
  681. shut
  682. exit
  683. int range fa0/6-17
  684. shut
  685. exit
  686. int range fa0/19-24
  687. shut
  688. exit
  689.  
  690. S1, S2:
  691.  
  692. username swadmin01 secret swadmin01pass
  693. ip domain name ccnasecurity.com
  694. crypto key generate rsa (1024)
  695. ip ssh version 2
  696.  
  697. line vty 0 4
  698. login local
  699. transport input ssh
  700. exit
  701.  
  702. int vlan 1
  703. ip add 192.168.1.2 255.255.255.0 vagy 192.168.3.2 255.255.255.0
  704. no shut
  705.  
  706. ip default-gateway 192.168.1.1 vagy 192.168.3.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement