H3C LS-5100-16P-SI-OVS-H3 Configuration page 152

Low-end ethernet switches
Table of Contents

Advertisement

Routing
H3C Low-End Ethernet Switches Configuration Examples
[SwitchD-ospf-1-area-0.0.0.0] network 194.1.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] network 195.1.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] network 4.0.0.0 0.255.255.255
[SwitchD-ospf-1-area-0.0.0.0] quit
[SwitchD-ospf-1] quit
# Enable BGP, create a peer group, and add peers to the peer group.
[SwitchD] bgp 200
[SwitchD-bgp] undo synchronization
[SwitchD-bgp] group in internal
[SwitchD-bgp] peer 195.1.1.2 group in
[SwitchD-bgp] peer 194.1.1.2 group in
To validate the configuration, you need to use the reset bgp all command on all the
BGP peers.
Since the MED attribute of route 1.0.0.0 learned by Switch C is smaller than that
learned by Switch B, Switch D selects the route 1.0.0.0 from Switch C.
If you do not configure MED attribute control on Switch A, setting the local
preference attribute for route 1.0.0.0 on Switch C is another choice.
# Define ACL 2000 to permit the routes destined for 1.0.0.0/8.
[SwitchC] acl number 2000
[SwitchC-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255
[SwitchC-acl-basic-2000] rule deny source any
[SwitchC-acl-basic-2000] quit
# Create a routing policy named localpref, and specify node 10 with the permit
matching mode for the routing policy. Set the local preference value of the route
matching ACL 2000 to 200
[SwitchC] route-policy localpref
[SwitchC-route-policy] if-match acl 2000
[SwitchC-route-policy] apply local-preference 200
[SwitchC-route-policy] quit
# Create a routing policy named localpref, and specify node 20 with the permit
matching mode for the routing policy. Set the local preference value of the route to 100.
[SwitchC] route-policy localpref permit node 20
[SwitchC-route-policy] apply local-preference 100
[SwitchC-route-policy] quit
# Apply the routing policy localpref to the routing information from the peer 193.1.1.1
(Switch A).
[SwitchC] bgp 200
[SwitchC-bgp] peer 193.1.1.1 route-policy localpref import
Since the local preference (200) of the route learned by Switch C is bigger than that
learned by Switch B (100), Switch D prefers the route 1.0.0.0 from Switch C. Note that
Chapter 2 Configuration Examples
permit node 10
2-18

Advertisement

Table of Contents
loading

Table of Contents