turning a openWRT router into a modem requires some steps.
it just took me about an hour to get it working...
it would be nice to have an assistant in the openWRT webinterface,
for a semi-automatic transition between "router mode" and "modem mode"
("modem mode" aka "bridge mode")
other webinterfaces (example: avm fritz os)
have a simple switch to enable/disable the "modem mode"
openWRT: turn a router into a modem
based on the german article: OpenWRT als PPPoE Passthrough Modem
- optional: make a backup of your router-mode config
- install the
rsync
package in openWRT > system > software - run:
router=192.168.178.1; d=backup/router-mode-$(date --utc +%Y%m%d-%H%M%SZ)/etc/; mkdir -p $d; rsync -rap root@$router:/etc/ $d
- install the
- you need at least 2 LAN ports
- an "internet" port: on this port, the device is a DSL modem
- a "management" port: on this port, the device is a DHCP and HTTP server, to provide the openWRT webinterface
- first, configure the management port, for example on LAN2
- make sure that your LAN2 port is working, otherwise choose a different LAN port
- for now, use a different LAN port to configure openWRT, for example LAN1
- add new VLAN
- openWRT > network > switch
- add VLAN
- VLAN ID: 2
- LAN2 is untagged on VLAN2, off on all other VLANs
- CPU is tagged on VLAN2
- WAN and all LANs except LAN2 are off on VLAN2
- save and apply
- add new LAN interface
- openWRT > network > interfaces
- add new interface
- interface name: management
- protocol: static address
- bridge interfaces: no (default)
- interface: Switch VLAN: "eth0.2"
- create interface
- general settings
- bring up on boot: yes (default)
- IPv4 address: 192.168.0.1 (or similar)
- IPv4 netmask: 255.255.255.0
- firewall settings
- zone: lan
- dhcp server
- setup dhcp server
- save
- save and apply
- TODO maybe create multiple management ports as backup
- connect your computer to the management port (LAN2) of your router
- restart your DHCP client: disconnect, connect
- this step is needed at least on my computer (linux with networkmanager service)
- open the openWRT webinterface on
http://192.168.0.1/
- login with the same admin username/password as before
- restart your DHCP client: disconnect, connect
- configure the "internet" LAN port, aka "WAN output" port, aka "modem" LAN port: LAN1
- add new VLAN
- openWRT > network > switch
- add VLAN
- VLAN ID: 5
- for me, VLAN ID 1 did not work
- maybe VLAN ID 7 does not work too
- in router mode, WAN is tagged on VLAN7
- in modem/bridge mode, WAN is untagged on VLAN5
- VLAN5 row:
- CPU is tagged
- LAN1 and WAN are untagged
- rest is off
- LAN1 and WAN column:
- untagged on VLAN5
- rest is off
- VLAN1: all are off
- save and apply
- delete the WAN6 interface. WAN6 is an alias of WAN
- openWRT > network > interfaces
- WAN_6 > delete
- this does not work for me. maybe this step is not needed, because WAN_6 is deleted automatically
- edit the WAN interface
- openWRT > network > interfaces
- WAN > edit
- general settings
- Protocol: PPPoE -> Unmanaged
- Switch Protocol
- bring up on boot: yes (default)
- Advanced Settings
- Use builtin IPv6-management: yes -> no
- Physical Settings
- Bridge Interfaces: no -> yes
- TODO is this correct? or should it be "no"
- Interfaces: add eth0.5
- before: dsl0.7
- after: dsl0.7 + eth0.5
- "dsl0.7" is needed for VDSL7 of my ISP (
telekom.de
)
- Bridge Interfaces: no -> yes
- Firewall Settings
- Zone: wan -> unspecified
- save
- save and apply
- add new VLAN
- add interface: wan_lan1_bridge
- openWRT > network > interfaces
- add new interface
- name: wan_lan1_bridge
- Bridge interfaces: no (default)
- interface: eth0.5
- create interface
- general settings
- bring up on boot: yes (default)
- Advanced Settings
- Use builtin IPv6-management: no
- save
- save and apply
- disable firewall
- openWRT > network > firewall
- zone "lan => wan"
- TODO what is the original accept/reject status of input/output/forward
- edit
- Allow forward to destination zones
- remove "wan" -> unspecified
- save
- save and apply
- now the firewall page says: zone "lan => reject"
- disable LAN switch
- openWRT > network > interfaces
- LAN
- usually this interface has an IP address like 192.168.178.1
- stop
- check the switch config
- openWRT > network > switch
- CPU column: all VLANs are tagged
- VLAN2 row: CPU is tagged, LAN2 is untagged, rest is off
- VLAN5 row: CPU is tagged, LAN1 + WAN are untagged, rest is off
- check your DSL line status
- openWRT > status > overview
- DSL should be: Line State: UP [0x0]
- this does not mean that your modem has an internet connection. this only means that your modem is "ready to connect" (TODO wording. modem is synchronized with some network hardware of the ISP)
- connect your computer to the internet LAN port: LAN1
- networkmanager
- LAN > disconnect
- add new connection
- type: DSL/PPPoE
- enter your ISP login data. example:
- service:
t-online.de
- username: 1111111111112222222222220001
- for the
t-online.de
service, the username is concatted from:111111111111
= anschlusskennung222222222222
= zugangsnummer0001
= mitbenutzernummer@t-online.de
- example username:
1111111111112222222222220001@t-online.de
- for the
- password: 12345678
- service:
- connect to the new DSL connection
- optional: make another backup of your modem-mode config
- connect your computer to the management port (LAN2) of your modem
- networkmanager: maybe restart the LAN connection
- run:
router=192.168.0.1; d=backup/modem-mode-$(date --utc +%Y%m%d-%H%M%SZ)/etc/; mkdir -p $d; rsync -rap root@$router:/etc/ $d
turn a modem into a router: basically do all steps in reverse
related
- Configuring OpenWRT as Ad-Hoc modem-like device
- OpenWrt + ISP router in Modem Mode - refuse to cooperate
- How to set up first router in bridge mode so the second router also gets a public IP?
- Lede device as VDSL Modem only
- OpenWrt as bridge / modem
- New OpenWrt as modem please help
[OpenWrt router after cable modem in bridge mode (Kabel Deutschland)](https://forum.openwrt.org/t/openwrt-router-after-cable-modem-in-bridge-mode-kabel-deutschland/48976)
(link disabled because of the "8 links limit")- Bridge mode # Full bridge: Less common in ISP-provided consumer devices is full bridge mode. In this mode, the device acts as a dumb modem. All authentication and encapsulation etc happens on the router that is connected to it through a specific protocol, pppoE. This mode is the one that allows the most control, stability and performance, but usually requires a specialized device (usually an Ethernet modem) that supports this mode, and it's easier to set up if your ISP is using pppoE protocol for their upstream lines.
keywords
- full bridge mode
- PPPoE passthrough modem