Nicolas Dassy 2327
Transcription
Nicolas Dassy 2327
Carnet reprenant les principales commandes permettant de configurer les switchs et routeurs CISCO. Nicolas Dassy 2327 Basé sur les notes de Nicolas Daems Je ne garanti pas l’exactitude de « toutes » les commandes ! Switch Note - - L’objectif 1 est de fixer une IP sur un switch, qui à priori ne connait pas ce type d’adressage. Cela permettra de pourvoir y accéder par telnet ou encore le pinger de sorte à pouvoir travailler à distance. L’objectif 2 est de s’aider d’un switch pour réaliserdu monitoring. On entend par cela, rediriger tous le traffic vers un port de monitoring. Base 1 Switch(config)# interface VLAN 1 Switch(config-if)# ip address 192.168.1.253 255.255.255.0 Switch(config-if)# exit Switch(config)# ip default-gateway 192.168.1.254 (ip du routeur) Switch (config)# line vty 0 4 Switch (config-line)# password MonPassword Switch (config-line)# login Base 2 http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/13ew/configuration/guide/span.html#wp1024634 Switch(config)# monitor session 1 source interface fa0/5 Switch(config)# monitor session 1 destination interface fa0/10 !--Filtre Switch(config)# monitor session 1 filter vlan 1-5 , 9 (1 à 5 plus le 9) Debug Switch# show mac-address-table (table de switching – PORT/MAC) Les VLANS Note - - L’objectif, de façon simpliste, est de permettre sur un même switch de segmenter un réseau. Ceux-ci pourront communiquer via des trunks qui sont les liens qui existent entre un switch et un autre switch ou encore avec un routeur de sorte à pouvoir faire des communications inter-vlan. Les vlans diminuent les domaines de broadcast mais ne diminue pas les domaines de collision. 192.168.x.x/24 1.1 1.2 VLAN 2 E0/2 VLAN 2 E0/1 E0/0.2 1.254 E0/12 E0/0.3 2.254 E0/3 2.1 VLAN 3 Création des VLANS Switch# vlan database Switch(vlan)# vlan 2 name VLAN2 Switch(vlan)# vlan 3 name VLAN3 Switch(vlan)# exit (obligatoire pour prendre les commandes ci-dessus) Assocation des ports aux VLANS Switch(config)# interface fastethernet 0/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access VLAN 2 Switch(config)# interface fastethernet 0/2 Switch(config-if)# switchport mode access Switch(config-if)# switchport access VLAN 2 Switch(config)# interface fastethernet 0/3 Switch(config-if)# switchport mode access Switch(config-if)# switchport access VLAN 3 Création d’un Trunk Switch(config)#interface fastethernet 0/12 Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk encapsulation dot1Q Switch(config-if)#switchport trunk allowed VLAN add 2 Switch(config-if)#switchport trunk allowed VLAN add 3 Communication Inter-VLAN Router(config)# interface Ethernet 0/0 Router(config-if)# no shutdown Router(config)# interface Ethernet 0/0.1 Router(config-subif)# encapsulation dot1Q 2 (2 est l’ ID du VLAN2) Router(config-subif)# ip address 192.168.1.254 255.255.255.0 Router(config-subif)# no shutdown Router(config)# interface Ethernet 0/0.2 Router(config-subif)# encapsulation dot1Q 3 (3 est l’ ID du VLAN3) Router(config-subif)# ip address 192.168.2.254 255.255.255.0 Router(config-subif)# no shutdown Debug Switch#show vlan Switch#show vlan brief VTP (VLAN Trunking Protocol) http://www.cisco.com/en/US/tech/tk389/tk689/technologies_configuration_example09186a0080890607.shtml Note - L’objectif est d’échanger la configuration courante concernant les VLANS sur un switch avec d’autres switch. Switch#vlan database Switch(vlan)# vtp domain NomDomaine (il doit être le même sur tous les switchs) Switch(vlan)#vtp [server | client | transparent ] (type de device VTP) Debug Switch# show vtp status Switch# show vtp counters IPv6 Note - Il est important de ne pas oublier qu’en IPV6, une interface peut avoir différentes adresse selon la portée. R2 travaillera uniquement en IPV4. Il se contentera donc de faire simplement du RIP ou autre pour connaitre les autres réseaux. R1 et R3 sont des routeurs DUAL-STACK dans le sens ou il gère la pile IPV4 et IPV6. Configuration IPv6 sur Windows http://livre.point6.net/index.php/Windows C:\> IPv6 install C:\> IPv6 if (découvrir les interfaces de carte réseau IPv6) C:\> netsh interface ipv6 set address ”7” 2001::1 (7 est le numéro de l’interface) C:\> netsh interface ipv6 add route ::/0 7 2001::2 (ajouter une rout par défaut) C:\> IPv6 rt (afficher la table de routage) C:\> ping ::1 (ping sur localhost) Configuration IPv6 sur Linux http://mirrors.deepspace6.net/Linux+IPv6-HOWTO-fr/chapter-configuration-address.html http://www.docmirror.net/fr/linux/howto/networking/Linux+IPv6-HOWTO/ SU ifconfig (découvrir les interfaces et leur adresse) ifconfig eth0 inet6[add,del] 2001::1/48 route –A inet6 [add,del] default gw 2004::2 (ajouter une rout par défaut) route –A inet6 (afficher la table de routage) ping6 ::1 (ping sur localhost) Debug Router#ping ipv6 2001::1/48 Router#sh ipv6 route (afficher la table de routage) Configuration du tunnel R1(config)# interface Ethernet 0/0 R1(config-if)# ipv6 address 2001::2/64 R1(config-if)# no shutdown R1(config)# interface serial 0/0 R1(config-if)# ip address 10.0.0.2 R1(config-if)# no shutdown R1(config)# ipv6 unicast-routing (activation IPV6) R1(config)# interface tunnel 0 R1(config-if)# ipv6 address 2005::1/48 R1(config-if)# tunnel source 10.0.0.2 R1(config-if)# tunnel destination 11.0.0.2 R1(config-if)# tunnel mode ipv6ip R1(config)# ipv6 route ::/0 2005::2/48 ( route par défaut IPV6) R1(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.1 (route par défaut IPV4) R3(config)# interface Ethernet 0/0 R3(config-if)# ipv6 address 2002::2/64 R3(config-if)# no shutdown R3(config)# interface serial 0/0 R3(config-if)# ip address 11.0.0.2 R3(config-if)# no shutdown R3(config)# ipv6 unicast-routing (activation IPV6) R3(config)# interface tunnel 0 R3(config-if)# ipv6 address 2005::2/48 R3(config-if)# tunnel source 11.0.0.2 R3(config-if)# tunnel destination 10.0.0.2 R3(config-if)# tunnel mode ipv6ip R3(config)# ipv6 route ::/0 2005::1/48 ( route par défaut IPV6) R3(config)# ip route 0.0.0.0 0.0.0.0 11.0.0.1 (route par défaut IPV4) RIP IPV6 Router# ipv6 router rip NomZoneRip Router(config-if)# ipv6 rip NomZoneRip enable VLAN IPV6 !--VLAN IPV4 Router(config)#interface FastEthernet 0/0.1 Router(config-if)#encapsulation dot1Q 4 Router(config-if)#ip address 192.168.3.1 255.255.255.0 !--VLAN IPV6 Router(config)#interface FastEthernet 0/0.1 Router(config-if)# encapsulation dot1Q 6 Router(config-if)# ipv6 address 2001:600:0:30::1/60 NAT/PAT http://cisco.goffinet.org/s4/nat/?searchterm=nat 192.168.1.0/24 .1 1.1.1.1 100.100.100.104/29 .2 E0/0 .254 E0/1 R1 E0/0 .105 .3 .106 R2 .110 Sniffer NAT Statique Chaque PC possède sa propre IP de sortie. R1(config)# interface Ethernet 0/0 R1(config-if)# ip address 192.168.1.254 255.255.255.0 R1(config-if)# ip nat inside R1(config-if)# no shutdown R1(config)# interface Ethernet 0/1 R1(config-if)# ip address 100.100.100.105 255.255.255.248 R1(config-if)# ip nat outside R1(config-if)# no shutdown !-- 191.168.1.2 devient en sortie 200.200.200.201 R1(config)# ip nat inside source static 191.168.1.2 200.200.200.201 R1(config)# ip route 0.0.0.0 0.0.0.0 100.100.100.106 NAT Dynamique Chaque PC se voit attribuer en cas de nécessité une IP issue d’un pool. R1(config)# interface Ethernet 0/0 R1(config-if)# ip address 192.168.1.254 255.255.255.0 R1(config-if)# ip nat inside R1(config-if)# no shutdown R1(config)# interface Ethernet 0/1 R1(config-if)# ip address 100.100.100.105 255.255.255.248 R1(config-if)# ip nat outside R1(config-if)# no shutdown !-- Définition d’une access list qui permettra le NAT R1(config)# access-list 1 permit 192.168.1.0 0.0.0.255 !--Définir le pool d’adresse externe disponible R1(config)# ip nat pool MonPool 200.200.200.1 200.200.200.10 netmask 255.0.0.0 !--Relier le pool à l’ACL R1(config)# ip nat inside source list 1 pool MonPool R1(config)# ip route 0.0.0.0 0.0.0.0 100.100.100.106 PAT Statique Même mécanisme que le NAT statique en ajoutant la notion de port R1(config)# interface Ethernet 0/0 R1(config-if)# ip address 192.168.1.254 255.255.255.0 R1(config-if)# ip nat inside R1(config-if)# no shutdown R1(config)# interface Ethernet 0/1 R1(config-if)# ip address 100.100.100.105 255.255.255.248 R1(config-if)# ip nat outside R1(config-if)# no shutdown R1(config)# ip nat inside source static tcp 192.168.1.2 80 200.200.200.201 80 R1(config)# ip route 0.0.0.0 0.0.0.0 100.100.100.106 PAT Dynamique (overload) Chaque PC se voit attribuer la même adresse (192.168.1.254) mais sur un port différent. R1(config)# interface Ethernet 0/0 R1(config-if)# ip address 192.168.1.254 255.255.255.0 R1(config-if)# ip nat inside R1(config-if)# no shutdown R1(config)# interface Ethernet 0/1 R1(config-if)# ip address 100.100.100.105 255.255.255.248 R1(config-if)# ip nat outside R1(config-if)# no shutdown !-- Définition d’une access list qui permettra le NAT R1(config)# access-list 1 permit 192.168.1.0 0.0.0.255 !--Relier le pool à l’ACL R1(config)# ip nat inside source list 1 interface Ethernet 0/1 overload R1(config)# ip route 0.0.0.0 0.0.0.0 100.100.100.106 Debug R1#clear ip nat translation * R1# sh ip nat translation R1#sh ip nat statistics R1#debug ip nat DHCP http://www.cisco.com/en/US/products/ps6441/products_configuration_guide_chapter09186a008071c340.html http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fipr_c/ipcprt1/1cfdhcp.htm 192.168.x.x/24 E0/0 3.254 R2 S0/0 S0/1 2.2 2.1 R1 S0/0 S0/0 1.1 1.2 E0/0 R3 4.254 Server DHCP DHCP Dynamique R1(config)# service dhcp !-- Définir le pool d’adresse R1(config)# ip dhcp pool MonPoolDHCP R1(dhcp-config)# network 192.168.1.0 255.255.255.0 R1(dhcp-config)# default-router 192.168.1.254 R1(dhcp-config)# dns-server 192.168.1.254 !-- Exclusion d’ip qui ne sera pas attribué R1(config)# ip dhcp excluded-address 192.168.1.250 192.168.1.254 PPP http://www.cisco.com/en/US/tech/tk713/tk507/technologies_configuration_example09186a0080094333.shtml Note - La topologie ci-dessous montre un nuage ISDN supporté par PPP. La technologie ISDN n’est pas expliquée dans cette partie mais uniquement le protocole de support. - CHAP nécessite le même password sur chaque routeur tandis que PAP permet de fixer un mot de passe différent par routeur. - Pour éviter des confusions, il est conseillé d’utiliser les noms de routeur configuré à l’aide de la commande hostname. - Le mot clé callin spécifie que le routeur jouera uniquement le rôle de client. On se retrouve dès lors dans un mode d’authentification unidirectionnel. PAP (bidirectionnel) R1(config)# username R2 password R2P (routeur distant) R1 (config)# interface serial 0 R1 (config-if)# encapsulation ppp R1 (config-if)# ppp authentication pap R1 (config-if)# ppp pap sent-username R1 password MonPass R2(config)# username R1 password R1P (routeur distant) R2 (config)# interface serial 0 R2 (config-if)# encapsulation ppp R2 (config-if)# ppp authentication pap R2 (config-if)# ppp pap sent-username R2 password MonPass Debug Router# debug ppp authentication Router# debug ppp negociation CHAP (Unidirectionnel) R1(config)# username R2 password R2P (routeur distant) R1 (config)# interface serial 0 R1 (config-if)# encapsulation ppp R1 (config-if)# ppp authentication chap R2 (config)# interface serial 0 R2 (config-if)# encapsulation ppp R2 (config-if)# ppp chap hostname R2 R2 (config-if)# ppp chap password R2P Debug Router# debug ppp authentication Router# debug ppp negociation Frame Relay Note - La commande encapsulation frame-relay peut-être remplacé par frame-relay lmitype selon la version de l’IOS ( < 11.2). - Toujours utiliser la commande no frame relay inverse-arp Full Mesh 192.168.1.x/24 R1 R3 .1 .3 .2 Frame relay Full Mesh .4 R2 R4 Chaque Routeur possède N numéro de DLCI sur une même interface R1(config)# interface Serial 0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# encapsulation frame-relay ietf R1(config-if)# frame-relay interface-dlci 102 (numéro DLCI lié au routeur 2) R1(config-if)# frame-relay interface-dlci 103 (numéro DLCI lié au routeur 3) R1(config-if)# frame-relay interface-dlci 104 (numéro DLCI lié au routeur 4) R2(config)# interface Serial 0/0 R2(config-if)# ip address 192.168.1.2 255.255.255.0 R2(config-if)# encapsulation frame-relay ietf (encapsulation ietf ou cisco) R2(config-if)# frame-relay interface-dlci 201 (numéro DLCI lié au routeur 1) R1(config-if)# frame-relay interface-dlci 203 (numéro DLCI lié au routeur 3) R2(config-if)# frame-relay interface-dlci 204 (numéro DLCI lié au routeur 4) R3(config)# interface Serial 0/0 R3(config-if)# ip address 192.168.1.3 255.255.255.0 R3(config-if)# encapsulation frame-relay ietf R3(config-if)# frame-relay interface-dlci 301 (numéro DLCI lié au routeur 1) R3(config-if)# frame-relay interface-dlci 302 (numéro DLCI lié au routeur 2) R3(config-if)# frame-relay interface-dlci 304 (numéro DLCI lié au routeur 4) R4(config)# interface Serial 0/0 R4(config-if)# ip address 192.168.1.4 255.255.255.0 R4(config-if)# encapsulation frame-relay ietf R4(config-if)# frame-relay interface-dlci 401 (numéro DLCI lié au routeur 1) R4(config-if)# frame-relay interface-dlci 402 (numéro DLCI lié au routeur 2) R4(config-if)# frame-relay interface-dlci 403 (numéro DLCI lié au routeur 3) Hybride(Full and Partial Mesh) R1 S0/0.102 1.1 S0/0.2 2.1 192.168.x.x/24 1.2 dlci: x01 R2 dlci: x02 1.0 2.0 R3 2.3 Frame relay Hybride dlci: x03 2.4 R4 dlci: x04 R1(config)# interface Serial 0/0 R1(config-if)# encapsulation frame-relay ietf !-- P2P avec R2 R1(config)# interface Serial 0/0.102 point-to-point R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# encapsulation frame-relay ietf R1(config-if)# frame-relay interface-dlci 102 !-- MP avec R3 et R4 R1(config)# interface Serial 0/0.2 multipoint R1(config-if)# ip address 192.168.2.1 255.255.255.0 R1(config-if)# encapsulation frame-relay ietf R1(config-if)# frame-relay interface-dlci 103 R1(config-if)# frame-relay interface-dlci 104 R2(config)# interface Serial 0/0 R2(config-if)# ip address 192.168.2.2 255.255.255.0 R2(config-if)# encapsulation frame-relay ietf R2(config-if)# frame-relay interface-dlci 201 R3(config)# interface Serial 0/0 R3(config-if)# ip address 192.168.2.3 255.255.255.0 R3(config-if)# encapsulation frame-relay ietf R3(config-if)# frame-relay interface-dlci 301 R3(config-if)# frame-relay interface-dlci 304 R4(config)# interface Serial 0/0 R4(config-if)# ip address 192.168.2.4 255.255.255.0 R4(config-if)# encapsulation frame-relay ietf R4(config-if)# frame-relay interface-dlci 401 R4(config-if)# frame-relay interface-dlci 403 Partial Mesh (Point to point) 192.168.x.x/24 R1 S0/0.1 1.1 S0/0.2 2.1 S0/0.3 3.1 1.2 dlci: x01 R2 dlci: x02 1.0 3.0 R3 3.2 2.0 Frame relay 2.2 Point-to-point dlci: x03 R1(config)# interface Serial 0/0 R1(config-if)# encapsulation frame-relay ietf R1(config)# interface Serial 0/0.1 point-to-point R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# encapsulation frame-relay ietf R1(config-if)# frame-relay interface-dlci 102 R1(config)# interface Serial 0/0.2 point-to-point R1(config-if)# ip address 192.168.2.1 255.255.255.0 R1(config-if)# encapsulation frame-relay ietf R1(config-if)# frame-relay interface-dlci 104 R1(config)# interface Serial 0/0.3 point-to-point R1(config-if)# ip address 192.168.3.1 255.255.255.0 R1(config-if)# encapsulation frame-relay ietf R1(config-if)# frame-relay interface-dlci 103 R2(config)# interface Serial 0/0 R2(config-if)# ip address 192.168.1.2 255.255.255.0 R2(config-if)# encapsulation frame-relay ietf R2(config-if)# frame-relay interface-dlci 201 R3(config)# interface Serial 0/0 R3(config-if)# ip address 192.168.3.2 255.255.255.0 R3(config-if)# encapsulation frame-relay ietf R3(config-if)# frame-relay interface-dlci 301 R4(config)# interface Serial 0/0 R4(config-if)# ip address 192.168.2.2 255.255.255.0 R4(config-if)# encapsulation frame-relay ietf R4(config-if)# frame-relay interface-dlci 401 R4 dlci: x04 ISDN LEGACY DDR http://www.cisco.com/warp/public/129/config-bri-map.html Note - L’interface ISDN du routeur et un des ports du simulateur du nuage ISDN sont relié à l’aide d’un câble droit. - L’encapsulation doit-être définie aussi bien sur l’interface BRI que sur le dialer. - L’encapsulation peut-être HDLC ou PPP avec son authentification PAP/CHAP. - Les noms du routeur distant doit être celui spécifié par la commande hostname Base Type de switch R1(config)# isdn switch-type basic-net3 Configuration de l’interface Adresse IP R1 (config)# interface BRI 0 R1 (config-if)# ip address 192.168.1.1 255.255.255.0 R1 (config-if)# encapsulation ppp Définition d’une Dialer-list (Type de trafic autorisé) R1 (config)# access-list 101 deny tcp any any eq ftp R1 (config)# access-list 101 permit ip any any (autorise tout traffic sauf ftp a activer ISDN) R1 (config)# dialer-list 2 protocol ip list 101 Définition d’une Dialer-map ou Dialer string R1 (config)# interface BRI 0 R1 (config-if# dialer-group 2 (2 doit correspondre a l’id du dialer-list) R1 (config-if)# dialer map ip 192.168.1.2 name R2 04307502 R1 (config-if)# dialer idle-timeout 120 (nombre de seconde d’inactivité avant déconnexion) ----- OU ----R1 (config)# interface BRI 0 R1 (config-if)# dialer-group 2 (2 doit correspondre a l’id du dialer-list) R1 (config-if)# dialer string 04307502 (numéro du coté distant) R1 (config-if)# dialer idle-timeout 120 (nombre de seconde d’inactivité avant déconnexion) Test Router# isdn test call interface bri 0 04307502 Router# isdn test disconnect interface bri 0 all Debug Router# show isdn active Router# show isdn status Router# show dialer ISDN Dialer Profile http://www.cisco.com/en/US/tech/tk801/tk133/technologies_configuration_example09186a0080093c2e.shtml Note - L’interface ISDN du routeur et un des ports du simulateur du nuage ISDN sont relié à l’aide d’un câble droit. - L’encapsulation doit-être définie aussi bien sur l’interface BRI que sur le dialer. - L’encapsulation peut-être HDLC ou PPP avec son authentification PAP/CHAP. - Les noms du routeur distant doit être celui spécifié par la commande hostname Base Type de switch R1(config)#isdn switch-type switch-type basic-net3 Création du dialer R1 (config)# interface dialer 1 R1 (config-if)# ip address 192.168.1.1 255.255.255.0 R1 (config-if)# encapsulation ppp R1 (config-if)# dialer remote name RouteurDistant R1 (config-if)# dialer-group 2 (2 doit correspondre a l’id du dialer-list) R1 (config-if)# dialer string 04307502 (numéro du coté distant) R1 (config-if)# dialer idle-timeout 120 (nombre de seconde d’inactivité avant déconnexion) R1 (config-if)# dialer pool 1 Définition d’une dialer-list (Type de trafic autorisé) R1 (config)# access-list 101 deny tcp any any eq ftp R1 (config)# access-list 101 permit ip any any (autorise tout traffic sauf ftp a activer ISDN) R1 (config)# dialer-list 2 protocol ip list 101 Attribution du dialer à l’interface BRI R1 (config)# interface BRI 0/0 R1 (config-if)# encapsulation ppp R1 (config-if# dialer pool-member 1 priority 1 (dans le cas ou on se retrouve avec plusieurs pools (dialer) au sein de la même interface BRI) Test Router# isdn test call interface bri 0 04307502 Router# isdn test disconnect interface bri 0 all Debug Router# show isdn active Router# show isdn status Router# show dialer ISDN Backup Line http://www.cisco.com/warp/public/125/fr_isdn_backup.html Note Outre le fait de configurer la ligne ISDN d’une des deux manières (Legacy DDR ou Dialer Profile), il est question ici de jouer sur le métrique des différents liens. 192.168.x.x/24 S0/0 1.1 S0/0 1.2 R1 R2 BRI0 5.1 BRI0 5.2 ISDN Backup line R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.2(route principal par défaut) R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.5.2 200 (route“backup” avec un métric plus grand) R2(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.1(route principal par défaut) R2(config)# ip route 0.0.0.0 0.0.0.0 192.168.5.1 200 (route“backup” avec un métric plus grand) OSPF http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fipr_c/ipcprt2/1cfospf.htm http://www.cisco.com/en/US/docs/ios/12_0/np1/configuration/guide/1cospf.html Note - OSPF utilise les masques de réseau du type « wildcard mask » - OSPF travaille à l’aide de processus au sein d’une aire de travaille. Base Router(config)# router ospf 1(numéro du processus OSPF) Router(config-router)# network 192.168.0.1 0.0.0.255 area 0 Configuration L’IP est un critère d’élection du DR. Il peut donc être intéressant de configurer le routeur de sorte à forcer le mécanisme d’élection à l’élire en tant que tel. !--loopback Router(config)# interface loopback 0 Router(config-if)# ip address 192.168.1.254 255.255.255.0 (IP la plus haute) !--priorité, BP, Coût Router(config-if)# ip ospf priority 50 (maximum 255, 0 l’enlève de la possibilité d’être élu) Router(config-if)# ip ospf cost 100 (10^8/BP = 10Mb = 1 | 100 Mb = 1 | 56k = 1785) Router(config-if)# bandwidth 150 (en kps) Authentification !--echange en clair Router(config)# router ospf 1(numéro du processus OSPF) Router(config-router)# area 0 authentication Router(config-if)# ip ospf authentication-key MonPassword (sur l’interface OSPF) !--echange “crypté” Router(config)# router ospf 1(numéro du processus OSPF) Router(config-router)# area 0 authentication message-digest Router(config-if)# ip ospf message-digest-key 1 md5 7 (sur l’interface OSPF) Redistribuer une route par défaut Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.2 Router(config-router)# default-information originate Debug Router# show ip protocol Router# show ip route Router# show ip ospf neighbors details Router# show ip ospf interface Router# show ip ospf database Router# show ip ospf events Router# show ip ospf adjacency Router# clear ip ospf process (relancer le mécanisme d’élection) EIGRP http://www.cisco.com/en/US/docs/ios/12_0/np1/configuration/guide/1ceigrp.html Note - EIGRP utilise les masques de réseau du type « wildcard mask » - EIGRP travaille au sein de système autonome (AS) - Toujours utiliser la commande no auto-summary Base router(config)# router eigrp 1(activation de EIGRP sur le système autonome 1) Router(config-router)# network 192.168.0.1 0.0.0.255 Divers Router(config-if)# bandwidth 150 (en kps) Router(config)# ip bandwith-percent eigrp 25 (25% de la BP sera attribué à EIGRP dans le cas d’une surcharge de la ligne. Cela permet d’éviter une congestion suite aux updates EIGRP) Authentification !-- echange “crypté” Router(config-if)# ip authentication mode eigrp 1 md5(1 est le numéro du système autonome) Router(config-if)# ip authentication key-chain eigrp 1 NomDeMaChaine Router(config)# key chain NomDeMaChaine Router(config-key-chain)# key 1 Router(config-key-chain-key)# key-string MonMotDePasse Redistribuer une route par défaut Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.2 Router(config-router)# redistribute static Echange IGRP – EIGRP Il suffit simplement de mettre les 2 protocoles au sein du même système autonome. Il marquera la route IGRP comme étant externe. Router(config)# router eigrp 1 Router(config-router)# network 192.168.1.0 0.0.0.255 Router(config)# router igrp 1 Router(config-router)# network 192.168.2.0 0.0.0.255 Debug Router# show ip eigrp neighbors Router# show ip eigrp topology Router# show ip eigrp interfaces Router# show ip eigrp traffic Router# debug eigrp fsm Router# debug eirgp packet VPN [R1 eth0/0] 1.1.1.1 ---------- VPN ---------- 1.1.1.2 [eth0/0 R2] crypto isakmp policy 100 (100 = priorité) encr aes authentication pre-share crypto isakmp key toto address 1.1.1.2 ! crypto ipsec security-association lifetime seconds 86400 ! crypto ipsec transform-set trans1 esp-aes ! crypto map totocrypto 110 ipsec-isakmp set peer 1.1.1.2 set transform-set trans1 set pfs group1 match address 110 ! interface FastEthernet0/0 ip address 1.1.1.1 255.0.0.0 crypto map totocrypto ! ip route 0.0.0.0 0.0.0.0 1.1.1.2 ! access-list 110 permit ip any any crypto isakmp policy 100 encr aes authentication pre-share crypto isakmp key toto address 1.1.1.1 ! crypto ipsec security-association lifetime seconds 86400 ! crypto ipsec transform-set trans1 esp-aes ! crypto map totocrypto 110 ipsec-isakmp set peer 1.1.1.1 set transform-set trans1 set pfs group1 match address 110 ! interface FastEthernet0/0 ip address 1.1.1.2 255.0.0.0 crypto map totocrypto ! ip route 0.0.0.0 0.0.0.0 1.1.1.1 ! access-list 110 permit ip any any