OSPF点对点配置

1.    点对点

 

a、 点对点不选举DR/BDR

b、 区域内各个路由器都有一样的拓扑数据库

c、 串口时钟由DCE端决定,需要为DCE端配置时钟

d、 串口封装encaption ppp

e、 查看邻居show ip ospf neighbor

f、  查看拓扑数据库show ip ospf database

g、 查看路由show ip route






R1配置

en
conf t
hostname R1
int s0/0
ip address 192.168.1.1 255.255.255.0
clock rate 64000
enc ppp
no shutdown
exit
 
int loopback 0
ip address 1.1.1.1255.255.255.0
no shutdown
exit
 
router ospf 1
network 1.1.1.00.0.0.255 area 0
network 192.168.1.0 0.0.0.255area 0
exit
end

 

 

 

R2配置

en
conf t
hostname R2
int s0/0
ip address 192.168.1.2 255.255.255.0
enc ppp
no shutdown
exit
 
int s0/1
ip address 192.168.2.1 255.255.255.0
clock rate 64000
enc ppp
no shutdown
exit
 
int loopback 0
ip address 2.2.2.2255.255.255.0
no shutdown
exit
 
int
 
router ospf 1
network 192.168.1.0 0.0.0.255area 0
network 192.168.2.0 0.0.0.255area 0
network 2.2.2.00.0.0.255 area 0
exit
end


 

 

 

R3配置

en
conf t
hostname R3
int s0/1
ip address 192.168.2.2 255.255.255.0
enc ppp
no shutdown
exit
 
int s0/0
ip address 192.168.3.1 255.255.255.0
clock rate 64000
enc ppp
no shutdown
exit
 
int loopback 0
ip address 3.3.3.3255.255.255.0
no shutdown
exit
 
int
 
router ospf 1
network 192.168.2.0 0.0.0.255area 0
network 192.168.3.0 0.0.0.255area 0
network 3.3.3.00.0.0.255 area 0
exit
end


 

 

 

 

R4配置

en
conf t
hostname R4
int s0/0
ip address 192.168.3.2 255.255.255.0
enc ppp
no shutdown
exit
 
int loopback 0
ip address 4.4.4.4255.255.255.0
no shutdown
exit
 
router ospf 1
network 192.168.3.0 0.0.0.255area 0
network 4.4.4.00.0.0.255 area 0
exit
end


 

 

 

 

R1#show ip ospf neighbor

 

Neighbor ID     Pri  State           Dead Time   Address         Interface

2.2.2.2           0  FULL/  -        00:00:36    192.168.1.2     Serial0/0

R1#show ip ospf database

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

 

                Router Link States (Area 0)

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

1.1.1.1         1.1.1.1         56          0x80000003 0x003297 3

2.2.2.2         2.2.2.2         56          0x80000006 0x0085b5 5

3.3.3.3         3.3.3.3         56          0x80000006 0x00051e 5

4.4.4.4         4.4.4.4         56          0x80000003 0x009408 3

 

解释:show ipospf neighbor 显示邻居。FULL/-中-表示不选举DR/BDR。

show ip ospf database 只有LSA1

 

 

R1#show ip route

Codes: C - connected, S - static, I - IGRP,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 - OSPFexternal type 2, E - EGP

       i - IS-IS, 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

 

    1.0.0.0/24 is subnetted, 1 subnets

C      1.1.1.0 is directly connected, Loopback0

    2.0.0.0/32 is subnetted, 1 subnets

O      2.2.2.2 [110/65] via 192.168.1.2, 00:01:15, Serial0/0

    3.0.0.0/32 is subnetted, 1 subnets

O       3.3.3.3 [110/129] via 192.168.1.2,00:01:15, Serial0/0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/193] via 192.168.1.2,00:01:15, Serial0/0

     192.168.1.0/24 is variablysubnetted, 2 subnets, 2 masks

C      192.168.1.0/24 is directly connected, Serial0/0

C      192.168.1.2/32 is directly connected, Serial0/0

O   192.168.2.0/24 [110/128] via 192.168.1.2, 00:01:15, Serial0/0

O   192.168.3.0/24 [110/192] via 192.168.1.2, 00:01:15, Serial0/0

 

 

 

解释:C直连路由,O代表ospf产生的域内路由,由LSA1和LSA2产生。


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值