C. PPPoE setup
For PPPoE connection, define a PPPoE tunnel interface on the interface connected to the ISP. The
interface
WAN2
is assumed to be connected to the ISP in the command shown below which
creates a PPPoE tunnel object called
wan_ppoe
:
Device:/> add Interface PPPoETunnel wan_ppoe
EthernetInterface=WAN2
Username=pppoe_username
Password=pppoe_password
Network=all-nets
Your ISP will supply the correct values for
pppoe_username
and
pppoe_password
in the dialog
above.
The PPPoE tunnel interface can now be treated exactly like a physical interface by the policies
defined in cOS Core rule sets.
There also has to be a route associated with the PPPoE tunnel to allow traffic to flow through it
and this is automatically created in the
main
routing table when the tunnel is defined. If the
PPPoE tunnel object is deleted, this route is also automatically deleted.
At this point, no traffic can flow through the tunnel since there is no IP rule set entry defined that
allows it. As was done in option A above, we must define an IP policy that will allow traffic from
the source network and source interface (in this example, the network
LAN2_net
and interface
LAN2
) to flow to the destination network
all-nets
and the destination interface, which is the
PPPoE tunnel.
D. PPTP setup
For PPTP connection, first define the PPTP tunnel interface. The following command will create a
PPTP tunnel object called
wan_pptp
with the remote endpoint
203.0.113.1
:
Device:/> add Interface L2TPClient wan_pptp
Network=all-nets
username=pptp_username
Password=pptp_password
RemoteEndpoint=203.0.113.1
TunnelProtocol=PPTP
Your ISP will supply the correct values for
pptp_username
,
pptp_password
and the remote
endpoint. An interface is not specified when defining the tunnel because this is determined by
cOS Core looking up the
Remote Endpoint
IP address in its routing tables.
The PPTP client tunnel interface can now be treated exactly like an Ethernet interface by the
policies defined in cOS Core rule sets.
There also has to be an associated route with the PPTP tunnel to allow traffic to flow through it,
and this is automatically created in the
main
routing table when the tunnel is defined. The
destination network for this route is the remote network specified for the tunnel and for the
public Internet this should be
all-nets
.
As with all automatically added routes, if the PPTP tunnel object is deleted then this route is also
automatically deleted.
At this point, no traffic can flow through the tunnel since there is no IP rule set entry defined that
allows it. As was done in option A above, we must define an IP policy that will allow traffic from
the source network and source interface (in this example, the network
LAN2_net
and interface
Chapter 4: cOS Core Configuration
63