Static Routes

Static routes are manually entered into the routing table. Static routes are used to reach networks not advertised by routers.

  • Static IPv6 routes can be created using the following command:

    configure iproute add ipv6Netmask [ipv6Gateway | ipv6ScopedGateway] {metric} {vr vr_name} {multicast | multicast-only | unicast | unicast-only}

    You can configure IPv6 default and blackhole routes. Traffic to blackhole routes is silently dropped.

    The IPv6 gateway can be a global address or a scoped link-local address of an adjacent router.

  • You can create static routes, for security reasons, to control which routes you want advertised by the router.

    If you want all static routes to be advertised, configure static routes using one of the following commands:

    enable ripng export [direct | ospfv3 | ospfv3-extern1 | ospfv3-extern2 | ospfv3-inter | ospfv3-intra | static | isis | isis-level-1| isis-level-1-external | isis-level-2| isis-level-2-external | bgp] [cost number {tag number} | policy policy-name]

    or

    disable rip export [bgp | direct | e-bgp | i-bgp | ospf | ospf-extern1 | ospf-extern2 | ospf-inter | ospf-intra | static | isis | isis-level-1| isis-level-1-external | isis-level-2| isis-level-2-external ]

    enable ospfv3 {domain domainName} export [direct | ripng | static | isis | isis-level-1 | isis-level-1-external | isis-level-2 | isis-level-2-external| bgp] [cost cost type [ase-type-1 | ase-type-2] | policy_map]

    or

    disable ospfv3 {domain domainName} export [direct | ripng | static | isis | isis-level-1 | isis-level-1-external | isis-level-2 | isis-level-2-external | bgp]

    The default setting is disabled. Static routes are never aged out of the routing table.

  • A static route‘s nexthop (gateway) must be associated with a valid IP subnet. An IP subnet is associated with a single VLAN (Virtual LAN) by its IP address and subnet mask. If the VLAN is subsequently deleted, the static route entries using that subnet must be deleted manually.

    The IPv6 routes can be viewed using the following command:

    show iproute ipv6 {priority | vlan vlan_name | tunnel tunnel_name | ipv6Netmask | summary {multicast | unicast}} {vr vr_name}}

  • You can view the IPv6 routes based on the type of the route using the following command:

    show iproute ipv6 origin [direct | static | blackhole | bgp| ibgp | ebgp | ripng | ospfv3 | ospfv3-intra | ospv3-inter | ospfv3-extern1 | ospfv3-extern2 | isis | isis-leve1-1 | isis-level-2 | isis-level-1-external | isis-level-2-external] {vr vr_name}