免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7080 | 回复: 6
打印 上一主题 下一主题

ip route 和ip default-gateway的区别 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-04-26 14:07 |只看该作者 |倒序浏览
在cisci-3550中
ip route 0.0.0.0 0.0.0.0 200.1.1.2 和ip default-gateway 200.1.1.2的区别 ,他们用于的环境有什么不同

以下是我在cisco网站上截取的,但是看不明白,请指点一下(cisco3550-emi)
http://www.cisco.com/en/US/tech/tk389/tk815/technologies_configuration_example09186a008019e74e.shtml

From the diagram in the Task section, note that the IP address of the default router is 200.1.1.2. If the switch receives a packet for a network not in the routing table, it forwards it to the default gateway for further processing. From the switch, verify that you can ping the default router.

Note: The ip default-gateway command is used to specify the default gateway when routing is not enabled. However, in this case, routing is enabled (from step 1). Therefore, the ip default-gateway command is unnecessary

论坛徽章:
0
2 [报告]
发表于 2005-04-26 14:53 |只看该作者

ip route 和ip default-gateway的区别

前者用来设置静态路由,后者设置网关,两者之间还有什么联系吗?

论坛徽章:
0
3 [报告]
发表于 2005-04-26 15:06 |只看该作者

ip route 和ip default-gateway的区别

[quote]原帖由 "xliu"]前者用来设置静态路由,后者设置网关,两者之间还有什么联系吗?[/quote 发表:


也可用这条命令来配置默认路由的.
两者确实存在一定关系的.
比如这条
ip route 172.16.1.0 255.255.255.0 100
这条命令,简单解释就是去往172.16.1.0 255.255.255.0 这个网段
通过下一跳地址192.168.10.0 .当这个地址不在本网段的时候
那么,就得去寻找default-gateway了.

当然这种配置比较特殊
但不能说二者就没关系     

论坛徽章:
0
4 [报告]
发表于 2005-04-26 16:02 |只看该作者

ip route 和ip default-gateway的区别

排除这种特殊的情况,还有别的什么联系吗?

论坛徽章:
0
5 [报告]
发表于 2005-04-27 10:06 |只看该作者

ip route 和ip default-gateway的区别

在L3交换机上使用ip routing命令启用ip路由后,default-gateway命令失效。简单点说,default-gateway命令工作在2层,ip route 命令工作在3层

论坛徽章:
0
6 [报告]
发表于 2005-04-27 16:39 |只看该作者

ip route 和ip default-gateway的区别

谢谢楼上的,受教了!

论坛徽章:
0
7 [报告]
发表于 2005-04-27 16:52 |只看该作者

ip route 和ip default-gateway的区别

但不是说二层交换机支持default-gateway,实际上,大家都是工作在第三层的,不过在没有启用路由协议之前是采用Default-gateway方式。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP