??? //實現:通過配置動態(tài)路由協議OSPF學習產生路由。
??? //環(huán)境:
??? CISCO 3560
??? Router01
??? Router02
??? VLAN2-PC01
??? PC02
??? //拓撲:如圖(110422-路由器OSPF動態(tài)路由配置)
???? ?
??? //配置CISCO 3560
??? CISCO 3560>enable
??? CISCO 3560#configure terminal
??? CISCO 3560(config)#vlan 2
??? CISCO 3560(config-vlan)#exit
??? CISCO 3560(config)#vlan 3
??? CISCO 3560(config-vlan)#exit
??? CISCO 3560(config)#interface fastEthernet 0/1
??? CISCO 3560(config-if)#switchport access vlan 2
??? CISCO 3560(config-if)#exit
??? CISCO 3560(config)#inter fastEthernet 0/24
??? CISCO 3560(config-if)#switchport access vlan 3
??? CISCO 3560(config-if)#exit
??? CISCO 3560(config)#interface vlan 2
??? CISCO 3560(config-if)#ip address 192.168.1.1 255.255.255.0
??? CISCO 3560(config-if)#no shutdown
??? CISCO 3560(config-if)#exit
??? CISCO 3560(config)#interface vlan 3
??? CISCO 3560(config-if)#ip address 192.168.3.1 255.255.255.0
??? CISCO 3560(config-if)#no shutdown
??? CISCO 3560(config-if)#exit
??? CISCO 3560(config)#router ospf 1???? //進入OSPf視圖
??? CISCO 3560(config-router)#network 192.168.1.0 0.0.0.255 area 0??? //發(fā)布直連路由
??? CISCO 3560(config-router)#network 192.168.3.0 0.0.0.255 area 0
??? CISCO 3560(config-router)#end
??? CISCO 3560#write
??? CISCO 3560#show vlan
??? CISCO 3560#show ip router[nextpage]
??? //配置Router01
??? Router01>enable
??? Router01#configure terminal
??? Router01(config)#interface fastEthernet 1/0
??? Router01(config-if)#no shutdown
??? Router01(config-if)#ip address 192.168.3.2 255.255.255.0
??? Router01(config-if)#exit
??? Router01(config)#interface serial 2/0
??? Router01(config-if)#ip address 192.168.4.1 255.255.255.0
??? Router01(config-if)#clock rate 64000
??? Router01(config-if)#no shutdown
??? Router01(config-if)#exit
??? Router01(config)#router ospf 1
??? Router01(config-router)#network 192.168.3.0 0.0.0.255 area 0
??? Router01(config-router)#network 192.168.4.0 0.0.0.255 area 0
??? Router01(config-router)#end
??? Router01#write
??? //配置Router02
??? Router02>enable
??? Router02#configure terminal
??? Router02(config)#interface fastEthernet 1/0
??? Router02(config-if)#no shutdown
??? Router02(config-if)#ip address 192.168.2.1 255.255.255.0
??? Router02(config-if)#exit
??? Router02(config)#interface serial 2/0
??? Router02(config-if)#ip address 192.168.4.2 255.255.255.0
??? Router02(config-if)#no shutdown
??? Router02(config-if)#exit
??? Router02(config)#router ospf 1
??? Router02(config-router)#network 192.168.2.0 0.0.0.255 area 0
??? Router02(config-router)#network 192.168.4.0 0.0.0.255 area 0
??? Router02(config-router)#end
??? Router02#write
??? Router02#show ip router
??? //測試:(終端計算機)
??? VLAN2-PC01>ping 192.168.2.101
??? Pinging 192.168.2.101 with 32 bytes of data:
??? Reply from 192.168.2.101: bytes=32 time=23ms TTL=125
??? Reply from 192.168.2.101: bytes=32 time=16ms TTL=125
??? Ping statistics for 192.168.2.101:
??? Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
??? Approximate round trip times in milli-seconds:
??? Minimum = 16ms, Maximum = 23ms, Average = 19ms
??? Control-C
關鍵詞標簽:路由器,OSPF
相關閱讀
熱門文章 路由器地址大全-各品牌路由設置地址 各品牌的ADSL與路由器出廠默認IP、帳號、密碼 Nslookup命令詳解-域名DNS診斷 站長裝備:十大網站管理員服務器工具軟件
人氣排行 各品牌的ADSL與路由器出廠默認IP、帳號、密碼 路由器地址大全-各品牌路由設置地址 騰達路由器怎么設置?騰達路由器設置教程 ADSL雙線負載均衡設置詳細圖文教程 路由表說明(詳解route print) Nslookup命令詳解-域名DNS診斷 網管員實際工作的一天 網管必會!了解交換機控制端口流量