ospf网络类型

                                                              默认接口                  特点

1.loopback                                            loopback           32位主机路由

2.point-to-point                       serial/bri/fr's p2psub-if     组播/无dr

3.brocast                                               ethernet               组播/有dr

4.nbma                                    fr's physical/fr's mpsub-if  单播/有dr

5.p2mp 点到到多点                          ------------------    组播/无dr/32位

6.p2mp nbma 点到多点nbma           ------------------单播/无dr/32位

实验:

1.loopback  

r1:

int s0

ip add 12.1.1.1 255.255.255.0

no sh

int lo0

ip add 1.1.1.1  255.255.255.0

no sh

r2:

int s0

ip add 12.1.1.2 255.255.255.0

no sh

int lo0

ip add 2.2.2.2 255.255.255.0

r1:

router ospf 110

net 12.1.1.0 0.0.0.255 area 0

net 1.1.1.0 0.0.0.255 area 0

r2:

router ospf 110

net 12.1.1.0 0.0.0.255 area 0

net 1.1.1.0 0.0.0.255 area 0

show ip ospf interface (查看网络类型)

2.point-to-point  

int lo0

ip ospf network point-to-point(还原真实的网络信息)

show ip ospf interface

3.brocast    

r1:

int s0

ip ospf network broadcast

r2:

int s0

ip ospf network broadcast(广播型网络类型)

4.nbma

r1:

int s0

ip ospf network mon-broadcast

r2:

int s0

ip ospf network mon-broadcast(非广播)

r1:

router ospf 110

neighbor 12.1.1.2 (需要手工指邻居)

hello包时间每30秒周期。

5.p2mp 点到到多点  

r1:

int s0

ip ospf network point-to-multipoint

r2:

int s0

ip ospf network point-to-multipoint

hello包时间每30秒周期。

不选dr,组播更新

到达对方32位的主机路由。

6.p2mp nbma 点到多点nbma

不选dr,单播更新,产生32位到达对方主机路由

r1:

int s0

ip ospf network point-to-multipoint non-broadcast

r2:

int s0

ip ospf network point-to-multipoint non-broadcast

网络类型对比

r1:

int s0

ip ospf network point-to-multipoint

r2:

int s0

ip ospf network point-to-point

ip ospf hello-interval 30(更改hello包30秒)

frame-relay:帧中继

1.二层网络技术

2.dlci号(本地意义)

3.基于pvc通道。

4.有连接

5.lmi本地管理接口(cisco/ansi/q933a)

                               local                remote

active                      正常                   正常

inactive                   正常                 不正常

delete                    不正常               不知道

6.map映射

自动(dynamic)

手工(static)实验:

将router 模拟成fr-switch:

1.将所有串口封装成帧中继。no sh.dce端配时钟

2.r2/r3模拟成fr-switch

3.在帧中继交换机接口指定lmi类型

4.接口帧中继交换机dce

5.接口打开pvc通道

r1:conf t

int s0

encapsulation frame-relay

no sh

r2:

int s0

clock rate 1000

en farme-relay

no sh

int s1

clck rate 1000

encapsulation frame-relay

no sh

r3:

int s0

en frame-relay

no sh

clock rate 1000

r4:

int s1

encapsulation fr

no sh

r5:

int s0

en frame-relay

r2:

frame-relay switching

r3:

frame-relay switching

r2:

int s0

frame-relay lmi-type cisco

cisco

ansi

q933a

frame-relay intf-type dce

frame-relay route 104(进来的dlci号) int s1 401(出去的dlci号)

int s1

frame-relay lmi-type ansi

frame-relay intf-type dce

frame-relay route 401 int ser 0 104

int e0

ip add 23.1.1.2 255.255.255.0

no sh

r3:

int e0

ip add 23.1.1.3 255.255.255.0

no sh

r2:

int tunnel 2

tunnel source 23.1.1.2

tunnel destination 23.1.1.3

r3:

int tunnel 3

tunnel source 23.1.13

tunnel destination 23.1.1.2

r2:

inter s0

frame-relay route 105 interface tunnel 2 100(任意取)

r3:

frame-relay lmi-type q933a

frame-relay intf-type dc

frame-relay route 501 interface tunnel 3 100

r2:

show frame-relay route(查看active没)

r1:

show frame-relay pvc(查看确认pvc好的)int s0

ip add 145.1.1.1 255.255.255.0

no sh

r4:

int s1

ip add 145.1.1.4 255.255.255.0

no sh

r5:

int s0

ip add 145.1.1.5 255.255.255.0

no sh

show frame-relay map

手工写:

r4:

int s1

frame-relay map ip 145.1.1.5 401 broadcast(支持微广播)show frame-relay map

r5:

int s0

frame-relay map 145.1.1.4 501 broadcast

r1:

int s0

frame-relay map ip 145.1.1.104(写静态map ping通自己)

前提:

hub & spoke

spoke端不能互访

实验:

r1:

int lo0

ip add 1.1.1.1 255.255.255.0

no sh

r4:

int lo0

ip add 4.4.4.4 255.255.255.0

no sh

r5:

int lo0

ip add 5.5.5.5 255.255.255.0

r1:

router ospf 110

network 145.1.1.0 0.0.0.255.area 0

net 1.1.1.0 0.0.0.255 area 0

r4:

router ospf 110

net 145.1.1.0 0.0.0.255 area 0

net 4.4.4.0 0.0.0.255 area 0

r5:

router ospf 110

net 145.1.1.0 0.0.0.255 area 0

net 5.5.5.0 0.0.0.255 area 0

不支持广播,手工neighbor邻居

nbma

手工neighbor

手工dr

手工map

r1:

neighbor 145.1.1.4

neighbro 145.1.1.5

int s0

ip ospf priority 2

r4:

int s1

ip ospf priority 0(把优先级设置为0不参与选举)

r5:

int s0

ip ospf priority  0

r4:

int s1

frame-relay map ip 145.1.1.5 401 broadcast

r5:

int s0

frame-relay map ip 145.1.1.4 501 brioadcast

修改为广播测试

自动neighbor

手工dr(hub)

手工map

r1:

int s0

ip ospf network broadcast

r4:

int s1

ip ospf network broadcast

r5:int s0

ip ospf network broadcast

点到多点nbma

需要手工neighbor

无dr

不需要手工map

r1:

int s0

ip ospf network point-to-multipoint non-broadcast

r4:

int s1

ip ospf network point-to-multipoint non-broadcast

r5:

int s0

ip ospf network point-to-multipoint non-broadcast

p2mp

自动neighbor

无dr

无map

p2p子接口

使用自结构

不同网段

双方网络类型一致