Cisco: Guia de Comandos
Um guia para cada modo de configuração: basta usar o comando show parser dump. Digite show parser dump <mode>, usando um dos modos de configuração (ex., interface, router…):
RouterA#sh parser dump router Mode Name :router 0 no protocol shutdown 0 no mpls ldp sync 0 no mpls ldp autoconfig area <address> 0 no mpls ldp autoconfig area <0-4294967295> 0 no mpls ldp autoconfig 0 no mpls traffic-eng router-id 0 no mpls traffic-eng multicast-intact 0 no mpls traffic-eng area <0-4294967295> 0 no mpls traffic-eng scanner interval 0 no mpls traffic-eng scanner max-flash 0 no mpls traffic-eng scanner 0 no mpls traffic-eng level-1 0 no mpls traffic-eng level-2 0 no mpls traffic-eng 0 no max-area-addresses 0 no net <address> 0 no is-type ...
Para um maior detalhe, use o parametro extend.
fonte: http://www.ciscoblog.com/archives/2008/06/cisco_command_r.html
Cisco: show ip bgp com expressões regulares (regexp)
Para exibir rotas BGP com filtro, basta utilizar o comando show ip bgp regexp [regexp].
Exemplo (exibindo apenas as rotas originadas no AS local):
RouterA#sh ip bgp regexp ^$ BGP table version is 33242, local router ID is 10.1.0.134 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i10.50.16.0/24 10.5.0.98 0 100 0 i *> 0.0.0.0 0 32768 i *> 10.1.0.134/32 0.0.0.0 0 32768 i *>i10.1.0.135/32 10.5.0.98 0 100 0 i
Mais exemplos aqui.
Cálculo com endereço IP no Excel – parte 2
Para conversão da notação em barra (/23) para máscara (255.255.254.0), copie e cole o bloco abaixo no Excel na célula A1:
192.168.32.160/23 Mask Calculation =RIGHT(A1;LEN(A1)-FIND("/";A1)) =2^32-(2^(32-A3)) =DEC2HEX(A4;8 ) =MID($A$5;1;2) =MID($A$5;3;2) =MID($A$5;5;2) =MID($A$5;7;2) =HEX2DEC(A6)&"."&HEX2DEC(A7)&"."&HEX2DEC(A8)&"."&HEX2DEC(A9) =-HEX2DEC(A6)-1 =-HEX2DEC(A7)-1 =-HEX2DEC(A8)-1 =-HEX2DEC(A9)-1 =RIGHT(DEC2HEX(A11);2) =RIGHT(DEC2HEX(A12);2) =RIGHT(DEC2HEX(A13);2) =RIGHT(DEC2HEX(A14);2) =HEX2DEC(A15)&"."&HEX2DEC(A16)&"."&HEX2DEC(A17)&"."&HEX2DEC(A18 )
A célula A10 mostrará a máscara correspondente e a célula 19, o wildcard.
Cisco: Key Sequences for Command Edit and Recall
Keyboard Command | What You Get |
Up arrow or Ctrl-p | This displays the most recently used command. If it is pressed again, the next most recent command appears until the history buffer is exhausted. (The p stands for previous.) |
Down arrow or Ctrl-n | If you have gone too far back into the history buffer, these keys will go forward to the more recently typed commands. (The n is for next.) Left arrow or Ctrl-b This moves the cursor backward in the currently displayed command without deleting characters. (The b stands for back.) |
Right arrow or Ctrl-f | This moves the cursor forward in the currently displayed command without deleting characters. (The f stands for forward.) |
Backspace | This moves the cursor backward in the currently displayed command, deleting characters. |
Ctrl-a | This moves the cursor directly to the first character of the currently displayed command. |
Ctrl-e | This moves the cursor directly to the end of the currently displayed command. |
Esc-b | This moves the cursor back one word in the currently displayed command. |
Esc-f | This moves the cursor forward one word in the currently displayed command. |
Ctrl-r | This creates a new command prompt, followed by all the characters typed since the last command prompt was written. This is particularly useful if system messages confuse the screen and it is unclear what you have typed so far. |
Bash prompt – PS1
Para mostrar o diretório atual e o hostname no prompt do bash:
bash$ PS1='\r\n[\w]\r\n\h> ' [~/dir/abc] thehost>
Cisco: Envio de rotas através de tunel – GRE + OSPF
ROUTER A – Anuncia a rota default:
! interface Tunnel0 description Tunnel to RouterB ip unnumbered Loopback0 ip tcp adjust-mss 1436 ip ospf 50 area 0 tunnel source Loopback0 tunnel destination 10.2.2.2 ! router ospf 50 router-id 10.1.1.1 log-adjacency-changes passive-interface default no passive-interface Tunnel0 default-information originate !
ROUTER B – Recebe a rota defaul via ospf:
! interface Tunnel0 description Tunnel to RouterB ip unnumbered Loopback0 ip tcp adjust-mss 1436 ip ospf 50 area 0 tunnel source Loopback0 tunnel destination 10.1.1.1 ! router ospf 50 router-id 10.2.2.2 log-adjacency-changes passive-interface default no passive-interface Tunnel0 distance 1 !
Distance = 1 faz com que a rota default recebida por este processo OSPF tenha preferência sobre qualquer outro protocolo.
Não foi usado o comando ‘keepalive’ no tunel pois há o keepalive (hello packets) do ospf.
leave a comment