Example for Configuring MLAG with DHCP Relay


Networking Requirements

Figure 1. Example for Configuring MLAG with DHCP Relay


As shown in Figure 1, Switch 1 and Switch 2 are a pair of MLAG peers. DHCP client connects to Switch 3 which is dual-homed to the MLAG network. The DHCP client in network segment 10.20.20.0/24 wants to dynamically obtain IP address from the DHCP server which is in a different subnet. In this case, we need to configure DHCP relay on MLAG peers to forward DHCP packets between client and server.

When an MLAG is deployed to provide L3 routing functions to downstream clients, the MLAG peers should provide the same gateway address to the downstream clients. VRRP groups combine the MLAG peer devices into a virtual router and use the IP address of the VRRP virtual router to communicate with the access devices as the default gateway address.

Follow the configuration roadmap below to complete the example for configuring MLAG with DHCP relay:

  1. Configure Switch 1 and Switch 2 as an MLAG pair.
  2. Configure Active-Active VRRP on Switch1 and Switch2 as a virtual Gateway for DHCP client.
  3. Enable DHCP relay on Switch 1 and Switch 2.
    • DHCP relay configuration should be identical on both MLAG peer devices.
    • Configure DHCP relay agent IP address to use VRRP virtual IP.

       4. Configure a route to DHCP server on Switch 1 and Switch 2. The static route is used as an example.

       5. As a Layer 2 device, access Switch3 dual-accesses to the network through Switch1 and Switch2 by a LAG interface.

       6. Configure the DHCP client with a gateway address that is the IP address of the VRRP virtual router.

Procedure

Switch1

MLAG Configuration

Step1         Configure the VLANs.

admin@Switch1# set vlans vlan-id 10
admin@Switch1# set vlans vlan-id 4088 l3-interface vlan4088
admin@Switch1# set interface aggregate-ethernet ae48 family ethernet-switching native-vlan-id 4088
admin@Switch1# set interface aggregate-ethernet ae48 family ethernet-switching port-mode trunk
admin@Switch1# set interface aggregate-ethernet ae48 family ethernet-switching vlan members 10
admin@Switch1# set interface aggregate-ethernet ae71 family ethernet-switching port-mode trunk
admin@Switch1# set interface aggregate-ethernet ae71 family ethernet-switching vlan members 10           

Step2         Configure aggregation interfaces with LACP mode.             

admin@Switch1# set interface aggregate-ethernet ae71 aggregated-ether-options lacp enable true 
admin@Switch1# set interface aggregate-ethernet ae48 aggregated-ether-options lacp enable true 

Step3         Add member interfaces to the LAG.

admin@Switch1# set interface gigabit-ethernet te-1/1/1 ether-options 802.3ad ae48
admin@Switch1# set interface gigabit-ethernet te-1/1/2 ether-options 802.3ad ae48
admin@Switch1# set interface gigabit-ethernet te-1/1/41 ether-options 802.3ad ae71   

Step4         Configure an MLAG domain ID.

admin@Switch1# set protocols mlag domain 10

NOTE: Currently, only one MLAG domain is allowed to be configured on one MLAG device.

Step5         Specify Switch1 as MLAG Node 0.

admin@Switch1# set protocols mlag domain 10 node 0

Step6         Configure the L3 interface IP address for peer link port on local MLAG peer device.             

admin@Switch1# set l3-interface vlan-interface vlan4088 address 10.10.0.1 prefix-length 24

Step7         Configure link ID for the MLAG member port.             

admin@Switch1# set protocols mlag domain 10 interface ae71 link 1

NOTE: The paired MLAG member ports separately configured on two MLAG peer must be bound to the same MLAG link ID.

Step8         Configure MLAG peer link and peer VLAN.

admin@Switch1# set protocols mlag domain 10 peer-ip 10.10.0.2 peer-link ae48
admin@Switch1# set protocols mlag domain 10 peer-ip 10.10.0.2 peer-vlan 4088

NOTE: Peer-link port should be configured as a LAG port.

VRRP Configuration

Step 1     Configure the L3 interface IP address.

admin@Switch1# set l3-interface vlan-interface vlan10 address 11.251.201.1 prefix-length 24

Step 2   Enable Active-Active-VRRP function.

admin@Switch1# set protocols vrrp interface vlan10 vrid 100 ip 11.251.201.3
admin@Switch1# set protocols vrrp interface vlan10 vrid 100 load-balance disable false

DHCP Relay Configuration

Step 1    Enable IP routing function when using DHCP relay.

admin@Switch1# set ip routing enable true

Step 2    Enable the DHCP relay function on L3 VLAN interface vlan10.

admin@Switch1# set protocols dhcp relay interface vlan10 disable false

Step 3    Configure the IP address of DHCP server 192.168.2.100.

admin@Switch1# set protocols dhcp relay interface vlan10 dhcp-server-address 192.168.2.100

Step 4    Configure DHCP relay agent IP address to use VRRP virtual IP.

admin@Switch1# set protocols dhcp relay interface vlan10 relay-agent-address 11.251.201.3

Other Configuration

Step1       Configure VLAN and VLAN interface.

admin@Switch1# set vlans vlan-id 20
admin@Switch1# set vlans vlan-id 20 l3-interface vlan20
admin@Switch1# set interface gigabit-ethernet te-1/1/42 family ethernet-switching native-vlan-id 20
admin@Switch1# set l3-interface vlan-interface vlan20 address 10.1.1.1 prefix-length 24

Step 2    Configure route to DHCP server. The following command configures static route as an example.

admin@Switch1# set protocols static route 192.168.2.0/24 next-hop 10.1.1.2

Step 3   Commit the configuration.

admin@Switch1# commit

Switch2

MLAG Configuration

Step 1       Configure the VLANs.

admin@Switch2# set vlans vlan-id 10
admin@Switch2# set vlans vlan-id 4088 l3-interface vlan4088
admin@Switch2# set interface aggregate-ethernet ae48 family ethernet-switching native-vlan-id 4088
admin@Switch2# set interface aggregate-ethernet ae48 family ethernet-switching port-mode trunk
admin@Switch2# set interface aggregate-ethernet ae48 family ethernet-switching vlan members 10
admin@Switch2# set interface aggregate-ethernet ae71 family ethernet-switching port-mode trunk
admin@Switch2# set interface aggregate-ethernet ae71 family ethernet-switching vlan members 10 

Step 2     Configure aggregation interfaces with LACP mode.   

admin@Switch2# set interface aggregate-ethernet ae71 aggregated-ether-options lacp enable true  
admin@Switch2# set interface aggregate-ethernet ae48 aggregated-ether-options lacp enable true

Step 3      Add member interfaces to the LAG.

admin@Switch2# set interface gigabit-ethernet te-1/1/1 ether-options 802.3ad ae48
admin@Switch2# set interface gigabit-ethernet te-1/1/2 ether-options 802.3ad ae48
admin@Switch2# set interface gigabit-ethernet te-1/1/41 ether-options 802.3ad ae71 

Step 4      Configure an MLAG domain ID. 

admin@Switch2# set protocols mlag domain 10

 NOTE: Currently, only one MLAG domain is allowed to be configured on one MLAG device.

Step 5      Specify Switch2 as MLAG Node 1.

admin@Switch2# set protocols mlag domain 10 node 1

Step 6    Configure the L3 interface IP address for peer link port on local MLAG peer device.

admin@Switch2# set l3-interface vlan-interface vlan4088 address 10.10.0.2 prefix-length 24

Step 7      Configure link ID for the MLAG member port.

admin@Switch2# set protocols mlag domain 10 interface ae71 link 1

NOTE: The paired MLAG member ports separately configured on two MLAG peer must be bound to the same MLAG link ID.

Step 8       Configure MLAG peer link and peer VLAN.

admin@Switch2# set protocols mlag domain 10 peer-ip 10.10.0.1 peer-link ae48
admin@Switch2# set protocols mlag domain 10 peer-ip 10.10.0.1 peer-vlan 4088

NOTE: Peer-link port should be configured as a LAG port.

VRRP Configuration

Step 1     Configure the L3 interface IP address.

admin@Switch2# set l3-interface vlan-interface vlan10 address 11.251.201.2 prefix-length 24

Step 2   Enable Active-Active-VRRP function.

admin@Switch2# set protocols vrrp interface vlan10 vrid 100 ip 11.251.201.3
admin@Switch2# set protocols vrrp interface vlan10 vrid 100 load-balance disable false

DHCP Relay Configuration

Step 1    Enable IP routing function when using DHCP relay.

admin@Switch2# set ip routing enable true

Step 2   Enable the DHCP relay function on L3 VLAN interface vlan10.

admin@Switch2# set protocols dhcp relay interface vlan10 disable false

Step 3    Configure the IP address of DHCP server 192.168.2.100.

admin@Switch2# set protocols dhcp relay interface vlan10 dhcp-server-address 192.168.2.100

Step 4    Configure DHCP relay agent IP address to use VRRP virtual IP.

admin@Switch2# set protocols dhcp relay interface vlan10 relay-agent-address 11.251.201.3

Other Configuration

Step1       Configure VLAN and VLAN interface.

admin@Switch2# set vlans vlan-id 30
admin@Switch2# set vlans vlan-id 30 l3-interface vlan30
admin@Switch2# set interface gigabit-ethernet te-1/1/42 family ethernet-switching native-vlan-id 30
admin@Switch2# set l3-interface vlan-interface vlan30 address 20.1.1.1 prefix-length 24

Step2       Configure a route to DHCP server. The following command uses the static route as an example.      

admin@Switch2# set protocols static route 192.168.2.0/24 next-hop 20.1.1.2

Step3       Commit the configuration.      

admin@Switch2# commit

Switch3

Step1        Enable aggregation interface with LACP mode.             

admin@Switch3# set interface aggregate-ethernet ae1 aggregated-ether-options lacp enable true

Step2         Add member interfaces to a LAG.           

admin@Switch3# set interface gigabit-ethernet ge-1/1/1 ether-options 802.3ad ae1
admin@Switch3# set interface gigabit-ethernet ge-1/1/2 ether-options 802.3ad ae1

Step3         Configure VLAN.             

admin@Switch3# set vlans vlan-id 10
admin@Switch3# set interface aggregate-ethernet ae1 family ethernet-switching native-vlan-id 10

Step4         Commit the configuration.   

admin@Switch3# commit

Verify the Configuration

  • You can use the run show mlag domain command to display the global MLAG domain information.
admin@Switch1# run show mlag domain summary
Domain ID: 10    Domain MAC: 62:9E:73:FF:00:01    Node ID: 0
-----------------------------------------------------------------------
Peer Link  Peer IP          Peer Vlan  Neighbor Status  Config Matched  MAC Synced   # of Links
---------  ---------------  ---------  ---------------  --------------  ----------   ----------
ae48       10.10.10.2       4088       ESTABLISHED      Yes              Yes          1 
  • You can use the run show mlag link command to display MLAG link information.
admin@Switch1# run show mlag link summary
# of Links: 1
Link   Local LAG   Link Status   Local Status   Peer Status   Config Matched   Flood
----   ---------   -----------   ------------   -----------   --------------   -----
1      ae71         IDLE          UP             UNKNOWN       No               No
  • You can use the run show mlag consistency-parameter command to display the result of MLAG configuration consistency check, including the global and per MLAG configuration.
admin@Switch1# run show mlag consistency-parameter link 1
Port Configurations:
-----------------------------------------------------------------
Property                 Local Value      Peer Value       Result
-----------------------  ---------------  ---------------  ------
MTU                      1514             1514             PASS  
Mac Learning             Yes              Yes              PASS 
Lag Mode                 LACP             LACP             PASS 
Native Vlan              1                1                PASS 
Port Vlan Mode           Trunk            Trunk            PASS 

Spanning-Tree Configurations:
-----------------------------------------------------------------
Property                 Local Value      Peer Value       Result
-----------------------  ---------------  ---------------  ------
Mode                                                       PASS 

admin@Switch1# run show mlag consistency-parameter summary
Overall : PASS
--------------
Global  : PASS
Link 1  : PASS

MLAG Configurations:
-----------------------------------------------------------------
Property                 Local Value      Peer Value       Result
-----------------------  ---------------  ---------------  ------
Domain ID                1                1                PASS 
Node ID                  0                1                PASS 
Peer VLAN                4088             4088             PASS 
Link Count               1                1                PASS 
Link IDs                 2                2                PASS                          

Spanning-Tree Configurations:
-----------------------------------------------------------------
Property                 Local Value      Peer Value       Result
-----------------------  ---------------  ---------------  ------
Enable                   No               No               PASS   

DHCP Snooping Configurations:
-----------------------------------------------------------------
Property                 Local Value      Peer Value       Result
-----------------------  ---------------  ---------------  ------
Enable                   No               No               PASS 

IGMP Snooping Configurations:
-----------------------------------------------------------------
Property                 Local Value      Peer Value       Result
-----------------------  ---------------  ---------------  ------
Enable                   No               No               PASS
  • You can use run show vrrp command to view the configuration information of VRRP group. The result of show command on Switch1 is as follows.
admin@Switch1# run show vrrp
Interface: vlan10
VRID: 100
Version: 2
Load-balance: enable
State: Master
Master IP: 11.251.201.1
Virtual MAC: 00:00:5e:00:01:01
Preempt: disable
Adver Interval: 1 
Priority: 250 
Virtual IP: 11.251.201.3
Auth-type: none
Auth-key:
  • DHCP client can obtain the IP address normally.




Copyright © 2024 Pica8 Inc. All Rights Reserved.