How network 6 computers with a switch

Without a router, connect the six computers to a 8 port switch and assign static IP to each computer like 192.168.1.11 - 192.168.1.16

With a router, connect a switch to the LAN port of the router via network cable and then connect the computer to either the switch or the router. If DHCP is enabled (default) on the router, the computers will receive an IP from the router.