Cannot Ping From Second VLAN

ProFamousProFamous Member Posts: 63 ■■□□□□□□□□
Hello, I am using packet tracer to do a little labbing. I have a switch and two computers. Computer1(fastEthernet 0/2) is on VLAN 1 with an IP address of 10.1.1.100 255.255.255.0. Computer2(fastEthernet 0/1) is on VLAN 50 with an IP address of 10.1.50.100 255.255.255.0.

Computer1 pings the switch (10.1.1.10) just fine. But computer2 tries to ping the switch (10.1.50.10) and request times out. This is my first experience with creating VLANs and I am not sure what to do. The switch should be able to respond to both of these IP addresses, correct?

Here is the relevant output of show running-config:
interface FastEthernet0/1 switchport access vlan 50
!
interface FastEthernet0/2
switchport mode access
.......
interface Vlan1
 ip address 10.1.1.10 255.255.255.0
!
interface Vlan50
 ip address 10.1.50.10 255.255.255.0

FastEthernet 0/1 and 0/2 and VLAN 1 and VLAN 50 are all "up" in show ip int brief.
Any help is greatly appreciated.

Comments

  • OctalDumpOctalDump Member Posts: 1,722
    That looks like it should work.

    Switch needs SVIs in the correct VLANs

    Ports need to be in correct VLANs with correct mode (mode access, access vlan 1, 50)

    Computers need to be attached to correct ports with correct IP and subnet mask

    All interfaces up.

    No firewall running on the computers? No firewall config on the switch?

    Have you tried swapping the computers (ports and IPs) to check if they are both ok?
    2017 Goals - Something Cisco, Something Linux, Agile PM
  • ProFamousProFamous Member Posts: 63 ■■□□□□□□□□
    I added "switchport mode access" to fastEthernet 0/1, but still nothing. fastEthernet 0/2 has no problems. Not sure what to do. I just started configuring switches a few days ago, I am not sure what SVI is so I don't think I even configured that. And no firewall running. I am using packet tracer so I don't think swapping computers will do much, it can't really be a hardware problem.
  • ProFamousProFamous Member Posts: 63 ■■□□□□□□□□
    I moved Computer1 to VLAN 50 just for testing. So they are both on the same VLAN now. And even weirder to me, they can now ping each other....but neither can ping the switch and the switch can't ping them.

    Also, both computers have records in the switches' ARP table, and they weren't there before pinging the switch. So the switch is still receiving the ping somehow, but the request still times out. I am at a loss. Any ideas?
  • OctalDumpOctalDump Member Posts: 1,722
    SVI's are Switch Virtual Interfaces - IPs on the switch associated with a VLAN. It's the bit where you type

    And yeah, if you are using PacketTracer, it's not likely to be any problem with the PCs.
    interface vlan 50
    ip address 10.1.50.10 255.255.255.0
    no shutdown
    exit
    

    Your config on the switch is probably ok, but should have something like:
    !
    interface FastEthernet0/1
     switchport mode access
    !
    interface FastEthernet0/2
     switchport access vlan 50
     switchport mode access
    !
    
    !
    interface Vlan1
     ip address 10.1.1.10 255.255.255.0
    !
    interface Vlan50
     ip address 10.1.50.10 255.255.255.0
    !
    

    Show ip interfaces brief should show something like:
    
    Interface              IP-Address      OK? Method Status                Protocol
     
    FastEthernet0/1        unassigned      YES manual up                    up
     
    FastEthernet0/2        unassigned      YES manual up                    up
    
    Vlan1                  10.1.1.10       YES manual up                    up
     
    Vlan50                 10.1.50.10      YES manual up                    up
    

    The pings might fail at first (packet tracer does this a bit), but the third, fourth, fifth etc pings should be ok.
    2017 Goals - Something Cisco, Something Linux, Agile PM
  • pinkiaiiipinkiaiii Member Posts: 216
    you cannot ping switch if it doesnt have ip address assigned to its vlan 1 ,as for vlans they separate hosts into different groups thus you cant have access to vlan 10 which say is sales from vlan 50 which would be managements etc.

    if you want to ping between pcs just use different subnets,rather then vlans.thats why it was working for you when you placed two pcs is same vlan even thou ips were different but they were part of same vlan.
  • ProFamousProFamous Member Posts: 63 ■■□□□□□□□□
    For anyone else that is having this problem, my fix was to use the command "ip routing". This makes sense...I forgot to turn on InterVLAN routing. I found my answer here: Configure InterVLAN Routing on Layer 3 Switches - Cisco. Thank you pinkiaiii and OctalDump for your help.
  • DCDDCD Member Posts: 473 ■■■■□□□□□□
    Can you show the actual config on PC2. Or do a ping and ipconfig and show that screen shot.
  • OctalDumpOctalDump Member Posts: 1,722
    ProFamous wrote: »
    For anyone else that is having this problem, my fix was to use the command "ip routing". This makes sense...I forgot to turn on InterVLAN routing. I found my answer here: Configure InterVLAN Routing on Layer 3 Switches - Cisco. Thank you pinkiaiii and OctalDump for your help.

    Intervlan routing should not be necessary to ping devices on the same subnet. You should be able to ping 10.1.50.10 from 10.1.50.100 if both devices are on the same VLAN.

    If the devices are on different subnets - for example to ping 10.1.1.10 from 10.1.50.100 - then intervlan routing will allow them to ping, since the packets will be routed between the subnets.
    2017 Goals - Something Cisco, Something Linux, Agile PM
  • ProFamousProFamous Member Posts: 63 ■■□□□□□□□□
    @OctalDump, oh I see, thanks for explaining that. Unfortunately I have deleted that setup from packet tracer and have moved on, but I understand the concept. Thanks though!
Sign In or Register to comment.