Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

OpenWRT routers: Difference between revisions

Content deleted Content added
Adsb (talk | contribs)
m Be clearer
Tags: Mobile edit Mobile web edit
Adsb (talk | contribs)
Packages
Tags: Mobile edit Mobile web edit
 
(9 intermediate revisions by the same user not shown)
Line 39: Line 39:


ADSL users need an ADSL modem. OpenWrt doesn't support many of the modems built into normal consumer ADSL router/modems. If using an external modem then no VLAN is needed.
ADSL users need an ADSL modem. OpenWrt doesn't support many of the modems built into normal consumer ADSL router/modems. If using an external modem then no VLAN is needed.

== On older "swconfig" versions ==

OpenWrt prior to version 21 had the "Network", "Switch" menu in Luci, and older switch configuration software. Some hardware is still using this older software even in version 24.
* Delete any wan6 interface under "Network", "Interfaces"
* If needing a WAN VLAN, go to "Network", "Switch" and you should see two VLANs defined: VLAN 1 for the LAN ports, and VLAN 2 for the WAN port. Change VLAN 2 to be numbered VLAN 911 or 101 as required. Change this VLAN on the WAN port from untagged to tagged. Save and Apply.
* Under "Network", "Interfaces" edit the wan interface. Change the protocol to PPPoE. Device should be "eth0.2" if you're not using a VLAN, or "eth0.911" or "eth0.101" if you are. Enter your AAISP username and password. Under "Advanced settings", set "Obtain IPv6 address" to automatic, tick "Use default gateway". Under DHCP server, ignore this interface.
* Save and apply, then restart the wan interface
* The wan and wan_6 interfaces should now come up online

The appropriate entries in ''/etc/config/network'' will look like the following.

With WAN VLAN:

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 1t'
option vid '911' OR '101'
Without WAN VLAN:

config device
option name 'eth0.2'
option macaddr 'aa.bb.cc.dd.ee.ff'

And for both configurations:

config interface 'wan'
option device 'eth0.2' OR 'eth0.911' OR 'eth0.101'
option proto 'pppoe'
option username 'xxnn@a.1'
option password 'ItIsASecret'
option ipv6 'auto'


== On new "Distributed Switch Architecture" versions ==
== On new "Distributed Switch Architecture" versions ==
Line 47: Line 81:
* Under "Network", "Interfaces" edit the wan interface. Change the protocol to PPPoE. Device should be "wan" if you're not using a VLAN, or "wan.911" or "wan.101" if you are. Enter your AAISP username and password. Under "Advanced settings", set "Obtain IPv6 address" to automatic, tick "Use default gateway". Under DHCP server, ignore this interface.
* Under "Network", "Interfaces" edit the wan interface. Change the protocol to PPPoE. Device should be "wan" if you're not using a VLAN, or "wan.911" or "wan.101" if you are. Enter your AAISP username and password. Under "Advanced settings", set "Obtain IPv6 address" to automatic, tick "Use default gateway". Under DHCP server, ignore this interface.
* Save and apply, then restart the wan interface
* Save and apply, then restart the wan interface
* The wan and wan6 interfaces should now come up online
* The wan and wan_6 interfaces should now come up online
The appropriate entries in ''/etc/config/network'' should look like the following. If you do not have Luci installed, make these edits to "/etc/config/network".
The appropriate entries in ''/etc/config/network'' should look like the following. If you do not have Luci installed, make these edits to "/etc/config/network".
Line 70: Line 104:
Do not have an interface named ''wan6'', the IPv6 configuration will be handled automatically.
Do not have an interface named ''wan6'', the IPv6 configuration will be handled automatically.
The ''option ipv6 auto'' line will cause a virtual interface named ''wan_6'' to be created, and an instance of the DHCPv6 client to be run on it. This will request an IPv6 Internet address, and a single Prefix to be Delegated. You can't get the DHCPv6 client started this way to accept more options.
The ''option ipv6 auto'' line will cause a virtual interface named ''wan_6'' to be created, and an instance of the DHCPv6 client to be run on it. This will request an IPv6 Internet address, and a single Prefix to be Delegated. You can't get the DHCPv6 client started this way to accept more options.

= Routed IPv4 addresses in the local network =

AAISP offer a block of up to 8 routed IPv4 addresses to customers. These can be configured on the lan interface instead of RFC1918 addresses, but you will have to change the firewall config. By default 2 firewall zones are created - wan and lan, and masquerading is done on the wan zone. The masquerading should be turned off for routed lan addresses - "Network", "Firewall", edit "wan" zone, untick masquerading.


= Enabling IPv6 in the local network =
= Enabling IPv6 in the local network =
Line 138: Line 176:
default from 2001:8b0:xyz:4520::/60 via fe80::9e89:1eff:fe2e:0 dev pppoe-wan metric 512
default from 2001:8b0:xyz:4520::/60 via fe80::9e89:1eff:fe2e:0 dev pppoe-wan metric 512
...
...

= Installing packages =

One of OpenWrt's key features is being able to install extra software packages. For example, you can install a VPN server on the router, or add SFTP support to the SSH server.

On the Luci web interface go to "System","Software", and click "Update lists...". You can then search for and install packages. ''openssh-sftp-server'' might be useful, or the ''nano'' text editor for in-situ changes to the configuration.

From the command line, ''opkg'' is the tool to manage packages. "opkg update" to update the lists, "opkg find openssh*" to search, "opkg install wireguard-tools" to install.


= Advanced configuration of the local network =
= Advanced configuration of the local network =