04-16-2012 10:55 PM
Hello,
I am trying to setup vlans on sf 302 switch and been unsuccesful. My idea is having 2 separate networks and both connecting to internet
192.168.2.0/24 Gaming Network
192.168.3.0/24 Work Network
Router ( Linkys) connected to port 8 on the switch - 192.168.4.1
I have attached the serial cable and made the following changes
Creating VLAN's
Created Vlan 20 for gaming network
#config t
#vlan database vlan 20
exit
Created Vlan 30 for work
#config t
# vlan database vlan 30
#exit
Asigned ports to VLAN's
#config t
# int fa2
# switchport mode access
# switchport access vlan 20
#exit
#config t
#int fa3
# switchport mode access
# switchport access vlan 30
#exit
Assigning IP address to VLAN
#conf t
#int vlan 20
# ip address 192.168.2.1 255.255.255.0
#end
#conf t
#int vlan 30
# ip address 192.168.3.1 255.255.255.0
#end
I am stuck after this. Now i want to connect vlan 20 and vlan 30 on to router attached to port8 on switch so that computers on both vlans have access to internet. The IP address of router is
192.168.4.1.
Please explain what needs to be done to acomplish this.
Thanks
Maakri
Solved! Go to Solution.
04-19-2012 06:16 AM
Hello Maakri,
It looks like you are using the switch in layer 3. It is important to remember that traffic is not one way. When you are sending pings to the router at 192.168.4.2, the switch will forward them on, but how does the router know how to get back?
If you do not have multiple vlans on the router, then you will have to add static routes. Here is an example of the routes you will need-
network 192.168.2.0/24 goto 192.168.4.1 hop 2
network 192.168.3.0/24 goto 192.168.4.1 hop 2
Hope this helps
04-18-2012 10:55 AM
Hello Maakri,
What is the system mode set to? Router or Switch?
If it is not in router mode then what is doing inter-vlan routing?
Cisco Small Business Support Center
Randy Manthey
CCNA, CCNA - Security
04-18-2012 03:55 PM
Hello Randy,
The switch is already set to router mode.
I have attached a belkin router on port 8 of the switch. The LAN IP of router is 192.168.4.2
On the switch I have configured port 8 as follows
#int fa8
#ip address 192.168.4.1
# switchport mode trunk
#switchport trunk allowed vlan add vlan 20
#switchport trunk allowed vlan add vlan 30
#no shutdown
#exit
#ip routing
From PC connected to vlan 20 and VLAN30 I can ping 192.168.4.1 but not 192.168.4.2. I want to access internet from my PC's on Vlan20 and VLAN30
I can ping PC in vlan30 from my pc in Vlan20 but cant access the router IP and so no internet. What am I missing? Please let me know
Thank you
Maakri
04-19-2012 06:16 AM
Hello Maakri,
It looks like you are using the switch in layer 3. It is important to remember that traffic is not one way. When you are sending pings to the router at 192.168.4.2, the switch will forward them on, but how does the router know how to get back?
If you do not have multiple vlans on the router, then you will have to add static routes. Here is an example of the routes you will need-
network 192.168.2.0/24 goto 192.168.4.1 hop 2
network 192.168.3.0/24 goto 192.168.4.1 hop 2
Hope this helps
04-22-2012 10:12 PM
Thanks Robert
You nailed it! Adding static routes on the router fixed it.
Perfect Answer
Thank you
Maakri
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide