Advertisement
Guest User

ccna5ccnp

a guest
May 31st, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 2.96 KB | None | 0 0
  1. -----ospf-----
  2. //Router:
  3.     enable
  4.     conf t
  5.    
  6.     router ospf xx //xx=id, musi być takie samo na wszystkich routerach
  7.         router-id 1.1.1.1 //najczęściej R1= same jedynki, R2= same dwójki itp, itd, etc...
  8.         clear ip ospf process //po zmianie id, trzeba to jebnąć
  9.        
  10.         //alternatywne ustawianie ID przy użyciu loopbacka:
  11.         int loopback 0
  12.             ip address 1.1.1.1 255.255.255.255 //tak, maska taka dziwna
  13.            
  14.         network 172.16.1.0 0.0.0.255 area 0 //odwrotność 'prawdziwej maski sieci' [maska blankietowa]
  15.         //odwracanie maski: 255.255.255.255-'prawdziwa maska'
  16.         network 172.16.1.1 0.0.0.0 area 0 //adres interfejsu- nie trzeba liczyć maski
  17.        
  18.         passive interface g0/0
  19.         passive interface default //wszystkie wyłącza w trzy diabły
  20.        
  21.         auto-cost reference-bandwidth 100 //default
  22.        
  23.         //bzdury:
  24.         show ip ospf neighbor
  25.         show ip protocols
  26.         show ip ospf
  27.         show ip ospf interface brief/port
  28.        
  29.    
  30. -----rip------
  31. //Router:
  32.     enable
  33.     conf t
  34.  
  35.     router rip
  36.         version 2
  37.         no auto-summary
  38.        
  39.         passive-interface g0/0 //nie wysyłaj przez ten interfejs
  40.             passive-interface default //wyłącza wszystkie w pizdu
  41.             no passive interface s0/0 //włącza interfejs
  42.            
  43.         network 192.168.0.0 //zera zamiast maski. takie *
  44.        
  45.         ip route 0.0.0.0 0.0.0.0 s0/0/1 192.168.0.1
  46.             //domyślna trasa statyczna- interfejs wyjściowy - adres następnego przeskoku
  47.        
  48. ///RIPng- ipv6
  49.  
  50.     enable
  51.     conf t
  52.    
  53.     ipv6 unicast-routing
  54.    
  55.     int g0/0
  56.         ipv6 rip RIP-AS enable //RIP-AS= domain name
  57.    
  58.     int s0/0/0
  59.         ipv6 rip RIP-AS enable
  60.         no shutdown //bo mogę        
  61.        
  62.         ipv6 rip domain-name default-information originate
  63.          //informuje router, że jest on źródłem informacji o trasie domyślnej i ma propagować informację
  64.          //o domyślnej trasie statycznej w swoich aktualizacjach RIPng, wysyłanych z tego interfejsu.
  65.  
  66. ------vlan------
  67.  
  68. Router: //Do routera dopieprzyć WIC-1T
  69. int fa 0/0 //do switcha
  70.     no shutdown
  71. int fa 0/0.xx //do switcha, gdzie xx=vlan id
  72.     encapsulation dotQ xx
  73.     ip address 192.168.0.1 255.255.255.0
  74.     no shutdown
  75. int serial 0/0
  76.     ip address 192.168.4.1 //taki będzie default gateway na switchu
  77.     no shutdown
  78. conf terminal
  79.     ip route 0.0.0.0 0.0.0.0 serial 0/0
  80. interface Serial0/0  //można z gui
  81.     clock rate 64000    //j.w.
  82.  
  83. Switch:
  84.  
  85. int fa 0/3 //routera
  86.     switchport mode trunk
  87.     no shutdown
  88.  
  89. int fa 0/1 //komp
  90.     switchport mode access
  91.     switchport access vlan xx
  92.     no shutdown
  93.    
  94. conf terminal
  95.     ip default-gateway 192.168.4.1
  96.    
  97. int vlan 10
  98.     ip address 192.168.0.2 255.255.255.0
  99.     no shutdown
  100. int vlan 20
  101.     ip address 192.168.1.2 255.255.255.0
  102.     no shutdown
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement