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:
- 0.0.0.0/8
- 127.0.0.0/8
- 128.0.0.0/16
- 191.255.0.0/16
- 192.0.0.0/24
- 223.255.255.0/24
- 240.0.0.0/4
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:
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:
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:
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:
- default—If this is the default route to the destination. This is equivalent to specifying the IP address 0.0.0.0/0.
- network/mask-length—network is the network portion of the IP address and mask-length is the destination prefix length.
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:
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:
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.
