=========================================================================
Multi LAN edge deployment, one global, one private
=========================================================================

The following page explains how to set up a multi LAN edge node deployment
connecting to a remote node, with one LAN in the global VRF and one LAN in a
private VRF ("Red").

.. graphviz::

    graph {
        rankdir=TB;
        newrank=true;
        fontname="Arial";
        splines=ortho;
        bgcolor="transparent";
        nodesep=0.25;
        ranksep=0.75;

        node [
            shape=box,
            style="filled,rounded",
            fontname="Arial",
            fontsize=12
        ];

        edge [
            penwidth=1.5,
            fontname="Arial",
            fontsize=10
        ];

        lan_global [label=<LAN: <font color="#333333">198.51.100.0/24</font><br align="left"/>LAN: <font color="#333333">2001:db8::/64</font><br align="left"/>>, fillcolor="#FFFFFF", color="#666666"];
        lan_red [label=<LAN: <font color="#C0392B">172.16.1.0/24</font><br align="left"/>LAN: <font color="#C0392B">fe00:1::/64</font><br align="left"/>>, fillcolor="#FFE0E0", color="#C0392B"];

        subgraph cluster_dc0 {
            label="Node: dc0";
            labelloc="t";
            style="filled,rounded";
            fillcolor="#E9F7EF";
            color="#1E8449";

            dc0_eth1 [
                label=<<b>Interface: eth1</b><br align="left"/>    Aliases: <font color="#C0392B">private1</font><br align="left"/>    VRF: <font color="#C0392B">Red</font><br align="left"/>    IPv4: <font color="#C0392B">10.0.1.1/24</font><br align="left"/>    IPv6: <font color="#C0392B">fd00:1::1/64</font><br align="left"/>    Keep on shutdown: <font color="#C0392B">✗</font><br align="left"/>>,
                fillcolor="#FFE0E0",
                color="#C0392B"
            ];

            dc0_eth0 [
                label=<<b>Interface: eth0</b><br align="left"/>    Aliases: <font color="#333333">public</font><br align="left"/>    VRF: <font color="#333333">Global</font><br align="left"/>    IPv4: <font color="#333333">203.0.113.1/24</font><br align="left"/>    IPv6: <font color="#333333">2001:db8:1::1/64</font><br align="left"/>    Keep on shutdown: <font color="#333333">✔ (IPv4/IPv6)</font><br align="left"/>>,
                fillcolor="#FFFFFF",
                color="#666666"
            ];

            dc0_peer [
                label=<<b>Peer: Default</b><br align="left"/>    Mode: <font color="#D4A90D">Listen</font><br align="left"/>>,
                shape=box,
                fillcolor="#FEF9E7",
                color="#F1C40F"
            ];

            dc0_eth0 -- dc0_peer;
            dc0_eth1 -- dc0_peer [color="#C0392B"];
        }

        subgraph cluster_cpe0 {
            label="Node: cpe0";
            labelloc="b";
            style="filled,rounded";
            fillcolor="#E9F7EF";
            color="#1E8449";

            cpe0_route_global1 [
                label=<<b>Route: 0.0.0.0/0</b><br align="left"/>    VRF: <font color="#333333">Global</font><br align="left"/>    Nexthop: <font color="#333333">Default</font><br align="left"/>    Preference: <font color="#333333">500</font><br align="left"/>>,
                style="filled",
                fillcolor="#FFFFFF",
                color="#666666"
            ];

            cpe0_route_global2 [
                label=<<b>Route: ::/0</b><br align="left"/>    VRF: <font color="#333333">Global</font><br align="left"/>    Nexthop: <font color="#333333">Default</font><br align="left"/>    Preference: <font color="#333333">500</font><br align="left"/>>,
                style="filled",
                fillcolor="#FFFFFF",
                color="#666666"
            ];

            cpe0_route_red1 [
                label=<<b>Route: 10.0.1.0/24</b><br align="left"/>    VRF: <font color="#C0392B">Red</font><br align="left"/>    Nexthop: <font color="#C0392B">Default</font><br align="left"/>    Preference: <font color="#C0392B">500</font><br align="left"/>>,
                style="filled",
                fillcolor="#FFE0E0",
                color="#C0392B"
            ];

            cpe0_route_red2 [
                label=<<b>Route: fd00:1::0/64</b><br align="left"/>    VRF: <font color="#C0392B">Red</font><br align="left"/>    Nexthop: <font color="#C0392B">Default</font><br align="left"/>    Preference: <font color="#C0392B">500</font><br align="left"/>>,
                style="filled",
                fillcolor="#FFE0E0",
                color="#C0392B"
            ];

            cpe0_nexthop [
                label=<<b>Nexthop: Peer</b><br align="left"/>    Peer: <font color="#333333">Default</font><br align="left"/>>,
                style="filled",
                fillcolor="#FFFFFF",
                color="#666666"
            ];

            cpe0_peer [
                label=<<b>Peer: Default</b><br align="left"/>    Mode: <font color="#D4A90D">Connect</font><br align="left"/>    Interface: <font color="#D4A90D">eth2</font><br align="left"/>    Interface: <font color="#D4A90D">eth3</font><br align="left"/>    Remote (node): <font color="#D4A90D">dc0</font><br align="left"/>    Preference: <font color="#D4A90D">500</font><br align="left"/>>,
                fillcolor="#FEF9E7",
                color="#F1C40F"
            ];

            cpe0_eth0 [
                label=<<b>Interface: eth0</b><br align="left"/>    Aliases: <font color="#333333">lan0</font><br align="left"/>    VRF: <font color="#333333">Global</font><br align="left"/>    IPv4: <font color="#333333">198.51.100.1/24</font><br align="left"/>    IPv6: <font color="#333333">2001:db8::1/64</font><br align="left"/>    Keep on shutdown: <font color="#333333">✗</font><br align="left"/>>,
                fillcolor="#FFFFFF",
                color="#666666"
            ];

            cpe0_eth1 [
                label=<<b>Interface: eth1</b><br align="left"/>    Aliases: <font color="#C0392B">lan1</font><br align="left"/>    VRF: <font color="#C0392B">Red</font><br align="left"/>    IPv4: <font color="#C0392B">172.16.1.1/24</font><br align="left"/>    IPv6: <font color="#C0392B">fe00:1::1/64</font><br align="left"/>    Keep on shutdown: <font color="#C0392B">✗</font><br align="left"/>>,
                fillcolor="#FFE0E0",
                color="#C0392B"
            ];

            cpe0_eth2 [
                label=<<b>Interface: eth2</b><br align="left"/>    Aliases: <font color="#484D4D">wan0</font><br align="left"/>    VRF: <font color="#484D4D">No VRF</font><br align="left"/>    IPv4: <font color="#484D4D">DHCP</font><br align="left"/>    Keep on shutdown: <font color="#333333">✔ (IPv4)</font><br align="left"/>>
            ];

            cpe0_eth3 [
                label=<<b>Interface: eth3</b><br align="left"/>    Aliases: <font color="#484D4D">wan1</font><br align="left"/>    VRF: <font color="#484D4D">No VRF</font><br align="left"/>    IPv4: <font color="#484D4D">DHCP</font><br align="left"/>    Keep on shutdown: <font color="#333333">✗</font><br align="left"/>>
            ];

            cpe0_peer -- cpe0_eth2 [weight=100];
            cpe0_peer -- cpe0_eth3 [weight=100];
            cpe0_route_global1 -- cpe0_route_red1 -- cpe0_eth1 [style=invis, weight=50];
            cpe0_route_global2 -- cpe0_route_red2 -- cpe0_eth2 [style=invis, weight=100];
            cpe0_route_global1 -- cpe0_eth0 [constraint=false];
            cpe0_route_global2 -- cpe0_eth0 [constraint=false];
            cpe0_route_red1 -- cpe0_eth1 [constraint=false, color="#C0392B"];
            cpe0_route_red2 -- cpe0_eth1 [constraint=false, color="#C0392B"];
            cpe0_route_global1 -- cpe0_nexthop [constraint=false];
            cpe0_route_global2 -- cpe0_nexthop [constraint=false];
            cpe0_route_red1 -- cpe0_nexthop [constraint=false, color="#C0392B"];
            cpe0_route_red2 -- cpe0_nexthop [constraint=false, color="#C0392B"];
            cpe0_nexthop -- cpe0_peer [constraint=false];
        }

        dc0_peer -- cpe0_peer [color="#F1C40F"];
        cpe0_eth0 -- lan_global;
        cpe0_eth1 -- lan_red [color="#C0392B"];

        { rank=same; cpe0_route_global1 -- cpe0_route_global2 -- cpe0_nexthop -- cpe0_peer [style=invis] }
        { rank=same; cpe0_route_red1 -- cpe0_route_red2 [style=invis] }
        { rank=same; cpe0_eth0 -- cpe0_eth1 -- cpe0_eth2 -- cpe0_eth3 [style=invis] }
    }

|

Instructions
============

#. Follow the instructions to `set up a core node with an interface in a
   private VRF <core-node-private-vrf-setup.html>`__.

#. Create a new node record on the management server with the name ``cpe0``.

#. Add the following interfaces to the newly created node:

   - Name: ``eth0``

      - Aliases: ``lan0``
      - VRF: ``Global``
      - IPv4: ``198.51.100.1/24``
      - IPv6: ``2001:db8::1/64``
      - Keep on shutdown disabled

   - Name: ``eth1``

      - Aliases: ``lan1``
      - VRF: ``Red``
      - IPv4: ``172.16.1.1/24``
      - IPv6: ``fe00:1::1/64``
      - Keep on shutdown disabled

   - Name: ``eth2``

      - Aliases: ``wan0``
      - VRF: ``No VRF``
      - IPv4: ``DHCP``
      - Keep on shutdown enabled

   - Name: ``eth3``

      - Aliases: ``wan1``
      - VRF: ``No VRF``
      - IPv4: ``DHCP``
      - Keep on shutdown disabled

#. Next, `add a peer <../peers/managing-peers.html>`__ to the node:

   - Name: ``Default``

      - Interface: ``eth2`` (Preference: ``500``)
      - Interface: ``eth3`` (Preference: ``500``)
      - Remote (node): ``dc0`` (Preference: ``500``)

#. Then, `add a nexthop <../routing-and-vrfs/nexthops/managing-nexthops.html>`__
   to the node:

   - Type: ``Peer``

      - Peer: ``Default``

#. Finally, `add four routes <../routing-and-vrfs/routes/managing-routes.html>`__
   to the node:

   - Destination: ``0.0.0.0/0``

      - VRF: ``Global``
      - Nexthop: ``Default`` (Preference: ``500``)

   - Destination: ``::/0``

      - VRF: ``Global``
      - Nexthop: ``Default`` (Preference: ``500``)

   - Destination: ``10.0.1.0/24``

      - VRF: ``Red``
      - Nexthop: ``Default`` (Preference: ``500``)

   - Destination: ``fd00:1::/64``

      - VRF: ``Red``
      - Nexthop: ``Default`` (Preference: ``500``)

#. You now have a complete multi LAN edge node configuration forming a peer
   connection with a remote node, with one LAN in the global VRF and another
   LAN in a private VRF.