谁说同一个设备不能在两个接口设置一样的IP地址……

可能是由于晚上去游泳的缘故,感觉回到家后头脑清醒了很多,而且睡不着。
看遍了sina sohu之类的网站,觉得内容没什么意思,于是就去翻cisco的文档Embarassed

这几天一直在为一些跨多台设备(L2-L3-L3-L2)的应用犯愁,曾经试图想用MPLS解决问题,可惜设备本身功能有限,不能很好的支持。

在瞎折腾的时候忽然想起了这样一个问题:同一个设备的2个接口故意设置成一样的IP是否可以呢?  折腾之后得到的答案是肯定的——只要对接口分别设定不同的vrf就行了。
3750#sh ip route vrf testtest
Routing Table: testtest
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
       D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
<omitted….>
Gateway of last resort is not set
     172.26.0.0/24 is subnetted, 1 subnets
C       172.26.24.0 is directly connected, Loopback64

3750#sh ip route
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
<omitted….>
Gateway of last resort is 172.26.200.5 to network 0.0.0.0
C       172.26.24.0/24 is directly connected, Vlan624

不过show ip interface brief似乎不能很好的区分interface所对应的vrf,乍一看还以为出问题了呢……
3750#sh ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
Vlan1                  unassigned      YES NVRAM  administratively down down
Vlan624                172.26.24.254   YES NVRAM  up                    up
<omitted….>
Loopback64             172.26.24.254   YES manual up                    up

其实很简单的问题,但是还是记录一下,作为自己开始学习MPLS技术的第一步Tongue out

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据