cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1365
Views
0
Helpful
18
Replies

Inter vlan routing problem

junaid haroon
Level 1
Level 1

Hi,

i tried to archive the inter valn rotuing using layer 3 switch.i can ping every PC between different vlans.But i cannot ping router interface.Netwrok diagram is attached for your reference.

Here is configuration

Layer-3 switch

Building configuration...

Current configuration : 1439 bytes

!

version 12.2

no service password-encryption

!

hostname Switch

!

!

ip routing

!

!

!

!

ip ssh version 1

!

port-channel load-balance src-mac

!

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport mode trunk

!

interface FastEthernet0/3

switchport access vlan 10

!

interface FastEthernet0/4

switchport access vlan 20

!

interface FastEthernet0/5

switchport access vlan 20

!

interface FastEthernet0/6

no switchport

ip address 192.168.40.253 255.255.255.0

duplex auto

speed auto

!

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

!

interface GigabitEthernet0/2

!

interface Vlan1

no ip address

shutdown

!

interface Vlan10

ip address 192.168.10.254 255.255.255.0

!

interface Vlan20

ip address 192.168.20.254 255.255.255.0

!

interface Vlan30

ip address 192.168.30.254 255.255.255.0

!

router rip

!

ip classless

ip route 0.0.0.0 0.0.0.0 192.168.40.254

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

end

*****************************************************************************************************************

My layer 2 Switch configuration

Current configuration : 967 bytes

!

version 12.1

no service password-encryption

!

hostname Switch

!

!

!

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 10

!

interface FastEthernet0/3

switchport access vlan 20

!

interface FastEthernet0/4

switchport access vlan 30

!

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 Vlan1

no ip address

shutdown

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

end

*****************************************************************************************

please help me out

18 Replies 18

kcnajaf
Level 7
Level 7

HI Junaid,

Not sure if i got your problem right?

You have mentioned that "I can ping every PC between different vlans" that mean your able to ping from on pc to other pc on different vlans? If that is the case then inter-vlan routing is working right?

You have trouble in pinging only the router interface from the PC? Is that right? If so can you please tel from which PC your trying to ping which ip address on the multi-layer switch?

Also have you enabled routing gloabally with command "ip routing" ?

Regards

Najaf

Paul Morgan
Level 1
Level 1

Display SH IP ROUTE on the L3 switch?

Jan Hrnko
Level 4
Level 4

Hi Junaid,

The problem is most probably at the Router0. Does it have ip route back to these VLANs? Or does it at least have default route configured, pointing at the Switch0?

Try to do traceroute from PC, see if you get any reply from Router0. Check Router0's routing table, if it has records for addresses from which you are pinging:

Router0#show ip route [IP_ADDRESS_OF_THE_COMPUTER_FROM_WHICH_YOU_ARE_PINGING]

If you get output like this: % Network not in table add appropriate routes (configure static or dynamic routing).

I wouldn't worry about ip routing command though, the running-config you have provided clearly states that it is enabled.

Best regards,

Jan

Hi Jan,

Here the output of Router0#show ip route command on router0

Router#sh ip route 192.168.30.2

% Network not in table

Router#

Jan can you please guide me how i define a route on router.And the default on layer 3 switch is already added.

ip route 0.0.0.0 0.0.0.0 192.168.40.254

looking forward for your reply



Hi,

ip route 192.168.30.0 255.255.255.0 192.168.40.253

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Hi cadet,

Do you saw my diagram after adding this route my traffic come back to lan.I want to out my traffic from router.and make a things that users can also ping router

Hi,

if you want to ping the router interface 192.168.40.254 from the PCs then you must give a route for each vlan subnet on the router,each pointing towards the L3 routeds port of the L3 switch doing the interVlan routing.

What I gave you is one of these static routes.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Hi cadet,

Got it and Thanks.I have one more issue on layer 2 switch i caan't ping any vlan interface??

Hi,

Jan can you please guide me how i define a route on router.And the default on layer 3 switch is already added.

as Alain said, you must configure static routes for every vlan, or you can define default route (which will forward any packet to the swtich, for which the router doesn't have a better route). You have that already on your switch but lacking on router. Default route will take care of everything in your case. I think that you can configure it this way in packet tracer:

Router0(config)#ip route 0.0.0.0 0.0.0.0 192.168.40.253

I have one more issue on layer 2 switch i caan't ping any vlan interface??

From which host/switch/router, with what source IP address are you pinging which vlan interface? Please, post also configs of these devices or upload your pkt file, so we can help you out.

Best regards,

Jan

Hi,

You must have a  management interface Vlan with an ip address and ip default-gateway x.x.x.x where x.x.x is the vlan interface in this management vlan on the layer 3 switch.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Hi jan,

I did't little amendent its starts pinging.

Now I want 1 managment vlan from which i telnet every switch how i do this???

Here is layer 2 switch configuration

Switch#sh run

Building configuration...

urrent configuration : 1147 bytes

!

version 12.1

no service password-encryption

!

hostname Switch

!

!

!

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 10

!

interface FastEthernet0/3

switchport access vlan 20

!

interface FastEthernet0/4

switchport access vlan 30

!

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 Vlan1

no ip address

shutdown

!

interface Vlan10

ip address 192.168.10.254 255.255.255.0

!

interface Vlan20

ip address 192.168.20.254 255.255.255.0

!

interface Vlan30

ip address 192.168.30.254 255.255.255.0

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

end

Hi,

just create one VLAN on all switches ,for example vlan 99 and configure a SVI(vlan interface) with an ip address for this vlan on all switches then on the l2 switches configure ip default-gateway x.x.x.x where x.x.x.x is the vlan interface for management IP.On your router if you didn't configure a default route pointing towards the l3 switch then create a static route for this Vlan subnet.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Hi cadet alain

What should be the default gateway for management vlan??

Hi,

the ip address of the management vlan interface on the core switch.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
Review Cisco Networking for a $25 gift card