国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 網絡通信 > 正文

IP default-network和靜態路由區別

2020-04-18 12:56:45
字體:
來源:轉載
供稿:網友

  對于一些準備考CCNA和CCNP的人來說,配置一條靜態路由和使用思科的命令IP default-network的區別是一個令人迷惑的地方。

  初一看,他們都是一樣的。結果都是配置一個目的地,使得路由器知道如果一個包在路由表中沒有指定的路由的話,這個包將會被發往何地。

  他們之間的主要區別是:配置一條靜態缺省路由僅是為你在配置的路由器定義一條路由,而ip default-network將通過使用的路由協議進行傳播。

  下面,我們在一個星形網絡(hub-and-spoke network)中來試驗ip default-network命令。R1為中心,R2和R3葉子。他們通過網絡172.12.123.0/24連接起來,而且每臺路由器都根據它的路由器號碼被配置了32位掩碼的LOOPBACK地址(1.1.1.1/32,等等)。路由協議使用RIP協議,LOOPBACK地址在網絡中被廣播。

  R1路由器配置有一個串口,地址為10.1.1.1/24,這個網絡被通過使用命令ip default-network 10.0.0.0命令,配置為一條缺省網絡。它還沒有被RIP廣播。

  接下來,路由協議廣播了這條路由。使用RIP,缺省網絡被廣播為0.0.0.0(如果使用了IGRP,它會顯示網絡號,但是被標識成IGRP的外部路由)。這個路由被指定為R1的一條缺省的路由,正如我們在下面看到的。

R1#show ip route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
R 2.0.0.0/8 [120/1] via 172.12.123.2, 00:00:11, Serial0
R 3.0.0.0/8 [120/1] via 172.12.123.3, 00:00:11, Serial0
172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.12.21.0/30 is directly connected, BRI0
C 172.12.123.0/24 is directly connected, Serial0
* 10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Serial1


  在R2和R3上,缺省的RIP路由也將出現:

R2#show ip route
Gateway of last resort is 172.12.123.1 to network 0.0.0.0

R 1.0.0.0/8 [120/1] via 172.12.123.1, 00:00:00, Serial0.213
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
R 3.0.0.0/8 [120/2] via 172.12.123.1, 00:00:00, Serial0.213
172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.12.21.0/30 is directly connected, BRI0
C 172.12.123.0/24 is directly connected, Serial0.213
R* 0.0.0.0/0 [120/1] via 172.12.123.1, 00:00:00, Serial0.213


R3#show ip route
Gateway of last resort is 172.12.123.1 to network 0.0.0.0

R 1.0.0.0/8 [120/1] via 172.12.123.1, 00:00:27, Serial0.31
R 2.0.0.0/8 [120/2] via 172.12.123.1, 00:00:28, Serial0.31
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
172.12.0.0/24 is subnetted, 1 subnets
C 172.12.123.0 is directly connected, Serial0.31
R* 0.0.0.0/0 [120/1] via 172.12.123.1, 00:00:28, Serial0.31


  所以缺省路由起了使用:如果我們在R2和R3上PING10.1.1.1,即使他們在路由表中沒有配置的路由,他們會使用缺省路由。

R2#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/68 ms

R3#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/68 ms


  當決定是使用缺省路由還是使用default network時,要記信:如果想路由協議廣播這條路由,那么使用default-network命令,否則使用缺省路由就可以了。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 大宁县| 青海省| 渭源县| 柞水县| 镇宁| 搜索| 漳平市| 乌兰察布市| 兴海县| 商城县| 石嘴山市| 孟州市| 册亨县| 高清| 翁牛特旗| 两当县| 六枝特区| 安塞县| 罗城| 塘沽区| 临夏市| 团风县| 微山县| 宁武县| 曲水县| 柘城县| 修文县| 昆山市| 安顺市| 旺苍县| 浮山县| 千阳县| 犍为县| 大英县| 全州县| 呼玛县| 马山县| 家居| 繁昌县| 仪陇县| 怀化市|