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:36] – [Router 3] olivierdocumentation:examples:pppoe_and_l2tp_lab [2021/04/01 11:47] – [LAC (R2)] olivier
Line 62: Line 62:
 ===== Routers configuration ===== ===== Routers configuration =====
  
-==== Router 1 ==== 
  
-Router 1 is configured as a simple workstation PPPoE client.+==== Router BAS and LAC ====
  
-Note: There is no IP address configured on the ethernet interface.+Router 2 forwards PPP between PPPoE and L2TP.
  
-<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 is configured as a BAS and LAC (forward PPP between PPPoE and L2TP). 
- 
-=== Modify configuration === 
  
-Set the base parameters: 
 <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"
Line 109: Line 76:
 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 121: Line 88:
 </code> </code>
  
-==== Router 3 ==== +==== Router 3 LNS (L2TP server) ====
- +
-Router 3 is configured as a LNS (L2TP server).+
  
 <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_vtnet2="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"
Line 148: Line 113:
 cat > /usr/local/etc/mpd5/mpd.secret <<'EOF' cat > /usr/local/etc/mpd5/mpd.secret <<'EOF'
 olivier         secret olivier         secret
 +'EOF'
 +service netif restart
 +service routing restart
 +service mpd5 start
 +config save
 +</code>
 +
 +==== Router 1 : : PPPoE client ====
 +
 +<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' 'EOF'
 service netif restart service netif restart
Line 159: Line 152:
 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
Line 314: Line 306:
 <code> <code>
 cat /var/log/ppp.log                                                                                                                           cat /var/log/ppp.log                                                                                                                          
-Mar  8 10:55:34 R2 newsyslog[1004]: logfile first created +Apr  11:47:11 R2 ppp[54126]: Incoming PPPoE connection request via vtnet0: for service "*" from 58:9c:fc:01:02:01 
-Mar  8 11:36:05 R2 ppp: Multi-link PPP daemon for FreeBSD +Apr  11:47:11 R2 ppp[54126]: [L1-2] Accepting PPPoE connection 
-Mar  8 11:36:05 R2 ppp:   +Apr  11:47:11 R2 ppp[54126]: [L1-2] Link: Matched action 'forward "L2"' 
-Mar  8 11:36:05 R2 ppp: process 3432 started, version 5.5 (root@bigdev.bsdrp.net 04:44  3-Apr-2011) +Apr  11:47:11 R2 ppp[54126]: [R-L1-2] Rep: INCOMING event from L1-2 (0) 
-Mar  11:36:05 R2 ppp: Label 'startup' not found +Apr  11:47:11 R2 ppp[54126]: L2TP: Initiating control connection 0x801e2d610 0.0.0.0 0 <-> 10.0.23.3 1701 
-Mar  8 11:36:05 R2 ppp: PPPoE: waiting for connection on em0:, service "*" +Apr  11:47:11 R2 ppp[54126]: [L1-2] PPPoE: connection successful 
-Mar  8 11:37:36 R2 ppp: Incoming PPPoE connection request via em0: for service "*" from aa:aa:00:00:01:12 +Apr  11:47:11 R2 ppp[54126]: L2TP: Control connection 0x801e2d610 10.0.23.2 31124 <-> 10.0.23.3 1701 connected 
-Mar  11:37:36 R2 ppp: [L1-2] Accepting PPPoE connection +Apr  11:47:11 R2 ppp[54126]: [L2-3] L2TP: Incoming call #1650000 via control connection 0x801e2d610 initiated 
-Mar  11:37:36 R2 ppp: [L1-2] Link: Matched action 'forward "L2"' +Apr  11:47:11 R2 ppp[54126]: [L2-3] L2TP: Call #1650000 connected 
-Mar  11:37:36 R2 ppp: [R-L1-2] Rep: INCOMING event from L1-2 (0) +Apr  11:47:11 R2 ppp[54126]: [R-L1-2] Rep: UP event from L2-3 (1) 
-Mar  11:37:36 R2 ppp: L2TP: Initiating control connection 0x801c8d110 0.0.0.0 0 <-> 10.0.23.3 1701 +Apr  11:47:11 R2 ppp[54126]: [R-L1-2] Rep: UP event from L1-2 (0)
-Mar  11:37:36 R2 ppp: [L1-2] PPPoE: connection successful +
-Mar  11:37:36 R2 ppp: L2TP: Control connection 0x801c8d110 10.0.23.2 37619 <-> 10.0.23.3 1701 connected +
-Mar  11:37:36 R2 ppp: [L2-3] L2TP: Incoming call #6190000 via control connection 0x801c8d110 initiated +
-Mar  11:37:36 R2 ppp: [L2-3] L2TP: Call #6190000 connected +
-Mar  11:37:36 R2 ppp: [R-L1-2] Rep: UP event from L2-3 (1) +
-Mar  11:37:36 R2 ppp: [R-L1-2] Rep: UP event from L1-2 (0)+
 </code> </code>
  
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