cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2885
Views
0
Helpful
6
Replies

Switch layer 3 routing question

admin28373
Level 1
Level 1

Hello. I am trying to get my first vlan setup to work and cannot inter vlan route. I can't see what I'm doing wrong at this point. Can you help?

Edit: The switch is an SG350-28P. Latest firmeware.

 

I'm using two SVI vlans 10 and 20. Also have the default vlan 1. They each have there own subnet and are in UP/UP mode.

If I plug PC1 in to any vlan with a corresponding static ip address, I cannot ping the default 10.10.10.2

With a printer plugged in to GE8 and ip of 10.10.10.4, I cannot ping my PC on GE9 IP 10.10.20.3.

If my PC is plugged into any othe port with ip 10.10.1.3 then I connect with the router on GE3 on the default vlan 1.

 

Here is the configuration

!

(Lines missout)

vlan databasevlan 10,20
exit
!

!
hostname switch148a1f
!

!

ip routing
interface vlan 1
ip address 10.10.1.2 255.255.255.0
no ip address dhcp
!
interface vlan 10
ip address 10.10.10.1 255.255.255.0
no shut
!
interface vlan 20
ip address 10.10.20.1 255.255.255.0
no shut
!
interface GigabitEthernet8
switchport access vlan 10
no shut
!
interface GigabitEthernet9
switchport access vlan 20
no shut
!
exit
ip default-gateway 10.10.1.1

 

6 Replies 6

balaji.bandi
Hall of Fame
Hall of Fame

I do not see anything wrong with the config as such

 

but we need more information, what is the Model of the Device and wht IOS running.

Can you post complete show run output.

 

From PC are you able to ping your own IP address ?

in the switch can you able to ping 10.10.10.1and 10.10.10.20.1 and 10.10.1.1

 

can you also post along wth config, show ip interface brief. show vlan

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Oops sorry. Missed that.  The switch is an SG350-28P. Latest firmeware. I'm using a Draytek router but only offering one interface of vlan 1 to the switch.

balaji.bandi
Hall of Fame
Hall of Fame

Hello,

 

delete the line:

 

ip default-gateway 10.10.1.1

 

as this is only needed if the switch is in layer 2 mode.

 

Also:

 

--> If I plug PC1 in to any vlan with a corresponding static ip address, I cannot ping the default 10.10.10.2

 

10.10.10.2 is not the default gateway,10.10.10.1 is. Make sure your clients use the IP addresses of the respective Vlan interfaces as their default gateway.

 

 

 

 

Thank you for those points. How do the SVIs route between them, and what interface to go to for dns or the internet? 

 

Vlan1 is connected to the router ( 10.10.1.2 to router 10.10.1.1). But how do frames on vlan 20 (10.10.20.1) know how to get to vlan 1 (10.10.1.1), the default on the Router interface. 

Then the reverse is true. How does a frame with a target for 10.10.20.3 get from the router 10.10.1.1 to  GE3 10.10.1.2 vlan 1 and then on to vlan 2?

I'm really struggling with this. I'm missing a light bulb moment.

 

You need a default route on your switch (IOS syntax) - 

 

ip route 0.0.0.0 0.0.0.0 10.10.1.1

 

and then on the router for each subnet on the switch (except vlan 1 subnet)  - 

 

ip route 10.10.10.0 0.0.0.255 10.10.1.2 

ip route 10.10.20.0 0.0.0.255 10.10.1.2

 

again IOS syntax but should give you the idea. 

 

Jon

Review Cisco Networking for a $25 gift card