Set the MED metric to 20 for all routes advertised in BGP update messages except for those sent to the peer system 192.168.0.1; the MED for this peer is 10:
- [edit]
- routing-options {
- router-id 10.0.0.1;
- autonomous-system 23;
- }
- protocols {
-
- bgp {
- metric-out 20;
-
- group 23 {
- type external;
- peer-as 56;
-
- neighbor 192.168.0.1 {
-
- traceoptions {
- file bgp-log-peer;
- flag packets;
- }
- log-updown;
- metric-out 10;
- }
- }
- }
- }
Set the MED metric to 20 for all routes from a particular community:
- [edit]
- routing-options {
- router-id 10.0.0.1;
- autonomous-system 23;
- }
- policy-options {
-
- policy-statement from-otago {
- from community otago;
- then metric 20;
- }
- community otago members [56:2379 23:46944];
- }
- protocols {
-
- bgp {
- import from-otago;
-
- group 23 {
- type external;
- peer-as 56;
-
- neighbor 192.168.0.1 {
-
- traceoptions {
- file bgp-log-peer;
- flag packets;
- }
- log-updown;
- }
- }
- }
- }