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

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

iproute0.0.0.00.0.0.0和ipdefult-network區別

2019-11-05 01:09:03
字體:
來源:轉載
供稿:網友

  哪位能說說ip route 0.0.0.0 0.0.0.0和ip default-network命令的區別嗎?
  我所知道的ip route 命令會向路由表里加一條靜態路由,ip default-network命令不會
  ip route 命令按接口和地址指定缺省路由ip default-network命令按網絡指定
  誰能說說還有什么區別?以及在什么情況下使用哪條嗎?還有他們在再發布時的區別!
  FW:發信人: canway()
  整理人: sanjose(2000-09-26 10:54:44), 站內信件
  Q:
  聽了各位解釋,有些明白,可是路由器沒有路由還叫路由器嗎,那樣兩個命令
  
  功能似乎是一樣的,都是把不知道到的包發給下一個站點,可是我在做一個項目
  時,
  設置ip default-gateway就不行。用ip route 0.0.0.0 0.0.0.0 xxxxxxxx
  就通了。 是不是這樣,對于ip default-gateway來說,只有對這個網段才有效,
  而從其他
  網段路由過來的其他網段的信息到了用ip default-gateway的網段就不能利用這
  
  個 命令傳送,而是要用ip route 0.0.0.0 0.0.0.0.了。也就是ip route 0.0.0
  .0
  0.0.0.0才能完成路由功能,不知道理解的對嗎
  
  Answer:
  1。 ip default-gateway用與路由器不作路由時使用,這時路由器就只是一臺主
  機好象Win95PC一樣需要配一個網關才能與外界通信。
  假如 “no ip routing"則路由器就不作路由。這時你可以配bridge-group,把路
  由表及里器當switch使。
  
  2。 ip route 0.0.0.0 0.0.0.0 用于履行路由功能。假如ip routin
  g是enable的則ip default-gateway不起作用.
  
  FW:區別在于,ip route本機生效,ip default-network可以影響整個路由協議域
  http://www.cisco.com/en/US/customer...sHtml#ipnetwork
  FW:IntrodUCtion
  This Tech Note eXPlains how to configure a default route, or gateway of last resort, using the following IP commands: ip default-gateway, ip default-network, and ip route 0.0.0.0 0.0.0.0. Let's look at each of these commands in more detail.
  Before You Begin
  Conventions
  For more information on document conventions, see the Cisco Technical Tips Conventions.
  
  PRerequisites
  There are no specific prerequisites for this document.
  
  Components Used
  This document is not restricted to specific software and hardware versions.
  
  The information presented in this document was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If you are working in a live network, ensure that you understand the potential impact of any command before using it.
  
  ip default-gateway
  The ip default-gateway command differs from the other two commands in that it should only be used when ip routing is disabled on the Cisco router.
  
  For instance, if the router is a host in the IP world, you can use this command to define a default gateway for it. You might also use this command when your low end Cisco router is in boot mode in order to TFTP a Cisco IOS® Software image to the router. In boot mode, the router doesn't have ip routing enabled.
  
  ip default-network
  Unlike the ip default-gateway command, you can use ip default-network when ip routing is enabled on the Cisco router. When you configure ip default-network the router considers routes to that network for installation as the gateway of last resort on the router.
  
  For every network configured with ip default-network, if a router has a route to that network, that route is flagged as a candidate default route. Let's look at the following routing table taken from a Cisco router:
  
  2513#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
  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
  Gateway of last resort is not set
  161.44.0.0 255.255.255.0 is subnetted, 1 subnets
  C 161.44.192.0 is directly connected, Ethernet0
  S 198.10.1.0 [1/0] via 161.44.192.2
  131.108.0.0 255.255.255.0 is subnetted, 1 subnets
  C 131.108.99.0 is directly connected, TokenRing0
  
  
  Note the static route to 198.10.1.0 via 161.44.192.2 and that the gateway of last resort isn't set. If we configure ip default-network 198.10.1.0, the routing table changes to the following:
  
  2513#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
  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
  
  Gateway of last resort is 161.44.192.2 to network 198.10.1.0
  
  161.44.0.0 255.255.255.0 is subnetted, 1 subnets
  C 161.44.192.0 is directly connected, Ethernet0
  S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
  S* 198.10.1.0 [1/0] via 161.44.192.2
  131.108.0.0 255.255.255.0 is subnetted, 1 subnets
  C 131.108.99.0 is directly connected, TokenRing0
  2513#show ip protocols
  2513#
  
  
  We can see the gateway of last resort has now been set as 161.44.192.2. This result is independent of any routing protocol, as shown by the show ip protocols command at the bottom of the output.
  
  We can add another candidate default route simply by configuring another instance of ip default-network:
  
  2513#config terminal
  Enter configuration commands, one per line. End with CNTL/Z.
  2513(config)#ip route 171.70.24.0 255.255.255.0 131.108.99.2
  2513(config)#ip default-network 171.70.24.0
  2513(config)#^Z
  
  2513#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
  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
  
  Gateway of last resort is 161.44.192.2 to network 198.10.1.0
  
  161.44.0.0 255.255.255.0 is subnetted, 1 subnets
  C 161.44.192.0 is directly connected, Ethernet0
  S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
  S* 198.10.1.0 [1/0] via 161.44.192.2
  171.70.0.0 is variably subnetted, 2 subnets, 2 masks
  S 171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
  S 171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
  131.108.0.0 255.255.255.0 is subnetted, 1 subnets
  C 131.108.99.0 is directly connected, TokenRing0
  
  
  Flagging a Default Network
  Note: The ip default-network command is classful, which means if the router has a route to the subnet indicated by this command, it installs the route to the major net. At this point neither network has been flagged as the default network. The ip default-network command must be issued again, using the major net, in order to flag the candidate default route.
  
  2513#config terminal
  Enter configuration commands, one per line. End with CNTL/Z.
  2513(config)#ip default-network 171.70.0.0
  2513(config)#^Z
  
  2513#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
  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
  
  Gateway of last resort is 161.44.192.2 to network 198.10.1.0
  
  161.44.0.0 255.255.255.0 is subnetted, 1 subnets
  C 161.44.192.0 is directly connected, Ethernet0
  S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
  S* 198.10.1.0 [1/0] via 161.44.192.2
  171.70.0.0 is variab


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 泗水县| 岢岚县| 乌恰县| 平安县| 新化县| 九江市| 大兴区| 会东县| 阿鲁科尔沁旗| 保定市| 南康市| 新蔡县| 大竹县| 桂东县| 界首市| 布拖县| 武平县| 临江市| 会同县| 沿河| 双流县| 花垣县| 特克斯县| 迭部县| 海城市| 嘉兴市| 海口市| 民勤县| 克拉玛依市| 福建省| 诸城市| 黎川县| 哈尔滨市| 汝南县| 峨边| 五大连池市| 天峨县| 海淀区| 沛县| 镇坪县| 邯郸市|