一·實驗設備:兩臺Route-PT,兩臺Switch 2950-24, 兩臺PC ,一根Serial DCE線,四根直通線
二·目的:使不同網(wǎng)段下的主機可以互相通信
三·流程
連接如下如圖所示

Serial DCE線連接的是路由器的serial口
R1:
Router>
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#interface fa0/0
R1(config-if)#no shutdown
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#exit
R1(config)#interface serial 0/1/0 //連線要使用 DCE 端,路由器的串行電
纜一端是 DCE 端,另外一端是 DTE 端
R1(config-if)#no shutdown
R1(config-if)#clock rate 64000 //時鐘頻率必須在 DCE 端設置
R1(config-if)#ip address 192.168.5.2 255.255.255.0
R1(config-if)#exit
R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.5.3
(靜態(tài)路由配置命令)
R1#show ip route
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S 192.168.2.0/24 [1/0] via 192.168.5.3
C 192.168.5.0/24 is directly connected, Serial0/1/0
R2:
Router>en
Router#conf t
Router(config)#hostname R2
R2(config)#interface fa0/0
R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#exit網(wǎng)絡技術 路由器靜態(tài)路由的配置 王海峰
R2(config)#interface serial 0/1/0
R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.5.3 255.255.255.0
R1(config-if)#exit
R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.5.2
(靜態(tài)路由配置命令)
R2#show ip route
S 192.168.1.0/24 [1/0] via 192.168.5.2
C 192.168.2.0/24 is directly connected, FastEthernet0/0
C 192.168.5.0/24 is directly connected, Serial0/1/0
測試:
PC>ping 192.168.2.2
Pinging 192.168.2.2 with 32 bytes of data:
Reply from 192.168.2.2: bytes=32 time=141ms TTL=126
Reply from 192.168.2.2: bytes=32 time=156ms TTL=126
Reply from 192.168.2.2: bytes=32 time=156ms TTL=126
Reply from 192.168.2.2: bytes=32 time=157ms TTL=126
Ping statistics for 192.168.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 141ms, Maximum = 157ms, Average = 152ms