cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1095
Views
10
Helpful
5
Replies

Simple routing and switching problem

alexb931
Level 1
Level 1

Hi, 

 

Could someone please explain to me why only VLAN 1 in this set up can ping other routers and bits on different subnets and  VLAN 2 and 3 can't seem to ping anything? Also DHCP only works for VLAN 1

Switch one - 

hostname SWITCH1

!

!

!

!

!

spanning-tree mode pvst

!

interface FastEthernet0/1

switchport access vlan 2

!

interface FastEthernet0/2

switchport access vlan 3

!

interface FastEthernet0/3

switchport access vlan 3

!

interface FastEthernet0/4

switchport access vlan 3

!

interface FastEthernet0/5

switchport access vlan 3

!

interface FastEthernet0/6

switchport access vlan 2

!

interface FastEthernet0/7

switchport access vlan 2

!

interface FastEthernet0/8

switchport access vlan 2

!

interface FastEthernet0/9

switchport access vlan 2

!

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 mode trunk

!

interface GigabitEthernet0/2

!

interface Vlan1

ip address 192.168.1.4 255.255.255.0

!

interface Vlan2

ip address 192.168.2.1 255.255.255.0

!

interface Vlan3

ip address 192.168.4.1 255.255.255.0

!

!

!

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

end

 

Now for the router - 

 

Router#show run

Building configuration...

 

Current configuration : 1586 bytes

!

version 15.1

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Router

!

!

!

!

!

ip dhcp pool add

network 192.168.4.0 255.255.255.0

default-router 192.168.4.5

ip dhcp pool 2

network 192.168.2.0 255.255.255.0

default-router 192.168.2.5

ip dhcp pool 3

network 192.168.1.0 255.255.255.0

default-router 192.168.1.5

!

!

!

ip cef

no ipv6 cef

!

!

!

!

license udi pid CISCO2911/K9 sn FTX1524S481

!

!

!

!

!

!

!

!

!

!

!

spanning-tree mode pvst

!

!

!

!

!

!

interface GigabitEthernet0/0

no ip address

duplex auto

speed auto

shutdown

!

interface GigabitEthernet0/1

no ip address

duplex auto

speed auto

!

interface GigabitEthernet0/1.1

encapsulation dot1Q 1 native

ip address 192.168.1.5 255.255.255.0

!

interface GigabitEthernet0/1.2

encapsulation dot1Q 2

ip address 192.168.2.5 255.255.255.0

!

interface GigabitEthernet0/1.3

encapsulation dot1Q 3

ip address 192.168.4.5 255.255.255.0

!

interface GigabitEthernet0/2

ip address 192.168.3.5 255.255.255.0

duplex auto

speed auto

!

interface GigabitEthernet0/2.2

no ip address

!

interface Vlan1

no ip address

shutdown

!

router ospf 1

log-adjacency-changes

network 10.1.1.1 0.0.0.0 area 0

network 10.1.2.1 0.0.0.0 area 0

network 10.1.3.1 0.0.0.0 area 0

network 10.1.1.0 0.0.0.255 area 0

network 10.1.2.0 0.0.0.255 area 0

network 192.168.1.0 0.0.0.255 area 0

network 192.168.2.0 0.0.0.255 area 0

network 192.168.3.0 0.0.0.255 area 0

!

ip classless

!

ip flow-export version 9

!

!

!

!

!

!

!

line con 0

!

line aux 0

!

line vty 0 4

login

!

!

!

end

 

I'm using packet tracer.

 

 

Any help would be very much appreciated. 

 

Kind regards,

Alex 

 

P.S. This is switch 2 that has VLAN 1 working from. Both switches are running VTP successfully. 

lding configuration...

 

Current configuration : 1092 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

switchport access vlan 3

!

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 mode trunk

!

interface GigabitEthernet0/2

!

interface Vlan1

no ip address

shutdown

!

!

!

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

end

 

 

Switch#

 

5 Replies 5

Dennis Mink
VIP Alumni
VIP Alumni

can you give us an example of what does NOT ping and what does. and also what the respective default gateways are on the machines you are pinging from?  

 

and can you ping the default gateways in each respective VLAN? 

Please remember to rate useful posts, by clicking on the stars below.

have you enabled ip routing for intervlan routing ?

can you post show int trunk from the switches make sure everything's being allowed through

 

Hi Guys,

 

I've added a screen shot of the network.

 

Basically VLAN 2 and 3 can ping hosts on the same LAN but can't ping its default route or other VLANs. VLAN 1 can ping everything perfectly even the routers on the ride hand side of the network .

Port Mode Encapsulation Status Native vlan

Gig0/1 on 802.1q trunking 1

 

Port Vlans allowed on trunk

Gig0/1 1-1005

 

Port Vlans allowed and active in management domain

Gig0/1 1,2,3

 

Port Vlans in spanning tree forwarding state and not pruned

Gig0/1 1,2,3

SWITCH1#

 

Possibly the fact I can't ping the default route says a lot, but I don't know where i'm going wrong

 

Regards,

Alex 

On switch 1  you do not need SVI's configured to route anything as the router is handling that duty . Delete interface vlan 2 and 3 if you are using interface vlan 1 to manage the switch. Also keep in mind packettracer  has been known to be buggy so it's possible that could be a factor too.   Check to make sure all vlans are created on your switches by doing a sh vlan command .  Check trunks between the switches and from the switches to the router.

I've found the problem! 

 

I had the wrong interface as the trunk, I had gig0/1 instead of 0/2! Explains why only VLAN one was working I suppose.

 

Thank you both for your help

 

Regards,

Alex