Antirux » Zápisky z CISCOZápisky z CISCO
[Pátek 28.8.09, 22:57]Zápisky z hodin abych měl vše po ruce, když jsem si zrovna nemohl vzpomenout jak ten příkaz přesně je
Nastavení IP
#ip addr add 192.168.1.5/24 dev eth0
Směrovací tabulka
#ip route
Smazání defaultní cesty
#ip route del [default | 0.0.0.0/0]
Přidání cesty
#ip route add default via 182.16.255.254
Restart démona
#/etc/rc.d/init.d/nscd restart
nebo
#/etc/init.d/network restart
ARP tabulka
| Co | win | linux
|
|---|
| show arp table | arp -a | ip neigh
|
| delete table | arp -d * | ip neigh flush dev eth0
|
| static IP with MAC | arp -s IP MAC | ip neigh add IP lladdr MAC dev eth0
|
show mac-address-table
Připojení na router
linux> minicom -s
Nastavení cesty
R1#enable
R1#configure terminal // = conf t
R1(config)# ip route (adr kam) (maska) (adr kudy/přes zařízení=např. serial)
Ovládání routeru
Vymazání nastavení
R1>enable
R1#erase startup-config
R1#reload
Základní nastavení
R1>enable
R1#conf t
R1(config)#hostname R1
R1(config)#no ip domain-lookup
R1(config)#enable secret class //přístup k privilegovanému EXEC
R1(config)#banner motd #Zprava: Neautorizovaný přístup zakázán!#
Logging synchronous
R1(config)#line console 0
R1(config-line)#logging synchronous
Zapnutí hesla pro login z terminálu
R1>enable
R1#conf t
R1(config)#line console 0
R1(config-line)#password HESLO
R1(config-line)#login
R1(config-line)#exit
R1(config)#line vty 0 4
R1(config-line)#password HESLO
R1(config-line)#login
R1(config-line)#exit
R1(config)#
Nastavení interfaců
R1(config)#interface fastetherne 0/0
R1(config-if)#ip address 192.… 255.…
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 0/0/0
R1(config-if)#ip address 192.… 255.…
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#end
R1#
Uložení nastavení
R1#copy running-config startup-config
Základní informace
R1#show ip route //routovací tabulky
R1#show ip interface brief (protocol down/up atd.)
R1#show interfaces
R1#show controllers serial 0/0/0 (zjištění DCE/DTE)
Debug
R1#debug ip routing
Undebug
R1#undebug ip routing
=
R1#undebug all
Description
R1(config-if)#description connect to R2
R1#show interfaces description
RIPv1
R1(config)#router rip
R1(config-router)#network 192.168.1.0
R1(config-router)#passive-interface fa 0/0
R1(config-router)#end
R1#debug ip rip
R1#show ip protocols
R1(config)#ip orute 0.0.0.0 0.0.0.0 serial 0/0/1
R1(config)#router rip
R1(config-router)#default-information originate //RIP posílá i default static
RIPv2
R1(config)#router rip
R1(config-router)#verstion 2
R1(config-router)#no auto-summary //aby byl classless
EIGRP
R1(config)#router eigrp 1
R1(config-router)#network 172.16.0.0 0.0.0.3
R1#show ip eigrp neighbours
OSPF
R1(config)#router eigrp 1 //1 = ID
R1(config-router)#network 172.16.1.16 0.0.0.15 area 0
ID
R1#show ip protocols
R1#show ip ospf
R1#show ip ospf interface
Change ID
R1(config)#router ospf 1
R1(config-router)#router-id 10.4.4.4
restart or
R1#clear ip ospf process
Lepší rozlišení rychlostí
R1(config-router)#auto-cost reference-bandwidth 10000