2

i have a question/problem. i have a local router with default-gateway 192.168.3.254, now on my layer 3 switch 3560 i configure 3 vlans.

vlan 10 - data /ip address 192.168.10.254 255.255.255.0

vlan 20 - server /ip address 192.168.20.254 255.255.255.0

vlan 30 - mgt /ip address 192.168.30.254 255.255.255.0

pc1 connected to gig0/5 vlan 10 ip address 192.168.10.5 255.255.255.0

pc2 connected to gig0/10 vlan 20 ip address 192.168.20.10 255.255.255.0

pc3 connected to gig0/20 vlan 30 ip address 192.168.30.20 255.255.255.0

on switchport gig0/1 which the router is connected i issued no switchport command and give it ip 192.168.3.90 255.255.255.0

enable ip routing ip route 0.0.0.0 0.0.0.0 192.168.3.254

inter-vlan routing on all pc's are working fine, but neither of the 3 pc is unable to connect to internet..

pls guide me, thank you.

  • Are you NATting each of these subnets before they get to the "real" internet router? Wherever you cross the boundary between private IP and the public IPs of the Internet, you'll have to NAT them. – A J Rossington Dec 23 '16 at 12:17
5

Your router doesn't know how to route to your 3 vlans. When it receives a packet for 192.168.10.5, for example, it doesn't know where to forward it.

You need to configure static routes on your router like this (exact syntax depends on your model of router):

ip route 192.168.10.0 255.255.255.0 192.168.3.90
ip route 192.168.20.0 255.255.255.0 192.168.3.90
ip route 192.168.30.0 255.255.255.0 192.168.3.90
-2

Router >>>> ip route 0.0.0.0 0.0.0.0 [interface]

Switch >>> ip default gateway is the router ip address

It should work

  • This will send everything back to the L3 switch, including packets you are trying to send out to the Internet (thus creating a routing loop) – Peter Green Aug 13 '16 at 22:54

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.