Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

300 Series Switch VLAN Setup

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
Bronze

Re: 300 Series Switch VLAN Setup

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

4 REPLIES
Bronze

300 Series Switch VLAN Setup

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

New Member

Re: 300 Series Switch VLAN Setup

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

Bronze

Re: 300 Series Switch VLAN Setup

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

New Member

Re: 300 Series Switch VLAN Setup

Thanks Robert

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

Perfect Answer

Thank you

Maakri

1159
Views
0
Helpful
4
Replies