Moves a misplaced image in Bridge Mode doc
[librecmc/librecmc.git] / docs / Bridge_Mode.md
1 # Bridge Mode
2
3 A common feature of COTS Wi-Fi routers is to be able to set the router
4 to bridge mode, where the devices stops acting like an IP router
5 (layer 3) and starts acting like an ethernet switch (layer
6 2). LibreCMC does not actually have a bridge mode, but the same effect
7 is achievable with two easy steps.
8
9 1. Add the LAN ethernet port to the LAN bridge interface
10 2. Set the DHCP server to ignore the LAN interface
11
12 ## Adjust the LAN bridge interface
13
14 Go to the Network >> Interfaces page and press the EDIT button next to
15 the LAN Network. Select the Physical Settings tab.
16
17 ![alt text](images/librecmc-default-interfaces.png "LibreCMC default
18  interfaces view")
19
20 Place a checkmark in the box for the "eth0" interface for wan and
21 wan6. (I suppose the interface name might vary amongst different
22 routers.)
23
24 You can also check the box for Enable STP if desired. There doesn't
25 seem to be any downside from this, though I suppose it would use a
26 little more CPU cycles and memory. STP is a protocol intended to
27 prevent infinite communication loops from forming in a network of
28 layer 2 switches.
29
30 ## Adjust DHCP server settings
31
32 On the same page, scroll down a little to the DHCP Server section. In
33 the General Setup tab, check the "Ignore interface" box.
34
35 ![alt text](images/librecmc-eth0-added-to-lan.png "Adjustments to
36  LibreCMC interface physical settings")
37
38 Save and apply your changes.
39
40 ## Communicating with LibreCMC in "bridge mode"
41
42 Now that the DHCP server is turned off, the next time you connect to
43 the libreCMC device, you will not be able to communicate with it. You
44 must set your connecting device manually to be on the same
45 subnet. Since the default libreCMC LAN IP address is 192.168.10.1/24,
46 it should work to set your connecting device to IP address
47 192.168.10.2/24.On Gnu/Linux systems, the command is usually `ip addr
48 add 192.168.10.2/24 dev eth0` or `dev wlan0` if connecting wirelessly.
49
50 Alternatively, you may set the libreCMC device to receive an IP
51 address from another DHCP server on your network: go to back to the
52 Network >> Interfaces page, press the EDIT button again next to the
53 LAN Network, select the General Setup tab, and switch the Protocol
54 from "Static address" to "DHCP client". (It seems that in LibreCMC,
55 bridging the LAN interface to the WAN port disables the operation of
56 the DHCP client on the WAN interface.) Of course, if you do this, be
57 sure that your DHCP server has reserved a memorable IP address for the
58 LibreCMC device's MAC address, so you don't have trouble finding it.
59
60 ![alt text](images/librecmc-switch-lan-to-dhcp.png)
61
62 ## Adjusting the firewall...?
63
64 To make a more consistent look in the your LibreCMC interface, you
65 could go into Network >> Firewall and do things like deleting WAN
66 zones or disabling NAT masquerading. But since the ports are bridged,
67 it isn't necessary, and it will only make it more work to switch back
68 out of "bridge mode" if you want to later.