I can't ping another host PC on the same switch and subnet.
Raymond Mason
Member Posts: 74 ■■□□□□□□□□
in CCNA & CCENT
This has been driving me bonkers. In theory this should work since I put both PCs on the same subnet connected to the same switch. I am using a network simulator and I don't know what went wrong. I just started out with a fresh switch and two PCs connected by a straight through cable and they can't ping each other. They don't have a firewall enabled. The switch is a 1960 with no router. Even with a router I still have the same problems.
Maybe there is something I am missing here. I have tried many things but none of them have worked.
Maybe there is something I am missing here. I have tried many things but none of them have worked.
Comments
-
koz24 Member Posts: 766 ■■■■□□□□□□Which network simulator are you using? Can you post the config? Are you sure they're on the same subnet? Maybe one is /24 and the other /16?
-
Raymond Mason Member Posts: 74 ■■□□□□□□□□I am using Packet Tracer 5.1. They both have a subnet mask of 255.255.255.0. I will give you the running-config of the switch. They are connected on fastethernet port 0/1 - 0/2.
Current configuration : 1033 bytes
!
version 12.2
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
!
interface FastEthernet0/2
!
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 GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
no ip address
shutdown
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end -
Raymond Mason Member Posts: 74 ■■□□□□□□□□The result of arp -a on both PC's is this:
Internet Address: Blank
Physical Address: Blank
Type: Blank
Do you think this might have something to do with the ARP? -
koz24 Member Posts: 766 ■■■■□□□□□□Raymond Mason wrote: »The result of arp -a on both PC's is this:
Internet Address: Blank
Physical Address: Blank
Type: Blank
Do you think this might have something to do with the ARP?
Yes, this is clearly the issue. Host forwarding logic says to first check if the destination is on the same subnet, if it is: send directly. The host then uses ARP to find the MAC address of the directly connected device and sends it directly. In your case it looks like the PCs don't have IP addresses configured, so how can they check if they're on the same subnet? They cant. Are you sure you configured the IP addresses? In PacketTracer all you have to do is left-click the device, then go to IP config and set it up. -
Raymond Mason Member Posts: 74 ■■□□□□□□□□They are configured or so I thought. Let me show you what I did:
-
koz24 Member Posts: 766 ■■■■□□□□□□This is really strange. Can you try this on Packet Tracer 6.X?
Also, PC2 I'm guessing is 192.168.2.2 255.255.255.0? -
Raymond Mason Member Posts: 74 ■■□□□□□□□□I did try this on packet tracer 6.x. That is why I am using 5.1 because I thought it was a bug with the simulator version. Nope, doesn't work at all.
-
echo_time_cat Member Posts: 74 ■■□□□□□□□□What does ipconfig show for each PC? I decided to try and reproduce this, and I got a APIPA (169.254 etc) until I provided a default gateway. Can ping each host now that I assigned a DG.
-
Deathmage Banned Posts: 2,496Try to make the vlan 1 not 'shutdown' with a 'no shutdown' and apply an ip address of say like '192.168.2.10 255.255.255.255.0' to interface vlan 1 and then assign like say 192.168.2.1 and 2 to the PC's with the 255.255.255.0 subnet mask and then see if you can ping across.
Since your using vlan 1 no need to setup 'switchport mode access - switchport access vlan 1' on the ports since it's the native vlan by default, as-well as according to the switch config above, but to me the vlan 1 interface still needs an ip address and not shutdown is for sure is needed.
Also sometimes Packet Tracer can work flaky.
Try the above and see if that works. -
mikeybinec Member Posts: 484 ■■■□□□□□□□Packet TRacer aint that flakey.. On the switch, give me a sh vtp st and a sh vlan br. I agree it looks clear on the running configCisco NetAcad Cuyamaca College
A.S. LAN Management 2010 Grossmont College
B.S. I.T. Management 2013 National University -
Deathmage Banned Posts: 2,496Keep it simple boys, it just needs a "no shutdown" on the vlan 1.
by default vlan 1 is always shutdown and needs to be taken out of an administrative down with a 'no shutdown' on the interface. The same applies for every interface on a out-of-the-box switch and/or router. Technically, even though it's virtual a Packet Tracer router/switch is a 'OFTB' Experience just like the real device.
Below, is an near exact clone:
Switch:
core-switch# core-switch#
core-switch#show ru
core-switch#show running-config
Building configuration...
Current configuration : 3292 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname core-switch
!
enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1 switchport mode access
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/2
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/3
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/4
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/5
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/6
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/7
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/8
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/9
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/10
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/11
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/12
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/13
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/14
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/15
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/16
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/17
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/18
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/19
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/20
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/21
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/22
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/23
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
interface FastEthernet0/24
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.2.10 255.255.255.0
!
!
!
!
line con 0
password 7 0822455D0A16
logging synchronous
login
history size 50
exec-timeout 0 0
!
line vty 0 4
exec-timeout 0 0
password 7 0822455D0A16
logging synchronous
login
line vty 5 15
exec-timeout 0 0
password 7 0822455D0A16
logging synchronous
login
!
!
end
core-switch#
core-switch#
core-switch#
core-switch#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms
core-switch#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms
core-switch#
Back to CCENT labbing I go... [disappears into the dark, dark, IT man-cave. Candle anyone?] -
xnx Member Posts: 464 ■■■□□□□□□□Good spot Deathimage, goes without saying but check the basics first :PGetting There ...
Lab Equipment: Using Cisco CSRs and 4 Switches currently -
Raymond Mason Member Posts: 74 ■■□□□□□□□□I've checked the config on the other PC and I can confirm that it has an I.P and subnet. I did what deathmage suggested. I still can't ping the other PC. It sends four packets and the request times out. I end up loosing all four packets. Also, when I did an IP config for each PC I got the following:
PC0
IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 0.0.0.0
PC1
IP Address......................: 192.168.2.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 0.0.0.0
Vlan 1 is not shutdown and is given an I.P address and subnet address. Here is a fresh running-config:
Switch#show running-config
Building configuration...
Current configuration : 1047 bytes
!
version 12.2
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
!
interface FastEthernet0/2
!
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 GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
ip address 192.168.2.10 255.255.255.0
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end -
davenull Member Posts: 173 ■■■□□□□□□□Raymond Mason wrote: »I've checked the config on the other PC and I can confirm that it has an I.P and subnet. I did what deathmage suggested. I still can't ping the other PC. It sends four packets and the request times out. I end up loosing all four packets. Also, when I did an IP config for each PC I got the following:
PC0
IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 0.0.0.0
PC1
IP Address......................: 192.168.2.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 0.0.0.0
end
The PCs are in different networks. -
Raymond Mason Member Posts: 74 ■■□□□□□□□□Different networks? The IPs are different; but how are they in different networks? Maybe you can explain? Thanks for pointing this out if it is the case.
-
HAMP Member Posts: 163Raymond Mason wrote: »Different networks? The IPs are different; but how are they in different networks? Maybe you can explain? Thanks for pointing this out if it is the case.
He is correct, they are in different networks. Looks like you may have to re-read the chapter on how to subnet. -
Raymond Mason Member Posts: 74 ■■□□□□□□□□I haven't gotten to the chapter on how to subnet. At least I know what the problem is and how I am going to tackle it now. I knew it was something simple that I was missing.
-
Deathmage Banned Posts: 2,496Raymond Mason wrote: »I haven't gotten to the chapter on how to subnet. At least I know what the problem is and how I am going to tackle it now. I knew it was something simple that I was missing.
different networks, yup that'll do it. Glad you figured it out. troubleshooting is part of the fun of networking sometimes or the stress, lol. -
HAMP Member Posts: 163Raymond Mason wrote: »I haven't gotten to the chapter on how to subnet. At least I know what the problem is and how I am going to tackle it now. I knew it was something simple that I was missing.
255.255.255.0
net.net.net.host
255.255.0.0
net.net.host.host
255.0.0.0
net.host.host.host
See how the net is lined up with the 255? The 255 mean network. To be the same network, all of the numbers have to match/line up.
Since you are using 255.255.255.0, all of the first 3 octet must match. You typed in the 3rd Octet different.
Should have been something like:
192.168.1.1
255.255.255.0
192.168.1.2
255.255.255.0
or if you wanted,
192.168.2.1
255.255.255.0
192.168.2.2
255.255.255.0 -
satishtech Member Posts: 243different networks, just did the same lab on PT
works with 192.168.1.0/24 on either interface.
1.0 ,2.0 --- different networks -
Raymond Mason Member Posts: 74 ■■□□□□□□□□I corrected the problem and instead of using 192.168.2.1 I used 192.168.1.2 ect. Now they can communicate just fine. I am so relieved to have finally figure this out. Thank you all for your help. I sure have learned a lot through this.