你的服务端程序是否可以控制主交换机,可以的话可以通过 install 一条 block IP地址的access List实现

解决方案 »

  1.   

    1.Server端读取主交换机的路由表(不知道你们那个交换机是啥牌子的),如果是cisco的,想省事点的话就telnet发个
    show ip route
    2. 遍历路由表,向你的客户端发送心跳(5 min一次)
    3. 你的客户端回复心跳
    4. 服务器端没有收到心跳的IP,向主交换机注册一条access list
    如: ip access list acl1 
         deny xx.xx.xx.xx any
         permit any any
    这代码估计不太好写