cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11596
Views
11
Helpful
12
Replies

can't ping some loopback interfaces

njconnect
Level 1
Level 1

Packet tracer practice environment

 

I'm trying to configure loopback interfaces on (2) 3560 Multilayer switches that i can ping from any computer. 

 

Currently, I am able to ping the loopback interface on switch 1 but not on switch 2 from any computer in the 2 VLANS i created.

 

i have enable IP routing on both switches.  I can ping the computers both vlans and the vlan ip addresses.  I can also ping the switch 2 loopback interface from switch 2 but not from anywhere else.

  

I have included the packet tracer project file

 

cisco.PNG

 

 

1 Accepted Solution

Accepted Solutions

Hello,

 

you need to decide if you want one or both switches to be Layer 3. If you have both as Layer 3, the default gateways need to be configured on the directly connected switches. If only Switch1 is a Layer 3 switch, you need a common management network on both switches, which can be Vlan 2. You need an IP address on Vlan 2 on Switch 2 for that to work. Below are the working configs if only Switch1 is Layer 3:

 

Switch1#sh run
Building configuration...

Current configuration : 2222 bytes
!
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Switch1
!
ip routing
!
username cisco privilege 15 password 7 0822455D0A16
!
ip ssh version 2
ip domain-name nina.com
!
spanning-tree mode pvst
!
interface Loopback0
ip address 10.0.0.1 255.255.255.255
!
interface Port-channel1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
switchport nonegotiate
spanning-tree portfast
!
interface FastEthernet0/2
switchport access vlan 3
switchport mode access
switchport nonegotiate
spanning-tree portfast
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
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 GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
mac-address 0001.97b3.ee01
ip address 192.168.2.1 255.255.255.0
!
interface Vlan3
mac-address 0001.97b3.ee02
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.2.10
!
ip classless
ip route 0.0.0.0 0.0.0.0 Vlan2
!
ip flow-export version 9
!
banner motd ^CWelcome!^C
!
line con 0
exec-timeout 0 0
logging synchronous
login local
!
line aux 0
!
line vty 0 4
exec-timeout 0 0
logging synchronous
login local
transport input ssh
line vty 5 15
exec-timeout 0 0
logging synchronous
login local
transport input ssh

!
end

 

----------------

 

Switch2#sh run
Building configuration...

Current configuration : 2105 bytes
!
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Switch2
!
username cisco privilege 15 password 7 0822455D0A16
!
ip ssh version 2
ip domain-name nina.com
!
spanning-tree mode pvst
!
interface Loopback0
ip address 10.0.0.2 255.255.255.255
!
interface Port-channel1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
switchport nonegotiate
spanning-tree portfast
!
interface FastEthernet0/2
switchport access vlan 3
switchport mode access
switchport nonegotiate
spanning-tree portfast
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
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 GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
mac-address 0003.e4c3.3401
ip address 192.168.2.2 255.255.255.0
!
ip default-gateway 192.168.2.1
ip classless
!
ip flow-export version 9
!
banner motd ^CWelcome!
banner motd ^C
!
line con 0
exec-timeout 0 0
logging synchronous
login local
!
line aux 0
!
line vty 0 4
exec-timeout 0 0
logging synchronous
login local
transport input ssh
line vty 5 15
exec-timeout 0 0
logging synchronous
login local
transport input ssh
!
end

View solution in original post

12 Replies 12

Abheesh Kumar
VIP Alumni
VIP Alumni
Hi,
Is that loopback on different subnet, try enabling IP ROUTING and ping

HTH
Abheesh

IP Routing is enabled on both switches and yes the loopback ip address are on different subnets are required.

is that route added on both the switches for the different subnets mentioning the gateways.

HTH
Abheesh

Hello,

 

the easiest way to configure this:

 

Switch1

 

Switch1(config)#ip route 0.0.0.0 0.0.0.0 vlan 2

 

Switch2

 

Switch2#conf t

Switch2(config)#no ip routing

Switch2(config)#ip default-gateway 192.168.2.1

No that did not work at all.  same results

Hello,

 

yoiu need to add an IP address and a VLAN 2 interface to Switch2 as well:

 

Switch2(config)#int vlan 2
Switch2(config-if)#ip address 192.168.2.2 255.255.255.0

 

Again, what are the requirements, what are you trying to accomplish ? Do both switches need to be Layer 3 ?

vlan 2 has an ip address 192.168.2.1/24

vlan 3 has an ip address 192.168.3.1/24

 

I'm trying to be able to ping loopback0 on switch2 from switch1 or any of the computers in vlan 2 and 3.  

As of now i can only ping loopback0 on switch1 from switch2 and all the computers.

Hello,

 

you need to decide if you want one or both switches to be Layer 3. If you have both as Layer 3, the default gateways need to be configured on the directly connected switches. If only Switch1 is a Layer 3 switch, you need a common management network on both switches, which can be Vlan 2. You need an IP address on Vlan 2 on Switch 2 for that to work. Below are the working configs if only Switch1 is Layer 3:

 

Switch1#sh run
Building configuration...

Current configuration : 2222 bytes
!
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Switch1
!
ip routing
!
username cisco privilege 15 password 7 0822455D0A16
!
ip ssh version 2
ip domain-name nina.com
!
spanning-tree mode pvst
!
interface Loopback0
ip address 10.0.0.1 255.255.255.255
!
interface Port-channel1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
switchport nonegotiate
spanning-tree portfast
!
interface FastEthernet0/2
switchport access vlan 3
switchport mode access
switchport nonegotiate
spanning-tree portfast
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
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 GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
mac-address 0001.97b3.ee01
ip address 192.168.2.1 255.255.255.0
!
interface Vlan3
mac-address 0001.97b3.ee02
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.2.10
!
ip classless
ip route 0.0.0.0 0.0.0.0 Vlan2
!
ip flow-export version 9
!
banner motd ^CWelcome!^C
!
line con 0
exec-timeout 0 0
logging synchronous
login local
!
line aux 0
!
line vty 0 4
exec-timeout 0 0
logging synchronous
login local
transport input ssh
line vty 5 15
exec-timeout 0 0
logging synchronous
login local
transport input ssh

!
end

 

----------------

 

Switch2#sh run
Building configuration...

Current configuration : 2105 bytes
!
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Switch2
!
username cisco privilege 15 password 7 0822455D0A16
!
ip ssh version 2
ip domain-name nina.com
!
spanning-tree mode pvst
!
interface Loopback0
ip address 10.0.0.2 255.255.255.255
!
interface Port-channel1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
switchport nonegotiate
spanning-tree portfast
!
interface FastEthernet0/2
switchport access vlan 3
switchport mode access
switchport nonegotiate
spanning-tree portfast
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
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 GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
mac-address 0003.e4c3.3401
ip address 192.168.2.2 255.255.255.0
!
ip default-gateway 192.168.2.1
ip classless
!
ip flow-export version 9
!
banner motd ^CWelcome!
banner motd ^C
!
line con 0
exec-timeout 0 0
logging synchronous
login local
!
line aux 0
!
line vty 0 4
exec-timeout 0 0
logging synchronous
login local
transport input ssh
line vty 5 15
exec-timeout 0 0
logging synchronous
login local
transport input ssh
!
end

@ george pauwen- With the  solution you describe i am able to ping switch 2 from all devices and computer but i can't ping loopback0 on switch2 from all other devices.

I created the management VLAN and also added a static route to Switch2 loopback interface which works.  Thanks for your help!

Can you post the configuration to have look what configured.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Switch 1 configuration

--------------------------------------------------------

 

!

version 12.2(37)SE1

no service timestamps log datetime msec

no service timestamps debug datetime msec

service password-encryption

!

hostname Switch1

!

!

!

!

!

!

ip routing

 

!

!

ip ssh version 2

ip domain-name blank.com

!

!

spanning-tree mode pvst

!

!

interface Loopback0

ip address 10.0.0.1 255.255.255.255

!

interface Port-channel1

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/1

switchport access vlan 2

switchport mode access

switchport nonegotiate

spanning-tree portfast

!

interface FastEthernet0/2

switchport access vlan 3

switchport mode access

switchport nonegotiate

spanning-tree portfast

!

 

!

interface GigabitEthernet0/1

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode active

!

interface GigabitEthernet0/2

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode active

!

interface Vlan1

no ip address

shutdown

!

interface Vlan2

mac-address 0001.97b3.ee01

ip address 192.168.2.1 255.255.255.0

!

interface Vlan3

mac-address 0001.97b3.ee02

ip address 192.168.3.1 255.255.255.0

ip helper-address 192.168.2.10

!

ip classless

!

ip flow-export version 9

!

!

!

banner motd ^CWelcome!^C

!

!

line con 0

exec-timeout 0 0

logging synchronous

login local

!

line aux 0

!

line vty 0 4

exec-timeout 0 0

logging synchronous

login local

transport input ssh

line vty 5 15

exec-timeout 0 0

logging synchronous

login local

transport input ssh

!

end

 

 

Switch2 Configuration

-------------------------------------------------------------

 

!

version 12.2(37)SE1

no service timestamps log datetime msec

no service timestamps debug datetime msec

service password-encryption

!

hostname Switch2

!

!

!

ip ssh version 2

ip domain-name blank.com

!

!

spanning-tree mode pvst

!

!

!

interface Loopback0

ip address 10.0.0.2 255.255.255.255

!

interface Port-channel1

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/1

switchport access vlan 2

switchport mode access

switchport nonegotiate

spanning-tree portfast

!

interface FastEthernet0/2

switchport access vlan 3

switchport mode access

switchport nonegotiate

spanning-tree portfast

!

!

interface GigabitEthernet0/1

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode active

!

interface GigabitEthernet0/2

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode active

!

interface Vlan1

no ip address

shutdown

!

ip classless

!

ip flow-export version 9

!

!

!

banner motd ^CWelcome!

banner motd ^C

!

!

!

!

!

line con 0

exec-timeout 0 0

logging synchronous

login local

!

line aux 0

!

line vty 0 4

exec-timeout 0 0

logging synchronous

login local

transport input ssh

line vty 5 15

exec-timeout 0 0

logging synchronous

login local

transport input ssh

!

!

!

!

end

Review Cisco Networking products for a $25 gift card