×¢²á | µÇ¼ Íü¼ÇÃÜÂ룿 51ctoÊ×Ò³ | ²©¿Í | ÂÛ̳ | ÕÐÆ¸
ÈȵãÎÄÕ [ÒµÄÚ´«ÎÅ]½ñÌ죬7ÔÂ25ÈÕ..
¡¡°ïÖú

OSPF ʵսƪ


2008-03-04 14:58:26
¡¡±êÇ©£ºOSPF¡¡¡¡¡¡[ÍÆË͵½¼¼ÊõȦ]

 
OSPF ʵսƪ
 
ͨ¹ý»ù´¡ÆªºÍ½ø½×ƪµÄѧϰ£¬ÎÒÏëÄãÒѾ­¾ß±¸Á˳ä×ãµÄ֪ʶ£¬·Ï»°ÉÙ˵£¬¼ÈÈ»ÊÇʵսƪ¾ÍҪͨ¹ýÊÔÑéÀ´Ñ§Ï° OSPF£¬ÏÂÃæÎÒÃÇͨ¹ý 8¸öʵÑéÀ´¼ìÑéÒ»ÏÂÄãÕÆÎÕµÄÈçºÎ¡£
ÊÔÑéÒ»£ºÅäÖà OSPFºÍ¼à¿Ø
ÊÔÑé¶þ£º½¨Á¢ÁÚ½Ó¹ØÏµ
ÊÔÑéÈý: ÅäÖõã¶ÔµãÁ´Â·
ÊÔÑéËÄ£ºÅäÖà OSPF over NBMA ÍøÂçÀàÐÍ
ÊÔÑéÎ壺ÅäÖà Stub¡¢Totally Stub¡¢NSSA
ÊÔÑéÁù£ºÁ˽â OSPF DatabaseÕâÓ¦¸ÃËãÊǸöÖØµãÁË£¡
ÊÔÑéÆß£ºÅäÖÃÐéÁ´Â·
ÊÔÑé°Ë£ºÖØ·Ö²¼ Rip ½ø OSPF
 
Lab 1: ÅäÖà OSPFºÍ¼à¿Ø
ÊÔÑéµÄÄ¿µÄ£º
1£®Íê³É OSPFÅäÖÃ
2£®¼ìÑé OSPFµÄÔËÐÐ״̬
3£®ÕÆÎÕһЩÅäÖÃÃüÁî
ÊÔÑé˼·£º
ÕâÊÇ×î×î¼òµ¥µÄÅäÖà ÒòΪֻÓÐһ̨·ÓÉÆ÷£¬Â·ÓÉÆ÷ FµÄ E1¿ÚÁ¬½ÓÖ÷¸ÉÇøÓò£¬ s2ÅäÖÃÁË×Ó½Ó¿Ú
Ê×ÏÈÓà sh ip interface brief ¿´¿´½Ó¿ÚÅäÖÃ
E0¶Ë¿Ú down
E1Ϊ 170.170.4.6
 
È»ºóÔÚ¿´¿´ s2´®¿ÚµÄÅäÖÃÐÅÏ¢
¿´µ½´®¿Ú 2Ϊ֡Öм̣¬ÅäÖÃΪµã¶Ôµã×Ö½Ó¿Ú£¬Ã¿¸ö½Ó¿ÚΪ 1¸ö×ÓÍø
ÏÂÃæÎÒÃÇÀ´ÅäÖà ospf
ÅäÖà ospf½ø³ÌºÅΪ 7
¹ã²¥ÍøÂç 170.170.4.0/24 (¾ÍÊÇ e1¶Ë¿Ú)µ½ÇøÓò 0
¹ã²¥ÍøÂç 170.170.11.0/24ºÍ 10.0/24 µ½ÇøÓò 1
 
ÅäÖÃÍêÁË£¬¼òµ¥°É£¬ºÇºÇ
ÏÂÃæÀ´¼ìÑéһϣº
Óà sh ip ospf ¼ì²éһϠospfµÄÅäÖÃÐÅÏ¢
Router_F#show ip ospf
Routing Process "ospf 7" with ID 170.170.11.6·ÓÉÆ÷ ID
Supports only single TOS(TOS0) routes
It is an area border router±íʾ´Ë·ÓÉÆ÷Ϊ ABR
SummaryLink updateintervalis00:30:00andthe updateduein 00:22:11
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Number of DCbitless external LSA 0
Number of DoNotAge external LSA 0
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Area BACKBONE(0) (Inactive)Ö÷¸ÉÇøÓò
Number of interfaces in this area is 1ÔÚÖ÷¸ÉÓòµÄ½Ó¿ÚΪ 1
Area has no authenticationÇøÓòδÅäÖÃÈÏÖ¤
SPF algorithm executed 4 times SPF¼ÆËã´ÎÊý
Area ranges are·ÓɾۺÏ
Link State Update Interval is 00:30:00 and due in 00:21:57
Link State Age Interval is 00:20:00 and due in 00:11:57
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
 
Area 1
Number of interfaces in this area is 2ÔÚÇøÓò 1µÄ½Ó¿ÚÊýÁ¿Îª 2
Area has no authenticationÇøÓòδÅäÖÃÈÏÖ¤
SPF algorithm executed 3 times SPF¼ÆËã´ÎÊý
Area ranges are·ÓɾۺÏ
Link State Update Interval is 00:30:00 and due in 00:22:08
Link State Age Interval is 00:20:00 and due in 00:12:08
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Router_F#
ͨ¹ýÉÏÌõÃüÁî¿É¼ì²é ospfЭÒéµÄ»ù±¾ÐÅÏ¢
½ÓÏÂÀ´ÎÒÃǼì²éÒ»ÏÂÖ÷¸ÉÓò½Ó¿Ú E1 µÄ ospfÐÅÏ¢£ºÓÃÃüÁî sho ip ospf int e1
Router_F#show ip ospf interface ethernet 1
Ethernet1 is up, line protocol is up
Internet Address 170.170.4.6/24, Area 0±íʾ½Ó¿ÚÊôÓÚÖ÷¸ÉÓò
Process ID 7, Router ID 170.170.11.6, Network Type BROADCAST, Cost:
10ÍøÂçÀàÐͺͽӿڳɱ¾
Transmit Delay is 1 sec, State DR, Priority 1 ±íʾ×Ô¼ºÊÇ
DR£¬ÓÅÏȼ¶Îª 1 Designated Router (ID) 170.170.11.6, Interface address 170.170.4.6
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit
5 helloºÍ deadµÄ¼ÆÊ±Æ÷
Hello due in 00:00:05 Neighbor Count is 0, Adjacent neighbor count is 0±íʾ´Ë½Ó¿ÚûÓÐÁÚ
¾Ó
Suppress hello for 0 neighbor(s)
Router_F#
ͨ¹ý´ËÃüÁî¼ì²é ospfµÄ½Ó¿ÚÐÅÏ¢£¬°üÀ¨½Ó¿Ú³É±¾£¬½Ó¿ÚÇøÓò£¬¼ÆÊ±Æ÷£¬ÁÚ¾Ó£¬ÓÅÏȼ¶£¬dr
µÈµÈ
ÓÃÃüÁî show ip ospf interface ¿É²é¿´ËùÓÐ½Ó¿ÚµÄ ospf״̬¡£
±¾ÊÔÑéÍê³É¡£
 
Lab2£º½¨Á¢ÁÚ½Ó¹ØÏµ
ÊÔÑéÄ¿µÄ£º
ÔÚ·ÓÉÆ÷ DÉÏÅäÖà ospfÒÔ½¨Á¢ºÍ·ÓÉÆ÷ FµÄÁÚ½Ó¹ØÏµ
¼ìÑéÁÚ¾Ó¹ØÏµ
ÊÔÑé˼·£º
·ÓÉÆ÷ FÒѾ­ÅäÖÃÍê±ÏÁË£¬ÄÇô¿ªÊ¼ÅäÖ÷ÓÉÆ÷ DÁË£¬»ù±¾ºÍ·ÓÉÆ÷ FµÄÅäÖÃÒ»Ñù
Ê×ÏÈ»¹ÊDz鿴·ÓÉÆ÷ DµÄ½Ó¿ÚÐÅÏ¢£¬»òÕß´ò sho run¿´Ò»Ï¶¼ÐÐ
Ò²¿ÉÓà show ip proto¿´¿´ÅäÖõÄ·ÓÉЭÒé¡£
È»ºóÅäÖà ospfЭÒé
Router_D(config)#router ospf 7
Router_D(config-router)#network 170.170.4.0 0.0.0.255 area 0
Router_D(config-router)#end
ÕâÑù¾Í°Ñ e1¶Ë¿Ú¹ã²¥µ½Ö÷¸ÉÓò£¬ÏëÏëÏÂÒ»²½Ó¦¸Ã»¹ÅäÖÃÊ²Ã´ÄØ£¿
ûÓÐÁË£¬^_^ ÄÇÎÒÃǼì²éÒ»ÏÂÁÚ¾Ó¹ØÏµ¿´¿´
ÔÚ·ÓÉÆ÷ FÉÏÆôÓà debug ¿´¿´ÁÚ¾Ó״̬
Router_F#debug ip ospf adj
OSPF adjacency events debugging is on
Router_F#
 
È»ºó¿´¿´ show logging
OSPF: Rcv hello from 170.170.8.4 area 0 from Ethernet1 170.170.4.4
OSPF: End of hello processing
OSPF: Rcv DBD from 170.170.8.4 on Ethernet1 seq 0x1036 opt 0x2 flag 0x7 len 32
state INIT
OSPF: 2 Way Communication to 170.170.8.4 on Ethernet1, state 2WAY
OSPF: Neighbor change Event on interface Ethernet1
OSPF: DR/BDR election on Ethernet1
OSPF: Elect BDR 170.170.8.4
OSPF: Elect DR 170.170.11.6
 
DR: 170.170.11.6 (Id) BDR: 170.170.8.4 (Id)
OSPF: Send DBD to 170.170.8.4 on Ethernet1 seq 0x2346 opt 0x2 flag 0x7 Len 32
OSPF: First DBD and we are not SLAVE
 
OSPF: Rcv DBD from 170.170.8.4 on Ethernet1 seq 0x2346 opt 0x2 flag 0x2 Len 132
state EXSTART
OSPF: NBR Negotiation Done. We are the MASTER
 
OSPF: Send DBD to 170.170.8.4 on Ethernet1 seq 0x2347 opt 0x2 flag 0x3 Len 112
OSPF: Database request to 170.170.8.4
OSPF: sent LS REQ packet to 170.170.4.4, length 24
OSPF: Rcv DBD from 170.170.8.4 on Ethernet1 seq 0x2347 opt 0x2 flag 0x0 Len 32
state EXCHANGE
OSPF: Send DBD to 170.170.8.4 on Ethernet1 seq 0x2348 opt 0x2 flag 0x1 Len 32
OSPF: Rcv DBD from 170.170.8.4 on Ethernet1 seq 0x2348 opt 0x2 flag 0x0 Len 32
state EXCHANGE
OSPF: Exchange Done with 170.170.8.4 on Ethernet1
OSPF: Build router LSA for area 0, router ID 170.170.11.6
OSPF: Build network LSA for Ethernet1, router ID 170.170.11.6
OSPF: No full nbrs to build Net Lsa
OSPF: Flush network LSA on Ethernet1 for area 0
OSPF: Synchronized with 170.170.8.4 on Ethernet1, state FULL
 
Èç¹ûÄãÓÐÄÍÐÔ¿´µÄ»°ÄÇôÄ㽫»á¿´µ½ ospf½¨Á¢Áڽӵĸ÷¸ö״̬µÄ˳Ðò
ÔÚÓà show ip ospf nei¿´¿´ÁÚ¾ÓµÄ״̬
Router_F#show ip ospf neighbor
Neighbor ID
Interface
Pri State Dead Time Address 170.170.8.4
Ethernet1
1 FULL/BDR 00:00:37 170.170.4.4
Router_F#
Router_D#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface
170.170.11.6 1 FULL/DR 00:00:32 170.170.4.6
Ethernet1
Router_D#
¿ÉÒÔ¿´µ½Â·ÓÉÆ÷ FÊÇ DR£¬Â·ÓÉÆ÷ DÊÇ BDR£¬²¢ÇÒ¶¼ÊÇ Full״̬£¬ÁÚ¾ÓÒѾ­ÐγÉ
±¾´ÎÊÔÑéÍê³É¡£
 
Lab 3: ÅäÖõã¶ÔµãÁ´Â·
ÅäÖÃ˼·£º
·ÓÉÆ÷ DºÍ·ÓÉÆ÷ FÒѾ­ÅäÖÃÍêÁË£¬ÄÇô½ÓÏÂÀ´ÅäÖà Area 1 ÁË£¬´ó¼Ò¼ÇµÃ·ÓÉÆ÷ FµÄ s2
ÊÇÅäÖõÄÖ¡ÖмÌ×Ö½Ó¿Ú°É¡£µã¶Ôµã×Ö½Ó¿ÚÅäÖúܼòµ¥£¬²»ÓÃÊ²Ã´ÌØ±ðÅäÖá£ÔÚ·ÓÉÆ÷ FÉÏÒѾ­½« s2.7ºÍ s2.8ÅäÖõ½ area 1ÁË£¬ÏÂÃæ¾ÍÔÚ·ÓÉÆ÷ GºÍ HÉÏÅäÖà ospfЭÒéÁË
Router_G(config)#router ospf 7
Router_G(config-router)#network 170.170.11.0 0.0.0.255 area 1
Router_G(config-router)#network 170.170.5.0 0.0.0.255 area 1
Router_G(config-router)#end
Router_G#
Router_H(config)#router ospf 7
Router_H(config-router)#network 170.170.10.0 0.0.0.255 area 1
Router_H(config-router)#network 170.170.14.0 0.0.0.255 area 1
Router_H(config-router)#end
Router_H#
 
½ÓÏÂÀ´ÎÒÃÇÀ´¼ì²éÒ»ÏÂÁÚ½Ó״̬£¬ÔÚ·ÓÉÆ÷ GÉÏ´ò sho ip ospf neig
Router_G#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
170.170.11.6 1 FULL/ - 00:00:30 170.170.11.6 Serial0.6
Router_G#
Ö®ËùÒÔûÓÐ DRºÍ BDRÊÇÒòΪÔÚµã¶ÔµãÉÏÊÇûÓÐ drµÄ£¬Â·ÓÉÆ÷ HºÍ·ÓÉÆ÷ GÒ»ÑùÒ²ºÍ
F½¨Á¢ÁËÁÚ½Ó¡£
 
·ÓÉÆ÷ FºÍ D£¬H½¨Á¢ÁËÁÚ½Ó£¬Ò²´ÓËûÃÇÄÇÀïѧµ½ÁË·ÓÉ£º 170.170.5.0/24 170.170.14.0/24. ÄÇôµ½ÕâÁ½Ìõ·¾¶µÄ¶ÈÁ¿ÖµÊǶàÉÙÄØ£¬¿ÉÒÔÔÚ FÉÏ´ò sho ip ospf int s2.7
Router_F#show ip ospf interface serial 2.7
Serial2.7 is up, line protocol is up
Internet Address 170.170.11.6/24, Area 1
Process ID 7, Router ID 170.170.11.6, Network Type POINT_TO_POINT,
Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit
5
Hello due in 00:00:03
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 170.170.11.7
Suppress hello for 0 neighbor(s)
Router_F#
 
Õâ¸ö¶Ë¿ÚµÄ³É±¾ÊÇ 64£¬ÄÇô¼ÓÉÏ e0µÄ³É±¾ÊÇ 10£¨10MµÄ³É±¾ÊÇ 10£¬100MµÄÊÇ 1£©£¬¾ÍÊÇ 74£¬ÔÚ·ÓɱíÖмì²éһϡ£
Router_F#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 -OSPF external type 2, E -EGP
i -IS-IS, L1 -IS-IS level-1, L2 -IS-IS level-2, * -candidate
default
U - per-user static route, o - ODR
Gateway of last resort is not set
170.170.0.0/24 is subnetted, 5 subnets
C 170.170.4.0 is directly connected, Ethernet1
O 170.170.5.0 [110/74] via 170.170.11.7, 00:26:49, Serial2.7
C 170.170.10.0 is directly connected, Serial2.8
C 170.170.11.0 is directly connected, Serial2.7
O 170.170.14.0 [110/74] via 170.170.10.8, 00:26:49, Serial2.8
Router_F#
¹ûÈ»ÊÇ 74
±¾´ÎÊÔÑéÍê³É¡£
 
Lab 4£ºÅäÖà OSPF over NBMA ÍøÂçÀàÐÍ
 
 
ÊÔÑéÄ¿µÄ£º
ÔÚ·ÓÉÆ÷ EºÍ FÉÏÅäÖà ep½Ó¿Ú½¨Á¢ÁÚ½Ó
ÅäÖà NBMA³É¹ã²¥ÀàÐÍ
ÅäÖà NBMA³Éµã¶Ô¶àµã
ÅäÖÃ˼·£º
ÏÖÔÚ¶àÁ˸ö·ÓÉÆ÷ E£¬ÅäÖà e0ºÍ·ÓÉÆ÷ FÁڽӺܼòµ¥£¬¹Ø¼üÊÇ s1¶Ë¿ÚµÄÖ¡ÖмÌÉèÖã¬ÏÂÃæÀ´¿´¿´ÈçºÎÅäÖá£
ÏÈÅäÖ÷ÓÉÆ÷ EºÍ F½¨Á¢ÁÚ½Ó¡£
ÅäÖúܼòµ¥£º
Router_E(config)#router ospf 7
Router_E(config-router)#network 170.170.6.0 0.0.0.255 area 0
Router_E(config-router)#end
Router_E#
 
ÅäÖà NBMAΪ¹ã²¥Ä£Ê½
ÔçÏÈ IOS 10.0ÒÔǰ£¬ÐèÒªÓà neighborÃüÁîÊÖ¹¤Ö¸¶¨ÁÚ¾Ó£¬ÏÖÔÚµÄ IOSÓà ip ospf
networkÀ´¸Ä±ä ospfµÄ½Ó¿ÚÀàÐÍ£¬ip ospf network broadcast ÃüÁî¿É½«½Ó¿Ú
¸ÄΪ¹ã²¥Ä£Ê½£¬ÕâÑùÔÚ·ÓÉÆ÷ E¡¢G¡¢HÖ®¼äµÄ½Ó¿Ú¾Í¸ÄΪ¹ã²¥½Ó¿Ú
ÉÏÃæÊÇ·ÓÉÆ÷ EµÄ s1ÅäÖã¬Óе½Â·ÓÉÆ÷ G 170.170.9.7 ºÍ·ÓÉÆ÷ HµÄ map
ÉÏÃæÊÇ·ÓÉÆ÷ GµÄ s0.5ÅäÖã¬Óе½Â·ÓÉÆ÷ EµÄ map
ÉÏÃæÊÇ·ÓÉÆ÷ HµÄ s0.5ÅäÖã¬Óе½Â·ÓÉÆ÷ EµÄ map
 
ÒòΪÕâ¸öÍøÂç²»ÊÇÈ«Á¬Í¨µÄÍøÂ磬ÄǸöÒª³ÉΪ DRÄØ£¿ÏëÒ»Ï룬Ӧ¸ÃÊÇ E£¬ÒòΪËüÁ¬½Ó×Å GºÍ H£¬ÐèÒªÔÚ GºÍ HÉϸijɲ»½øÐÐÑ¡¾ÙµÄģʽ£¬ÓÃÏÂÃæÕâÌõÃüÁî¡£
 
Router_G(config-subif)#ip ospf priority 0
Router_G(config-subif)#
 
ÅäÖà GºÍ HµÄ ospf
Router_H(config-subif)#router ospf 7
Router_H(config-router)#network 170.170.9.0 0.0.0.255 area 1
 
Router_H(config-router)#network 170.170.14.0 0.0.0.255 area 1
Router_H(config-router)#end
Router_H#
ͬÑùÅäÖà G£¬È»ºóÔÚ½Ó¿ÚÉÏÅäÖà ip ospf network broadcast
 
ÎÒÃÇÔÚ·ÓÉÆ÷ GÉϼì²éÒ»ÏÂÁÚ¾Ó״̬
Router_G#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
170.170.9.5 1 FULL/DR 00:00:35 170.170.9.5 Serial0.5
170.170.11.6 1 FULL/ - 00:00:35 170.170.11.6 Serial0.6
Router_G#
¿É¿´µ½ 170.170.9.5 Ϊ DR£¬Ò²¾ÍÊÇ·ÓÉÆ÷ E£¬ÒòΪ GºÍ H²»²ÎÓ뾺Õù
 
ÎÒÃÇ¿´¿´ÕâÑùµ¼ÖÂʲôÎÊÌ⣬ÎÒÃÇÔÚ·ÓÉÆ÷ GÉÏ ping HµÄ e0¿Ú 170.170.14.8
´Ó·ÓÉÆ÷ H ping GµÄ e0¿Ú 170.170.5.7
Router_G#ping 170.170.14.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 170.170.14.8, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Router_G#
Ϊʲô»áʧ°ÜÄØ£¿
ÎÒÃÇ¿´¿´Â·Óɱí
Router_G#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 -OSPF external type 2, E -EGP
i -IS-IS, L1 -IS-IS level-1, L2 -IS-IS level-2, * -candidate
default
U - per-user static route, o - ODR
Gateway of last resort is not set
170.170.0.0/24 is subnetted, 7 subnets
O IA 170.170.4.0 [110/74] via 170.170.11.6, 23:02:07, Serial0.6
C 170.170.5.0 is directly connected, Ethernet0
O IA 170.170.6.0 [110/74] via 170.170.11.6, 23:02:07, Serial0.6
[110/74] via 170.170.9.5, 23:02:07, Serial0.5
C 170.170.9.0 is directly connected, Serial0.5
O 170.170.10.0 [110/128] via 170.170.11.6, 23:02:07, Serial0.6
[110/128] via 170.170.9.8, 23:02:07, Serial0.5
C 170.170.11.0 is directly connected, Serial0.6
O 170.170.14.0 [110/74] via 170.170.9.8, 23:02:07, Serial0.5
Router_G#
Óе½ 14.0µÄ·ÓÉ£¬ÎªÊ²Ã´²»Í¨ÄØ£¬¿´Ò»ÏºóÃæµÄ¾Í¿Ú 170.170.9.8£¬ÊÇ´ÓÕâÀï´«¹ýÀ´µÄ
ÒòΪÅäÖÃ³É broadcastģʽ£¬Á´Â·±»¿´×÷³ÉÒ»Ìõ¶à··ÃÎÊÁ´Â·£¬ÈçÒÔÌ«Íø£»ËùÒÔ·ÓÉÆ÷
GÈÏΪ·ÓÉÆ÷ HºÍ×Ô¼ºÁ¬ÔÚÒ»Æð£¬¹²Í¬ÔÚÍ¬Ò»Íø¶Î£¬ºÍÒÔÌ«ÍøÒ»Ñù£¬ËùÒÔÓÃ
H×÷ΪÏÂÒ»ÌøµØÖ·¡£ÎªÊ²Ã´Óà H×öÏÂÒ»ÌøÊ§°ÜÄØ£¬ÒòΪ GºÍ HûÓÐ PVCÁ¬½Ó£¬GûÓÐ
2¸ö Layer 2£­to£­Layer 3µØÖ·Ó³É䣬·ÓÉÆ÷ HµÄ ipµØÖ·²»ÄÜÓ³Éäµ½Ö¡ÖмÌÍ·ÖУ¬ÔÚÒÔÌ«ÍøÖУ¬¿ÉÓà MACÀ´Ó³Éä¡£ÔÚÖ¡ÖмÌÖÐÒªÓà DLCIÀ´Ó³Éä IPµØÖ·¡£
 
ÖªµÀÎÊÌâËùÔÚ£¬ÎÒÃÇÀ´ÅäÖÃÒ»Ìõ pvcÓ³Éä
Router_G(config)#int s 0.5 mult
Router_G(config-subif)#frame-relay map ip 170.170.9.8 112 broadcast
Router_G(config-subif)#end
Router_G#
 
ͬÑù£¬ÔÚ·ÓÉÆ÷ HÉÏ£¬ÅäÖÃÒ»ÌõÓ³ÉäÓÃÀ´µ½Â·ÓÉÆ÷ GµÄ 170.170.5.0/24ÍøÂç
Router_H(config-subif)#frame-relay map ip 170.170.9.7 132 broadcast
ÏÖÔÚ pingÒ»ÏÂ
 
Router_G#ping 170.170.14.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 170.170.14.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/52/56 ms
Router_G#
ÏÖÔÚͨÁ˰ɣ¬^_^
ÒÔÉϵÄÎÊÌâ¿´¿´µã¶Ô¶àµãÊÇÈçºÎ½â¾öµÄ
ÔÚ·ÓÉÆ÷ GÉϽ«Ó³Éäµ½ HÉÏÄǸö pvcÈ¥µô
Router_G(config)#int s 0.5 mult
Router_G(config-subif)#no frame-relay map ip 170.170.9.8 112 broadcast
Router_G(config-subif)#end
Router_G#
ͬÑùÈ¥µô HµÄ pvc °´ÅäÖà broadcastµÄ·½·¨ÅäÖÃ³É point-to-multipoint
Router_E(config)#interface serial 1
Router_E(config-if)#ip ospf network point-to-multipoint
Router_E(config-if)#end
Router_E#
 
ÔÚ GºÍ HÉÏÅäÖÃ
interface serial 0.5
ip ospf network point-to-multipoint
ÔÚ·ÓÉÆ÷ GÉÏ ping H µÄ e0¿Ú
Router_G#ping 170.170.14.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 170.170.14.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/28/40 ms
Router_G#
 
 
ÏÖÔÚͨÁË£¬Ã»ÓÐÅäÖà pvcÓ³É䣬ÔõôºÍ¸Õ²Å broadcastÀàÐͲ»Í¬ÄØ£¿
 
¿´¿´Â·Óɱí
Router_G#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 -OSPF external type 2, E -EGP
i -IS-IS, L1 -IS-IS level-1, L2 -IS-IS level-2, * -candidate
default
U - per-user static route, o - ODR
Gateway of last resort is not set
170.170.0.0/16 is variably subnetted, 9 subnets, 2 masks
O 170.170.9.8/32 [110/128] via 170.170.11.6, 01:02:11, Serial0.6
[110/128] via 170.170.9.5, 01:02:11, Serial0.5
O IA 170.170.4.0/24 [110/74] via 170.170.11.6, 01:02:11, Serial0.6
C 170.170.5.0/24 is directly connected, Ethernet0
O IA 170.170.6.0/24 [110/74] via 170.170.11.6, 01:02:11, Serial0.6
[110/74] via 170.170.9.5, 01:02:11, Serial0.5
C 170.170.9.0/24 is directly connected, Serial0.5
O 170.170.10.0/24 [110/128] via 170.170.11.6, 01:02:11, Serial0.6
C 170.170.11.0/24 is directly connected, Serial0.6
O 170.170.9.5/32 [110/64] via 170.170.9.5, 01:02:12, Serial0.5
O 170.170.14.0/24 [110/138] via 170.170.11.6, 01:02:12, Serial0.6
[110/138] via 170.170.9.5, 01:02:12, Serial0.5
µã¶Ô¶àµã»á²úÉúÁÚ¾Ó¼äµÄÖ÷»ú·ÓÉ£¬²»Óý¨Á¢ pvcµÄÓ³Éä¹ØÏµ£¬²¢ÇÒ 170.170.14.0/24µÄÏÂÒ»Ìø¸Ä³É 9.5ÁËÒ²¾ÍÊÇ·ÓÉÆ÷ E¡£
±¾´ÎÊÔÑéÍê±Ï¡£
Lab 5£ºÅäÖà Stub¡¢Totally Stub¡¢NSSA
ÊÔÑéÄ¿µÄ£º
ÒÀ´ÎÅäÖà 3¸öÇøÓò×ܽá¸÷¸öÀàÐ͵ÄÌØµã
ÊÔÑé˼·£º
·ÓÉÆ÷ CÔÚ area 2 ºÍ·ÓÉÆ÷ EÁÚ½Ó£¬EÊÇ ABR£¬½« CÅäÖÃ³É 3¸öÇøÓòÀàÐÍ£¬¹Û²ì·ÓɱíµÄ±ä»¯¡£
ÅäÖãº
Ê×ÏÈÅäÖà EºÍ CµÄ ospf
Router_E:
router ospf 7
network 170.170.2.0 0.0.0.255 area 2
 
Router_C:
router ospf 7
network 170.170.2.0 0.0.0.255 area 2
Õâ¸öÊÔÑé·ÓÉÆ÷ DµÄ 170.170.5.0/24ûÓвÎÓë ospf£¬ÎÒÃÇ¿ÉÒÔÖØ·Ö²¼µ½ ospfÖУ¬ÓÃÃüÁî
Router_D(config)#router ospf 7
Router_D(config-router)#redistribute connected subnets
Router_D(config-router)#end
Router_D#
ÕâÑù·ÓÉÆ÷ D¾Í³ÉÁË ASBR
¿´¿´Â·ÓÉÆ÷ CµÄ·Óɱí
Router_C#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 - OSPF external type 2, E - EGP
i -IS-IS, L1 -IS-IS level-1, L2 -IS-IS level-2, * -candidate
default
U - per-user static route, o - ODR
Gateway of last resort is not set
170.170.0.0/16 is variably subnetted, 12 subnets, 2 masks
O IA 170.170.9.8/32 [110/128] via 170.170.2.5, 02:24:07, Serial0
C 170.170.2.0/24 is directly connected, Serial0
O E2 170.170.3.0/24 [110/20] via 170.170.2.5, 02:24:07, Serial0
O IA 170.170.4.0/24 [110/84] via 170.170.2.5, 02:24:07, Serial0
O IA 170.170.5.0/24 [110/138] via 170.170.2.5, 02:24:07, Serial0
O IA 170.170.6.0/24 [110/74] via 170.170.2.5, 02:24:07, Serial0
O IA 170.170.10.0/24 [110/192] via 170.170.2.5, 02:24:07, Serial0
O IA 170.170.11.0/24 [110/192] via 170.170.2.5, 02:24:07, Serial0
O IA 170.170.9.5/32 [110/64] via 170.170.2.5, 02:24:08, Serial0
O IA 170.170.14.0/24 [110/138] via 170.170.2.5, 02:24:08, Serial0