Cisco ODR配置示例

静态路由的缺点是,必须手工配置,同时在网络拓扑变化后需要手工更新;动态路由的缺点是,它们需要占用网络带宽和路由器资源。在包含数百个分支站点的中央-分支网络,采用静态路由时配置工作量将非常大,而采用动态路由时将占用大量的资源。

在这种情况下,我们采用第三种方式——按需路由(ODR,On Demand Routing)。ODR是Cisco的私有协议,它使用CDP在分支路由器和中央路由器之间传输网络信息。它的优点是,比动态路由协议开销小得多,比静态路由协议配置量少得多。而它的缺点就是,只适合于中央-分支拓扑。

在中央路由器的全局模式下使用router odr命令来启用ODR。

下面是ODR配置示例:

R1配置如下:

R1#sh run

Building configuration...

Current configuration : 1289 bytes

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

service password-encryption

hostname R1

boot-start-marker

boot-end-marker

enable secret 5 $1$xGcB$Oir1JjPzZdoLL4wxA7kPH1

aaa new-model

aaa authentication login default local

aaa session-id common

no ip icmp rate-limit unreachable

ip cef

no ip domain lookup

username cisco password 7 091D1C5A4D5041

ip tcp synwait-time 5

interface FastEthernet0/0

ip address 192.168.1.1 255.255.255.252

duplex auto

speed auto

interface FastEthernet0/1

ip address 192.168.1.5 255.255.255.252

duplex auto

speed auto

interface Serial1/0

no ip address

shutdown

serial restart-delay 0

interface Serial1/1

no ip address

shutdown

serial restart-delay 0

interface Serial1/2

no ip address

shutdown

serial restart-delay 0

interface Serial1/3

no ip address

shutdown

serial restart-delay 0

router odr                //配置ODR

no ip http server

no ip http secure-server

no cdp log mismatch duplex

control-plane

gatekeeper

shutdown

line con 0

exec-timeout 0 0

privilege level 15

logging synchronous

no exec

stopbits 1

line aux 0

exec-timeout 0 0

privilege level 15

logging synchronous

stopbits 1

line vty 0 4

end

R2的配置如下:

R2#sh run

Building configuration...

Current configuration : 1319 bytes

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

service password-encryption

hostname R2

boot-start-marker

boot-end-marker

enable secret 5 $1$AOeH$KIuGrBL.TNS1Iwe0Kt8Bd0

aaa new-model

aaa authentication login default local

aaa session-id common

no ip icmp rate-limit unreachable

ip cef

no ip domain lookup

username cisco password 7 00554155500E5D

ip tcp synwait-time 5

interface Loopback0

ip address 2.2.2.2 255.255.255.255

interface FastEthernet0/0

ip address 192.168.1.2 255.255.255.252

duplex auto

speed auto

interface FastEthernet0/1

no ip address

shutdown

duplex auto

speed auto

interface Serial1/0

no ip address

shutdown

serial restart-delay 0

interface Serial1/1

no ip address

shutdown

serial restart-delay 0

interface Serial1/2

no ip address

shutdown

serial restart-delay 0

interface Serial1/3

no ip address

shutdown

serial restart-delay 0

no ip http server

no ip http secure-server

no cdp log mismatch duplex

control-plane

gatekeeper

shutdown

line con 0

exec-timeout 0 0

privilege level 15

logging synchronous

no exec

stopbits 1

line aux 0

exec-timeout 0 0

privilege level 15

logging synchronous

stopbits 1

line vty 0 4

end

R3的配置如下:

R3#sh run

Building configuration...

*May  5 19:44:13.907:%SYS-5-CONFIG_I: Configured from console by console

Current configuration : 1319 bytes

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

service password-encryption

hostname R3

boot-start-marker

boot-end-marker

enable secret 5 $1$nkGN$k3DeFEbRxkr8ILTnGTpDu/

aaa new-model

aaa authentication login default local

aaa session-id common

no ip icmp rate-limit unreachable

ip cef

no ip domain lookup

username cisco password 7 075E731F1A5C4F

ip tcp synwait-time 5

interface Loopback0

ip address 3.3.3.3 255.255.255.255

interface FastEthernet0/0

no ip address

shutdown

duplex auto

speed auto

interface FastEthernet0/1

ip address 192.168.1.6 255.255.255.252

duplex auto

speed auto

interface Serial1/0

no ip address

shutdown

serial restart-delay 0

interface Serial1/1

no ip address

shutdown

serial restart-delay 0

interface Serial1/2

no ip address

shutdown

serial restart-delay 0

interface Serial1/3

no ip address

shutdown

serial restart-delay 0

no ip http server

no ip http secure-server

no cdp log mismatch duplex

control-plane

gatekeeper

shutdown

line con 0

exec-timeout 0 0

privilege level 15

logging synchronous

no exec

stopbits 1

line aux 0

exec-timeout 0 0

privilege level 15

logging synchronous

stopbits 1

line vty 0 4

end

用R2去ping R3,测试连通性:

R2#ping 3.3.3.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 60/62/64ms

查看R1的路由表:

R1#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRPexternal, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA externaltype 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type1, E2 - OSPF external type 2

i - IS-IS, su - IS-ISsummary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area,* - candidate default, U - per-user static route

o - ODR, P - periodicdownloaded static route

Gateway of last resort is not set

2.0.0.0/32 is subnetted,1 subnets

o       2.2.2.2 [160/1] via192.168.1.2, 00:00:22, FastEthernet0/0

3.0.0.0/32 is subnetted,1 subnets

o       3.3.3.3 [160/1] via192.168.1.6, 00:00:27, FastEthernet0/1

192.168.1.0/30 issubnetted, 2 subnets

C       192.168.1.0 isdirectly connected, FastEthernet0/0

C       192.168.1.4 isdirectly connected, FastEthernet0/1

查看R2的路由表:

R2#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRPexternal, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA externaltype 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPFexternal type 2

i - IS-IS, su - IS-ISsummary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area,* - candidate default, U - per-user static route

o - ODR, P - periodicdownloaded static route

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

2.0.0.0/32 is subnetted,1 subnets

C       2.2.2.2 is directlyconnected, Loopback0

192.168.1.0/30 issubnetted, 1 subnets

C       192.168.1.0 isdirectly connected, FastEthernet0/0

o*   0.0.0.0/0 [160/1] via 192.168.1.1, 00:00:16, FastEthernet0/0

查看R3的路由表:

R3#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRPexternal, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA externaltype 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type1, E2 - OSPF external type 2

i - IS-IS, su - IS-ISsummary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area,* - candidate default, U - per-user static route

o - ODR, P - periodicdownloaded static route

Gateway of last resort is 192.168.1.5 to network 0.0.0.0

3.0.0.0/32 is subnetted,1 subnets

C       3.3.3.3 is directlyconnected, Loopback0

192.168.1.0/30 issubnetted, 1 subnets

C       192.168.1.4 isdirectly connected, FastEthernet0/1

o*   0.0.0.0/0 [160/1] via 192.168.1.5, 00:00:45, FastEthernet0/1

时间: 2024-10-14 03:11:00

Cisco ODR配置示例的相关文章

LVS NAT模型配置示例

1.LVS-NAT基于Cisco的LocalDirector.VS/NAT不需要在RealServer上做任何设置,其只要能提供一个tcp/ip的协议栈即可,甚至其无论基于什么OS. 2.基于VS/NAT,所有的入站数据包均由Director进行目标地址转换后转发至内部的RealServer,RealServer响应的数据包再由Director转换源地址后发回客户端. 3.VS/NAT模式不能与netfilter兼容,因此,不能将VS/NAT模式的Director运行在netfilter的保护范

CISCO交换机配置命令及释义

CISCO交换机配置命令及释义1.设置交换机名称switch(config)#hostname DSHDDSHD(config)# 2打开和关闭端口//缺省状态下,端口是关闭的 Switch(config)#interface fastethernet 0/1 Switch(config-if)#shutdown //关闭端口 Switch(config)#interface fastethernet 0/1 Switch(config-if))#no shutdown //打开端口 3设置端口

华为MSTP负载均衡配置示例

8.6.7   MSTP负载均衡配置示例 本示例拓扑结构如图8-38所示,SwitchA.SwitchB.SwitchC和SwitchD都运行MSTP.它们彼此相连形成了一个环网,因为在SwitchA与SwitchB之间,以及SwitchC与SwitchD之间都存在冗余链路.为实现VLAN2-VLAN10和VLAN11-VLAN20的流量负载分担,本示例采用MSTP协议配置了两个MSTI,即MSTI1和MSTI2. 图8-38  MSTP配置示例 1.    配置思路分析 (1)在四台交换机创建

tinc vpn简单配置示例扩展(一)——跨越三层网络

tinc vpn简单配置示例扩展(一)--跨越三层网络 在tinc vpn简单配置示例(http://watertoeast.blog.51cto.com/8489855/1711649)一文中,构建tinc VPN的两台机器同属一个局域网(如图一),这样的场景基本与实际应用情况不符.今天对简单示例进行扩展,使构建vpn的两台主机跨越三层网络边界(如图二). 图一 tinc vpn in lan 图二 tinc VPN跨越三层网络边界 如图二所示,PC02的IP地址变成了172.16.1.6,与

DB2 HADR 配置示例

介绍 DB2的HA可以在OS级别使用专门的HA来实现,也可使用DB2内置的HADR来实现,且配置和管理很简单. 一个HADR环境需要两台数据库服务器:主数据库服务器(primary)和备用数据库服务器(standby,处于standby角色的数据库不能够被访问).当主数据库中发生事务操作时,会同时将日志文件通过TCP/IP协议传送到备用数据库服务器,然后备用数据库对接受到的日志文件进行重放(Replay),从而保持与主数据库的一致性.当主数据库发生故障时,备用数据库服务器可以接管主数据库服务器的

华为IPv4静态路由配置示例

IPv4静态路由配置示例 组网需求 如图1所示,属于不同网段的主机通过几台Switch相连,要求不配置动态路由协议,使不同网段的任意两台主机之间能够互通. 图1 配置IP静态路由组网图 配置思路 采用如下的思路配置IPv4静态路由: 创建VLAN并配置各接口所属VLAN,配置各VLANIF接口的IP地址,实现相邻设备网络互通. 在各主机上配置IP缺省网关,在各台Switch上配置IPv4静态路由或者静态缺省路由,实现不配置动态路由协议,使不同网段的任意两台主机之间能够互通. 操作步骤 1.配置各

LVS DR模型配置示例

要让路由知道哪台主机是Director,进行选择: 1.VIP:MAC(Director VIP) -- MAC绑定,但未必可行,例如路由是运营商的. 2.arptables 3.kernel parameter(常用此配置): arp_ignore:定义接收到ARP请求时的响应级别: 0:默认级别,只要本机配置有相应的地址,就给予响应: 1:只有当请求目标地址是请求到达接口上配置的地址,才给予响应: arp_announce:定义将自己的地址向外通告时的通告级别: 0:默认级别,将本机任何接口

SharePoint 2013 工作流之使用Designer配置示例篇

原文:SharePoint 2013 工作流之使用Designer配置示例篇 在SharePoint 2013中,支持SharePoint Designer 2013(以下简称SPD)配置简单的工作流,完成我们的业务需要.下面,我们就举一个小例子,实现SPD配置工作流. 1. 首先,打开SPD,打开SharePoint站点,在Ribbon菜单上,选择列表工作流,选择需要配置的列表,如下图: 2.弹出对话框,如下图,填写工作流名称.说明及平台类型: 3.进入工作流设计器,如下图: 4.在Ribbo

vsftpd的基于pam_mysql的虚拟用户配置示例      

第一步:安装vsftpd和mariadb ~]# yum install mariadb-server ~]# yum install vsftpd 因为中CentOS 7平台上/lib64/security/中没有pam_mysql模块驱动,需要编译安装pam_mysql这个模块. 准备编译环境 安装Development Tools 和 service platform Development这两个包组,另外需要安装依赖到的开发包pam-devel,openssl-devel,mariadb