Configuration cisco

Bonjour,
j'ai un switch catalyst 3750 dont je veux configurer pour router les vlans d'un switch 2960.
Configuration: Windows XP
Firefox 2.0.0.20

39 réponses

Résumé de la discussion

Le but est de faire router les VLANs présents sur un switch 2960 via un switch Catalyst 3750, car le 2960 n’effectue pas le routage inter-VLAN. Sur le 3750, créer des interfaces VLAN (SVI) et leur attribuer des adresses IP dans les sous-réseaux correspondants, par exemple VLAN1 192.168.0.2/26, VLAN2 192.168.0.66/26, VLAN3 192.168.0.130/26 et VLAN4 192.168.0.194/26. Ensuite, activer ip routing sur le 3750 et configurer les ports de liaison trunk entre les switches, les ports d’accès étant affectés à chaque VLAN concerné. Enfin, les PC de chaque VLAN doivent pointer vers la passerelle du VLAN correspondant sur le 3750 comme passerelle par défaut, et la connectivité inter-VLAN sera fonctionnelle une fois les SVIs et les trunks établis.

Bobot (l’IA à votre service)
  1. je te l'accorde et c'est vrai que j'en ai perdu mon latin. Je crois qu'il n'a pas fait son plan d'adressage ni son shema de principe.
    Esperons qu'il s'en sorte.
    Bonne soirée.
    1. il est toujours étonnant que l'on confie des produits qui représentent tout de même un investissement conséquent (le 3750 notamment, mais le 2960 aussi) à des gens qui n'ont aucune formation dessus .
      mais, c'est peut-etre dans le cadre d'une formation justement .
    2. @brupalaj'ai essayé d'affecter une interface pour un vlans au niveau 3750 mais switchport access vlan numV ne fonctionne pas.
    3. @brupalaça va bien marcher,
      il me reste la configuration DHCP.
      je veux attribuer des @ip à l'aide de 3750 sans avoir besoin de connecter un serveur DHCP au niveau 3750.
  2. autant pour moi!
    Mantenant que maman est revenu, c'est plus calme pour moi! lol
    Extrait tiré du pdf en lien plus haut
    "Remarque : Il faut créer tous les VLANs de l’entreprise dans le commutateur central même quand il n’y a aucun port assigné à ces VLAN. Parce que ce commutateur doit faire le routage entre eux."

    extrai n°2
    "6. configuration du routage inter-vlan
    a. Activer le routage :
    Switch#configure terminal
    Switch(config)#ip routing
    b. Configuration de l’interface virtuelle pour le VLAN 2
    Switch#configure terminal
    Switch(config)#interface Vlan2
    Switch(config−if)#ip address 192.168.2.254 255.255.255.0
    Switch(config−if)#no shutdown
    c. Configuration de l’interface virtuelle pour le VLAN 3
    Switch#configure terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    Switch(config)#interface Vlan3
    Switch(config−if)#ip address 192.168.3.254 255.255.255.0
    Switch(config−if)#no shutdown
    Remarque :
    ◘ Il faut refaire l’opération pour tous les VLANs de l’entreprise (ou ceux qu’on veut router).
    ◘ Si le switch est relié à un routeur pour accéder à internet, par exemple dans notre cas le port 23, il faut configurer la passerelle par défaut pour tous les VLANs :
    Switch(config)#interface FastEthernet 0/23
    Switch(config−if)#no switchport
    Switch(config−if)#ip address 192.168.16.254 255.255.255.0
    Switch(config−if)#no shutdown
    Puis ajouter la route par défaut :
    Switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.X.X"

    je pense qu'on touche au but, non.?
  3. désolé je suis obligé de decrocher car je m'occupe des enfants qui viennent de rentrer de l'ecole.
    Mais vite on reprend.
    Le but est d'effectuer du routage inter vlan avec un switch manageable cisco 3750.
    A savoir qu'un switch manageable n'est pas un routeur, il n'apprend pas les reseaux et il faut donc lui indiquer les reseaux aini que les ports qui y sont reliés.
    Si tu trouve une fonction qui te permets de definir le port trunk en X Vlan alors tant mieux.
    Le port trunk ne sert qu'a transporter des paquets identifiés par vlan sur d'autres vlan du swich. si il n'y a pas de correspondance, tes paquets sont purement et simplement detruits.
    Il te faut donc autant de Vlan sur ton 3750 que sur l'autre switch. Une fois tes Vlan créés, tu le interconnect par la fonction iprouting.
    sommes nous bien d'accord?
    1. nous sommes d'accord sauf sur un fait: un 3750 est un aussi vrai routeur, il peut gérer des protocoles de routage dynamiques (rip, ospf ... bgp, je ne suis pas sûr) et bien d'autres choses .
  4. pour mon 3750 je peux attribuer:
    gi1/0/1 vlan1: 192.168.0.2 255.255.255.192
    gi1/0/2 vlan2: 192.168.0.66 255.255.255.192
    gi1/0/3 vlan3: 192.168.0.130 255.255.255.192
    gi1/0/4 vlan4: 192.168.0.194 255.255.255.192
    puis
    je fais ip routing
    1. c'est quoi ce bazar ?
      tu veux faire du routage entre ports ? tu vas relier 4 ports entre les 2 switchs ?
      n'importe quoi .
      pourquoi ne fais tu tu pas comme dit plus haut ?
  5. tiens j'ai trouvé ça
    http://www.lyc-vilgenis-massy.ac-versailles.fr/vilgenis/IMG/pdf/Catalyst3750.pdf
    1. ou est le problème je ne crois pas que c'est au niveau de 2960.
      1. Si c'est ton 2960 qui est mal configuré en IP .
    2. oui j'ai essayé mais j'ai pas pu mettre mes inter vlan-routing.
      aides moi brupala.
      1. supprime toutes tes configs ip interface vlan sur le 2960 :
        interface vlan 2
        no ip add 192.168.0...
        ça ne sert à rien sur le 2960
        tu mets juste une adresse ip sur le vlan 1 et différente de celle du 3750 (192.168.0.3 par exemple).
    3. s v p
      brupala
      1. @brupalamais pourqoui je vais diviser les interfaces 3750 en vlans.
        j'ai besoin de ces port pour un autre travail(serveur;...).
        voici ma configuration au niveau 2960:
        hostname Switch2960
        !
        enable secret 5 $1$C4ZL$/j7ts/zFeWlv0qaQ3dWx4/
        !
        no aaa new-model
        udld aggressive

        ip subnet-zero
        !
        !
        mls qos map cos-dscp 0 8 16 26 32 46 46 56
        !
        !
        macro global description cisco-global | cisco-global
        errdisable recovery cause link-flap
        errdisable recovery interval 60
        no file verify auto
        !
        spanning-tree mode rapid-pvst
        spanning-tree loopguard default
        spanning-tree extend system-id
        !
        vlan internal allocation policy ascending
        !
        interface FastEthernet0/1
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/2
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/3
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/4
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/5
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security ag
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/6
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/7
        switchport access vlan 2
        switchport mode access
        switchport port-security
        switchport port-security agi
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/8
        switchport access vlan 2
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/9
        switchport access vlan 2
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/10
        switchport access vlan 2
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/11
        switchport access vlan 2
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/12
        switchport access vlan 2
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/13
        switchport access vlan 3
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/14
        switchport access vlan 3
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/15
        switchport access vlan 3
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/16
        switchport access vlan 3
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/17
        switchport access vlan 3
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/18
        switchport access vlan 3
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/19
        switchport access vlan 4
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/20
        switchport access vlan 4
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/21
        switchport access vlan 4
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/22
        switchport access vlan 4
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/23
        switchport access vlan 4
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface FastEthernet0/24
        switchport access vlan 4
        switchport mode access
        switchport port-security
        switchport port-security aging time 2
        switchport port-security violation restrict
        switchport port-security aging type inactivity
        macro description cisco-desktop
        spanning-tree portfast
        spanning-tree bpduguard enable
        !
        interface GigabitEthernet0/1
        switchport mode trunk
        macro description cisco-switch
        auto qos voip trust
        spanning-tree link-type point-to-point
        !
        interface GigabitEthernet0/2
        switchport mode trunk
        macro description cisco-switch
        auto qos voip trust
        spanning-tree link-type point-to-point
        !
        interface Vlan1
        ip address 192.168.0.2 255.255.255.192
        no ip route-cache
        !
        interface Vlan2
        ip address 192.168.0.66 255.255.255.192
        no ip route-cache
        !
        interface Vlan3
        ip address 192.168.0.130 255.255.255.192
        no ip route-cache
        !
        interface Vlan4
        ip address 192.168.0.194 255.255.255.192
        no ip route-cache
        !
        ip default-gateway 192.168.0.1
        ip http server
        !
        control-plane
        !
        !
        line con 0
        line vty 0 4
        password network1
        login
        line vty 5 15
        password network1
        login
        !
        end
      2. @brupalaje suis allé voire ton lien mais plus de page
    4. OK mais ce qui veux dire que ses paquets ne sont pas reconnu dans le Vlan1 car ils portent l'adresse des autres Vlan. Il faudrait qu'il fassent des Vlan sur sont 3750 puis il interconnecte les Vlan 1 à 1 pour que la connection se fasse. Le mode Trunk n'est pas là pour faire du routage, ilest là pour utiliser 1 port au lieu de X ports pour X Vlan.
      1. les vlans sont interconnectés un à un via le port trunk .
        le routage est fait dans .... le routeur (3750) .
    5. Switch3750#show run
      Building configuration...

      Current configuration : 3867 bytes
      !
      version 12.2
      no service pad
      service timestamps debug uptime
      service timestamps log uptime
      no service password-encryption
      !
      hostname Switch3750
      !
      enable secret 5 $1$uniA$6pzOhF6kj8GcPbaep/jks0
      !
      no aaa new-model
      clock timezone UTC 1
      clock summer-time UTC recurring last Sun Mar 2:00 last Sun Oct 3:00
      switch 1 provision ws-c3750g-48ps
      system mtu routing 1500
      udld aggressive

      ip subnet-zero
      ip routing
      !
      !
      mls qos map cos-dscp 0 8 16 26 32 46
      !
      !
      macro global description cisco-global
      errdisable recovery cause link-flap
      errdisable recovery interval 60
      no file verify auto
      !
      spanning-tree mode rapid-pvst
      spanning-tree loopguard default
      spanning-tree extend system-id
      !
      vlan internal allocation policy ascending
      !
      interface GigabitEthernet1/0/1
      switchport trunk encapsulation dot1q
      macro description cisco-switch
      auto qos voip trust
      spanning-tree link-type point-to-point
      !
      interface GigabitEthernet1/0/2
      switchport mode access
      switchport port-security
      switchport port-security aging time 2
      switchport port-security violation restrict
      switchport port-security aging type inactivity
      macro description cisco-desktop
      spanning-tree portfast
      spanning-tree bpduguard enable
      !
      interface GigabitEthernet1/0/3
      switchport mode access
      switchport port-security
      switchport port-security aging time 2
      switchport port-security violation restrict
      switchport port-security aging type inactivity
      macro description cisco-desktop
      spanning-tree portfast
      spanning-tree bpduguard en
      !
      interface GigabitEthernet1/0/4
      switchport mode access
      switchport port-security
      switchport port-security aging time 2
      switchport port-security violation restrict
      switchport port-security aging type inactivity
      macro description cisco-desktop
      spanning-tree portfast
      spanning-tree bpduguard enable
      !
      interface GigabitEthernet1/0/5
      !
      interface GigabitEthernet1/0/6
      !
      interface GigabitEthernet1/0/7
      !
      interface GigabitEthernet1/0/8
      !
      interface GigabitEthernet1/0/9
      !
      interface GigabitEthernet1/0/10
      !
      interface GigabitEt
      !
      interface GigabitEthernet1/0/12
      !
      interface GigabitEthernet1/0/13
      !
      --More--
      00:58:06: %IP-4-DUPADDR: Duplicate address 192.168.0.2 on Vlan1, sourced by 001b
      interface GigabitEthernet1/0/14
      !
      interface GigabitEthernet1/0/15
      !
      interface GigabitEthernet1/0/16
      !
      interface GigabitEthernet1/0/17
      !
      interface GigabitEthernet1/0/18
      !
      interface GigabitEthernet1/0/19
      !
      interface GigabitEthernet1/0/20
      !
      interface GigabitEthernet1/0/21
      !
      interface GigabitEthernet1/0/22
      !
      interface GigabitEthernet1/0/23
      !
      interface GigabitEthernet
      !
      interface GigabitEthernet1/0/25
      !
      interface GigabitEthernet1/0/26
      !
      interface GigabitEthernet1/0/27
      !
      interface GigabitEthernet1/0/28
      !
      interface GigabitEthernet1/0/29
      !
      interface GigabitEthernet1/0/30
      !
      interface GigabitEthernet1/0/31
      !
      interface GigabitEthernet1/0/32
      !
      interface GigabitEthernet1/0/33
      !
      interface GigabitEthernet1/0/34
      !
      interface GigabitEthernet1/0/35
      !
      interface GigabitEthernet1/0/36
      !
      interface GigabitEthernet1/0/37
      !
      interface GigabitEthernet1/0/38
      !
      interface GigabitEthernet1/0/39
      !
      interface GigabitEthernet1/0/40
      !
      interface GigabitEthernet1/0/41
      !
      interface GigabitEthernet1/0/42
      !
      interface GigabitEthernet1/0/43
      !
      interface GigabitEthernet1/0/44
      !
      interface GigabitEthernet1/0/45
      !
      interface GigabitEthernet1/0/46
      !
      interface GigabitEthernet1/0/47
      !
      interface GigabitEthernet1/0/48
      !
      interface GigabitEthernet1/0/49
      !
      interface GigabitEthernet1/0/50
      !
      interface GigabitEthernet1/0/51
      !
      interface GigabitEthernet1/0/52
      !
      interface Vlan1
      ip address 192.168.0.2 255.255.255.192
      !
      interface Vlan2
      ip address 192.168.0.66 255.255.255.192
      !
      interface Vlan3
      ip address 192.168.0.130 255.255.255.192
      !
      interface Vlan4
      ip address 192.168.0.194 255.255.255.192
      !
      ip default-gateway 192.168.0.1
      ip classless
      ip http server
      !
      !
      control-plane
      !
      !
      line con 0
      login
      line vty 0 4
      password network2
      login
      length 0
      line vty 5 15
      password network2
      login
      length 0
      !
      end

      Switch3750#
      1. arf,
        00:58:06: %IP-4-DUPADDR: Duplicate address 192.168.0.2 on Vlan1, sourced by 001b

        ton 2960 n'aurait pas la même adresse ip par hasard ?
      2. Bonjour,

        Deja il faudrait, si je me souviens bien, affecter tes ports a un Vlan. Pour l'instant ils sont tous dans le Vlan1 (par defaut).
        En somme, il faut que tu affectes par ex les ports 1 à 5 au vlan 1, 6 à 20 Vlan2 etc...
        Apres la commande, je ne m'n souviens plus, je recherche ma doc. T'as de la chance si je la retrouve!
        Courage
        DC
      3. @dadoonetnon,
        le port giga 1/0/1 entre les 2 switchs est en trunk .
      4. @brupalamais les vlans de 3750 sont les même pour 2960.
        tu a parlé de port gi1/0/1:
        je l'ai mis en mode trunk puisque la liaison entre 3750 et 2960 et entre respéctivement gi0/1(2960) et gi1/0/1 (3750).
    6. SVP brupala,
      1. j'arrive pas à mettre le password de telnet.
        tu as configuré le telnet sur le 3750 ?
        qu'est ce que tu appelles mettre le password ?
        peux tu nous copier/coller un show run de ton 3750
    7. mais je n'ai pas un routeur dans mon réseau , cest puorquoi je veux utiliser 3750 pour jouer le rôle deu routeur.
      aide-moi
      1. oui, bien sûr, quand je parle du routeur, je parle de ton 3750 .
      2. essaie de suivre STP .
      3. @brupalamais tu m'a demandé de faire les 4vlans au niveau 3750.
        je l'ai fait et j'ai fait ip routing mais tu ne m'a pas donné des commandes concernant les passerelles ( ni au niveau 2960 ni au niveau 3750).
      4. @merdassi ahmedpas besoin de passerelles sur les cisco dans ta configuration .
        les passerelles par défaut (on devrait dire route par défaut) sur les PC doivent être les adresses du 3750 (routeur) dans chaque vlan respectivement , c'est le principe de base du routage .
      5. @brupalace que j'ai compris c'est d'attribuer à chaque pc une passerelle celle de l'@vlan dont il appartient.
    • 1
    • 2