...
In redistribute mode, BGP imports IGP routes, including RIP, OSPF, and IS-IS routes, into BGP routing tables based on protocol type. To ensure the validity of imported IGP routes, BGP can also import static routes and direct routes in redistribute mode.
se Use the following commands command to configure BGP configure to import BGP route:
set protocols bgp [vrf <vrf-name>] {ipv4-unicast redistribute {connected|kernel|ospf|static|table <table-number>}set protocols bgp [vrf <vrf-name>] ipv4-unicast|ipv6-unicast} redistribute {connected|kernel|ospf|static|table <table-number>} [metric <metric-number>set protocols bgp [vrf <vrf-name>] ipv4-unicast redistribute {connected|kernel|ospf|static|table <table-number>} route-map <route-map>]
Network Mode
In network mode, BGP imports the routes in the IP routing table one by one to BGP routing tables. The network mode is more accurate than the redistribute mode. The ORIGIN attribute of BGP routes advertised in this way is IGP.
...
Apply the specified route policy or a route label to control network advertisements with the following command:
set protocols bgp [vrf <vrf-name>] ipv4-unicast {ipv4-unicast|ipv6-unicast} network <ipv4/prefixlen> [prefixlen> [label-index<label-index>|route-map <ROUTE-MAP-NAME>]
Specifies a route label to control network advertisements with the following command:
set protocols bgp [vrf<vrf-name>] ipv4-unicast network <ipv4/prefixlen> [label-index <label-index>]
The network mode command is used to import exactly-matching routes. The mask length as configured in the network statement must match the mask length of prefixes in the routing table. This means that the specified network must be available and active in the local IP routing table.