cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1638
Views
0
Helpful
4
Replies

300 Series Switch VLAN Setup

maakri123
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

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

View solution in original post

4 Replies 4

rmanthey
Level 4
Level 4

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

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

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

Thanks Robert

You nailed it! Adding static routes on the router fixed it.

Perfect Answer

Thank you

Maakri

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Switch products supported in this community
Cisco Business Product Family
  • CBS110
  • CBS220
  • CBS250
  • CBS350
Cisco Switching Product Family
  • 110
  • 200
  • 220
  • 250
  • 300
  • 350
  • 350X
  • 550X