2ict Ccna3 Cmd

Embed Size (px)

Citation preview

  • 2ICT CCNA3 Commandos!!Over deze samenvatting!!Een beschrijving van een commando staat aangeduid als Dit is een beschrijving of commentaar.!Als er in een commando parameters moeten meegegeven worden zal dit aangeduid zijn als !. Ik heb mijn best gedaan om alles correct over te nemen. Helaas is niemand perfect ;-). Als je nog een foutje ziet staan dan mag je dit altijd laten weten via facebook. Hopelijk heb je hier wat aan!!!Hans Ott!!Router configuratie commandos!!Router#configure terminal Router(config)#hostname (config)#enable secret class (config)#line console 0 (config-line)#password cisco (config-line)#login (config-line)#logging synchronous (config-line)#line vty 0 15 (config-line)#password cisco (config-line)#login (config-line)#exit (config)#service password-encryption Encrypt all passwords (config)#banner motd $ Authorized Access Only! $ !TIP: Disable altijd dns lookup.! Translating "wrong-command"...domain server (255.255.255.255) > Router(config)#no ip domain-lookup !Router show commandos!!show ip protocols ! Displays information about the routing protocols configured. (OSPF etc)!!show ip route ! Displays routing table information, including: routing codes, known networks, administrative ! distance and metrics, how routes were learned, next hop, static routes, and default routes.!!show ip ospf neighbor ! Displays information about OSPF neighbors that have been learned, including the Router ! ID of the neighbor, priority, the state (Full = adjacency has been formed), the IP address, ! and the local interface that learned of the neighbor.!!!!

  • show interfaces ! Displays interfaces with line (protocol) status, bandwidth, delay, reliability, encapsulation, ! duplex, and I/O statistics.!!show ip interfaces ! Displays interface information, including: protocol status, the IP address, if a helper address ! is configured, and whether an ACL is enabled on the interface.!!show ip interface brief ! Displays all interfaces with IP addressing information and interface and line protocols !! status.!!show protocols ! Displays information about the routed protocol that is enabled, and the protocol status of !! interfaces.!!show cdp neighbors ! This command displays information on directly connected devices including Device ID, the ! local interface the device is connected to, capability (R = router, S = switch), the platform, ! and Port ID of the remote device. !!Spanning Tree Protocol!!TIP: Als een switch al geconfigureerd is, wis dan de configuraties en de vlan database.! switch#delete flash:vlan.dat switch#erase startup-config switch#reload !Configureer alle poorten die verbinding maken met een andere switch als trunks. Maak gebruik van het interface range commando of configureer de interfaces individueel:!Switch(Config-if-range)#switchport trunk encapsulation dot1q Switch(Config-if-range)#switchport mode trunk !Configureer de poorten waar de PCs zijn aangesloten als access poorten in de juiste vlan. Zorg er eerst voor dat deze vlan bestaat:!Switch(config)#vlan 10 Switch(config-vlan)#name user !Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 !Controleer de werking van spanning tree op een switch:!Switch#show spanning-tree !Controleer de werking van spanning tree op een switch (specifieke vlan)!Switch#show spanning-tree vlan 10 !Standaard werken de switches met PVST+, waarbij per VLAN een spanning tree wordt opgebouwd. Pas de bridge priority van n van de switches (die geen root bridge is) aan:!Switch(config)#spanning-tree vlan 10 priority !

  • Maak een switch root bridge of secondary voor een specifieke vlan:!Switch(config)#spanning-tree vlan 10 root primary root secondary !Port priority instellen op een poort van een switch voor STP:!Switch(config-if)#spanning-tree vlan 10 port-priority !!!Cost aanpassen van een poort op een switch voor STP:!Switch(config-if)#spanning-tree vlan 10 cost !TIP: Spanning Tree Protocol debuggen:!Switch#debug spanning-tree events Switch#no debug spanning-tree events !Rapid PVST+ modus inschakelen op switch:!Switch(config)#spanning-tree mode rapid-pvst !STP uitschakelen op een poort van een switch:!Switch(config-if)#spanning-tree portfast Uitschakelen Switch(config-if)#spanning-tree portfast default Inschakelen > Ongetwijfeld heb je tijdens eerdere labos al gemerkt dat je na het aansluiten van een PC op een switch, je ongeveer een dertigtal seconden moet wachten vooraleer deze verbinding groen licht krijgt en gebruikt kan worden. Ondertussen is duidelijk dat dit is omwille van STP.!Het is evenwel een vervelende situatie dat het netwerk een dergelijke lange tijd onbruikbaar is als een nieuwe connectie wordt gemaakt. Bovendien is het een overbodige tijd op de poorten waar PCs worden aangesloten omdat die geen lussen zullen introduceren en onder normale omstandigheden ook geen invloed hebben op het STP proces.!!Verhinderen dat de poorten van een switch onder abnormale omstandigheden (bijvoorbeeld bij een aanval via het STP proces) toch BPDUs zouden versturen:!Switch(config-if)#spanning-tree bpduguard enable Uitschakelen Switch(config-if)#spanning-tree bpduguard default Inschakelen !Configuratie van PAgP of LACP:!Switch(Config-if-range)#channel-group mode !Debuggen van PAgP of LACP:!Switch#show run interface Switch#show interfaces switchport Switch#show etherchannel summary !HSRP & GLBP (First Hop Redundancy)!!Configureer HSRP op een router:!Router(config)#interface Router(config-if)#standby 1 ip Router(config-if)#standby 1 proirity Router(config-if)#standby 1 preempt !

  • HSRP uitschakelen!Router(config-if)#no standby 1 !HSRP debuggen:!Router#show standby Router#show standby brief !Configureer GLBP op een router:!Router(config)#interface Router(config-if)#glbp 1 ip Router(config-if)#glbp 1 preempt Router(config-if)#glbp 1 priority Router(config-if)#glbp 1 load-balancing round-robin !GLBP debuggen:!Router#show glbp brief !Configuratie OSPFv2!!Configureer OSPF op een router:!Router(config)#router ospf Router(config-router)#network area Router(config-router)#router-id Router(config-router)#auto-cost reference-bandwidth Router(config-router)#passive-interface Router(config-router)#default-information originate !Extra:!Router(config)#interface Router(config-if)#ip ospf priority Router(config-if)#bandwidth Router(config-if)#ip ospf cost !Debug:!Router#show ip ospf interface Router#show controllers serial Router(config)#clear ip ospf process Router#show ip ospf database Router#show ip route ospf !Authenticatie via message-digest of authentication key!Router(config-router)#area 0 authentication message-digest Router(config)#interface Router(config-if)#ip ospf message-digest-key 1 md5 !Router(config-router)#area 0 authentication message-digest uitschakelen Router(config)#interface Router(config-if)#ip ospf authentication-key

  • !!!Summary route (multiarea)!Router(config)#router ospf Router(config)#area range !EIGRP!!EIGRP configureren:!Router(config)#router eigrp autonomous system number Router(config-router)#network Router(config-router)#router-id Router(config-router)#passive-interface Router(config-router)#redistribute static Router(config-router)#auto-summary Router(config-router)#no auto-summary !Extra EIGRP commandos voor een specifieke interface!R(config)#interface R(config-if)#ip summary-address eigrp R(config-if)#ip bandwidth-percent eigrp R(config-if)#ip hello-interval eigrp R(config-if)#ip hold-time eigrp !Debuggen:!Router#show ip route eigrp Router#show ip eigrp neighbors Router#show ip eigrp topology Router#show ip eigrp interfaces detail Router#show ip protocols !Authenticatie!Router(config)#key chain Router(config-keychain)#key Router(config-keychain-key)#key-string !R(config)#interface R(config-if)#ip authentication key-chain eigrp R(config-if)#ip authentication mode eigrp md5