BGP - network command with subnet mask
When configuring BGP, the network
command is used to advertise a prefix. An example of the command follows:
network 192.168.12.0 mask 255.255.255.0
In order for this command to cause the local BGP router to advertise this route, it must fulfil the prerequisite of have an exact match in the local routing table including the subnet mask.
If the subnet mask matches the classful subnet mask of the particular IPv4 address, then in the running config, the subnet mask will not appear. However, if the subnet mask being used is different than the classful one for that particular address, then it will appear in the running config.
Links
https://forum.networklessons.com/t/mpls-layer-3-vpn-configuration/1288/179?u=lagapidis
https://networklessons.com/bgp/how-to-advertise-networks-in-bgp