8 Replies Latest reply: Sep 19, 2011 10:02 PM by Kumar Mantri RSS

    Connecting 2 routers with a layer 2 switch in-between

    Leonardo

      Hi folks,

       

      Seek some advice on how to properly configure 2 routers to connect with a layer 2 switch in-between.

       

      In the picture below, i have 4 routers connecting through a layer 2 switch.

       

      Here are my configurations:

      Switch

      • Fa0/1
        • switchport access vlan 10
        • switchport mode access
      • Fa0/2
        • switchport access vlan 10
        • switchport mode access
      • Fa0/3
        • switchport access vlan 50
        • switchport mode access
      • Fa0/4
        • switchport access vlan 50
        • switchport mode access

      Router0

      • encapsulation dot1q 10
      • ip address 10.1.1.1 255.255.255.0

      Router1

      • encapsulation dot1q 10
      • ip address 10.1.1.2 255.255.255.0

      Router2

      • encapsulation dot1q 50
      • ip address 10.2.1.1 255.255.255.0

      Router3

      • encapsulation dot1q 50
      • ip address 10.2.1.2 255.255.255.0

       

      I am unable to ping from Router0 to Router 1 nor Router2 to Router3. However, when i change the configs on the switchport to "switchport mode trunk", the ping worked. Why? It wouldnt be feasible for me to configure trunk on the switch as i would want only traffic from the respective vlans to communicate.

      lab1.jpg