Classical IP over ATM (CLIP) 是一种最简单的使用带IP的ATM的方法。这种方法可以用在交换式连接(SVC)和永久连接(PVC)上。这部分描述的就是配置基于PVC的网络。
第一种使用PVC来设置CLIP的方式就是通过专用的PVC让网络里的每一台机子都互连在一起。尽管这样配置起来很简单,但对于数量更多一点的机子来说就有些不切实际了。例如我们有四台机子在网络里,每一台都使用一张ATM适配器卡连接到ATM网络。第一步就是规划IP地址和机子间的ATM连接。我们使用下面的:
为了建造完全交错的网络,我们需要在第一对机子间有一个ATM连接:
机器 | VPI.VCI 对 |
---|---|
hostA - hostB | 0.100 |
hostA - hostC | 0.101 |
hostA - hostD | 0.102 |
hostB - hostC | 0.103 |
hostB - hostD | 0.104 |
hostC - hostD | 0.105 |
在每一个连接端VPI和VCI的值都可能会不同,只是为了简单起见,我们假定它们是一样的。下一步我们需要配置每一个主机上的ATM接口:
hostA# ifconfig hatm0 192.168.173.1 up hostB# ifconfig hatm0 192.168.173.2 up hostC# ifconfig hatm0 192.168.173.3 up hostD# ifconfig hatm0 192.168.173.4 up
假定所有主机上的ATM接口都是hatm0。现在PVC需要配置到hostA上 (我们假定它们都已经配置在了ATM交换机上,至于怎么做的,你就需要参考一下该交换机的手册了)。
hostA# atmconfig natm add 192.168.173.2 hatm0 0 100 llc/snap ubr hostA# atmconfig natm add 192.168.173.3 hatm0 0 101 llc/snap ubr hostA# atmconfig natm add 192.168.173.4 hatm0 0 102 llc/snap ubr hostB# atmconfig natm add 192.168.173.1 hatm0 0 100 llc/snap ubr hostB# atmconfig natm add 192.168.173.3 hatm0 0 103 llc/snap ubr hostB# atmconfig natm add 192.168.173.4 hatm0 0 104 llc/snap ubr hostC# atmconfig natm add 192.168.173.1 hatm0 0 101 llc/snap ubr hostC# atmconfig natm add 192.168.173.2 hatm0 0 103 llc/snap ubr hostC# atmconfig natm add 192.168.173.4 hatm0 0 105 llc/snap ubr hostD# atmconfig natm add 192.168.173.1 hatm0 0 102 llc/snap ubr hostD# atmconfig natm add 192.168.173.2 hatm0 0 104 llc/snap ubr hostD# atmconfig natm add 192.168.173.3 hatm0 0 105 llc/snap ubr
当然,除UBR外其它的通信协定也可让ATM适配器支持这些。此种情况下,通信协定的名字要跟人通信参数后边。工具atmconfig(8)的帮助可以这样得到:
# atmconfig help natm add
或者在atmconfig(8)手册页里得到。
相同的配置也可以通过/etc/rc.conf来完成。对于hostA,看起来就象这样:
network_interfaces="lo0 hatm0" ifconfig_hatm0="inet 192.168.173.1 up" natm_static_routes="hostB hostC hostD" route_hostB="192.168.173.2 hatm0 0 100 llc/snap ubr" route_hostC="192.168.173.3 hatm0 0 101 llc/snap ubr" route_hostD="192.168.173.4 hatm0 0 102 llc/snap ubr"
所有CLIP路由的当前状态可以使用如下命令获得:
hostA# atmconfig natm show