关于redistribute的命令,,

redistribute

To redistribute routes from one routing domain into another routing domain, use the redistribute router configuration command. To disable redistribution, use the no form of this command.

redistribute protocol [ process-id ] { level-1 | level-1-2 | level-2} [ metric metric-value ]
[ metric-type type-value ] [match { internal | external 1 | external 2}]
[tag tag-value] [ route-map map-tag] [ weight weight] [subnets]
no redistribute protocol [ process-id] {level-1 | level-1-2 | level-2} [metric metric-value]
[metric-type type-value] [match {internal | external 1 | external 2}]
[tag tag-value] [ route-map map-tag] [ weight weight] [subnets]
Syntax Description

 

Defaults

Route redistribution is disabled.

protocol---No source protocol is defined.
process-id---No process ID is defined.
metric metric-value---0
metric-type type-value---Type 2 external route
match internal | external---internal, external 1, external 2
external type-value---internal
tag tag-value---If no value is specified, the remote autonomous system number is used for routes
     from BGP and EGP; for other protocols, the default is 0.
route-map map-tag---If the route-map argument is not entered, all routes are redistributed; if no
     map-tag value is entered, no routes are imported.
weight weight---No network weight is defined.
subnets---No subnets are defined.

Command Mode

Router configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 10.0.

Changing or disabling any keyword will not affect the state of other keywords.

A router receiving a link-state protocol (LSP) with an internal metric will consider the cost of the route from itself to the redistributing router plus the advertised cost to reach the destination. An external metric only considers the advertised metric to reach the destination.

Routes learned from IP routing protocols can be redistributed at level-1 into an attached area or at level-2. The keyword level-1-2 allows both in a single command.

Redistributed routing information should always be filtered by the distribute-list out router configuration command. This ensures that only those routes intended by the administrator are passed along to the receiving routing protocol.

Whenever you use the redistribute or the default-information router configuration commands to redistribute routes into an OSPF routing domain, the router automatically becomes an Autonomous System Boundary Router (ASBR). However, an ASBR does not, by default, generate a default route into the OSPF routing domain.

When routes are redistributed between OSPF processes, no OSPF metrics are preserved.

When routes are redistributed into OSPF and no metric is specified in the metric keyword, the default metric that OSPF uses is 20 for routes from all protocols except BGP route, which gets a metric of 1.

When redistributing routes into OSPF, only routes that are not subnetted are redistributed if the subnets keyword is not specified.

The only connected routes affected by this redistribute command are the routes not specified by the network command.

You cannot use the default-metric command to affect the metric used to advertise connected routes.


Note The metric value specified in the redistribute command supersedes the metric value specified using the default-metric command.

Default redistribution of IGPs or EGP into BGP is not allowed unless default-information originate is specified.

When routes are redistributed into OSPF and no metric is specified in the metric keyword, the default metric that OSPF uses is 20 for routes from all protocols except BGP route, which gets a metric of 1.

Examples

The following are examples of the various configurations you would use to redistribute one routing protocol into another routing protocol.

The following example configuration causes OSPF routes to be redistributed into a BGP domain:

router bgp 109
redistribute ospf...
 

The following example configuration causes IGRP routes to be redistributed into an OSPF domain:

router ospf 110
redistribute igrp...
 

The following example causes the specified IGRP process routes to be redistributed into an OSPF domain. The IGRP-derived metric will be remapped to 100 and RIP routes to 200.

router ospf 109
redistribute igrp 108 metric 100 subnets
redistribute rip metric 200 subnets
 

In the following example, BGP routes are configured to be redistributed into IS-IS. The link-state cost is specified as 5, and the metric type will be set to external, indicating that it has lower priority than internal metrics.

router isis
redistribute bgp 120 metric 5 metric-type external

protocol

Source protocol from which routes are being redistributed. It can be one of the following keywords: bgp, egp, igrp, isis, ospf, static [ip], connected, and rip.

The keyword static [ip] is used to redistribute IP static routes. The optional ip keyword is used when redistributing into IS-IS.

The keyword connected refers to routes which are established automatically by virtue of having enabled IP on an interface. For routing protocols such as OSPF and IS-IS, these routes will be redistributed as external to the autonomous system.

process-id

(Optional) For bgp, egp, or igrp, this is an autonomous system number, which is a 16-bit decimal number.
For isis, this is an optional tag that defines a meaningful name for a routing process. You can specify only one IS-IS process per router. Creating a name for a routing process means that you use names when configuring routing.
For ospf, this is an appropriate OSPF process ID from which routes are to be redistributed. This identifies the routing process. This value takes the form of a nonzero decimal number.
For rip, no process-id value is needed.

level-1

For IS-IS, Level 1 routes are redistributed into other IP routing protocols independently.

level-1-2

For IS-IS, both Level 1 and Level 2 routes are redistributed into other IP routing protocols.

level-2

For IS-IS, Level 2 routes are redistributed into other IP routing protocols independently.

metric metric-value

(Optional) Metric used for the redistributed route. If a value is not specified for this option, and no value is specified using the default-metric command, the default metric value is 0. Use a value consistent with the destination protocol.

metric-type type-value

(Optional) For OSPF, the external link type associated with the default route advertised into the OSPF routing domain. It can be one of two values:

1---Type 1 external route

2---Type 2 external route

If a metric-type is not specified, the Cisco IOS software adopts a Type 2 external route.

For IS-IS, it can be one of two values:

internal---IS-IS metric which is < 63.

external---IS-IS metric which is > 64 < 128.

The default is internal.

match {internal | external 1 | external 2}

(Optional) For OPSF, the criteria by which OSPF routes are redistributed into other routing domains. It an be one of the following:

internal---Routes that are internal to a specific autonomous system.

external 1---Routes that are external to the autonomous system, but are imported into OSPF as type 1 external route.

external 2---Routes that are external to the autonomous system, but are imported into OSPF as type 2 external route.

tag tag-value

(Optional) 32-bit decimal value attached to each external route. This is not used by the OSPF protocol itself. It may be used to communicate information between Autonomous System Boundary Routers. If none is specified, then the remote autonomous system number is used for routes from BGP and EGP; for other protocols, zero (0) is used.

route-map

(Optional) Route map should be interrogated to filter the importation of routes from this source routing protocol to the current routing protocol. If not specified, all routes are redistributed. If this keyword is specified, but no route map tags are listed, no routes will be imported.

map-tag

(Optional) Identifier of a configured route map.

weight weight

(Optional) Network weight when redistributing into BGP. An integer from 0 to 65535.

subnets

(Optional) For redistributing routes into OSPF, the scope of redistribution for the specified protocol.

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值