cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1441
Views
0
Helpful
13
Replies

How to setup a LAN with different addressing scheme

Mrzander1
Level 1
Level 1

I purchased a Cisco SG300-10 managed switch in the hopes I could set it up where anything connected to ports 1-8 would be put in a different LAN than whatever is connected to the router. Basically, the router has an addressing scheme of 192.168.1.xxx and anything connected to the switch should have something like 192.168.10.xxx. Port 9 or 10 should be set as a trunk port attached to the router. 

I'm not sure whether the solution involves a VLAN, DCHP server, or some combination thereof. The final setup should look something like the attached photo. The Desktop and Entertainment Goodies connected to the switch should be in a different local network than the Access Point and VPN Server connected directly to the router.

How do I configure the switch to put anything connected to it in a different network that the router provides?

13 Replies 13

Shawnw4401
Level 1
Level 1

Mr. Zander,

The best solution would be VLANs. Here would be an example of what you would need to do:

From the switch: 

Vlan 10
name LAN_Network
!
Interface Vlan 10
ip address 192.168.10.2 255.255.255.0
no shut
!
Interface Fa0/10
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
ip route 0.0.0.0 0.0.0.0 192.168.10.1

From the router:
interface Fa0/1
description --To LAN--
ip address 192.168.10.1 255.255.255.0
no shut
!
interface Fa0/4:
description --To Internet--
ip address dhcp
no shut
!
ip route 0.0.0.0 0.0.0.0 dhcp


If you are deadset on the connection to the router being 192.168.1.253 then you would need an ip route pointing to the router from the switch.... It would look like this: ip route 192.168.10.0 255.255.255.0 192.168.1.254 

Hi Shawn,

I should add that I use the web interface to configure my switch. It's the only way I can access the switch's config at this time (I have yet to setup SSH or Telnet access yet, working on it today). 

Is there a way to accomplish your answer through the web interface or do I need to have ssh/telnet enabled to make it work? 

Thanks for your help!

P.S. I'm not dead set on on my switch's IP address being 192.169.1.253. I'm fine with whatever the router tells it to be, which is now 192.168.1.178 since the firmware upgrade.

Hi

This link could be useful for interfaces and vlan setup.

http://www.cisco.com/c/dam/en/us/td/docs/switches/lan/csbms/sf30x_sg30x/administration_guide/78-19308-01.pdf

This link is useful in order to create static routes:

http://www.thewichitacomputerguy.com/blog/how-set-default-gateway-layer-3-l3-cisco-sg300-switch

Is the router configured to know the internal networks? the router should be in charge of create a NAT to translate the private networks to the public IP address. 

Hope 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. <<

Mr. Zander,

You should be able to do it from the web interface. 

I can't seem to find the VLAN setting that lets me set the IP address pool of a particular VID. I managed to create a VLAN with a VID of 10 and made the first eight ports members of it, but everything connected to it still has the addressing scheme assigned by the router. 

I also found the setting to enable SSH and was able to login to the CLI of the switch, but sadly, I'm completely new to the Cisco set of commands and am unsure what specific commands to issue to make it look like your previous comment. 

Any insight on where to go from here?


Mr. Zander,

Sure, I can help with that. I'll paste the commands from a brand new switch of what it should look like throughout the process in CLI.

switch>enable
switch#configure terminal
switch(config)#Vlan 10
switch(config-vlan)#name LAN_Network
switch(config-vlan)#exit
switch(config)#Interface Vlan 10
switch(config-if)#ip address 192.168.10.2 255.255.255.0
switch(config-if)#no shut
switch(config-if)#exit

switch(config)#Interface Fa0/10
switch(config-if)#switchport access vlan 10
switch(config-if)#switchport mode access
switch(config-if)#spanning-tree portfast
switch(config-if)#exit
switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1
switch(config)#exit
switch#write memory

From the router:
router>enable
router#configure terminal
router(config)#
interface Fa0/1
router(config-if)#description --To LAN--
router(config-if)#ip address 192.168.10.1 255.255.255.0
router(config-if)#no shut
router(config-if)#interface Fa0/4:
router(config-if)#description --To Internet--
router(config-if)#ip address dhcp
router(config-if)#no shut
router(config-if)#exit
router(config)#ip route 0.0.0.0 0.0.0.0 dhcp
router(config)#exit
router#write memory

I couldn't get some of the commands to work exactly as what you pasted, but here's what I was able to input so far after looking up how to do some commands (hopefully it doesn't format horribly):

switch196f48#configure terminal
switch196f48(config)#interface vlan 10
switch196f48(config-if)#name Desktop_LAN
switch196f48(config-if)#exit
switch196f48(config)#exit
switch196f48#show vlan
Created by: D-Default, S-Static, G-GVRP, R-Radius Assigned VLAN, V-Voice VLAN

Vlan Name Tagged Ports UnTagged Ports Created by
---- ----------------- ------------------ ------------------ ----------------
1 1 gi1-10,Po1-8 V
10 Desktop_LAN S

switch196f48#configure terminal
switch196f48(config)#interface vlan 10
switch196f48(config-if)#ip address 192.168.10.2 255.255.255.0
switch196f48(config-if)#no shut
switch196f48(config-if)#exit
switch196f48(config)#interface range gi1-10
switch196f48(config-if-range)#switchport access vlan 10
Port gi1: Port mode is not ACCESS.
Port gi2: Port mode is not ACCESS.
Port gi3: Port mode is not ACCESS.
Port gi4: Port mode is not ACCESS.
Port gi5: Port mode is not ACCESS.
Port gi6: Port mode is not ACCESS.
Port gi7: Port mode is not ACCESS.
Port gi8: Port mode is not ACCESS.
Port gi9: Port mode is not ACCESS.
Port gi10: Port mode is not ACCESS.

switch196f48(config-if-range)#exit
switch196f48(config)#interface range gi2-8
switch196f48(config-if-range)#switchport mode access
switch196f48(config-if-range)#switchport access vlan 10
07-Dec-2016 18:57:26 %LINK-I-Up: Vlan 10
switch196f48(config-if-range)#spanning-tree portfast
switch196f48(config-if-range)#exit
switch196f48(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1
switch196f48(config)#

Now my web interface looks like the attached photo. I have my main desktop on port 1 and left it out of the configuration because the last time I set all the ports to "access" with the "switchport mode access" command, it locked me out of the switch and I had to a factory reset to get back to where it is now according to the above snippet and attached photo. 

Currently, the desktop (switch port 1) has an internet connection and still has a local IP assigned by the router, and everything connected on ports 2-8 has no internet connection. It's also worth noting that my router is NOT a Cisco router, just the switch, so I can't access and configure it (the router) like the 2nd half of what you pasted. 

Once it works and ports 2-8 have a different addressing scheme than the router, then I'll translate those settings over to port 1 as well. 

I'm guessing the last steps involve setting a route from VLAN 10 to the router, but am not 100% sure. Where would I go from here? 

Thanks for all your help by the way.

Hi

Try configure the interface first as switchport

interface range g1-10
switchport 
switchport access vlan <vlan id>




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Sorry to cause so much trouble, but even after running that command, I can't seem to find a noticeable difference. 

I hooked my laptop up directly to port 7 and it has no internet connectivity. The web configuration still looks like the photo from my most recent comment. 

I'm not sure whether the problem now is related to a missing route or a bad port configuration, so I'm not entirely sure where to look now.

Hi

Is the router doing the NAT and it knows how to reach the internal networks? What router model are you using? it should have a default route as well. 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Yes, the router is handling the NAT. 

I just looked at the status list on the router, and it looks like it does not know about the internal network on the switch based on the below table. Here's a snippit of what the status table on the router looks like with the switch ports included.

LAN 1

Name Switch Port # Local IP Status
Cisco Switch N/A 192.168.1.178 off
Apple TV 6 192.168.1.168 off
Laptop 7 192.168.1.167 off
Desktop 1 192.168.1.163 on

...where port 10 of the switch is connected to port 1 of the router. Currently, port 1 of the switch is still set as a trunk port so my desktop continues to have internet until this is all figured out. 

The router is an Arris NVG589. 

Hi 

Thank you so much, to be honest Im not sure how works the Arris devices in order to implement intervlan routing. Assuming  the IP 192.168.1.1 is configured on the router for the port 1. 

So you could configure the port 10 on the switch under the any vlan, in this case the vlan 10. The access ports for Apple TV, Laptop and other devices can be configured under the vlan 10 as well, no default routing should be required, Assuming everything is in place on the router. 

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Edit: Thanks to (https://supportforums.cisco.com/discussion/12116176/rv042-082-016-sx300500-switch-open-discussion), I was able to setup VLAN10 the way I wanted. However, anything connected to ports assigned to VLAN 10 can't access the internet.

Maybe it's a missing route from the router to the switch. Is this something that needs to be fixed on the router's end or the switch's end?