The network command can now be specified under a specific AF in order to announce the network under that AF. This section discusses the old and new styles of configuring the network command.
The old style used the network command to advertise a network over BGP. The command used an nlri extension to specify if the network was to be advertised as unicast, multicast, or both. The absence of the nlri keyword implied IPv4 unicast only. For example:
Router(config)#router bgp 10 Router(config-router)#network 2.2.2.0 mask 255.255.255.0 Router(config-router)#network 3.0.0.0 mask 255.0.0.0 nlri multicast Router(config-router)#network 1.1.0.0 mask 255.255.0.0 nlri unicast multicast
In this style, the presence of the address-family submode obviates the need for the nlri keyword. To advertise a network over IPv4, the network command has to be specified under BGP router mode. In order for the network to be advertised as multicast NLRI, the network command needs to be specified under the ipv4 multicast AF submode.
The following commands advertise a network to all the neighbors in the IPv4 address family:
Router(config-router)#network 1.1.0.0 mask 255.255.0.0 Router(config-router)#network 2.2.2.0 mask 255.255.255.0
To advertise a network in the IPv4 multicast AF, you need to define the network under the IPv4 multicast AF mode:
Router(config-router)#address-family ipv4 multicast Router(config-router-af)#network 1.1.0.0 mask 255.255.0.0 Router(config-router-af)#network 2.2.2.0 mask 255.255.255.0
This way, networks can be independently advertised as IPv4 unicast, multicast, or unicast and multicast NLRI.
3.139.240.142