Sauvegarder la configuration
copy running-config working
puis
copy working certified
Ou bien il est possible de sauvegarder en une seule commande :
write memory flash-synchro
Afficher la configuration
show configuration snapshot all
show running-directory
Redémarer
reload
Hostname et Contact
system name <Nom>
system contact <contact>
Utilisateur et mot de passe
user <Nom> password <MDP> read-write all
SSH et Telnet
ip service ssh
aaa authentication ssh local
session timeout cli <temps_en_min>
session login-attempt <nombre>
no aaa authentication telnet
show ssh config
AOS Release 8
ip service ssh admin-state enable
aaa authentication ssh local
session timeout cli <temps_en_min>
session login-attempt <nombre>
no aaa authentication telnet
show ssh config
Configuration du Prompt
Il est possible de configurer ce que le Prompt affiche
session prompt default <promt>
Accès console
AOS Release 6
aaa authentication console local
session console enable
AOS Release 8
aaa authentication console local
Accès WEB
AOS Release 6
aaa authentication http local
no http server
https server
https SSL
https port <port> (permet de changer le port)
AOS Release 8
aaa authentication http local
web view server enable
web view force-ssl enable
web view https-port <port> (permet de changer le port)
FTP
aaa authentication ftp local
session timeout ftp <temps_en_min>
SFTP
AOS Release 6
scp-sftp enable
Bannière
AOS Release 6
session banner cli <nom_fichier.txt>
AOS Release 8
session cli <nom_fichier.txt>
Afficher le contenu de la Flash
ls
Configuration d’un port
Activation / Désactivation
AOS Release 6
interfaces 1/2 admin down
interfaces 1/2 admin up
AOS Release 8
interfaces 1/2 admin-state enable
interfaces 1/2 admin-state disable
Description
interfaces 1/1 alias <nom>
Vitesse et Duplex
interfaces 1/1 autoneg disable
interfaces 1/1 speed 100
interfaces 1/1 duplex full
Limitation de broadcast
Interfaces 1/1 flood all enable
interfaces 1/1 flood broadcast rate percentage 20
Sécurité de port
Nombre maximum d’adresse MAC
port-security 1/1 maximum 5
Action en cas de violation
Il existe 3 modes :
Restrict: Bloque le trafic non autorisé, mais autorise le reste
Discard: Les adresses MAC apprises sont oubliées, aucun trafic n’est autorisé, mais
le port reste UP
Shutdown: Les adresses MAC apprises sont oubliées, aucun trafic n’est autorisé, le
port devient DOWN
AOS Release 6
port-security 1/1 violation restrict
port-security 1/1 violation discard
port-security 1/1 violation shutdown
AOS Release 8
port-security port 1/1 violation restrict
port-security port 1/1 violation discard
port-security port 1/1 violation shutdown
Activation
AOS Release 6
port-security 1/1 enable
AOS Release 8
port-security port 1/1 admin-state enable
Affichage des adresses MAC
AOS Release 6
show mac-address-table
AOS Release 8
show mac-learning
Ajout d’une adresse MAC statique
AOS Release 6
port-security 1/1 mac 00:00:00:00:00:01
AOS Release 8
En version 8, il n’est pas possible d’ajouter une MAC à la main. Mais il est possible de convertir
les MAC apprises en MAC statiques.
port-security port 1/1 convert-to-static
Affichage la table ARP (correspondance IP /
MAC)
show arp
VLAN
Creation d’un VLAN
AOS Release 6
vlan 10 enable
vlan 10 name VLAN10
AOS Release 8
vlan 10 admin-state enable
vlan 10 name VLAN10
Suppression d’un VLAN
no vlan 10
Port Access
AOS Release 6
vlan 10 port default 1/1
AOS Release 8
vlan 10 members port 1/1 untagged
Port Trunk
AOS Release 6
vlan 10 802.1q 1/1
AOS Release 8
vlan 10 members port 1/1 tagged
Vérification
AOS Release 6
show vlan
show vlan port
show vlan 10
AOS Release 8
show vlan
show vlan members
show vlan 10
Configuration IP
Interface VLAN
ip interface “IntVlan10” address 10.0.1.50 mask 255.255.255.0 vlan 10
ip interface dhcp-client vlan 20
ip interface dhcp-client admin enable
ip interface dhcp-client release
ip interface dhcp-client renew
Route par défaut
ip static-route 0.0.0.0/0 gateway 10.0.1.254
DNS
ip name-server 10.0.1.250 10.0.1.251
ip domain-lookup
no ip domain-lookup (choix par défaut)
show dns
Spanning Tree
Les switchs Alcatel proposent deux modes Spanning Tree :
1×1 (AOS 6) – Per-Vlan (AOS 8) : une instance STP par VLAN
Flat: une instance générale
Configuration flat
AOS Release 6
bridge mode flat
bridge protocol mstp
bridge protocol rstp
bridge protocol stp
bridge protocol 1W
bridge protocol 1D
AOS Release 8
spantree mode flat
spantree protocol rstp
spantree protocol mstp
spantree protocol stp
spantree protocol 1W
spantree protocol 1D
Configuration 1×1
AOS Release 6
bridge mode 1x1
bridge 1x1 10 priority 4096
Priorité par défaut : 32768
AOS Release 8
spantree mode per-vlan
spantree vlan 10 admin-state enable
spantree vlan 10 priority 4096
Priorité par défaut : 32768
Contrôle par Port
AOS Release 6
bridge 1x1 10 1/1 <Enable / Disable>
AOS Release 8
spantree vlan 10 port 1/1 <enable / disable>
Port d’accès (Portfast)
Une fois le STP activé, les ports prennent plus longtemps à monter. Sur les ports d’accès
(connectés au PC) il convient d’activer l’option Admin-Edge pour qu’ils montent plus vite.
AOS Release 6
bridge 1x1 <No_VLAN> 1/1 connection admin-edge enable
AOS Release 8
spantree vlan 10 port 1/1 admin-edge enable
Root-Guard
AOS Release 6
bridge 1X1 10 1/1 root-guard enable
AOS Release 8
spantree vlan 10 port 1/1 root-guard enable
Vérification
AOS Release 6
show spantree
show spantree 1x1
show spantree mode
show spantree 1x1 ports
show spantree 1x1 10 ports
AOS Release 8
show spantree
show spantree vlan
show spantree ports
show spantree mode
Agrégation de lien
Agrégation statique
AOS Release 6
static linkagg 5 size 2 name "Agg 1"
static agg 1/1 agg num 5
static agg 1/2 agg num 5
static agg no 1/2 (suppression d’un lien)
vlan 10 802.1q 5
vlan 20 802.1q 5
static linkagg 5 admin state disable (pour désactiver l'agrégation)
AOS Release 8
linkagg static port 1/1 agg 5
linkagg static agg 5 admin-state enable
linkagg static agg 5 name "Agg 1"
vlan 10 members linkagg 5 <tagged / untagged>
LACP
AOS Release 6
lacp linkagg 5 size 2
lacp linkagg 5 name "Agg 1"
lacp linkagg 5 admin state enable
lacp linkagg 5 actor admin key 1
lacp agg 1/1 actor admin key 1
lacp agg 1/2 actor admin key 1
vlan 10 802.1q 5
vlan 20 802.1q 5
AOS Release 8
linkagg lacp agg 5 size 2 admin-state enable
linkagg lacp agg 5 actor admin-key 1
linkagg lacp agg 5 name "Agg 1"
linkagg lacp port 1/1 actor admin-key 1
vlan 10 members linkagg 5 <tagged / untagged>
Vérification
AOS Release 6
show linkagg
show linkagg agg 5
show linkagg port
show linkagg port 1/1
AOS Release 8
show linkagg
show linkagg 5
show linkagg port
show linkagg port 1/1
VRRP
Switch Active
ip interface “nom” address 10.0.1.250 mask 255.255.255.0 vlan <VLAN>
vrrp <vrid> <VLAN> enable
vrrp <vrid> <VLAN> priority 110 (100 par défaut)
vrrp <vrid> <VLAN> preempt
vrrp <vrid> <VLAN> address 10.0.1.254
vrrp track <track_ID> enable
vrrp track <track_ID> priority 25 (25 par défaut, valeur à décrémenter)
vrrp track <track_ID> port 1/1
Le mode Preempt permet au switch de redevenir Active après une panne. Le Tracking permet de
réduire la priorité en cas de panne d’une interface (ici si l’interfaces 1/1 tombe, la priorité devient
85, et le switch Standby prend le relais).
Switch Standby
ip interface “nom” address 10.0.1.251 mask 255.255.255.0 vlan <VLAN>
vrrp <vrid> <VLAN> enable
vrrp <vrid> <VLAN> priority 100 (défaut)
vrrp <vrid> <VLAN> address 10.0.1.254
Vérification
show vrrp
show vrrp <vrid>
show vrrp statistics
show vrrp track
!NTP
Client NTP
AOS Release 6
ntp client enable
ntp server 10.0.0.10 prefer
ntp server 10.0.0.20
AOS Release 8
ntp client admin-state enable
ntp server 10.0.0.10 prefer
ntp server 10.0.0.20
Vérification
show ntp client
show ntp servers status
SNMP
AOS Release 6
aaa authentication snmp local
user AdminSnmp READ-ONLY snmp all
user AdminSnmp password SnmpPass read-only all no auth
snmp security no security
snmp community map mode enable
snmp community map SnmpMap user AdminSnmp
snmp station 10.0.1.10 <v1 / v2 / v3> AdminSnmp enable
AOS Release 8
aaa authentication snmp local
user AdminSnmp READ-ONLY snmp all
user AdminSnmp password SnmpPass read-only all no auth
snmp security no-security
snmp community-map mode enable
snmp community-map SnmpMap user AdminSnmp
snmp station 10.0.1.10 <v1 / v2 / v3> AdminSnmp enable
Autres paramètres de sécurité :
Source : documentation Alcatel.
Vérification
AOS Release 6
show snmp station
show snmp community map
AOS Release 8
show snmp station
show snmp community-map
DHCP Snooping
Le DHCP Snooping est une fonctionnalité permettant de filtrer des messages DHCP sur un
switch. Il est possible de configurer les ports en mode Trust (un serveur DHCP peut se trouver
derrière et faires des DHCP-ACK et DHCP-OFFER) ou en mode Client-Only (un client peut se
trouver derrière le port) ou en mode Block (aucun trafic DHCP autorisé).
Cela évite qu’un intrus se fasse passer pour un serveur DHCP.
Activation / Désactivation
AOS Release 6
ip helper dhcp-snooping <enable | disable>
AOS Release 8
dhcp-snooping admin-state <enable | disable>
Configuration des ports
AOS Release 6
ip helper dhcp-snooping port 1/1 trust (autorise tout trafic DHCP)
ip helper dhcp-snooping port 1/1 block (bloque tout trafic DHCP)
ip helper dhcp-snooping port 1/1 client-only (autorise les requêtes DHCP depuis ce
port)
AOS Release 8
dhcp-snooping port 1/1 trust (autorise tout trafic DHCP)
dhcp-snooping port 1/1 block (bloque tout trafic DHCP)
dhcp-snooping port 1/1 client-only (autorise les requêtes DHCP depuis ce port)
Activation par VLAN
AOS Release 6
ip helper dhcp-snooping vlan 10 <enable | disable>
AOS Release 8
dhcp-snooping vlan 10 admin-state <enable | disable>
Vérification de l’adresse MAC
AOS Release 6
ip helper dhcp-snooping mac-address verification <enable | disable>
Permet d’activer la vérification des adresses MAC pour le trafic DHCP entrant. Lorsque cette
fonction est activée, l’adresse MAC source est comparée à l’adresse MAC dans le paquet DHCP.
Si ces deux adresses ne correspondent pas, le paquet est abandonné.
AOS Release 8
dhcp-snooping mac-address-verification admin-state <enable | disable>
Vérification
AOS Release 6
show ip helper dhcp-snooping vlan
show ip helper dhcp-snooping port
AOS Release 8
show dhcp-snooping
show dhcp-snooping vlan
show dhcp-snooping port
Syslog
Activation / Désactivation
AOS Release 6
swlog
no swlog
AOS Release 8
Swlog <enable / disable>
Destination des logs
swlog output console
swlog output socket 10.0.0.10
swlog output flash (création d’un fichier de log dans la Flash)
Commandes Show
show log swlog (afficher les logs)
show log swlog timestamp <mm/jj/aaaa>
show swlog
Port Mirroring
port mirroring 1 source 1/1 destination 1/10
port mirroring 1 enable
port mirroring 1 disable
show port mirroring status
LLDP
AOS Release 6
show lldp remote-system
show lldp 1/1
AOS Release 8
show lldp remote-system
show lldp port 1/1
POE
AOS Release 6
lanpower <start / stop> 1/1
AOS Release 8
lanpower port 1/1 admin-state <enable / disable>
802.1X Ethernet
Configuration
AOS Release 6
aaa radius-server Srv1 host 10.0.0.10 auth-port 1812 acct-port 1813 key "NLKey"
aaa authentication 802.1x Srv1
vlan port mobile 1/1
vlan port 1/1 802.1x enable
802.1x 1/1 supplicant policy authentication pass vlan 10 fail vlan 20
Si l’authentification est réussie, le port est place dans le VLAN 10, sinon dans le VLAN 20.
Vérification
show 802.1x 1/1
show 802.1x users
DHCP Relay
Activation globale
ip helper address 10.0.1.10
Activation par VLAN
AOS Release 6
ip helper address 10.0.1.10 <No_VLAN>
AOS Release 8
ip helper vlan <No_VLAN> address 10.0.0.1
RIP
AOS Release 6
vlan 10 name "VLAN 10"
vlan 10 port default 1/1
ip interface vlan-10 address 10.0.0.1 vlan 10
ip load rip
ip rip status enable
ip rip interface VLAN-10
ip rip interface VLAN-10 status enable
AOS Release 8
vlan 10 name "VLAN 10"
vlan 10 member port 1/1
ip interface vlan-10 address 10.0.0.1 vlan 10
ip load rip
ip rip admin-state enable
ip rip interface VLAN-10
ip rip interface VLAN-10 admin-state enable
Vérification
show ip rip
show ip rip routes
show ip rip interface VLAN-1
OSPF
AOS Release 6
vlan 10
ip interface vlan-10 vlan 10 address 10.0.0.254 mask 255.255.255.0
vlan 10 port default 1/1
ip router router-id 1.1.1.1
ip load ospf
ip ospf status enable
ip ospf area 0.0.0.0
ip ospf interface vlan-10
ip ospf interface vlan-10 area 0.0.0.0
ip ospf interface vlan-10 status enable
AOS Release 8
vlan 10
ip interface vlan-10 vlan 10 address 10.0.0.254 mask 255.255.255.0
vlan 10 members port 1/1/1 untagged
ip router router-id 1.1.1.1
ip load ospf
ip ospf admin-state enable
ip ospf area 0.0.0.0
ip ospf interface vlan-10
ip ospf interface vlan-10 area 0.0.0.0
ip ospf interface vlan-10 admin-state enable