Configuration Guide
VRRP Configuration Guide
34 min
introduction introduction vrrp, which stands for virtual router redundancy protocol, is a protocol that creates a virtual router by grouping multiple devices together by configuring the ip address of this virtual device as the default gateway, it achieves backup for the default gateway when the gateway device fails, the vrrp mechanism can elect a new gateway device to handle data traffic, thus ensuring reliable network communication hosts within the local area network only need to know the virtual ip address of this virtual router and set it as the ip address of the gateway basic concepts basic concepts master device master device the switch elected to take on the forwarding task, responsible for forwarding packets sent to the virtual ip address, as well as responding to arp requests/nd requests backup device backup device a group of devices that are not currently undertaking the forwarding task; when the master device fails, they will compete to become the new master device vrrp working process vrrp working process the working process of vrrp is as follows devices in the vrrp backup group elect a master based on priority the master device sends gratuitous arp messages to notify the connected devices or hosts of the virtual mac address, thereby taking on the task of forwarding packets the master device periodically sends vrrp advertisement messages to all backup devices within the backup group to announce its configuration information (priority, etc ) and working status if the master device fails, the backup devices in the vrrp backup group will re elect a new master based on priority when there is a state transition in the vrrp backup group, the master device switches from one device to another the new master device immediately sends gratuitous arp messages, which carry the virtual mac address and virtual ip address information of the virtual router to refresh the mac table entries of the connected devices or hosts, thereby directing user traffic to the new master device the entire process is completely transparent to the users vrrp configuration vrrp configuration this feature is only supported by the cx308p 48y n v2 and cx532p n v2 models; other models are not currently supported vrrp default setting vrrp default setting the default setting of vrrp is shown in the following table table 1 default setting of vrrp table 1 default setting of vrrp parameters default value protocol running version 3 message announcement interval 1000ms preemption mode enable priority 100 checksum calculation with ipv4 packet pseudo header enable configure vrrp instance configure vrrp instance table 2 configure vrrp instance table 2 configure vrrp instance purpose commands description enter global configuration view configure terminal enable vrrp vrrp enable enter interface configuration view interface { ethernet interface name\[ subinterface number ] | link aggregation lag id\[ subinterface number ]| vlan vlan id } configure vrid { vrrp | vrrp6 } vrid \[ version protocol ver ] vrid range is \[0,255] the vrrp protocol version parameter protocol ver can be specified as 2 or 3, with the default value being 3 vrrp6 does not require specification configure virtual ip { vrrp | vrrp6 } vrid { ip a b c d/m | ipv6 x\ x x\ x/m } configure vrrp instance priority { vrrp | vrrp6 } vrid priority pri pri priority, default is 100, value range \[1,254] configure the vrrp advertisement interval { vrrp | vrrp6 } vrid advertisement interval time time the advertisement interval for vrrp messages, with a value range of \[10,40950] in milliseconds and a default value of 1000 when the protocol version is 2, this value should be a multiple of 1000; when the protocol version is 3, it should be a multiple of 10 disable preempt mode no { vrrp | vrrp6 } vrid preempt enabled by default, when enabled, the backup device has a higher priority than the master and will become the new master when disabled, even if a backup device is later configured with a higher priority, it will not become the master device as long as the master device has not failed, which can prevent frequent master switchovers disable vrrp instance { vrrp | vrrp6 } vrid shutdown before making network adjustments or changing vrrp configurations, you can first disable the vrrp instance to avoid affecting existing network services during the modification process configure checksum to exclude the calculation of the ipv4 packet pseudo header no vrrp vrid checksum with ipv4 pseudoheader default is to calculate, applicable only for vrrp protocol version 3 configure instance associated interfaces { vrrp | vrrp6 } vrid track interface { ethernet interface name | link aggregation lag id | vlan vlan id } priority dec pri when the upstream port fails, the master can correspondingly reduce its priority to trigger a re election of the master, ensuring normal traffic forwarding display and maintenance display and maintenance table 3 vrrp display and maintenance table 3 vrrp display and maintenance purpose command description display vrrp configurations show { vrrp | vrrp6 } \[ interface { ethernet interface name \[ subinterface number ]| link aggregation lag id \[ subinterface number ] | vlan vlan id }] \[ vrid ] \[ json | summary ] typical configuration example typical configuration example vrrp and mstp integrated configuration scenario vrrp and mstp integrated configuration scenario networking requirements switcha and switchb implement gateway redundancy through vrrp and eliminate layer 2 loops through mstp topology configuration roadmap (1) basic vlan and ip configuration (2) mstp configuration for switch a, switch b, and switch c (3) vrrp configuration for switch a and switch b (4) routing protocol configuration for switch a, switch b, and switch d procedure switch a configure mstp sonic# configure terminal sonic(config)# vlan 107 sonic(config vlan 107)# exit sonic(config)# mstp enable sonic(config)# mstp name test1 sonic(config)# mstp instance 1 sonic(config mstp instance 1)# vlan 107 sonic(config mstp instance 1)# priority 0 sonic(config mstp instance 1)# exit configure vlan and ip sonic(config)# interface ethernet 0/128 sonic(config if 0/128)# switchport trunk vlan 107 sonic(config if 0/128)# exit sonic(config)# interface ethernet 0/129 sonic(config if 0/129)# switchport trunk vlan 107 sonic(config if 0/129)# exit sonic(config)# interface vlan 107 sonic(config vlanif 107)# ip address 107 0 0 171/24 sonic(config vlanif 107)# ip address 107 171/64 sonic(config vlanif 107)# exit sonic(config)# interface ethernet 0/4 sonic(config if 0/4)# ip address 4 0 0 171/24 sonic(config if 0/4)# ip address 4 171/2464 sonic(config if 0/4)# exit configure vrrp sonic(config)# interface vlan 107 sonic(config vlanif 107)# vrrp 1 ip 107 0 0 1/24 sonic(config vlanif 107)# vrrp6 2 ipv6 107 1/64 sonic(config vlanif 107)# vrrp 1 priority 120 sonic(config vlanif 107)# vrrp6 2 priority 120 sonic(config vlanif 107)# vrrp 1 track interface ethernet 0/4 priority dec 50 sonic(config vlanif 107)# vrrp6 2 track interface ethernet 0/4 priority dec 50 sonic(config vlanif 107)# exit configure ospf sonic(config)# router ospf sonic(config router)# router id 10 250 0 171 sonic(config router)# exit sonic(config)# router ospf6 sonic(config ospf6)# ospf6 router id 10 250 0 171 sonic(config ospf6)# exit sonic(config)# interface vlan 107 sonic(config vlanif 107)# ip ospf area 107 sonic(config vlanif 107)# ipv6 ospf6 area 107 sonic(config vlanif 107)# exit sonic(config)# interface ethernet 0/4 sonic(config if 0/4)# ip ospf area 107 sonic(config if 0/4)# ipv6 ospf6 area 107 sonic(config if 0/4)# exit switch b configure mstp sonic# configure terminal sonic(config)# vlan 107 sonic(config vlan 107)# exit sonic(config)# mstp enable sonic(config)# mstp name test1 sonic(config)# mstp instance 1 sonic(config mstp instance 1)# vlan 107 sonic(config mstp instance 1)# exit configure vlan and ip sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# switchport trunk vlan 107 sonic(config if 0/0)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# switchport trunk vlan 107 sonic(config if 0/45)# exit sonic(config)# interface vlan 107 sonic(config vlanif 107)# ip address 107 0 0 173/24 sonic(config vlanif 107)# ip address 107 173/64 sonic(config vlanif 107)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# ip address 46 0 0 173/24 sonic(config if 0/46)# ip address 46 173/24 sonic(config if 0/46)# exit configure vrrp sonic(config)# interface vlan 107 sonic(config vlanif 107)# vrrp 1 ip 107 0 0 1/24 sonic(config vlanif 107)# vrrp6 2 ipv6 107 1/64 sonic(config vlanif 107)# exit configure ospf sonic(config)# router ospf sonic(config router)# ospf router id 10 250 0 173 sonic(config router)# exit sonic(config)# router ospf6 sonic(config ospf6)# router ospf6 vrf 1007 sonic(config ospf6)# ospf6 router id 10 250 0 173 sonic(config ospf6)# exit sonic(config)# interface vlan 107 sonic(config vlanif 107)# ip ospf area 107 sonic(config vlanif 107)# ipv6 ospf6 area 107 sonic(config vlanif 107)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# ip ospf area 107 sonic(config if 0/46)# ipv6 ospf6 area 107 sonic(config if 0/46)# exit switch c configure mstp sonic# configure terminal sonic(config)# vlan 107 sonic(config vlan 107)# exit sonic(config)# mstp enable sonic(config)# mstp name test1 sonic(config)# mstp instance 1 sonic(config mstp instance 1)# vlan 107 sonic(config mstp instance 1)# exit sonic(config)# mstp edge port enable interface ethernet 0/64 configure vlan sonic(config)# interface ethernet 0/64 sonic(config if 0/64)# switchport access vlan 107 sonic(config if 0/64)# exit sonic(config)# interface ethernet 0/47 sonic(config if 0/47)# switchport trunk vlan 107 sonic(config if 0/47)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# switchport trunk vlan 107 sonic(config if 0/45)# exit switch d configure ip sonic(config)# interface ethernet 0/76 sonic(config if 0/76)# ip address 4 0 0 131/24 sonic(config if 0/76)# ip address 4 131/64 sonic(config if 0/76)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# ip address 46 0 0 131/24 sonic(config if 0/46)# ip address 46 131/64 sonic(config if 0/46)# exit sonic(config)# interface ethernet 0/65 sonic(config if 0/65)# ip address 65 0 0 131/24 sonic(config if 0/65)# ip address 65 131/64 sonic(config if 0/65)# exit configure ospf sonic(config)# router ospf sonic(config router)# ospf router id 10 250 0 131 sonic(config router)# exit sonic(config)# router ospf6 sonic(config ospf6)# ospf6 router id 10 250 0 131 sonic(config ospf6)# exit sonic(config)# interface ethernet 0/76 sonic(config if 0/76)# ip ospf area 107 sonic(config if 0/76)# ipv6 ospf6 area 107 sonic(config if 0/76)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# ip ospf area 107 sonic(config if 0/46)# ipv6 ospf6 area 107 sonic(config if 0/46)# exit sonic(config)# interface ethernet 0/65 sonic(config if 0/65)# ip ospf area 107 sonic(config if 0/65)# ipv6 ospf6 area 107 sonic(config if 0/65)# end configure verification (1) configuration check (2) check vrrp/vrrp6 status show vrrp/vrrp6 (3) check mstp status show mstp (4) vm a1's gateway is configured with the vrrp address, and it can ping vm b1 successfully mc lag device configuration with vrrp scenari mc lag device configuration with vrrp scenari networking requirements within the same data center, when creating vrrp, configure the same interface ip and virtual mac to simulate the two devices of the mc lag system as a single device for vrrp negotiation with the mc lag system of the peer data center topology configuration roadmap (1) switch a and switch b are configured as an mclag pair, and switch c and switch d are configured as another mclag pair (2) switch a and switch b are configured as vrrp masters, while switch c and switch d are configured as vrrp backups (3) routing protocols are configured between switch a and switch d, and between switch a and switch h procedure switch a configure mclag sonic# configure terminal sonic(config)# vlan range 1,1007 sonic(config)# interface vlan 1 sonic(config vlanif 1)# ip address 1 0 0 173/24 sonic(config vlanif 1)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# mac address 60\ eb 5a 00 01 07 sonic(config vlanif 1007)# ip address 107 0 0 10/24 sonic(config vlanif 1007)# exit sonic(config)# interface ethernet 0/1 sonic(config if 0/1)# switchport trunk vlan 1 sonic(config if 0/1)# switchport trunk vlan 1007 sonic(config if 0/1)# exit sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# link aggregation group 1007 sonic(config if 0/0)# exit sonic(config)# mclag domain 1007 sonic(mclag domain)# local address 1 0 0 173 sonic(mclag domain)# peer address 1 0 0 174 sonic(mclag domain)# peer link ethernet 0/1 sonic(mclag domain)# commit sonic(mclag domain)# member lag 1007 sonic(mclag domain)# exit configure vrrp sonic# configure terminal sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# vrrp 255 sonic(config vlanif 1007)# vrrp 255 priority 120 sonic(config vlanif 1007)# vrrp 255 track interface ethernet 0/2 priority dec 50 sonic(config vlanif 1007)# vrrp 255 ip 107 0 0 1/24 sonic(config vlanif 1007)# exit configure routing protocols sonic# configure terminal sonic(config)# router ospf sonic(config router)# ospf router id 10 1 0 173 sonic(config router)# exit sonic(config)# interface ethernet 0/2 sonic(config if 0/2)# ip address 2 0 0 173/24 sonic(config if 0/2)# ip ospf area 1007 sonic(config if 0/2)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# ip ospf area 1007 sonic(config vlanif 1007)# exit switch b configure mclag sonic# configure terminal sonic(config)# vlan range 1,1007 sonic(config)# interface vlan 1 sonic(config vlanif 1)# ip address 1 0 0 174/24 sonic(config vlanif 1)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# mac address 60\ eb 5a 00 01 07 sonic(config vlanif 1007)# ip address 107 0 0 10/24 sonic(config vlanif 1007)# exit sonic(config)# interface ethernet 0/1 sonic(config if 0/1)# switchport trunk vlan 1 sonic(config if 0/1)# switchport trunk vlan 1007 sonic(config if 0/1)# exit sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# link aggregation group 1007 sonic(config if 0/46)# exit sonic(config)# mclag domain 1007 sonic(mclag domain)# local address 1 0 0 174 sonic(mclag domain)# peer address 1 0 0 173 sonic(mclag domain)# peer link ethernet 0/1 sonic(mclag domain)# commit sonic(mclag domain)# member lag 1007 sonic(mclag domain)# exit configure vrrp sonic# configure terminal sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# vrrp 255 sonic(config vlanif 1007)# vrrp 255 priority 120 sonic(config vlanif 1007)# vrrp 255 track interface ethernet 0/0 priority dec 50 sonic(config vlanif 1007)# vrrp 255 ip 107 0 0 1/24 sonic(config vlanif 1007)# exit configure routing protocols sonic# configure terminal sonic(config)# router ospf sonic(config router)# ospf router id 10 250 0 174 sonic(config router)# exit sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# ip address 46 0 0 174/24 sonic(config if 0/0)# ip ospf area 1007 sonic(config if 0/0)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# ip ospf area 1007 sonic(config vlanif 1007)# exit switch c configure mclag sonic# configure terminal sonic(config)# vlan range 1,1007 sonic(config)# interface vlan 1 sonic(config vlanif 1)# ip address 1 0 0 132/24 sonic(config vlanif 1)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# mac address 60\ eb 5a 00 01 08 sonic(config vlanif 1007)# ip address 107 0 0 20/24 sonic(config vlanif 1007)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# switchport trunk vlan 1 sonic(config if 0/45)# switchport trunk vlan 1007 sonic(config if 0/45)# exit sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface ethernet 0/44 sonic(config if 0/44)# link aggregation group 1007 sonic(config if 0/44)# exit sonic(config)# mclag domain 107 sonic(mclag domain)# local address 1 0 0 132 sonic(mclag domain)# peer address 1 0 0 180 sonic(mclag domain)# peer link ethernet 0/45 sonic(mclag domain)# commit sonic(mclag domain)# member lag 1007 sonic(mclag domain)# exit configure vrrp sonic# configure terminal sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# vrrp 255 sonic(config vlanif 1007)# vrrp 255 ip 107 0 0 1/24 sonic(config vlanif 1007)# exit configure routing protocols sonic# configure terminal sonic(config)# router ospf sonic(config router)# ospf router id 10 250 0 132 sonic(config router)# exit sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# ip address 7 0 0 132/24 sonic(config if 0/0)# ip ospf area 1007 sonic(config if 0/0)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# ip ospf area 1007 sonic(config vlanif 1007)# exit switch d configure mclag sonic# configure terminal sonic(config)# vlan range 1,1007 sonic(config)# interface vlan 1 sonic(config vlanif 1)# ip address 1 0 0 180/24 sonic(config vlanif 1)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# mac address 60\ eb 5a 00 01 08 sonic(config vlanif 1007)# ip address 107 0 0 20/24 sonic(config vlanif 1007)# exit sonic(config)# interface ethernet 0/40 sonic(config if 0/40)# switchport trunk vlan 1 sonic(config if 0/40)# switchport trunk vlan 1007 sonic(config if 0/40)# exit sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface ethernet 0/42 sonic(config if 0/42)# link aggregation group 1007 sonic(config if 0/42)# exit sonic(config)# mclag domain 107 sonic(mclag domain)# local address 1 0 0 180 sonic(mclag domain)# peer address 1 0 0 132 sonic(mclag domain)# peer link ethernet 0/40 sonic(mclag domain)# commit sonic(mclag domain)# member lag 1007 sonic(mclag domain)# exit configure vrrp sonic# configure terminal sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# vrrp 255 sonic(config vlanif 1007)# vrrp 255 ip 107 0 0 1/24 sonic(config vlanif 1007)# exit configure routing protocols sonic# configure terminal sonic(config)# router ospf sonic(config router)# ospf router id 10 250 0 180 sonic(config router)# exit sonic(config)# interface ethernet 0/38 sonic(config if 0/38)# ip address 47 0 0 180/24 sonic(config if 0/38)# ip ospf area 1007 sonic(config if 0/38)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# ip ospf area 1007 sonic(config vlanif 1007)# exit switch e sonic# configure terminal sonic(config)# vlan range 1007 sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# link aggregation group 1007 sonic(config if 0/45)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# link aggregation group 1007 sonic(config if 0/46)# exit sonic(config)# interface ethernet 0/44 sonic(config if 0/44)# switchport trunk vlan 1007 sonic(config if 0/44)# exit switch f sonic# configure terminal sonic(config)# vlan range 1007 sonic(config)# interface ethernet 0/44 sonic(config if 0/44)# link aggregation group 1007 sonic(config if 0/44)# exit sonic(config)# interface ethernet 0/47 sonic(config if 0/47)# link aggregation group 1007 sonic(config if 0/47)# exit sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface ethernet 0/7 sonic(config if 0/7)# switchport trunk vlan 1007 sonic(config if 0/7)# exit switch g sonic# configure terminal sonic(config)# interface ethernet 0/8 sonic(config if 0/8)# switchport trunk vlan 1007 sonic(config if 0/8)# exit sonic(config)# interface ethernet 0/9 sonic(config if 0/9)# switchport trunk vlan 1007 sonic(config if 0/9)# exit sonic(config)# interface ethernet 0/72 sonic(config if 0/72)# switchport access vlan 1007 sonic(config if 0/72)# exit switch h sonic# configure terminal sonic(config)# interface ethernet 0/7 sonic(config if 0/7)# ip address 7 0 0 133/24 sonic(config if 0/7)# ip ospf area 1007 sonic(config if 0/7)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# ip address 2 0 0 133/24 sonic(config if 0/45)# ip ospf area 1007 sonic(config if 0/45)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# ip address 46 0 0 133/24 sonic(config if 0/46)# ip ospf area 1007 sonic(config if 0/46)# exit sonic(config)# interface ethernet 0/47 sonic(config if 0/47)# ip address 47 0 0 133/24 sonic(config if 0/47)# ip ospf area 1007 sonic(config if 0/47)# exit sonic(config)# interface ethernet 0/73 sonic(config if 0/73)# ip address 73 0 0 133/24 sonic(config if 0/73)# ip ospf area 1007 sonic(config if 0/73)# exit configure verification (1) configuration check (2) check vrrp status show vrrp (3) check mclag status show mclag state (4) vm a1's gateway is configured with the vrrp address, and it can ping vm b1 successfully mclag interconnection with enabled vrrp/vrrp6 fw scenario mclag interconnection with enabled vrrp/vrrp6 fw scenario networking requirements mclag interconnects with fw devices enabled for vrrp/vrrp6, and traffic is processed by the fw before being sent to other networks topology configuration roadmap (1) switch a and switch b are configured as an mclag pair (2) fw a and fw b are configured with vrrp (3) switch a, switch b, switch c, and switch d are configured with routing protocols procedure switch a configure mclag sonic# configure terminal sonic(config)# vlan range 1,1007 1008 sonic(config)# interface vlan 1 sonic(config vlanif 1)# ip address 1 0 0 173/24 sonic(config vlanif 1)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# mac address 60\ eb 5a 00 01 07 sonic(config vlanif 1007)# vrf 1007 sonic(config vlanif 1007)# ip address 107 0 0 10/24 sonic(config vlanif 1007)# ip address 107 10/64 sonic(config vlanif 1007)# exit sonic(config)# interface vlan 1008 sonic(config vlanif 1008)# mac address 60\ eb 5a 00 01 08 sonic(config vlanif 1008)# ip address 108 0 0 10/24 sonic(config vlanif 1008)# ip address 108 10/64 sonic(config vlanif 1008)# exit sonic(config)# interface ethernet 0/2 sonic(config if 0/2)# switchport trunk vlan 1 sonic(config if 0/2)# switchport trunk vlan 1007 sonic(config if 0/2)# switchport trunk vlan 1008 sonic(config if 0/2)# exit sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface link aggregation 1008 sonic(config lagif 1008)# switchport trunk vlan 1008 sonic(config lagif 1008)# exit sonic(config)# interface link aggregation 1009 sonic(config lagif 1009)# switchport trunk vlan 1007 sonic(config lagif 1009)# exit sonic(config)# interface link aggregation 1010 sonic(config lagif 1010)# switchport trunk vlan 1008 sonic(config lagif 1010)# exit sonic(config)# interface ethernet 0/3 sonic(config if 0/3)# link aggregation group 1007 sonic(config if 0/3)# exit sonic(config)# interface ethernet 0/4 sonic(config if 0/4)# link aggregation group 1008 sonic(config if 0/4)# exit sonic(config)# interface ethernet 0/5 sonic(config if 0/5)# link aggregation group 1009 sonic(config if 0/5)# exit sonic(config)# interface ethernet 0/6 sonic(config if 0/6)# link aggregation group 1010 sonic(config if 0/6)# exit sonic(config)# mclag domain 1007 sonic(mclag domain)# local address 1 0 0 173 sonic(mclag domain)# peer address 1 0 0 132 sonic(mclag domain)# peer link ethernet 0/2 sonic(mclag domain)# commit sonic(mclag domain)# member lag 1007 sonic(mclag domain)# member lag 1008 sonic(mclag domain)# member lag 1009 sonic(mclag domain)# member lag 1010 sonic(mclag domain)# exit configure route sonic# configure terminal sonic(config)# router ospf sonic(config router)# ospf router id 10 1 0 173 sonic(config router)# exit sonic(config)# router ospf6 sonic(config ospf6)# ospf6 router id 10 1 0 173 sonic(config ospf6)# exit sonic(config)# vrf 1007 sonic(config vrf)# ip route 65 0 0 0/24 107 0 0 1 sonic(config vrf)# ipv6 route 65 /64 107 1 sonic(config vrf)# exit vrf sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# vrf 1007 sonic(config if 0/0)# ip address 45 0 0 173/24 sonic(config if 0/0)# ip address 45 173/24 sonic(config if 0/0)# exit sonic(config)# interface ethernet 0/1 sonic(config if 0/1)# ip address 46 0 0 173/24 sonic(config if 0/1)# ip address 46 173/64 sonic(config if 0/1)# ip ospf area 1007 sonic(config if 0/1)# ipv6 ospf6 area 1007 sonic(config if 0/1)# exit switch b configure mclag sonic# configure terminal sonic(config)# vlan range 1,1007 1008 sonic(config)# interface vlan 1 sonic(config vlanif 1)# ip address 1 0 0 132/24 sonic(config vlanif 1)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# mac address 60\ eb 5a 00 01 07 sonic(config vlanif 1007)# vrf 1007 sonic(config vlanif 1007)# ip address 107 0 0 10/24 sonic(config vlanif 1007)# ip address 107 10/64 sonic(config vlanif 1007)# exit sonic(config)# interface vlan 1008 sonic(config vlanif 1008)# mac address 60\ eb 5a 00 01 08 sonic(config vlanif 1008)# ip address 108 0 0 10/24 sonic(config vlanif 1008)# ip address 108 10/64 sonic(config vlanif 1008)# exit sonic(config)# interface ethernet 0/40 sonic(config if 0/40)# switchport trunk vlan 1 sonic(config if 0/40)# switchport trunk vlan 1007 sonic(config if 0/40)# switchport trunk vlan 1008 sonic(config if 0/40)# exit sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface link aggregation 1008 sonic(config lagif 1008)# switchport trunk vlan 1008 sonic(config lagif 1008)# exit sonic(config)# interface link aggregation 1009 sonic(config lagif 1009)# switchport trunk vlan 1007 sonic(config lagif 1009)# exit sonic(config)# interface link aggregation 1010 sonic(config lagif 1010)# switchport trunk vlan 1008 sonic(config lagif 1010)# exit sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# link aggregation group 1010 sonic(config if 0/0)# exit sonic(config)# interface ethernet 0/41 sonic(config if 0/41)# link aggregation group 1007 sonic(config if 0/41)# exit sonic(config)# interface ethernet 0/42 sonic(config if 0/42)# link aggregation group 1009 sonic(config if 0/42)# exit sonic(config)# interface ethernet 0/43 sonic(config if 0/43)# link aggregation group 1008 sonic(config if 0/43)# exit sonic(config)# mclag domain 1007 sonic(mclag domain)# local address 1 0 0 132 sonic(mclag domain)# peer address 1 0 0 173 sonic(mclag domain)# peer link ethernet 0/40 sonic(mclag domain)# commit sonic(mclag domain)# member lag 1007 sonic(mclag domain)# member lag 1008 sonic(mclag domain)# member lag 1009 sonic(mclag domain)# member lag 1010 sonic(mclag domain)# exit configure route sonic# configure terminal sonic(config)# vrf 1007 sonic(config vrf)# ip route 65 0 0 0/24 107 0 0 1 sonic(config vrf)# ipv6 route 65 /64 107 1 sonic(config vrf)# exit vrf sonic(config)# router ospf sonic(config router)# ospf router id 10 250 0 132 sonic(config router)# exit sonic(config)# router ospf6 sonic(config ospf6)# ospf6 router id 10 250 0 132 sonic(config ospf6)# exit sonic(config)# interface ethernet 0/44 sonic(config if 0/44)# vrf 1007 sonic(config if 0/44)# ip address 44 0 0 132/24 sonic(config if 0/44)# ip address 44 132/64 sonic(config if 0/44)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# ip address 47 0 0 132/24 sonic(config if 0/45)# ip address 47 132/64 sonic(config if 0/45)# ip ospf area 1007 sonic(config if 0/45)# ipv6 ospf6 area 1007 sonic(config if 0/45)# exit fw a configure vrrp sonic# configure terminal sonic(config)# vlan range 1007 1008 sonic(config)# interface link aggregation 1007 sonic(config lagif 1007)# switchport trunk vlan 1007 sonic(config lagif 1007)# exit sonic(config)# interface link aggregation 1008 sonic(config lagif 1008)# switchport trunk vlan 1008 sonic(config lagif 1008)# exit sonic(config)# interface ethernet 0/43 sonic(config if 0/43)# link aggregation group 1007 sonic(config if 0/43)# exit sonic(config)# interface ethernet 0/44 sonic(config if 0/44)# link aggregation group 1007 sonic(config if 0/44)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# link aggregation group 1008 sonic(config if 0/45)# exit sonic(config)# interface ethernet 0/47 sonic(config if 0/47)# link aggregation group 1008 sonic(config if 0/47)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# vrf 1007 sonic(config vlanif 1007)# ip address 107 0 0 20/24 sonic(config vlanif 1007)# ip address 107 20/24 sonic(config vlanif 1007)# vrrp 255 sonic(config vlanif 1007)# vrrp 255 priority 120 sonic(config vlanif 1007)# vrrp 255 ip 107 0 0 1/24 sonic(config vlanif 1007)# vrrp6 100 sonic(config vlanif 1007)# vrrp6 100 priority 120 sonic(config vlanif 1007)# vrrp6 100 ipv6 107 1/64 sonic(config vlanif 1007)# exit configure route sonic# configure terminal sonic(config)# interface vlan 1008 sonic(config vlanif 1008)# ip address 108 0 0 20/24 sonic(config vlanif 1008)# ip address 108 20/64 sonic(config vlanif 1008)# exit sonic(config)# vrf 1007 sonic(config vrf)# ip route 65 0 0 0/24 108 0 0 10 nexthop vrf default sonic(config vrf)# ipv6 route 65 /64 108 10 nexthop vrf default sonic(config vrf)# exit vrf fw b configure vrrp sonic# configure terminal sonic(config)# vlan range 1007 1008 sonic(config)# interface link aggregation 1009 sonic(config lagif 1009)# switchport trunk vlan 1007 sonic(config lagif 1009)# exit sonic(config)# interface link aggregation 1010 sonic(config lagif 1010)# switchport trunk vlan 1008 sonic(config lagif 1010)# exit sonic(config)# interface ethernet 0/7 sonic(config if 0/7)# link aggregation group 1010 sonic(config if 0/7)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# link aggregation group 1009 sonic(config if 0/45)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# link aggregation group 1009 sonic(config if 0/46)# exit sonic(config)# interface ethernet 0/47 sonic(config if 0/47)# link aggregation group 1010 sonic(config if 0/47)# exit sonic(config)# interface vlan 1007 sonic(config vlanif 1007)# vrf 1007 sonic(config vlanif 1007)# ip address 107 0 0 30/24 sonic(config vlanif 1007)# ip address 107 30/64 sonic(config vlanif 1007)# vrrp 255 sonic(config vlanif 1007)# vrrp 255 ip 107 0 0 1/24 sonic(config vlanif 1007)# vrrp6 100 sonic(config vlanif 1007)# vrrp6 100 ipv6 107 1/64 sonic(config vlanif 1007)# exit configure route sonic# configure terminal sonic(config)# interface vlan 1008 sonic(config vlanif 1008)# ip address 108 0 0 30/24 sonic(config vlanif 1008)# ip address 108 30/64 sonic(config vlanif 1008)# exit sonic(config)# vrf 1007 sonic(config vrf)# ip route 65 0 0 0/24 108 0 0 10 nexthop vrf default sonic(config vrf)# ipv6 route 65 /64 108 10 nexthop vrf default sonic(config vrf)# exit vrf switch c configure route sonic# configure terminal sonic(config)# vrf 1007 sonic(config vrf)# ip route 65 0 0 0/24 44 0 0 132 sonic(config vrf)# ip route 65 0 0 0/24 45 0 0 173 sonic(config vrf)# ipv6 route 65 /64 44 132 sonic(config vrf)# ipv6 route 65 /64 45 173 sonic(config vrf)# exit vrf sonic(config)# interface ethernet 0/44 sonic(config if 0/44)# vrf 1007 sonic(config if 0/44)# ip address 44 0 0 131/24 sonic(config if 0/44)# ip address 44 131/64 sonic(config if 0/44)# exit sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# vrf 1007 sonic(config if 0/45)# ip address 45 0 0 131/24 sonic(config if 0/45)# ip address 45 131/64 sonic(config if 0/45)# exit sonic(config)# interface ethernet 0/64 sonic(config if 0/64)# vrf 1007 sonic(config if 0/64)# ip address 64 0 0 131/24 sonic(config if 0/64)# ip address 64 131/64 sonic(config if 0/64)# exit switch d configure route sonic# configure terminal sonic(config)# router ospf sonic(config router)# ospf router id 10 250 0 131 sonic(config router)# exit sonic(config)# router ospf6 sonic(config ospf6)# ospf6 router id 10 250 0 131 sonic(config ospf6)# exit sonic(config)# interface ethernet 0/46 sonic(config if 0/46)# ip address 46 0 0 131/24 sonic(config if 0/46)# ip address 46 131/64 sonic(config if 0/46)# ip ospf area 1007 sonic(config if 0/46)# ipv6 ospf6 area 1007 sonic(config if 0/46)# exit sonic(config)# interface ethernet 0/47 sonic(config if 0/47)# ip address 47 0 0 131/24 sonic(config if 0/47)# ip address 47 131/64 sonic(config if 0/47)# ip ospf area 1007 sonic(config if 0/47)# ipv6 ospf6 area 1007 sonic(config if 0/47)# exit sonic(config)# interface ethernet 0/65 sonic(config if 0/65)# ip address 65 0 0 131/24 sonic(config if 0/65)# ip address 65 131/64 sonic(config if 0/65)# ip ospf area 1007 sonic(config if 0/65)# ipv6 ospf6 area 1007 sonic(config if 0/65)# exit configure verification (1) configuration check (2) check vrrp status show vrrp (3) check mclag status show mclag state (4) vm a1 sends traffic to vm b1, and vm b1 can receive the traffic sent by vm a1
