How to network Ubuntu and Windows 7 through a switch?

1

I have a PC running on Windows 7 and another one running Ubuntu 12.04.

I know I can directly connect both of them using a crossover cable, however I occasionally do have a laptop to connect as well, so a switch is a better option.

I would like to connect both of them using a D-link 5-port 10/100 Desktop switch which I have, but can't figure out how to do that. Also, I use a dongle to connect to the internet. I hope that does not create any additional problems.

Should I be going for a switch or should I buy a router?

Roshan

Posted 2012-05-03T18:45:40.293

Reputation: 111

Routers are for creating subnets. Switches are all 1 network. As for switches, here is a relavant question regarding their capabilities: https://superuser.com/questions/1216118/how-can-i-determine-if-a-network-switch-has-sufficient-bandwidth-to-support-pc-t

– SDsolar – 2017-07-22T05:21:11.340

Answers

2

The switch will allow you to share information between all three computers, once you have connected them all to the switch with normal ethernet cables... providing they all have IP addresses in the same range.

You can manually set the IP addresses, OR you can set the computer that will have the dongle plugged into it to use Internet Connection Sharing... in which case that computer would tell the OTHER computers what IP address to use.

Should you buy a router? Only if you intend to purchase Internet service from a company that will provide you with a stand alone modem. You would connect the modem to the router, and the router would then "route" the internet connection to all the connected devices.

If you wish to stick with the dongle, you can still use a router, but setting it up would be more complicated, and actually redundant, since most of the functions of the router would already be done by the computer with the dongle plugged into it that you had set up for Internet Connection Sharing.

Bon Gart

Posted 2012-05-03T18:45:40.293

Reputation: 12 574

@Bon...in short...it doesnt matter what OS ewe use when I use the switch...just IP needs to be in a same range...??? – Roshan – 2012-05-03T19:03:09.243

@Roshan yes. It does not matter. I have multiple computers on my network... Windows, Linux, iOS, and occasionally a Mac. The switch is a dumb router... or rather, a router without the ability to do any routing. If you enable Internet Connection Sharing on the computer with the dongle, it will handle all the router functions, and the switch will enable all the computers to be connected and talk to one another, regardless of the OS on them. – Bon Gart – 2012-05-03T19:05:36.513

thanka a lot man...i'll try & let you know if I do haveeee any problems :) – Roshan – 2012-05-03T19:16:34.170

Just remember, when you use the switch, you won't use crossover cables any more. – Bon Gart – 2012-05-03T19:26:13.397

@Bon...'m able to connect the 2 PC's but cant access internet from the PC2(Ubuntu) & dongle is on PC1(Win 7)...any suggestions on what I should do...??? – Roshan – 2012-05-03T20:12:45.893

Dongle is on PC1. You have enabled internet connection sharing on that computer, and restarted PC2? Ok, you don't necessarily need to restart it, but you do at least have to reset it's network connection. PC1 has to have ICS on, with the dongle selected as the source. It will then set the ethernet port on that computer as the gateway, and give it an address of 192.168.0.1 AFTER this has been set up, any computers that connect to the network will get an IP address from the Windows computer... and only when that Windows computer is on. – Bon Gart – 2012-05-03T22:35:35.627