Configuring RIPng IPsec policies
Network requirements
In the following figure, configure RIPng on the switches, and configure IPsec policies on the switches to authenticate and encrypt protocol packets.
Figure 104: Network diagram
Configuration procedure
Configure IPv6 addresses for interfaces. (Details not shown.)
Configure RIPng basic functions:
# Configure Switch A.
<SwitchA> system-view [SwitchA] ripng 1 [SwitchA-ripng-1] quit [SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] ripng 1 enable [SwitchA-Vlan-interface100] quit
# Configure Switch B.
<SwitchB> system-view [SwitchB] ripng 1 [SwitchB-ripng-1] quit [SwitchB] interface vlan-interface 200 [SwitchB-Vlan-interface200] ripng 1 enable [SwitchB-Vlan-interface200] quit [SwitchB] interface vlan-interface 100 [SwitchB-Vlan-interface100] ripng 1 enable [SwitchB-Vlan-interface100] quit
# Configure Switch C.
<SwitchC> system-view [SwitchC] ripng 1 [SwitchC-ripng-1] quit [SwitchC] interface vlan-interface 200 [SwitchC-Vlan-interface200] ripng 1 enable [SwitchC-Vlan-interface200] quit
Configure RIPng IPsec policies:
# On Switch A, create an IPsec proposal named tran1, and set the encapsulation mode to transport mode, the security protocol to ESP, the encryption algorithm to DES, and authentication algorithm to SHA1; create an IPsec policy named policy001, specify the manual mode for it, reference IPsec proposal tran1, set the SPIs of the inbound and outbound SAs to 12345, and the keys for the inbound and outbound SAs using ESP to abcdefg.
[SwitchA] ipsec proposal tran1 [SwitchA-ipsec-proposal-tran1] encapsulation-mode transport [SwitchA-ipsec-proposal-tran1] transform esp [SwitchA-ipsec-proposal-tran1] esp encryption-algorithm des [SwitchA-ipsec-proposal-tran1] esp authentication-algorithm sha1 [SwitchA-ipsec-proposal-tran1] quit [SwitchA] ipsec policy policy001 10 manual [SwitchA-ipsec-policy-manual-policy001-10] proposal tran1 [SwitchA-ipsec-policy-manual-policy001-10] sa spi outbound esp 12345 [SwitchA-ipsec-policy-manual-policy001-10] sa spi inbound esp 12345 [SwitchA-ipsec-policy-manual-policy001-10] sa string-key outbound esp abcdefg [SwitchA-ipsec-policy-manual-policy001-10] sa string-key inbound esp abcdefg [SwitchA-ipsec-policy-manual-policy001-10] quit
# On Switch B, create an IPsec proposal named tran1, and set the encapsulation mode to transport mode, the security protocol to ESP, the encryption algorithm to DES, and authentication algorithm to SHA1; create an IPsec policy named policy001, specify the manual mode for it, reference IPsec proposal tran1, set the SPIs of the inbound and outbound SAs to 12345, and the keys for the inbound and outbound SAs using ESP to abcdefg.
[SwitchB] ipsec proposal tran1 [SwitchB-ipsec-proposal-tran1] encapsulation-mode transport [SwitchB-ipsec-proposal-tran1] transform esp [SwitchB-ipsec-proposal-tran1] esp encryption-algorithm des [SwitchB-ipsec-proposal-tran1] esp authentication-algorithm sha1 [SwitchB-ipsec-proposal-tran1] quit [SwitchB] ipsec policy policy001 10 manual [SwitchB-ipsec-policy-manual-policy001-10] proposal tran1 [SwitchB-ipsec-policy-manual-policy001-10] sa spi outbound esp 12345 [SwitchB-ipsec-policy-manual-policy001-10] sa spi inbound esp 12345 [SwitchB-ipsec-policy-manual-policy001-10] sa string-key outbound esp abcdefg [SwitchB-ipsec-policy-manual-policy001-10] sa string-key inbound esp abcdefg [SwitchB-ipsec-policy-manual-policy001-10] quit
# On Switch C, create an IPsec proposal named tran1, and set the encapsulation mode to transport mode, the security protocol to ESP, the encryption algorithm to DES, and authentication algorithm to SHA1; create an IPsec policy named policy001, specify the manual mode for it, reference IPsec proposal tran1, set the SPIs of the inbound and outbound SAs to 12345, and the keys for the inbound and outbound SAs using ESP to abcdefg.
[SwitchC] ipsec proposal tran1 [SwitchC-ipsec-proposal-tran1] encapsulation-mode transport [SwitchC-ipsec-proposal-tran1] transform esp [SwitchC-ipsec-proposal-tran1] esp encryption-algorithm des [SwitchC-ipsec-proposal-tran1] esp authentication-algorithm sha1 [SwitchC-ipsec-proposal-tran1] quit [SwitchC] ipsec policy policy001 10 manual [SwitchC-ipsec-policy-manual-policy001-10] proposal tran1 [SwitchC-ipsec-policy-manual-policy001-10] sa spi outbound esp 12345 [SwitchC-ipsec-policy-manual-policy001-10] sa spi inbound esp 12345 [SwitchC-ipsec-policy-manual-policy001-10] sa string-key outbound esp abcdefg [SwitchC-ipsec-policy-manual-policy001-10] sa string-key inbound esp abcdefg [SwitchC-ipsec-policy-manual-policy001-10] quit
Apply the IPsec policies in the RIPng process:
# Configure Switch A.
[SwitchA] ripng 1 [SwitchA-ripng-1] enable ipsec-policy policy001 [SwitchA-ripng-1] quit
# Configure Switch B.
[SwitchB] ripng 1 [SwitchB-ripng-1] enable ipsec-policy policy001 [SwitchB-ripng-1] quit
# Configure Switch C.
[SwitchC] ripng 1 [SwitchC-ripng-1] enable ipsec-policy policy001 [SwitchC-ripng-1] quit
Verify the configuration:
RIPng packets between Switches A, B and C are protected by IPsec.