Configuring Martian Addresses

Martian addresses are host or network addresses about which all routing information is ignored. They commonly are sent by improperly configured systems on the network and have destination addresses that are obviously invalid.

In IPv4, the following are the default martian addresses:

In IPv6, the loopback address, the reserved and unassigned prefixes from RFC 2373, and the link-local unicast prefix are the default martian addresses.

The following sections explain how to configure martian routes:

Adding Martian Addresses

To add martian addresses to the list of default martian addresses in the default IPv4 routing table (inet.0), include the martians statement:

martians {destination-prefix match-type;}

To add martian addresses to the list of default martian addresses in other routing tables, or to explicitly add martian addresses to the list of default martian addresses in the primary IPv6 routing table (inet6.0), include the martians statement:

rib inet6.0 {martians {destination-prefix match-type;}}

To add martian addresses to the list of default martian addresses in any other routing tables, or to explicitly add martian addresses to the list of default martian addresses in the default routing table (inet.0), include the martians statement:

rib routing-table-name {martians {destination-prefix match-type;}}

For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.

In destination-prefix, specify the routing destination in one of the following ways:

In match-type, specify the type of match to apply to the destination prefix. For more information about match types, see the Junos Policy Framework Configuration Guide.

Deleting Martian Addresses

To delete a martian address from within a range of martian addresses, include the allow option in the martians statement. This option removes an exact prefix that is within a range of addresses that has been specified to be martian addresses.

To delete a martian address from the default routing table (inet.0), include the martians statement:

martians {destination-prefix match-type allow;}

To delete a martian address from other routing tables, or to explicitly delete a martian address from the primary IPv6 routing table (inet6.0), include the martians statement:

rib inet6.0 {martians {destination-prefix match-type allow;}}

For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.

Using Class E Addresses for Interface Addresses

In Junos OS Release 9.6 and later, you can configure Class E addresses on interfaces. Class E addresses are treated like any other unicast address for the purpose of forwarding. To allow Class E addresses to be configured on interfaces, you must remove the Class E prefix from the list of martian addresses. To remove the Class E prefix from the list of martian addresses include the martians 240/4 orlonger allow statement at the [edit routing-options] hierarchy level.