Announcement

Collapse
No announcement yet.

Ciso Switch can't ping router

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ciso Switch can't ping router

    So in my network the computers and servers can ping the router and the router can ping them, but the switch can't ping the router

    This is my switch

    Current configuration : 1249 bytes
    !
    version 12.1
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname Switch
    !
    !
    spanning-tree mode pvst
    !
    interface FastEthernet0/1
    switchport mode trunk
    !
    interface FastEthernet0/2
    switchport access vlan 20
    switchport mode access
    !
    interface FastEthernet0/3
    switchport access vlan 20
    switchport mode access
    !
    interface FastEthernet0/4
    switchport access vlan 10
    switchport mode access
    !
    interface FastEthernet0/5
    switchport access vlan 10
    switchport mode access
    !
    interface FastEthernet0/6
    switchport access vlan 10
    switchport mode access
    !
    interface FastEthernet0/7
    !
    interface FastEthernet0/8
    !
    interface FastEthernet0/9
    !
    interface FastEthernet0/10
    !
    interface FastEthernet0/11
    !
    interface FastEthernet0/12
    !
    interface FastEthernet0/13
    !
    interface FastEthernet0/14
    !
    interface FastEthernet0/15
    !
    interface FastEthernet0/16
    !
    interface FastEthernet0/17
    !
    interface FastEthernet0/18
    !
    interface FastEthernet0/19
    !
    interface FastEthernet0/20
    !
    interface FastEthernet0/21
    !
    interface FastEthernet0/22
    !
    interface FastEthernet0/23
    !
    interface FastEthernet0/24
    !
    interface Vlan1
    no ip address
    shutdown
    !
    !
    line con 0
    !
    line vty 0 4
    login
    line vty 5 15
    login
    !
    !
    end

    This is the router

    Current configuration : 1021 bytes
    !
    version 12.4
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname HQ
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    spanning-tree mode pvst
    !
    !
    !
    !
    interface FastEthernet0/0
    no ip address
    ip nat inside
    duplex auto
    speed auto
    !
    interface FastEthernet0/0.1
    encapsulation dot1Q 20
    ip address 10.1.1.1 255.255.255.0
    !
    interface FastEthernet0/0.2
    encapsulation dot1Q 10
    ip address 10.1.2.1 255.255.255.0
    !
    interface FastEthernet0/1
    no ip address
    duplex auto
    speed auto
    shutdown
    !
    interface Serial0/0/0
    ip address 170.1.1.2 255.255.255.0
    encapsulation frame-relay
    ip nat outside
    clock rate 64000
    !
    interface Serial0/1/0
    no ip address
    clock rate 2000000
    shutdown
    !
    interface Serial0/1/1
    no ip address
    clock rate 2000000
    shutdown
    !
    interface Vlan1
    no ip address
    shutdown
    !
    router rip
    !
    ip nat inside source static 10.1.1.2 170.1.1.4
    ip nat inside source static 10.1.2.4 170.1.1.7
    ip classless
    !
    !
    !
    !
    !
    !
    !
    line con 0
    line vty 0 4
    login
    !
    !
    !
    end

    can someone please help me out?

  • #2
    Re: Ciso Switch can't ping router

    Here is your problem. You need to put a layer 3 (IP address) on Vlan 1 if your going to use that as your management vlan. Then you can either create another sub-interface on the router for vlan 1 or you can just put an ip address on fa0/0 on the router in the Vlan 1 subnet. In production I dont recommend using vlan 1 for management. If you do decide to change the native vlan then make sure you change it on the sub-interface on the router and also on the trunk port on the switch.


    interface Vlan1
    no ip address
    shutdown
    CCNA, CCNA-Security, CCNP
    CCIE Security (In Progress)

    Comment


    • #3
      Re: Ciso Switch can't ping router

      Originally posted by auglan View Post
      Here is your problem. You need to put a layer 3 (IP address) on Vlan 1 if your going to use that as your management vlan. Then you can either create another sub-interface on the router for vlan 1 or you can just put an ip address on fa0/0 on the router in the Vlan 1 subnet. In production I dont recommend using vlan 1 for management. If you do decide to change the native vlan then make sure you change it on the sub-interface on the router and also on the trunk port on the switch.


      interface Vlan1
      no ip address
      shutdown
      What would you recommend the IP address to be on vlan 1 then?

      Comment


      • #4
        Re: Ciso Switch can't ping router

        Whatever subnet you want for your management vlan.


        Keeping with your ip scheme now:


        10.1.3.0/24


        Router interface:

        10.1.3.1 255.255.255.0


        Switch Interface:

        10.1.3.2 255.255.255.0


        Also don't forget to no shut the vlan 1 interface if you decide to use it.
        CCNA, CCNA-Security, CCNP
        CCIE Security (In Progress)

        Comment


        • #5
          Re: Ciso Switch can't ping router

          Originally posted by auglan View Post
          Whatever subnet you want for your management vlan.


          Keeping with your ip scheme now:


          10.1.3.0/24


          Router interface:

          10.1.3.1 255.255.255.0


          Switch Interface:

          10.1.3.2 255.255.255.0


          Also don't forget to no shut the vlan 1 interface if you decide to use it.
          Ok I did that and the switch still can't ping the gateway or the serial port on the router... but the computers and servers can. And I did the no shut command on the switch and the router.

          Comment


          • #6
            Re: Ciso Switch can't ping router

            even set the default gateway on the switch to see if that would work but nope nothing it can't ping the router.

            Comment


            • #7
              Re: Ciso Switch can't ping router

              Please post updated configs of both devices.
              CCNA, CCNA-Security, CCNP
              CCIE Security (In Progress)

              Comment


              • #8
                Re: Ciso Switch can't ping router

                Originally posted by auglan View Post
                Please post updated configs of both devices.
                this is the switch

                Current configuration : 1289 bytes
                !
                version 12.1
                no service timestamps log datetime msec
                no service timestamps debug datetime msec
                no service password-encryption
                !
                hostname Switch
                !
                !
                spanning-tree mode pvst
                !
                interface FastEthernet0/1
                switchport mode trunk
                !
                interface FastEthernet0/2
                switchport access vlan 20
                switchport mode access
                !
                interface FastEthernet0/3
                switchport access vlan 20
                switchport mode access
                !
                interface FastEthernet0/4
                switchport access vlan 10
                switchport mode access
                !
                interface FastEthernet0/5
                switchport access vlan 10
                switchport mode access
                !
                interface FastEthernet0/6
                switchport access vlan 10
                switchport mode access
                !
                interface FastEthernet0/7
                !
                interface FastEthernet0/8
                !
                interface FastEthernet0/9
                !
                interface FastEthernet0/10
                !
                interface FastEthernet0/11
                !
                interface FastEthernet0/12
                !
                interface FastEthernet0/13
                !
                interface FastEthernet0/14
                !
                interface FastEthernet0/15
                !
                interface FastEthernet0/16
                !
                interface FastEthernet0/17
                !
                interface FastEthernet0/18
                !
                interface FastEthernet0/19
                !
                interface FastEthernet0/20
                !
                interface FastEthernet0/21
                !
                interface FastEthernet0/22
                !
                interface FastEthernet0/23
                !
                interface FastEthernet0/24
                !
                interface Vlan1
                ip address 10.1.3.2 255.255.255.0
                !
                ip default-gateway 10.1.1.1
                !
                !
                line con 0
                !
                line vty 0 4
                login
                line vty 5 15
                login
                !
                !
                end

                this is the router

                Current configuration : 1086 bytes
                !
                version 12.4
                no service timestamps log datetime msec
                no service timestamps debug datetime msec
                no service password-encryption
                !
                hostname HQ
                !
                !
                !
                !
                !
                !
                !
                !
                !
                !
                !
                !
                !
                !
                spanning-tree mode pvst
                !
                !
                !
                !
                interface FastEthernet0/0
                no ip address
                ip nat inside
                duplex auto
                speed auto
                !
                interface FastEthernet0/0.1
                encapsulation dot1Q 20
                ip address 10.1.1.1 255.255.255.0
                !
                interface FastEthernet0/0.2
                encapsulation dot1Q 10
                ip address 10.1.2.1 255.255.255.0
                !
                interface FastEthernet0/0.3
                no ip address
                shutdown
                !
                interface FastEthernet0/1
                no ip address
                duplex auto
                speed auto
                shutdown
                !
                interface Serial0/0/0
                ip address 170.1.1.2 255.255.255.0
                encapsulation frame-relay
                ip nat outside
                clock rate 64000
                !
                interface Serial0/1/0
                no ip address
                clock rate 2000000
                shutdown
                !
                interface Serial0/1/1
                no ip address
                clock rate 2000000
                shutdown
                !
                interface Vlan1
                ip address 10.1.3.1 255.255.255.0
                !
                router rip
                !
                ip nat inside source static 10.1.1.2 170.1.1.4
                ip nat inside source static 10.1.2.4 170.1.1.7
                ip classless
                !
                !
                !
                !
                !
                !
                !
                line con 0
                line vty 0 4
                login
                !
                !
                !
                end

                Comment


                • #9
                  Re: Ciso Switch can't ping router

                  You have no corresponding layer 3 interface for that subnet configured on your router.


                  On Router:

                  interface FastEthernet0/0.3
                  encapsulation dot1Q 1 native
                  ip address 10.1.3.1 255.255.255.0

                  On Switch:

                  ip default-gateway 10.1.3.1


                  Its also a good idea to number your sub-interfaces with the vlan they are encapsulating. The numbers are arbitrary but it just makes the config easier to read.


                  int fa0/0.20 (would be for vlan 20)
                  CCNA, CCNA-Security, CCNP
                  CCIE Security (In Progress)

                  Comment


                  • #10
                    Re: Ciso Switch can't ping router

                    Originally posted by auglan View Post
                    You have no corresponding layer 3 interface for that subnet configured on your router.


                    On Router:

                    interface FastEthernet0/0.3
                    encapsulation dot1Q 1 native
                    ip address 10.1.3.1 255.255.255.0

                    On Switch:

                    ip default-gateway 10.1.3.1


                    Its also a good idea to number your sub-interfaces with the vlan they are encapsulating. The numbers are arbitrary but it just makes the config easier to read.


                    int fa0/0.20 (would be for vlan 20)
                    This worked, yes thank you so much. Helped me out a lot.

                    Comment


                    • #11
                      Re: Ciso Switch can't ping router

                      Glad it worked out
                      CCNA, CCNA-Security, CCNP
                      CCIE Security (In Progress)

                      Comment

                      Working...
                      X