I più comuni comandi Cisco

Qui sotto ho riassunto dai miei appunti i più comuni comandi Cisco per la configurazione di diversi protocolli di routing.
Ovviamente non hanno un ordine logico, sono elencati casualmente e non sono correlati da dovute spiegazioni, sono solamente un promemoria per chi, come me, ogni tanto ha bisogno di qualche rinfrescata.



RIP 
----------------------------------------------------------------------------------------
R(config)#router rip
R(config-router)#version 2
R(config-router)#no auto-summary
R(config-router)#network
R(config-router)#passive passive-interface interface
R(config-router)#default-information originate

R(config-router)#redistribute static
R(config)#show ip route rip
R(config)#show ip protocols

RIPNG 
----------------------------------------------------------------------------------------
R(config)#ipv6 unicast-routing
R(config)#ipv6 router rip PIPPO
R(config-if)#ipv6 rip PIPPO enable
R(config-if)#ipv6 rip PIPPO default-information originate

EIGRP for IPv4 
----------------------------------------------------------------------------------------
R(config)#router eigrp <as>
R(config-router)#eigrp router-id 1.1.1.1
R(config-router)#no auto-summary
R(config-router)#network <net> [wild]
R(config-router)#passive-interface <int>
R(config-router)#redistribute static
R(config-if)#ip summary-address eigrp <as> <sum> <mask>
R#show ip route [eigrp]
R#show ip protocols
R#show ip eigrp interface [detail]
R#show ip eigrp neighbor
R#show ip eigrp topology [all-links]

EIGRP fine tuning 
----------------------------------------------------------------------------------------
R(config-if)#ip bandwidth-percent eigrp <as> <%>
R(config-if)#ip hello-interval eigrp <as> <sec>
R(config-if)#ip hold-time eigrp <as> <sec>
R(config-router)#maximum-paths <paths>
R(config-router)#variance <variance>

EIGRP for IPv6 
----------------------------------------------------------------------------------------
R(config)#ipv6 unicast-routing
R(config)#ipv6 router eigrp <as>
R(config-router)#eigrp router-id 1.1.1.1
R(config-router)#passive-interface <int>
R(config-router)#redistribute static
R(config-router)#no shutdown
R(config-if)#ipv6 eigrp <as>
EIGRP metric
R(config-if)#bandwidth <bw in kbps>
R(config-if)#delay <delay in tens of microsec>
R(config-router)#metric weights tos k1 k2 k3 k4 k5


OSPFv2  
----------------------------------------------------------------------------------------
R(config)#router ospf <pid>
R(config-router)#router-id 1.1.1.1
R(config-router)#auto-cost reference-bandwidth <bw in Mbps>
R(config-router)#network <net> <wild> <area>
R(config-router)#passive-interface <int>
R(config-router)#default-information originate
R(config-if)#ip ospf cost <cost>
R(config-if)#ip ospf priority <priority>
R#show ip route [ospf]
R#show ip protocols
R#show ip ospf
R#show ip ospf interface [brief]
R#show ip ospf neighbor
R#show ip ospf database
R#clear ip ospf process

OSPF fine tuning  
----------------------------------------------------------------------------------------
R(config-if)#ip ospf hello-interval <sec>
R(config-if)#ip ospf dead-interval <sec>

OSPFv3  
----------------------------------------------------------------------------------------
R(config)#ipv6 unicast-routing
R(config)#ipv6 router ospf <pid>
R(config-router)#router-id 1.1.1.1
R(config-router)#auto-cost reference-bandwidth <bw>
R(config-router)#passive-interface <int>
R(config-router)#default-information originate
R(config-router)#redistribute static subnets
R(config-if)#ipv6 ospf <pid> <area>

OSPF inter-area summarization  
----------------------------------------------------------------------------------------
R(config-router)#area <area> range <sum> <mask>

 ACL  
----------------------------------------------------------------------------------------
R(config)#access-list <aclid> remark <comment>
R(config)#access-list <aclid> <permit|deny> <sip> <sport> <dip> <dport> [established]
R(config)#ip access-list <standard|extended> <aclname>
R(config-nacl)#remark <commento>
R(config-nacl)#<permit|deny> <sip> <sport> <dip> <dport> [established]
R(config-if)#ip access-group <aclid|aclname> <in|out>
R(config-line)#access-class <aclid|aclname> <in|out>
R#show access-list
R#show ip interface <int>
R#clear access-list counters

Static NAT 
----------------------------------------------------------------------------------------



Port Forwarding 
----------------------------------------------------------------------------------------


R(config)# ip nat inside source static tcp 192.168.10.254 80 209.165.200.225 8080

(Identifies interface serial 0/0/0 as an inside NAT interface)

R(config)# interface Serial0/0/0
R(config-if)# ip nat inside

(Identifies interface serial 0/1/0 as the outside NAT interface)

R(config)# interface Serial0/1/0
R(config-if)# ip nat outside



Dynamic NAT
----------------------------------------------------------------------------------------



PAT Nat Overload con Interfaccia Singolo IP  
----------------------------------------------------------------------------------------


PAT Nat Overload Pool 
----------------------------------------------------------------------------------------


     Lato PPP Server 
----------------------------------------------------------------------------------------




      Lato PPP Client  
----------------------------------------------------------------------------------------

BGP 
----------------------------------------------------------------------------------------
router bgp 65001
bgp log-neighbor-changes
neighbor 209.165.200.2 remote-as 65000
network 0.0.0.0
end
show ip bgp
show ip bgp summary
Show ip route

IP SLA 
----------------------------------------------------------------------------------------
track 1 ip sla 1 reachability
 delay down 45 up 90

track 2 ip sla 2 reachability
 delay down 45 up 90

ip sla 1
 icmp-echo 1.1.1.1 source-interface S0/0
 timeout 1500
 frequency 3
ip sla schedule 1 life forever start-time now

ip sla 2
 icmp-echo 2.2.2.2 source-interface S0/1
 timeout 1500
 frequency 3
ip sla schedule 2 life forever start-time now

ip route 0.0.0.0 0.0.0.0 10.0.0.1 track 1
ip route 0.0.0.0 0.0.0.0 10.0.1.1 10 track 2

sh track
show ip sla configuration
show ip sla configuration
show ip sla statistics
---------------------------------------------------------------------------

Commenti

Post popolari in questo blog

How to collect diagnostic information when a failed ESXi Host upgrade

Piccoli spiragli