Cyberworld-builders / academy

A designated place for educational and training docs, materials and exercises. Also a place to track issues and progress and a lab for code that can be potentially used elsewere.
0 stars 0 forks source link

Set up a second router as an access point on the same network with OpenWrt #29

Open jaylong255 opened 1 month ago

jaylong255 commented 1 month ago

To set up a second router as a wireless access point (WAP) and switch using OpenWrt, follow these steps:

  1. Connect to the second router and access its web interface.

  2. Go to Network > Interfaces and delete all interfaces except for LAN.

  3. Edit the LAN interface:

    • Change the protocol to "Static address"
    • Set an IP address in the same subnet as your main router, but outside its DHCP range
    • Set the gateway and DNS to your main router's IP address
    • Disable DHCP server
  4. Go to Network > Wireless:

    • Set up your wireless networks (2.4GHz and 5GHz if available)
    • Use the same SSID and security settings as your main router for seamless roaming
  5. Go to Network > Firewall:

    • Delete all zones except for "lan"
    • Set lan zone input and forward policies to "accept"
  6. Connect the second router's LAN port to one of the LAN ports on your main router using an Ethernet cable.

  7. Reboot the second router.

This setup will make your second router function as a wireless access point and switch, extending your network's coverage.

Would you like me to explain or elaborate on any of these steps?

jaylong255 commented 1 month ago

Yes, a WAN interface can be reprogrammed as a LAN interface in OpenWrt. This is often done when setting up a router as an access point or switch. Here's how you can do it:

  1. Access the OpenWrt web interface of the router.

  2. Go to Network > Interfaces.

  3. Find the WAN interface and click on "Delete".

  4. Go to Network > Switch.

  5. In the switch configuration, you'll see a list of ports. Find the port that was previously assigned to WAN.

  6. Change this port's VLAN assignment to match the LAN VLAN (usually VLAN 1).

  7. Save and apply the changes.

  8. Reboot the router.

After these steps, the former WAN port will now function as another LAN port.

This process can be particularly useful when repurposing a router as a switch or access point, as it gives you an extra Ethernet port to work with.

Would you like more details on any part of this process?

jaylong255 commented 1 month ago
lanType: BridgeDevice: br-lanConnected: yesMAC: 8C:3B:AD:DD:B3:F0RX: 7.98 MB (36641 Pkts.)TX: 32.14 MB (41067 Pkts.) (Type: Switch portDevice: lan1Connected: yesMAC: 8C:3B:AD:DD:B3:F0RX: 0 B (0 Pkts.)TX: 0 B (0 Pkts.)Type: Switch portDevice: lan2Connected: yesMAC: 8C:3B:AD:DD:B3:F0RX: 0 B (0 Pkts.)TX: 0 B (0 Pkts.)Type: Switch portDevice: lan3Connected: yesMAC: 8C:3B:AD:DD:B3:F0RX: 3.63 MB (15943 Pkts.)TX: 9.37 MB (16910 Pkts.)Type: Switch portDevice: lan4Connected: yesMAC: 8C:3B:AD:DD:B3:F0RX: 4.37 MB (21402 Pkts.)TX: 22.76 MB (24147 Pkts.))br-lan | Protocol: Static addressUptime: 0h 17m 43sMAC: 8C:3B:AD:DD:B3:F0RX: 7.98 MB (36641 Pkts.)TX: 32.14 MB (41067 Pkts.)IPv4: 192.168.1.1/24IPv6: fda3:a2b7:a211:8::1/62IPv6: fdfd:db83:f8e7::1/60 | RestartStopEditDelete -- | -- | -- wanType: Ethernet AdapterDevice: wanConnected: yesMAC: 8C:3B:AD:DD:B3:F2RX: 29.34 MB (45958 Pkts.)TX: 8.04 MB (32433 Pkts.)wan | Protocol: DHCP clientUptime: 0h 17m 38sMAC: 8C:3B:AD:DD:B3:F2RX: 29.34 MB (45958 Pkts.)TX: 8.04 MB (32433 Pkts.)IPv4: 10.0.0.122/24 | RestartStopEditDelete wan6Type: Ethernet AdapterDevice: wanConnected: yesMAC: 8C:3B:AD:DD:B3:F2RX: 29.34 MB (45958 Pkts.)TX: 8.04 MB (32433 Pkts.)wan | Protocol: DHCPv6 clientUptime: 0h 17m 34sMAC: 8C:3B:AD:DD:B3:F2RX: 29.34 MB (45958 Pkts.)TX: 8.04 MB (32433 Pkts.)IPv6: 2600:6c58:e7f:6a9a::fae/128IPv6: fda3:a2b7:a211::fae/128IPv6: 2600:6c58:e7f:6a9a:8e3b:adff:fedd:b3f2/64IPv6: fda3:a2b7:a211:0:8e3b:adff:fedd:b3f2/64IPv6-PD: fda3:a2b7:a211:8::/62 | RestartStopEditDelete