EoIP Routing

From DD-WRT Wiki

Jump to: navigation, search

Contents


[edit] Prerequisites

  • Both routers have a static IP
  • Both routers have the EoIP facility (Firmware: DD-WRT v24-sp1 vpn)

[edit] Overview

Important Note:

As of V24-preSP2/SVN12476 EOIP is not working, the interface 'oet1' is not being setup with the WAN ip and as a result renders any EOIP tunnel setup inoperative. If anyone knows how to accomplish this with a startup script, please update this wiki article. Update: As of V24-preSP2 build 14896, EoIP is working fine, but a bug in the Web GUI prevents reassigning a bridged oet interface to anything other than br0. This can be remedied at command line; for discussion on how to achieve this see FON_Hotspot_on_La_Fonera#EoIP, particularly the section on configuring EoIP settings in NVRAM.



We will link the two routers using a subnet and appropriate routes.
Example:

  • Router 1 Subnet: 192.168.1.0
  • Router 2 Subnet: 192.168.2.0
  • EoIP Subnet: 192.168.202.0
  • EoIP Interfaces: (Webinterface: Services - EoIP Tunnel)
    • Router 1 EoIP Interface (tap101): 192.168.202.1 (defined in Router 1)
    • Router 2 EoIP Interface (tap101): 192.168.202.2 (defined in Router 2)
  • Required Routes: (Webinterface: Setup - Advanced Routing)
    • Destination 192.168.2.0 Gateway 192.168.202.2 (defined in Router 1)
    • Destination 192.168.1.0 Gateway 192.168.202.1 (defined in Router 2)

[edit] Detailed setup for Router 1

  • Go to 'Setup - EoIP Tunnel'
    Configure on of the preset EuIP tunnels
    • Enable 'Tunnel 1'
    • Remote IP Address a.b.c.d (The static internet (WAN port) address of router 2)
    • Tunnel ID: 1 (Must be the same on both routers)
    • Leave Compression, TOS passthrough, fragment, mssfix, shaper alone (Disabled or 0)
    • Set Bridging to Disable
    • Set the IP Address of the EoIP interface to 192.168.202.1
    • Set the Subnet Mask to 255.255.255.0
      The IP Address/Subnet Mask combination must be consistent with the second router
  • Go to 'Setup - Advanced Routing'
    Add a new/additional static route
    • Select set number 1
    • Route Name: 'Router-2-via-EoIP' (no spaces !)
    • Metric: 0
    • Destination LAN NET: 192.168.2.0
    • Subnet Mask: 255.255.255.0
    • Gateway: 192.168.202.2
    • Interface: ANY

[edit] Detailed setup for Router 2

  • Go to 'Setup - EoIP Tunnel'
    • Enable 'Tunnel 1'
    • Remote IP Address a.b.c.d (The static internet (WAN port) address of router 1)
    • Tunnel ID: 1 (Must be the same on both routers)
    • Leave Compression, TOS passthrough, fragment, mssfix, shaper alone (Disabled or 0)
    • Set Bridging to Disable
    • Set the IP Address of the EoIP interface to 192.168.202.2
    • Set the Subnet Mask to 255.255.255.0
      The IP Address/Subnet Mask combination must be consistent with the second router
  • Go to 'Setup - Advanced Routing'
    Add a new/additional static route
    • Select set number 1
    • Route Name: 'Router-1-via-EoIP' (no spaces !)
    • Metric: 0
    • Destination LAN NET: 192.168.1.0
    • Subnet Mask: 255.255.255.0
    • Gateway: 192.168.202.1
    • Interface: ANY

[edit] Check the Setup / Debugging

Here a series of checks to see if everything is working

  • On router 1 'Administration - Commands'
    Type the command and press 'Run Command'
    • Run 'ifconfig'
      You should see the 'tap101' or 'oet1' interface with its ip address 192.168.202.1
    • Run 'route'
      The routing table, should contain a route to Destination 192.168.2.0 with Gateway 192.168.202.2
    • Run 'ping -c5 192.168.202.2'
      You should see a response from the remote router. If you have 100% packet loss then your EoIP connection is not set up correctly !
    • Run 'ping -c5 192.168.2.1'
      You should see a response from the remote router. If you have 100% packet loss and the first ping test to 202.2 did work then your route is not set up correctly. The route must be set right on both routers for this to work !
  • On router 2 'Administration - Commands'
    Type the command and press 'Run Command'
    • Run 'ifconfig'
      You should see the 'tap101' or 'oet1' interface with its ip address 192.168.202.2
    • Run 'route'
      The routing table, should contain a route to Destination 192.168.2.0 with Gateway 192.168.202.1
    • Run 'ping -c5 192.168.202.1'
      You should see a response from the remote router. If you have 100% packet loss then your EoIP connection is not set up correctly !
    • Run 'ping -c5 192.168.1.1'
      You should see a response from the remote router. If you have 100% packet loss and the first ping test to 202.2 did work then your route is not set up correctly. The route must be set right on both routers for this to work !