<commit_before>
## Configuration

### Overview

* basic configuration
    * PE12 multihome with PE14 with site id = 1
        * PE12 has preference 200
        * PE14 has preference 400. This config should make this router as the preferred PE.
    * PE11 multihome with PE17 with site id = 2
        * no explicit preference configured. By default lower router-id should be preferred.
    * PE-CE @site 1 is using vlan 949 and PE-CE @site 2 is using vlan 950. Therefore, vlan mapping is used to connect them. To show different mapping solution, two different mechanism are being used:
        * at site 1, vlan-id is configured on routing-instance to allow automatic vlan push/pop/swap
        * at site 2, input-vlan-map and output-vlan-map is configured on PE-CE interface
* Optional configuration 
    * Additional dummy site is configured on each PE to demonstrate always on pseudowire feature to imporve failover time.
        * PE11 @ site 2 is configured with site id 11
        * PE17 @ site 2 is configured with site id 17
        * PE12 @ site 1 is configured with site id 12
        * PE14 @ site 1 is configured with site id 14
    * dummy site configuration configured with "best-site" keyword and has no PE-CE interface associated with it. This is to make sure the dummy site is always up.

### Router Configuration 

* PE1
    
    ```
    rwibawa@vmx-13-11# show interfaces ge-0/0/0 unit 950
    apply-groups-except interface-group;
    encapsulation vlan-vpls;
    vlan-id 950;
    input-vlan-map {
        swap;
        vlan-id 951;
    }
    output-vlan-map swap;
    family vpls;
    
    
    rwibawa@vmx-13-11# show routing-instances VPLS3
    instance-type vpls;
    interface ge-0/0/0.950;
    route-distinguisher 172.16.58.3:766;
    vrf-target target:7041:776;
    protocols {
        vpls {
            site-range 20;
            no-tunnel-services;
            site 2 {
                site-identifier 2;
                multi-homing;
                interface ge-0/0/0.950;
            }
            site 11 {
                site-identifier 11;
                best-site;
            }
            mac-flush;
        }
    }
    
* PE17

    ```
    rwibawa@vmx-13-17# show interfaces ge-0/0/0.950
    apply-groups-except interface-group;
    encapsulation vlan-vpls;
    vlan-id 950;
    input-vlan-map {<commit_msg>Update junos.vpls.bgp.multihoming.md<commit_after>
## Configuration

### Overview

* basic configuration
    * PE12 multihome with PE14 with site id = 1
        * PE12 has preference 200
        * PE14 has preference 400. This config should make this router as the preferred PE.
    * PE11 multihome with PE17 with site id = 2
        * no explicit preference configured. By default lower router-id should be preferred.
    * PE-CE @site 1 is using vlan 949 and PE-CE @site 2 is using vlan 950. Therefore, vlan mapping is used to connect them. To show different mapping solution, two different mechanism are being used:
        * at site 1, vlan-id is configured on routing-instance to allow automatic vlan push/pop/swap
        * at site 2, input-vlan-map and output-vlan-map is configured on PE-CE interface
* Optional configuration 
    * Additional dummy site is configured on each PE to demonstrate always on pseudowire feature to imporve failover time.
        * PE11 @ site 2 is configured with site id 11
        * PE17 @ site 2 is configured with site id 17
        * PE12 @ site 1 is configured with site id 12
        * PE14 @ site 1 is configured with site id 14
    * dummy site configuration configured with "best-site" keyword and has no PE-CE interface associated with it. This is to make sure the dummy site is always up.

### Router Configuration 

* PE1
    
    ```
    rwibawa@vmx-13-11# show interfaces ge-0/0/0 unit 950
    apply-groups-except interface-group;
    encapsulation vlan-vpls;
    vlan-id 950;
    input-vlan-map {
        swap;
        vlan-id 951;
    }
    output-vlan-map swap;
    family vpls;
    
    
    rwibawa@vmx-13-11# show routing-instances VPLS3
    instance-type vpls;
    interface ge-0/0/0.950;
    route-distinguisher 172.16.58.3:766;
    vrf-target target:7041:776;
    protocols {
        vpls {
            site-range 20;
            no-tunnel-services;
            site 2 {
                site-identifier 2;
                multi-homing;
                interface ge-0/0/0.950;
            }
            site 11 {
                site-identifier 11;
                best-site;
            }
            mac-flush;
        }
    }
    ```
    
* PE17

    ```
    rwibawa@vmx-13-17# show interfaces ge-0/0/0.950
    apply-groups-except interface-group;
    encapsulation vlan-vpls;
    vlan-id 950;
    input-vlan-map {
{'fraction_non_alphanumeric': 0.0725925925925926, 'fraction_numerical': 0.05291005291005291, 'mean_word_length': 2.035324341682723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5308893', 'n_tokens_mistral': 1589, 'n_tokens_neox': 1390, 'n_words': 511}