The question is vague, but this might help:
- As I understand topologies, the question would require you to create (for example) both a Token Ring and a Star topology using a single switch. I'm not exactly sure what the purpose of that would be. Further confusing it is "either the same or different topologies." Maybe you should just create two Star Ethernet TCP/IP topologies on the same switch?
- To "connect two LANs" or in other words enable communication between two networks, you need a router or gateway device. By definition only a router-type device can enable communication between two networks. If they operate on the same switch, you can simply setup two interfaces on the router plugged into the same switch-- one for each network type, and then configure routing between them. You will probably need to separate the switch with VLANs or at least by using different subnets.
Here's what I would answer, since it's the simplest way to do this (without using VLANs or different topologies):
Router:
- Interface 1
IP 192.168.1.1
SN 255.255.255.0
- Interface 2
IP 192.168.2.1
SN 255.255.255.0
- Define routes between Interface 1 and 2
Switch:
- No special configuration
Network Device 1:
- IP 192.168.1.5
SN 255.255.255.0
GW 192.168.1.1
Network Device 2:
- IP 192.168.2.7
SN 255.255.255.0
GW 192.168.2.1