SG200-08 inter-vlan routing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2017 09:24 AM - edited 03-05-2019 08:08 AM
I'm new to this forum and not too technical.
I would like to connect a non-VLAN aware router to port 1 (or other port), create VLAN 2 (port 2&3), and VLAN 3 (port 4), connecting computers to them.
Can the SG200-08 be configured to allow all devices on VLANS 2 & 3 get to the internet on the router?
And will DHCP work from DHCP server on the router?
If so, where would I go to see an example on how to set the switch's configuration for this?
Thanks much.
- Labels:
-
LAN Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2017 11:53 AM
Hi
Below you will find the configuration for the Router and switch:
ROUTER
interface fa0/0
description INTERNET
ip address <public IP and its subnet mask>
ip nat outside
Create sub interfaces where you are going to create the gateways for each vlan.
interface f0/1
description P2P-TO-SWITCH
no shutdown
interface f0/1.2
description GATEWAY-VLAN2
encapsulation dot1q 2
ip add 192.168.2.1 255.255.255.0
ip nat inside
interface f0/1.3
description GATEWAY-VLAN3
encapsulation dot1q 3
ip add 192.168.3.1 255.255.255.0
ip nat inside
Create an access-list to match the internal subnet to be translated to the public IP through the PAT.
ip access-list standard PRIVATE-NETS
permit 192.168.2.0 0.0.0.255
permit 192.168.3.0 0.0.0.255
Create a PAT
ip nat inside source list PRIVATE-NETS interface fa0/0 overload
Create a default route
ip route 0.0.0.0 0.0.0.0 <IP next hop to the ISP> The next hop IP should be the same segment like the IP under the interface fa0/0
DHCP configuration
ip dhcp pool VLAN2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 8.8.8.8 4.2.2.2
ip dhcp pool VLAN3
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
dns-server 8.8.8.8 4.2.2.2
Then exclude the gateways.
ip dhcp excluded-address 192.168.2.1 192.168.2.1
ip dhcp excluded-address 192.168.3.1 192.168.3.1
SWITCH
vlan 2
name VLAN-X
vlan 3
name VLAN-Y
interface fa0/1 <---- Port connected to the ROUTER
description P2P-TO-ROUTER
switchport trunk encapsulation dot1q
switchport mode trunk
no shutdown
switchport trunk allowed vlan 2,3 (optional)
Configuring ports for computers:
interface fa0/2
switchport mode access
switchport access vlan 2
no shutdown
interface fa0/3
switchport mode access
switchport access vlan 2
no shutdown
interface fa0/4
switchport mode access
switchport access vlan 3
no shutdown
Please rate the comment if it is useful
:-)
>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2017 02:02 PM
Thanks for your prompt reply. I guess you are saying that the SG200-08 can do inter-VLAN routing, without using a VLAN-ware router, right?
I think your instructions are CLI commands? I'm not familiar with them, but can learn.
Can this setup be done via a browser, via the switch GUI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2017 02:47 PM
Hi
You are welcome :-)
In order to make inter vlan routing you need a router or layer 3 switch, I think the Cisco SG200 is layer 2 only. You are right, the commands are for CLI, but the links below can be useful for the configuration via GUI:
Vlan and access ports.
http://sbkb.cisco.com/CiscoSB/GetArticle.aspx?docid=67844b99e2da4a7f88db0c588197487d_Creating_VLANs_on_Cisco_Managed_Switches.xml
Trunk Interface
http://lachlanmiskin.com/blog/2012/08/01/cisco-sg-200-08-trunking/
What model of router are you using?
>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2017 08:22 AM
I was planning to use an old DLINK DIR655 (not CISCO), non VLAN aware router.
So I'm confused. Are you saying that the SG200-08 can not be configured to do what I want to do? I need both VLAN 2 (port2) and VLAN 3 (port3) be able to access the router port (VLAN1 port1).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017 04:32 AM
The SG200-08 can not be configured to do what you want, it is a layer 2 device.
Julio's original reply was very detailed, and for someone with a Cisco router also very helpful. Not helpful in your situation however, unless you replace your DLink router with something useful.
Please understand though, you can configure the SG200-08 to use VLANs but it won't matter if you do not have a layer 3 device connected to it.
Depending on where you live, an entry-level Cisco is definitely affordable ($123 for a RV215W here in Canada)
