多年来,我一直在使用许多Dell PowerConnect交换机configuration,即使他们的configuration控制台非常像IOS,但使用show running-config其打印回来时,也不会以同样的方式pipe理configuration语句。 当我执行了interface range ethernet gX-gY语句时,configuration语句经常为每个接口重复,而其他范围语句则被打印回来,并重复接口语句。 下面的例子。
有没有一种工具可以模拟一个戴尔(或者真的类似IOS的)networking交换机configuration引擎,并打印出一个很好的可读/可扩展版本的configuration文件? 这将与RANCID一起使用 ,尽pipe除了整合configuration之外,我还会保留实时configuration。
如果没有,我可能只写一个。
例如,在我运行的交换机上:
interface range ethernet g1-2 lldp notifications enable lldp med network-policy add 1 interface range ethernet g1-4 switchport mode access interface range ethernet g1-2 switchport access vlan 2 interface ethernet g3 switchport access vlan 3 interface ethernet g4 switchport access vlan 3
当我运行show running-config ,它将保留一些input的语句,其他语句将被打破,并重复一些接口语句,如:
interface range ethernet g1-4 switchport mode access interface ethernet g1 lldp notifications enable interface ethernet g2 lldp notifications enable interface ethernet g1 lldp med network-policy add 1 interface ethernet g2 lldp med network-policy add 1 interface range ethernet g1-2 switchport access vlan 2 interface ethernet g3 switchport access vlan 3 interface ethernet g4 switchport access vlan 3
显然,Dell的交换机会parsing出一些configuration条目,并保留其他条目,并且不会优化交换机configuration的内部表示。 多年来,这些都是分散的,虽然不损害经营业绩,但却难以阅读或diff 。 在一个48端口交换机上,所有端口上都有十几个vlan和几个lldp语句,整个交换机configuration相当混乱。