Flag multicast-only is a type modifier that restricting values to be within the IPv4 or IPv6 multicast ip address ranges.
IPv4 multicast address range (RFC 2780)
224.0.0.0 - 239.255.255.255
IPv6 multicast address range (RFC 4291)
FF00::0 - FF0F:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
This flag can be used on all IPv4 and IPv6 address types.
object newbie { help "Newbie settings"; attribute mcast-addr { help "Test mcast address"; flag multicast-only; type ipv4addr; } }
user@router# set example newbie mcast-addr ? Possible completions: <mcast-addr> Test mcast address [edit] user@router# set example newbie mcast-addr 1.1.1.1 ^ invalid multicast address - '1.1.1.1' at '1.1.1.1' user@router# set example newbie mcast-addr 222.1.1.1 ^ invalid multicast address - '222.1.1.1' at '222.1.1.1' user@router# set example newbie mcast-addr 224.0.1.2 [edit] user@router# show example newbie { mcast-addr 224.0.1.2; } [edit]
object newbie { help "Newbie settings"; attribute src-addr { help "Test multicast constraint"; flag multicast-only; type ipv6prefix; } }
user@router# set example newbie ?
Possible completions:
<[Enter]> Execute this command
src-addr Test multicast constraint
| Pipe through a command
[edit]
user@router# set example newbie src-addr 1234:1::2/126
^
invalid multicast address - '1234:1::2/126' at '1234:1::2/126'
[edit]
user@router# set example newbie src-addr FF05::3/120
[edit]
user@router# show example
newbie {
src-addr FF05::3/120;
}