Utiliser un routeur Linksys WRT54G comme un switch Page d'entrée > Informatique > Astuces

Si vous avez un routeur qui traîne au fond de sa boite, il peut remplacer un switch.
Avantage par rapport à un switch: Wi-Fi en plus.
Pour rappel, quelques switchs de marque: Netgear FS605; D-Link DES-1005D

A quoi ca sert?
- sur une portion de votre réseau local qui comporte déjà un autre routeur (ou Freebox, Livebox, ou autre box), partager (dédoubler, dupliquer) une connexion réseau RJ45 entre plusieurs ordinateurs,
- faire un nouveau réseau Wi-Fi dans votre maison (qui peut même se rajouter à celui de votre box ou de votre premier routeur WiFi si vous avez déjà un réseau WiFi),
- relayer ou prolonger votre réseau WiFi existant,
- etc...

Voici de la doc plus récente que celle que j'ai utilisée, et qui utilise un Linksys WRT54GL et le firmware DD-WRT:
http://www.pcastuces.com/pratique/materiel/pont_wifi/page1.htm

La doc qui m'a servi se trouve ici:
http://forums.linksys.com > Routers and Access Points > Wireless Routers > Connecting two routers wired - the definitive answer
http://forums.linksys.com/linksys/board/message?board.id=Wireless_Routers&thread.id=26177
Si jamais le lien disparaissait, je vous recopie l'article:

This is a common issue and I answered the question probably more than a hundred times thus I put it into a new thread to which I can simply link from now on... Please do not post a reply in this thread if you have a problem setting it up. Post a NEW thread instead. This thread would explode if everybody would post in here...

You have one router running in your network. This router connects to the internet. Now you want to hook up a second router (e.g. a wireless router to have wireless access) in your network connecting both with an ethernet cable. The following is in most cases the best approach for home networks. You'll find similar answers with some screenshots in the Linksys Easy Answers, e.g. http://linksys.custhelp.com/cgi-bin/linksys.cfg/php/enduser/std_adp.php?p_faqid=4579

The setup:

1. Unplug the second router from anything. Connect a single computer to the router. Do not connect the second router to the first at the moment!

2. Configure the router at http://192.168.1.1/ (dans mon cas 192.168.0.1, voir copie d'écran plus bas)

3. Change the LAN IP address of the second router from 192.168.1.1 to a free address in your LAN (e.g. 192.168.1.2 should be O.K. if the first router is also a Linksys router) (dans mon cas 192.168.0.2, voir copie d'écran plus bas). The address you change to (192.168.1.2) must not be used by any other device with static IP address in your network nor should be assigned by the DHCP server your network. A default Linksys router uses 192.168.1.1 itself and the DHCP server assigns 192.168.1.100-149.

4. Turn off the DHCP server on the second router.

5. Save the setting.

6. Unplug the computer from the second router.

7. Connect an ethernet cable from a numbered LAN port of the first router to a numbered LAN port of the second router. Do not use the Internet/WAN port on the second router!

8. That's it! If you don't know or don't want to know more about networking you don't have to read the rest here.

What do you have now?

The second router is connected through a LAN port to your existing network. This basically means that the router part of the device is actually not used. So you have a router device that you don't operate as router in your network. Whatever you connect to the second router either through one of the remaining LAN ports or through a wireless if it has one, is directly connected to your LAN. Devices connected to the second router use the DHCP server of the first router to get an IP address. They use the first router directly for internet access. Everything is connected to a single larger ethernet network. Everything is in a single "broadcast" domain.

If the second router is not a wireless one, you basically have a few more ports in your network. In that case it might have been cheaper to get a simple switch/hub instead to extend your network.

Please remember: as the second router is not connected through the Internet/WAN port many configurations and functions of the second router won't work simply because they require an internet connection on the router itself. Some examples are: access restrictions, dynamic DNS service, port forwardings, MAC address clone, the firewall... All these things must be configured on the first router and only there.

Why is this better than connecting the second router with the Internet port?

A router is a separating network element. It separates two networks and allows certain traffic to cross. Sometimes this is necessary in a network setup but for most home networks it only creates a lot of obstacles.

1. In default Gateway mode the second router does network address translation (NAT). This means computers connected to the second router can connect to computers connected to the first router but not in the opposite direction.

2. If you use Router mode on the second router: you have to configure "routes" on the first router and possibly your computer connected to the first router so that IP packets find their way into the subnet of the second router.

3. You have two separate ethernet networks and thus two "broadcast" domains. A broadcast in the first router's subnet reaches all computers connected there. The same applies to the second router. A broadcast will never cross the second router, though. This is an obstacle for applications that depend on broadcasting to locate other computers and services. Windows file and printer sharing is one example here. With the second router in between, computers on one side do not know about computers on the other side. You cannot search your workgroup for the computer on the other side even when they use the identical workgroup name. You will be able to access the other computer using the IP address directly (e.g. \\192.168.1.100\share) but that's usually a hassle and the IP address may change if it is assigned by the DHCP server to the computer. There are ways to deal with some of these issues (e.g. save the host names in lmhosts files...) but all this requires more effort and attention to keep everything up-to-date.
4. Port forwardings become more complicated. If you need a port forwarding (i.e. you want a port on a computer in your network to be accessible from the internet) on a computer connected to the second router you have to setup two forwardings: one on the first router to the second router and one on the second router to the computer.

5. If you have two wireless routers: you cannot roam between both routers without loosing the connection. This is simply because if a wireless computers moves from one router to the other it needs a different IP address.

6. The whole configuration becomes more complicated: you always have to think about where to configure what, e.g. dynamic DNS service, access restrictions, ...

Bottom line: unless you have good reasons why you must have some computers separated from the other computers in your network, there is no good reason to in a home network to do so. For normal home networking with simple to use file and printer sharing it is better to connect the second router as suggested in this post...

Message Edited by gv on 08-11-2007 01:45 PM

Et voici la copie d'écran de la page de configuration que j'ai utilisée pour configurer le routeur (étapes 2 à 5 plus haut) :
WRT54G_as_switch.png