4

I'm using the student version of cisco packet tracer 6.2.

I have two vlans that are connected to the same router but they can't ping each other. Here is the config from my router and my switch.

My router:

version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
hostname Router
ip dhcp excluded-address 192.168.10.254
ip dhcp excluded-address 192.168.20.254
ip dhcp pool 10
network 192.168.10.0 255.255.255.0
ip dhcp pool 20
network 192.168.20.0 255.255.255.0
ip cef
no ipv6 cef
spanning-tree mode pvst
interface FastEthernet0/0
no ip address
duplex auto
speed auto
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.254 255.255.255.0
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.254 255.255.255.0
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
interface Vlan1
no ip address
shutdown
ip classless
ip flow-export version 9
no cdp run
line con 0
line aux 0
line vty 0 4
 login
end

and my switch:

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 access vlan 10
interface FastEthernet0/2
switchport access vlan 20
interface FastEthernet0/3
switchport mode trunk
ports 4-24 are not configured. 
interface Vlan1
no ip address
shutdown
line con 0
line vty 0 4
login
line vty 5 15
login
end
  • 1
    Why is there only one port configured as a trunk of VLANs 10 and 20 on the router while the switch has two access ports, one with VLAN 10 and one with VLAN20? – Teun Vink May 3 '16 at 15:16
  • How are you assigning the gateway for the hosts? You don't have that in your DHCP pools. A host will need a gateway in order to contact anything off its network. – Ron Maupin May 3 '16 at 15:16
  • @RonMaupin Thanks, I forgot to assign the default gateway on the dhcp pools. – Dusty Hawkins May 3 '16 at 15:21
  • @TeunVink sorry the config was unreadable at first. Thanks for fixing it for me – Dusty Hawkins May 3 '16 at 15:21
1

You forgot the default gateway in the DHCP configurations. You need one for each pool:

default-router 192.168.x.254
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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