0

I am stuck in that that switch can't ping router and router can't ping switch. How to fix that ?

I tried so much variants but them didn't help me

Actually router must do static routing, that i am trying to do but that doesn't help me

I know that some config is awful here, actually on that connected switch but I am learning. Picture

enter image description here

L3 switch show run code

interface FastEthernet0/1
 switchport access vlan 12
 switchport trunk allowed vlan 2-11
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
!
interface FastEthernet0/2
 switchport access vlan 2
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/3
 switchport access vlan 3
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/4
 switchport access vlan 4
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/5
 switchport access vlan 5
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/6
 switchport access vlan 6
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/7
 switchport access vlan 7
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/8
 switchport access vlan 8
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/9
 switchport access vlan 9
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/10
 switchport access vlan 10
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet0/11
 switchport access vlan 11
 switchport mode access
 switchport nonegotiate
!
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 GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan2
 mac-address 000a.41cd.4e01
 ip address 192.168.0.1 255.255.255.248
!
interface Vlan3
 mac-address 000a.41cd.4e02
 ip address 192.168.0.9 255.255.255.248
!
interface Vlan4
 mac-address 000a.41cd.4e03
 ip address 192.168.0.17 255.255.255.248
!
interface Vlan5
 mac-address 000a.41cd.4e04
 ip address 192.168.0.25 255.255.255.248
!
interface Vlan6
 mac-address 000a.41cd.4e05
 ip address 192.168.0.33 255.255.255.248
!
interface Vlan7
 mac-address 000a.41cd.4e06
 ip address 192.168.0.41 255.255.255.248
!
interface Vlan8
 mac-address 000a.41cd.4e07
 ip address 192.168.0.49 255.255.255.248
!
interface Vlan9
 mac-address 000a.41cd.4e08
 ip address 192.168.0.57 255.255.255.248
!
interface Vlan10
 mac-address 000a.41cd.4e09
 ip address 192.168.0.65 255.255.255.248
!
interface Vlan11
 mac-address 000a.41cd.4e0a
 ip address 192.168.0.73 255.255.255.248
!
interface Vlan12
 mac-address 000a.41cd.4e0b
 ip address 192.168.0.82 255.255.255.248
!
router rip
!
ip classless
ip route 192.168.0.0 255.255.255.0 192.168.0.0 

Router show run code

interface GigabitEthernet0/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface GigabitEthernet0/1
 ip address 196.168.0.81 255.255.255.248
 duplex auto
 speed auto
!
interface GigabitEthernet0/2
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router rip
!
ip classless

Router show ip route

 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
           * - candidate default, U - per-user static route, o - ODR
           P - periodic downloaded static route

    Gateway of last resort is not set

         196.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
    C       196.168.0.80/29 is directly connected, GigabitEthernet0/1
    L       196.168.0.81/32 is directly connected, GigabitEthernet0/1
7
  • please provide screen shot of your diagram. You can insert it here.
    – infra
    Jun 11, 2019 at 17:27
  • If you have doubt about your code which you configured, code sample also
    – infra
    Jun 11, 2019 at 17:30
  • @infra, done. code sample provided and picture also too Jun 11, 2019 at 17:40
  • You've got two routers and three L3 switches in your diagram. Which ones can't ping each other and where are the links in between? Which ports connect to each other?
    – Zac67
    Jun 11, 2019 at 18:18
  • @Zac67, Second router is redundant , i have tested one thing. that router what is connected need to be configured Jun 11, 2019 at 18:59

2 Answers 2

1

I assume you want to connect switch interface FastEthernet0/1 to the router interface GigabitEthernet0/1 is that right?

If you want to route traffic from vlan 2-11 to the router you must:

  • delete interface Vlan12
  • configure the IP directly on the interface FastEthernet0/1

interface FastEthernet0/1 ip address 192.168.0.82 255.255.255.248

Now it should be possible to ping the switch from the router or vice versa

2
  • It is impossible to configure IP on any interface on L3 switch without Vlan Jun 12, 2019 at 15:07
  • 1
    @AwesomeMan, you clearly don't know how to configure an IP without a vlan, but it's quite simple (assuming the switch supports it). Go into interface config mode, type no switchport, and then configure your IP address Jun 13, 2019 at 11:47
0

You need to configure router-on-a-stick.

interface FastEthernet0/1
 switchport trunk allowed vlan 2-11
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate

Router(config)# interface g0/0.20
Router(config-subif)# encapsulation dot1q 20
Router(config-subif)# ip add x.x.x.x x.x.x.x
Router(config-subif)# interface g0/0.30
Router(config-subif)# encapsulation dot1q 30
Router(config-subif)# ip add x.x.x.y x.x.x.x
....(add remanining vlan 4,5,6...)
Router(config)# interface g0/0
Router(config-if)# no shut

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.