網路拓撲圖:
p.s.:所有掩碼:255.255.255.0
pc配置:
host a : ip:10.0.0.2 gw:10.0.0.1
host b : ip:10.0.1.2 gw:10.0.1.1
host c : ip:10.0.4.2 gw:10.0.4.1
路由器基本配置:
router a:
[a]int e0
[a-enternet0/0]ip addr 10.0.0.1 255.255.255.0
[a-enternet0/0]undo shut
[a-enternet0/0]int s1
[a-serial0/1]clock rate 64000
[a-serial0/1]ip addr 10.0.2.1 255.255.255.0
[a-serial0/1]undo shut
[a-serial0/1]quit
router b:
[b]int e0
[b-enternet0/0]ip addr 10.0.1.2 255.255.255.0
[b-enternet0/0]undo shut
[b-enternet0/0]int s0
[b-serial0/0]clock rate 64000
[b-serial0/0]ip addr 10.0.2.2 255.255.255.0
[b-serial0/0]undo shut
[b-serial0/0]int s1
[b-serial0/1]clock rate 64000
[b-serial0/1]ip addr 10.0.3.1 255.255.255.0
[b-serial0/1]undo shut
[b-serial0/1]quit
route c:
[c]int e0
[c-enternet0/0]ip addr 10.0.4.2 255.255.255.0
[c-enternet0/0]undo shut
[c-enternet0/0]int s0
[c-serial0/0]clock rate 64000
[c-serial0/0]ip addr 10.0.3.2 255.255.255.0
[c-serial0/0]undo shut
[c-serial0/0]quit
路由的配置:
route b:
[b]ip route-static 10.0.4.0 255.255.255.0 10.0.3.2
//指定路由器b傳送到10.0.4.0網段的資料由10.0.3.2處理
[b]ip route-static 10.0.0.0 255.255.255.0 10.0.2.1
route a:
[a]ip route-static 10.0.4.0 255.255.255.0 10.0.2.2
[a]ip route-static 10.0.3.0 255.255.255.0 10.0.2.2
[a]ip route-static 10.0.1.0 255.255.255.0 10.0.2.2
route c:
[c]ip route-static 10.0.0.0 255.255.255.0 10.0.3.1
[c]ip route-static 10.0.2.0 255.255.255.0 10.0.3.1
[c]ip route-static 10.0.1.0 255.255.255.0 10.0.3.1
實驗結果:
各網段互通~!
HCL 配置靜態路由例項
1 將pc 1連線r1路由的ge 0 0介面新增閘道器ip 192.168.1.1 24 將r1路由的ge 0 1 介面新增閘道器ip 192.168.10.1 24 r1配置 r1 inte ce gigabitethernet 0 0 r1 gigabitethernet0 0 ip add 1...
靜態黑洞路由例項
黑洞路由 主要是指指向null介面的路由,null介面是乙個虛擬的介面 無法被配置ip位址,到該介面上的資料報都會被丟掉,所以對於所 有可能因為中斷故障產生路由迴路的路由都加上一條黑洞路由。例如在配置有預設路由的環境中如果該路由器中的某乙個路由項因為故障 中斷,那麼很可能在兩個路由器中造成路由環路 ...
靜態路由與動態路由概念及例項
靜態路由 靜態路由是指由網路管理員手工配置的路由資訊。當網路的拓撲結構或鏈路的狀態發生變化時,網路管理員需要手工去修改路由表 中相關的靜態路由資訊。靜態路由資訊在預設情況下是私有的,不會傳遞給其他的路由器。當然,網管員也可以通過對路由器進行設定使之成為共享的。靜態路由一 般適用於比較簡單的網路環境,...