On your 3560, make the following route:
ip route 0.0.0.0 0.0.0.0 192.168.3.6
This will add a default route that will direct traffic to the router if the destination address is not in the switch's routing table.
You can also use the interface: ip route 0.0.0.0 0.0.0.0 fa0/4
**********
if his suggestion doesn't work, try to configure fa0/4 as a trunk since you have more than 1 vlan..
-----------------------------------------------------
You can ping the 192.168.3.6 from your switch because the interface its cabled into is on the same subnet. Hosts connected to your switch on either of the other 2 VLANS will never connect to the internet, because, as mentioned before, there is no VLAN trunking taking place from your switch to your router...
Try the following config instead:
Cisco 3560:
Set up VLAN interfaces to be "trunk-ready"
3560(config)#interface VLAN 1
3560(config-if)#ip address 192.168.1.2 255.255.255.0
3560(config-if)#no shut
3560(config-if)#exit
3560(config)#Int VLAN 2
3560(config-if)#ip address 192.168.2.2 255.255.255.0
3560(config-if)#no shut
3560(config-if)#exit
Now set up your trunk:
3560(config)#int fa0/4
3560(config-if)#switchport trunk encapsulation dot1q
3560(config-if)#switchport mode trunk
3560(config-if)#switchport trunk native vlan 1
3560(config-if)#switchport trunk allowed vlan add 2 (or "sw trunk allowed vlans all")
3560(config-if)#end
(save config if you wish)
Cisco 1841:
Now set up the trunk port on the router:
1841(config)#int fa0/0
1841(config-if)#no ip address
1841(config-if)#no shutdown
1841(config-subif)#int fa0/0.1
1841(config-subif)#encapsulation dot1Q 1
1841(config-subif)#ip address 192.168.1.1 255.255.255.0
1841(config-subif)#int fa0/0.2
1841(config-subif)#encapsulation dot1Q 2
1841(config-subif)#ip address 192.168.2.1 255.255.255.0
1841(config-subif)#exit
if its done right, you should see something similar to this:
%LINK-5-CHANGED: Interface FastEthernet0/4, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to up
Configure the 1841 to get to you ISP as needed, and all users should be able to get online easily from here. Test pings from the devices used to assist in this config show the following results:
3560#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 31/31/31 ms
3560#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 31/31/32 ms
Let us know how it goes...
this attemp i have already done. please suggest natting if any
You need to setup a similar route on your router.
ip route 192.168.2.0 255.255.255.0 fa 0/1
ip route 192.168.3.0 255.255.255.0 fa 0/1
Run traceroute from a client in the LAN and post the results.
you should make the port that’s connected to the router a trunk link.Configure the port on the router to route traffic between vlan and also pass traffic to the internet by doing NAT.