BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

User-defined Martian address check

Want to summarize with AI?

Log in

Describes configuring checks for user-defined Martian addresses to prevent invalid routes from propagating.


Martian addresses are IP addresses that

  • are typically dropped by routers to prevent access to certain sites

  • include specific IPv4 and IPv6 prefixes, and

  • can be configured to be accessible using BGP.

When you configure BGP, you can prevent routers from accessing certain sites with certain specific IP address prefixes. The routers drop packets from such IP addresses, known as Martian addresses.

These IPv4 address prefixes are part of Martian addresses:

  • 0.0.0.0/8

  • 127.0.0.0/8

  • 224.0.0.0/4

These IPv6 address prefixes are part of Martian addresses:

  • ::

  • ::0002 to ::ffff

  • ::ffff:a.b.c.d

  • fe80:xxxx

  • ffxx:xxxx

By default, routers prevent access to sites with Martian addresses. However, you can enable routers with BGP IPv4 address-family or BGP IPv6 address-family configuration to access these sites by configuring the default-martian-check disable command.

Routers with OSPF or IS-IS protocols cannot access these sites even by having the default-martian-check disable command configured.


Disable Martian address check

To allow routers with BGP IPv4 address-family or BGP IPv6 address-family configuration to access sites with Martian addresses.

By default, routers prevent access to sites with Martian addresses. This task configures the router to disable this check.

Before you begin

Follow these steps to allow routes from Martian addresses.

Procedure

1.

Enter BGP IPv4 or BGP IPv6 address-family configuration mode.

Example:

Router# configure
Router(config)# router bgp 100
2.

Configure the address-family modifier as unicast.

Example:

Router(config-bgp)# address-family ipv4 unicast
3.

Disable the Martian address check.

Example:

Router(config-bgp-af)# default-martian-check disable
Router(config-bgp-af)# commit
4.

Use the show bgp ipv4 unicast command or show bgp ipv6 unicast command to verify Martian address check status.

Example:

Router# show bgp ipv6 unicast
BGP router identifier 2.2.2.1, local AS number 1 BGP generic scan interval 60 secs
Non-stop routing is enabled BGP table state: Active
Table ID: 0xe0800000 RD version: 29 BGP main routing table version 29
BGP NSR Initial initsync version 4 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 Dampening enabled
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network	Next Hop	Metric	LocPrf	Weight Path
*>i::/0	1:1:1:1:1:1:1:1	100	0	i
* i192:1::/112	1.1.1.1	0	100	0 ?
*>i	1:1:1:1:1:1:1:1	0	100	0 ?
* iff11:1123::/64	1.1.1.1	2	100	0 ?
*>i	1:1:1:1:1:1:1:1	2	100	0 ?