User Tools

Site Tools


documentation:examples:pppoe_and_l2tp_lab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
documentation:examples:pppoe_and_l2tp_lab [2021/04/01 11:35] – [Router 1] olivierdocumentation:examples:pppoe_and_l2tp_lab [2021/04/01 11:42] – [Router 1] olivier
Line 62: Line 62:
 ===== Routers configuration ===== ===== Routers configuration =====
  
-==== Router 1 ==== 
- 
-Router 1 is configured as a simple workstation : PPPoE client. 
- 
-Note: There is no IP address configured on the ethernet interface. 
- 
-<code> 
-sysrc hostname=R1 
-sysrc gateway_enable=NO 
-sysrc ipv6_gateway_enable=NO 
-sysrc mpd_enable=YES 
-sysrc mpd_flags="-b -s ppp" 
-cat > /usr/local/etc/mpd5/mpd.conf <<'EOF' 
-default: 
-        create bundle static B1 
-        set bundle enable ipv6cp 
-        set ipcp enable req-pri-dns   
-        set ipcp enable req-sec-dns   
-        set iface route default 
-        create link static L1 pppoe 
-        set link action bundle B1 
-        set auth authname olivier 
-        set auth password secret 
-        set pppoe iface vtnet0 
-        open 
-'EOF' 
-service netif restart 
-service routing restart 
-service mpd5 start 
-config save 
-</code> 
  
 ==== Router 2 ==== ==== Router 2 ====
Line 103: Line 72:
 <code> <code>
 sysrc hostname=R2 sysrc hostname=R2
-sysrc ifconfig_em1="10.0.23.2/24"+sysrc ifconfig_vtnet1="10.0.23.2/24"
 sysrc mpd_enable=YES sysrc mpd_enable=YES
 sysrc mpd_flags="-b -s ppp" sysrc mpd_flags="-b -s ppp"
-</code> 
- 
-Configure mpd5: 
- 
-<code> 
 cat > /usr/local/etc/mpd5/mpd.conf <<'EOF' cat > /usr/local/etc/mpd5/mpd.conf <<'EOF'
 default: default:
         create link template L1 pppoe         create link template L1 pppoe
-        set pppoe iface em0+        set pppoe iface vtnet0
         set link action forward L2         set link action forward L2
         set link enable incoming         set link enable incoming
Line 120: Line 84:
         set l2tp peer 10.0.23.3         set l2tp peer 10.0.23.3
 'EOF' 'EOF'
-</code> 
- 
-And apply your changes: 
- 
-<code> 
 service netif restart service netif restart
 service routing restart service routing restart
Line 135: Line 94:
 Router 3 is configured as a LNS (L2TP server). Router 3 is configured as a LNS (L2TP server).
  
-=== Modify configuration === 
- 
-Set the global parameters: 
 <code> <code>
 sysrc hostname=R3 sysrc hostname=R3
-sysrc ifconfig_em1="10.0.23.3/24" +sysrc ifconfig_vtnet1="10.0.23.3/24" 
-sysrc ifconfig_em2="88.88.88.4/24"+sysrc ifconfig_vnet2="88.88.88.4/24"
 sysrc mpd_enable=YES sysrc mpd_enable=YES
 sysrc mpd_flags="-b -s ppp" sysrc mpd_flags="-b -s ppp"
-</code> 
- 
-Configure mpd5: 
- 
-<code> 
 cat > /usr/local/etc/mpd5/mpd.conf <<'EOF' cat > /usr/local/etc/mpd5/mpd.conf <<'EOF'
 default: default:
Line 164: Line 115:
         set link enable incoming         set link enable incoming
 'EOF' 'EOF'
-</code> 
- 
-Set the password: 
- 
-<code> 
 cat > /usr/local/etc/mpd5/mpd.secret <<'EOF' cat > /usr/local/etc/mpd5/mpd.secret <<'EOF'
 olivier         secret olivier         secret
 'EOF' 'EOF'
 +service netif restart
 +service routing restart
 +service mpd5 start
 +config save
 </code> </code>
  
-And apply your changes:+==== Router 1 : PPPoE client ====
  
 <code> <code>
 +sysrc hostname=R1
 +sysrc gateway_enable=NO
 +sysrc ipv6_gateway_enable=NO
 +sysrc mpd_enable=YES
 +sysrc mpd_flags="-b -s ppp"
 +cat > /usr/local/etc/mpd5/mpd.conf <<'EOF'
 +default:
 +        create bundle static B1
 +        set bundle enable ipv6cp
 +        set ipcp enable req-pri-dns  
 +        set ipcp enable req-sec-dns  
 +        set iface route default
 +        create link static L1 pppoe
 +        set link action bundle B1
 +        set auth authname olivier
 +        set auth password secret
 +        set pppoe iface vtnet0
 +        open
 +'EOF'
 service netif restart service netif restart
 service routing restart service routing restart
Line 187: Line 156:
 Router 4 is configured as simple host, and be used an Internet server too for testing connectivity with the PC. Router 4 is configured as simple host, and be used an Internet server too for testing connectivity with the PC.
  
-=== Modify configuration === 
- 
-Set the basic parameters: 
 <code> <code>
 sysrc hostname=R4 sysrc hostname=R4
 sysrc defaultrouter="88.88.88.4" sysrc defaultrouter="88.88.88.4"
-sysrc ifconfig_em2="88.88.88.5/24"+sysrc ifconfig_vtnet2="88.88.88.5/24" 
 +sysrc gateway_enable=NO 
 +sysrc ipv6_gateway_enable=NO
 service netif restart service netif restart
 service routing restart service routing restart
documentation/examples/pppoe_and_l2tp_lab.txt · Last modified: 2021/04/01 11:51 by olivier

Except where otherwise noted, content on this wiki is licensed under the following license: BSD 2-Clause
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki