该表设计目的是存储从IBSS定时下载的用户资料,提供给系统进行帐户与客户资料的匹配使用。
字段说明
该表设计的主键为product_no,各字段含义如下表所示,
字段名称 字段类型 字段含义
[id] [int]
[PRODUCT_NO] [nvarchar] 产品编码;主键
[CUST_NAME] [nvarchar] 用户名称
[CERT_TYPE] [nvarchar] 证件类型
[CERT_NO] [nvarchar] 证件号码
[CONT_MAN] [nvarchar] 联系人名称
[CONT_TEL] [nvarchar] 联系人电话
[DWELL_ADDR] [nvarchar] 联系人地址
[COMM_ADDR] [nvarchar] 通信地址
[USE_STATE] [nvarchar] 产品状态
[STIME] [datetime] 开始使用时间
[ALT_TIME] [datetime] 变更时间
[PROD_ADDR] [nvarchar] 安装地址
[PRODUCT_NO1] [nvarchar] 关联产品
[PROD_TYPE] [int] 产品类型(62是ADSL,66是LAN)
Accmac表
作用
该表设计目的是存储brasdata与switchdata匹配记录的过程表,是随时变化的,该记录是系统进行稽核使用的最终资料,需要定时的自动更新;能提供给设备维护人员使用。
字段说明
该表没有设计主键,各字段含义如下表所示,
字段名称 字段类型 字段含义
[ipacc] [varchar] 帐号与固定ip
[ipacc1] [varchar] 帐号与固定ip
[usermac] [varchar] 用户MAC
[nodename] [varchar] 节点名称
[prod_no1] [varchar] 改装号码
[cust_name] [varchar] 用户名称
[prod_addr] [varchar] 安装地址
[switchip] [varchar] 设备IP
[port] [varchar] 设备端口
[tswitchtype] [varchar] 设备型号
[hcol_code] [varchar] 数据横列编码
[dshcol_seq] [int] 数据横列端子
[hcol_code1] [varchar] 语音横列编码
[vhcol_seq] [int] 语音横列端子
[measure_name] [varchar] 测量室名称
[measure_code] [varchar] 测量室编码
[vlan] [int] 用户对应的brasvlan
[vpi] [int] 用户对应的brasvpi
[vci] [int] 用户对应的brasvci
[svlan] [int] 用户对应的switchdata-vlan
[svpi] [int] 用户对应的switchdata-vpi
[svci] [int] 用户对应的switchdata-vci
[te] [int] Dslam用户对应的端口摸板;LAN用户为-1
[brasip] [varchar] 宽带接入服务器ip
[brasslot] [int] 宽带接入服务器的槽位
[brasport] [int] 宽带接入服务器的端口
[brassubslot] [int] 宽带接入服务器的子槽位
[flag] [int] 处理标志,初始为0
[gettime] [datetime] brasdata的采集时间
记录的处理
brasdata的数据录入
指令集
操作举例(具体见附件一)
①ISN8850
②MA5200G
③MA5200
注意事项
①采集数据录入brasdata的flag均为-1
②Lan用户的te均为-1
序号 操作方式 ISN8850 MA5200G MA5200
1 读取在线设备的IP地址 show arp X 其中x为(6,14),其中ip开头为10的均为设备ip,该项录入facility (1)使用display domain,将结果中type为device的域提取出来,作为设备域;(2)display access-user domain 设备域,则取到的ip及为设备ip; 该项录入facility show vlan static user slot(判断10开头的IP是否有MAC存在); 该项录入facility
2 进行用户帐号与mac匹配 两类操作:(1)show aaa user与show vpdn session X(X为slot号;2,3,4,6,14)同时配合使用,得出拨号用户的帐号与mac的对应关系。方法:使用show aaa user指令时得出用户帐号与cid(第二个“.”后的数字为十进制数)的关系;再使用show vpdn session 6指令可以得出RemMAC与cid(后四位为十六进制)的对应关系;两个cid经过进制转换后形成关联,这样就可以得出用户的帐号与用户MAC的对应关系。(2)使用show arp X(2,6,14)得出固定ip用户与mac槽位的对应关系,上述结果存入brasdata。注意:要使用命令先打开显示详细信息功能show aaa user display-mode detail-info (1)使用display domain,得出在用的域,将得出的数据中online=0的域剔出,剩下的域即为在用的域;(2)使用display access-user domain XXX,将在用的域进行采集,得出mac与帐号(或者ip地址)的匹配关系,结果存入brasdata (1)show connect username ,得出mac与帐号(或者ip地址)的匹配关系,结果存入brasdata(2)show vlan static user slot,得出为固定ip地址的用户,将ip地址,对应brasslot、brasport记录登记入brasdata;(3)与show connect username的结果比较,将ip对应匹配项的mac地址更新入brasdata对应固定ip项内
switchdata的数据录入
通过telnet方式登录交换机设备,采集相关的端口与mac的对应信息并录入swichdata表内。具体:
指令集
设备型号 软件型号 操作指令
MA5300 show mac-address-table
MA5605 show mac-table all与show pvc all配合,通过CID相等关联关系即可找出MAC与端口的对应关系。
MA5600 GG_68Cun_MA5600(config)#diagnose
GG_68Cun_MA5600(diagnose)%%transparent on 0/0
GG_68Cun_MA5600(diagnose)%%co show mac
GG_68Cun_MA5600(diagnose)%%transparent off
UA5000 FengHuangCheng_UA5000-1(config)#show vlan from-vlanid 1
show mac-address-table mac-addr vlan 842
AC7300 登陆大地址(IP):show fdb port
登陆小地址(ATM):RTRV-CRS-VC:XIASHAN-7300:ALL;
ZTE9210 show fdb slot 1(槽号)
Quidway2026 Version 3.10 Quidway# show mac-address-table
Quidway2026 Version 3.10, RELEASE 0022 [Quidway]display mac-address
格林耐特2024M show mac-address-table
格林耐特S3026E show mac-address-table
注意事项
atm上行的DSLAM设备无法进行采集,对应mac与端口关系,其操作在pvc表执行。
Pvc表的数据录入
该表的部分字段数据记录需要手工生成,采用telnet方式从ATM-DSLAM设备读取端口的PVC信息,生成表中从ID至brassubslot的字段;使用指令生成完整PVC表,具体:
匹配switchdata中的记录,将port与switchdata中的port进行对应。指令如下:
update p set p.port=s.port from pvc p,switchdata s where p.switchip=s.switchip and p.source_vpi=s.vpi and p.source_vci=s.vci and p.switchip is not null and p.source_type not in('NMS')
匹配rd_dsl_port的数据,使记录与IBSS的资料对应。指令如下:
update a set a.hcol_code=r.hcol_code,a.dshcol_seq=r.dshcol_seq,a.hcol_code1=r.hcol_code1,a.vhcol_seq=r.vhcol_seq,
a.measure_name=r.measure_name,a.measure_code=r.measure_code from pvc a,rd_dsl_port r where a.switchip=r.switchip and a.port=r.port and a.switchip is not null
用在brasdata表中brasip=222.217.183.6,vpi<>-1的情形,使用该表与accmac记录进行匹配端口,将sink_vpi,sink_vci写入accmac的专门处理atm上行的情况。其中port字段需要与switchdata进行匹配后填入,之后需要与rd_dsl_port进行匹配,该操作集中在存储过程pro_accmac1中,执行之前最好执行一次pro_pvc其之后的字段。
Facility表的数据录入
该表由系统自动生成,之后由系统进行相关的动态更新或者提供给维护人员手工更新密码用户名安装地址的相关信息。具体指令如下:
初始化falicity表,具体指令,
①删除表facility所有数据
delete facility
②将brasdata的设备ip等相关信息填入facility表
insert into facility(switchip,brasip,brasslot,brassubslot,brasport,bvlan,bvpi,bvci,switchmac,lasttime) select ipacc,brasip,brasslot,brassubslot,brasport,vlan,vpi,vci,usermac,gettime from brasdata where ipacc like '10%' order by brasip
③将设置记录的初始状态,更新次数置0
update facility set state=0,upcs=0,lastman=0
④将Ibss的设备资料更新facility的相关字段,保持资料的一致性
update f set f.switchtype=f1.switchtype,f.account=f1.account,f.password=f1.password,f.tswitchtype=f1.tswitchtype from facility f,facility6956 f1 where f.switchip=f1.switchip
⑤将Ibss的设备资料更新facility的相关字段,保持资料的一致性
update f set f.nodename=r.measure_name from facility f,rd_dsl_port r where f.switchip=r.switchip
⑥将Ibss的设备资料更新facility的相关字段,保持资料的一致性
update f set f.nodename=f1.nodename from facility f,facility6956 f1 where f.nodename is null and f.switchip=f1.switchip
⑦将无对应nodename的设备置0,便于进行手工更新
update facility set nodename='0' where nodename is null
系统动态更新表,具体指令:
①基于switchdata表插入facility表内没有的switchip记录
insert into facility(switchip) select Distinct switchip from switchdata where switchip not in(select switchip from facility)
②基于brasdata表插入facility表内新增记录相关的接入服务器属性
update f set f.brasslot=a.brasslot,f.brassubslot=a.brassubslot,f.brasport=a.brasport,f.bvlan=a.vlan,f.bvpi=a.vpi,f.bvci=a.vci,f.switchmac=a.usermac,f.lasttime=a.gettime from facility f,brasdata a where f.switchip=a.ipacc and f.brasslot is null
③将设置记录的初始状态,更新次数置0
update facility set state=0,upcs=0,lastman=0 where state is null
④将Ibss的设备资料更新facility的相关字段,保持资料的一致性
update f set f.switchtype=f1.switchtype,f.account=f1.account,f.password=f1.password,f.tswitchtype=f1.tswitchtype from facility f,facility6956 f1 where f.switchip=f1.switchip and f.switchtype is null
⑤将Ibss的设备资料更新facility的相关字段,保持资料的一致性
update f set f.swaddress=f1.swaddress from facility f,facility070512 f1 where f.switchip=f1.switchip
⑥将Ibss的设备资料更新facility的相关字段,保持资料的一致性
update f set f.nodename=r.measure_name from facility f,rd_dsl_port r where f.switchip=r.switchip and f.nodename is null
⑦将Ibss的设备资料更新facility的相关字段,保持资料的一致性
update f set f.nodename=f1.nodename from facility f,facility6956 f1 where f.nodename is null and f.switchip=f1.switchip
⑧将无对应nodename的设备置0,便于进行手工更新
update facility set nodename='0' where nodename is null
Accmac表的生成
该表由系统自动生成,初始化时生成表,此后进行动态更新,具体为:
初始表
CREATE PROCEDURE pro_accmac
AS
①判断临时表是否存在,存在删除
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[accmac]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[accmac]
②创建临时表
create table accmac
(
ipacc varchar(100), --帐号与固定ip
ipacc1 varchar(100), --帐号与固定ip
usermac varchar(100), --用户的mac地址
nodename varchar(100),--节点名称
prod_no1 varchar(100),--改装号码
cust_name varchar(100),--改装号码
prod_addr varchar(150),--装机地址
switchip varchar(20), --接入的交换机ip
port varchar(20), --接入的设备物理端口
tswitchtype varchar(50), --接入的设备物理端口
hcol_code varchar(100),--数据横列
dshcol_seq int,--数据端子
hcol_code1 varchar(100),--语音横列
vhcol_seq int,--语音端子
宽带端口自动稽核系统的设计及应用(三)由毕业论文网(www.huoyuandh.com)会员上传。