I used two separate cables to attach the router to the switch—one for each subnet. If your router and switch support trunking, you can configure the router to access both subnets over the same Ethernet cable. On the switch, use the Switchport Mode Access Trunk command in config-if mode. On the router, use the Encapsulation Dot1q command in config-if mode. You can then configure a subinterface on the router for each subnet. For example, to configure subinterface 1 on Ethernet interface 1, use the command

interface ethernet1.1.