Cisco之OSPF

OSPF网络架构如下:

R1的配置:

R1(config)#router ospf 100

R1(config-router)#router-id 1.1.1.1

R1(config-router)#network 10.1.1.0 0.0.0.3 area 0

R1(config-router)#network 10.1.1.4 0.0.0.3 area 1

R2的配置:

R2(config)#router ospf 100

R2(config-router)#router-id 2.2.2.2

R2(config-router)#network 10.1.1.8 0.0.0.3 area 0

R2(config-router)#network 10.1.1.12 0.0.0.3 area 1

R3的配置:

R3(config)#router ospf 100

R3(config-router)#router-id 3.3.3.3

R3(config-router)#network 10.1.1.0 0.0.0.3 area 0

R3(config-router)#network 10.1.1.8 0.0.0.3 area 0

R3(config-router)#network 192.168.1.0 0.0.0.255 area 0

R4的配置:

R4(config)#router ospf 100

R4(config-router)#router-id 4.4.4.4

R4(config-router)#network 10.1.1.4 0.0.0.3 area 1

R4(config-router)#network 10.1.1.12 0.0.0.3 area 1

R4(config-router)#network 172.16.1.0 0.0.0.255 area 1

显示路由器的路由协议信息:

R1#sh ip protocols

Routing Protocol is "ospf 100"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 1.1.1.1

It is an area border router

Number of areas in this router is 2. 2 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

10.1.1.0 0.0.0.3 area 0

10.1.1.4 0.0.0.3 area 1

Reference bandwidth unit is 100 mbps

Routing Information Sources:

Gateway         Distance      Last Update

4.4.4.4              110      00:14:48

2.2.2.2              110      00:14:48

3.3.3.3              110      00:17:19

Distance: (default is 110)

查看路由表:

R1#sh ip route

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

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

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

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

i - IS-IS, su - IS-IS summary, 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 - periodic downloaded static route

Gateway of last resort is not set

172.16.0.0/32 is subnetted, 1 subnets

O       172.16.1.1 [110/2] via 10.1.1.6, 00:03:55, FastEthernet1/0

10.0.0.0/30 is subnetted, 4 subnets

O       10.1.1.8 [110/2] via 10.1.1.1, 00:06:26, FastEthernet0/0

O       10.1.1.12 [110/2] via 10.1.1.6, 00:03:55, FastEthernet1/0

C       10.1.1.0 is directly connected, FastEthernet0/0

C       10.1.1.4 is directly connected, FastEthernet1/0

192.168.1.0/32 is subnetted, 1 subnets

O       192.168.1.1 [110/2] via 10.1.1.1, 00:06:26, FastEthernet0/0

仅显示与OSPF相关的路由信息:

R1#sh ip route ospf

172.16.0.0/32 is subnetted, 1 subnets

O       172.16.1.1 [110/2] via 10.1.1.6, 00:17:27, FastEthernet1/0

10.0.0.0/30 is subnetted, 4 subnets

O       10.1.1.8 [110/2] via 10.1.1.1, 00:19:58, FastEthernet0/0

O       10.1.1.12 [110/2] via 10.1.1.6, 00:17:27, FastEthernet1/0

192.168.1.0/32 is subnetted, 1 subnets

O       192.168.1.1 [110/2] via 10.1.1.1, 00:19:58, FastEthernet0/0

验证网络是否畅通:

R3#ping 172.16.1.1 source 192.168.1.1

Type escape sequence to abort.

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

Packet sent with a source address of 192.168.1.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 52/66/76 ms

查看邻接关系:

R1#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface

3.3.3.3           1   FULL/BDR        00:00:34    10.1.1.1        FastEthernet0/0

4.4.4.4           1   FULL/BDR        00:00:32    10.1.1.6        FastEthernet1/0

R3#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface

2.2.2.2           1   FULL/DR         00:00:33    10.1.1.10       FastEthernet1/0

1.1.1.1           1   FULL/DR         00:00:35    10.1.1.2        FastEthernet0/0

查看接口是否加入正确的区域:

R1#sh ip ospf interface

FastEthernet0/0 is up, line protocol is up

Internet Address 10.1.1.2/30, Area 0

Process ID 100, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1

Transmit Delay is 1 sec, State DR, Priority 1

Designated Router (ID) 1.1.1.1, Interface address 10.1.1.2

Backup Designated router (ID) 3.3.3.3, Interface address 10.1.1.1

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40

Hello due in 00:00:07

Supports Link-local Signaling (LLS)

Index 1/1, flood queue length 0

Next 0x0(0)/0x0(0)

Last flood scan length is 0, maximum is 1

Last flood scan time is 0 msec, maximum is 4 msec

Neighbor Count is 1, Adjacent neighbor count is 1

Adjacent with neighbor 3.3.3.3  (Backup Designated Router)

Suppress hello for 0 neighbor(s)

FastEthernet1/0 is up, line protocol is up

Internet Address 10.1.1.5/30, Area 1

Process ID 100, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1

Transmit Delay is 1 sec, State DR, Priority 1

Designated Router (ID) 1.1.1.1, Interface address 10.1.1.5

Backup Designated router (ID) 4.4.4.4, Interface address 10.1.1.6

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40

Hello due in 00:00:06

Supports Link-local Signaling (LLS)

Index 1/2, flood queue length 0

Next 0x0(0)/0x0(0)

Last flood scan length is 0, maximum is 1

Last flood scan time is 0 msec, maximum is 0 msec

Neighbor Count is 1, Adjacent neighbor count is 1

Adjacent with neighbor 4.4.4.4  (Backup Designated Router)

Suppress hello for 0 neighbor(s)

查看OSPF数据库:

R1#sh ip ospf database

OSPF Router with ID (1.1.1.1) (Process ID 100)

Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count

1.1.1.1         1.1.1.1         1390        0x80000003 0x00AD5E 1

2.2.2.2         2.2.2.2         1373        0x80000003 0x0022D1 1

3.3.3.3         3.3.3.3         1367        0x80000005 0x00083C 3

Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum

10.1.1.2        1.1.1.1         1390        0x80000001 0x007AA0

10.1.1.10       2.2.2.2         1374        0x80000001 0x002EDC

Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum

10.1.1.4        1.1.1.1         1749        0x80000001 0x00A189

10.1.1.4        2.2.2.2         1218        0x80000001 0x008D98

10.1.1.12       1.1.1.1         1225        0x80000001 0x005BC6

10.1.1.12       2.2.2.2         1507        0x80000001 0x0033EB

时间: 2024-10-27 02:11:52

Cisco之OSPF的相关文章

[cisco][LAB]OSPF in NBMA

NBMA為一種沒有廣播類型的的網路連接,這會使得OSPF建立需要手動設定 拓樸如下: R1# ! interface Loopback0 ip address 172.16.1.1 255.255.255.0 ip ospf network point-to-point ! interface Serial2/0 ip address 192.168.1.1 255.255.255.0 encapsulation frame-relay ip ospf network point-to-mult

OSPF环境下帧中继的配置

配置 R1========================================================================================= frame-relay de-list 1 protocol ip list 100 ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Serial1/0 ip address 10.1.1.1 255.255.255.0 e

OSPF开放最短路径优先

记录学习OSPF的一些术语 LSA-链路状态通知 LSR-链路状态请求 LSU-链路状态更新 LSAck-链路状态确认(确认对像为:DBD.LSU.LSR) LSDB-链路数据(拓扑表) DBD-数据库描述 DR-指定路由 BDR-备用指定路由 DR与BDR的存在关系 在点到点的(PTOP)的网络中不存在DR与BDR. 在广播网络中存 DR与BDR的.同时在此时还有一上新的术语为DROTHER,所有 DROTHER都与DR进行LSA更新. SPF-最短路径优先,创建始者为:dijkstra OS

21.三层技术之OSPF相关命令---虚链路(3)

虚链路:是指一条通过一个非骨干区域连接到骨干区域的链路. 虚链路一般用于: v 通过一个非骨干区域连接一个区域到骨干区域. v 通过一个非骨干区域连接一个分段的骨干区域两边的部分区域. 配置虚链路规则: v 虚链路必须配置在两台路由器之间. v 虚链路所经过的区域必须拥有全部的路由信息. v 传送区域不能是一个末梢区域和NSSA区域. v 虚链路的稳定性取决于其经过的区域的稳定性. v 虚链路有助于提供逻辑冗余. CISCO思科OSPF相关命令: 命令 描述 (config)# router o

cisco learn book index

------------------------------------------------------------------ Routing TCP/IP Volume 1 , Second Edition ------------------------------------------------------------------ Routing TCP/IP Volume 2 ---------------------------------------------------

3.2【OSPF】NP十二班第二天-OSPF邻居状态机及邻居建立1

OSPF邻居状态机及邻居建立 控制层面:RIB表 转发层面:FIB表 Hello报文的作用:发现建立和维护邻居关系 \\Hello报文里的字段 option选项在哪些报文中存在? 1.Hello    2.DBD   3.LSA OPtion选项: DN比特位 DN比特位(宕比特位)置位如何防环 运营商和客户路由重分发造成环路 把OSPF重分发进BGP很可能造成环路 通过DN位解决,如果DN位置位了,这条路由本地是不能做选路的,同时也不会重分发进其他的协议 DC位 按虚电路:需要的时候才建立虚电

单域MPLS vpn数据转发实验分析

MPLS VPN数据详细转发流程示意图: 配置思路: 在自治系统AS100中配置IGP,使得两台PE路由器的lo 0接口路由可达: 两台PE路由器路由可达后,在两台PE路由器之间建立MP-iBGP邻居关系,用来传输VPNV4路由: AS100中所有P路由器和PE路由器运行MPLS,并使用LDP来给非BGP路由分发标签: 在PE路由器和CE路由器之间运行ospf路由协议,使得PE路由器的VRF路由表可以学习到CE路由器的路由: 将PE路由器VRF学习到的路由重分发进BGP,使得对端PE路由器可以通

ccnp学习笔记

1  eigrp是igp(内部网管协议)协议,最大支持100跳,rip最大支持15跳,16跳不可达. 2是高级距离矢量协议(类似链路)(ADV)与rip对比  rip建邻居是纯触发机制端口两端设置为为rip eigrp是先建立邻居,后建立连接关系后邻居表将连接关系装在拓扑表中    进行dlal算法计算后放入路由表, 3eigrp是无泪协议,是高档协议,是不连续子网,发送路由信息支持vlsm cidr 对于ripv2是一个提升,ripv2只支持vlsm,不连续子网必须满足1可以关闭自动汇总2是一

IPSec××× HA

一.链路备份IPSec ××× HA解决方案1.相关节点关键配置Branch节点crypto isakmp policy 10authentication pre-sharecrypto isakmp key cisco address 61.128.1.1crypto isakmp key cisco address 137.78.5.1crypto isakmp keepalive 10 periodic!crypto ipsec transform-set cisco esp-3des e