Configuring Cisco SG300-20 switch for Hyper-V networking

or rather networking in general on this switch..

As good and easy to use this SMB grade switch is, there’s a bit to do to get things going and not all of it is very straightforward/easy to find in the interface. I have the following requirements:

  • Hyper-V hosts are on the 10.0.10.0/24 subnet, VLAN 10
  • iSCSI network is VLAN 20
  • Production VMs are on VLAN 100
  • Dev/Test VMs are on VLAN 200
  • SCVMM virtual machine does not live on the Hyper-V hosts it manages. It’s on a separate host on a home-conventional 10.0.0.0/24 network
  • Domain Controller (of course does DNS work) is on the 10.0.0.0/24 network too
  • The NAS and the switch are also on the 10.0.0.0/24 network (the NAS is used for some video sharing in the house)

Quick diagram:

LAB_LAYOUT_DIAGRAM1

As is evident from the diagram, the switch will provide L2 and L3 connectivity for this network. The homegrade router as dumb as it is does not allow for a static route to be put in. With this in mind, here it is

1. Set the switch to have a static IP address. Out of the box, it does not have a static address. I gave it 10.0.0.110.

2. Before doing anything else, change the switch’s mode from L2 to L3. This is because the switch resets its config when the mode’s changed:

SwitchConfig_L2_L3_mode

Save the config before going further.

3. Next, define the VLANs:

SwitchConfig_AddVLANtag

4. Next, define an interface for the VLAN that’s just been created. In other words, define the default gateway for this VLAN:

SwitchConfig_Associate_VLAN_with_IP

Quick note that until a device on this VLAN connects to the switch, the VLAN interface state is disabled:

SwitchConfig_AddVLAN_still_says_disabled

5. Then go to Port to VLAN and tag the port with the new VLAN. Say a new host connects to port 5 on the switch:

SwitchConfig_Port_to_VLAN

I’ve left the mode to trunk, you could go with making it an access port.

6. Finally, if you need to create a static route to get to your home/another network, throw in a static route here (I didn’t need to)

SwitchConfig_Static_Route

This completes the switch side of things.

7. With the home router being a dumb device with nowhere to put in a static route, I resorted to throwing in static routes to the 10.0.10.0/24 network manually into my management PC, the DC and the SCVMM machines:

SwitchConfig_Static_Route_on_machines

8. It’s a given that the Hyper-V hosts will need the right VLAN tags in their NICs but here’s a screenshot of where/how for completion’s sake:

SwitchConfig_VLAN_tag_on_hosts

Happy days..

Leave a Comment

Your email address will not be published.