一年总结(一) - idle

一年总结(一)

views63 posted @ 2012年4月08日 17:42 in II with tags 为工具所累 工作? sqlite3 , 3793 阅读

离职手续正在办理中,第一份工作就要结束了。尽管我很珍惜这份工作,可公司、领导太过分!一年多来先后做了三个项目,现在还是三个项目同时在做。懒人一个,平时没时间、没心情写总结。就要走了闲来无聊,写点东西打发时间。

PTN 传输、WLAN、7750 路由器,一年多来做的都是粗活没什么技术含量。在 WLAN 上面花的时间比较多,总结就从这个开始吧。

WLAN 的基础知识网上很多,就在此不赘述了『其实是避实就虚……』。AC 的配置方法就我接触到的有两种:思科的 IOS 系纯 CLI,如思科,锐捷等;OEM/OMD 的,如上海贝尔、中兴通讯、三元达等,其实是无锡中太代工软件、阿德里亚(Aruba)硬件,在 Linux 底层上加一个业务平台。其中 IOS 系的,只是看别人操作过,我不会。在中太这套方案中有一个很重要的 sqlite3 数据库:icac_cfg.db,所有在 web 界面配置的数据都存储在这个文件里面。也正是因为这样,通过 web 界面配置的自然也可以通过 sqlite3 数据库配置。通过 web 界面配置,如添加热点等,网上也多的是,在此也不赘述。我就说说网上没看到的,通过 sqlite3 数据库如何配置。

该文件位于 /icac/db/icac_cfg/icac_cfg.db,因为 sqlite3 的位置没有在 Linux 的环境变量中,只能通过 /icac/local/sqlite/bin/sqlite3 /icac/db/icac_cfg/icac_cfg.db 打开。现在只要知道数据库的中各表的结构,剩下要配置什么就是 SQL 的事情了。以添加热点为例,这说这个之前先要知道添加热点的流程:

1.新建 AP 分组。导入 AP 的 MAC 地址及其对应的信道、功率,还应包含 AP 名称、所属热点名称等便于后期维护;

2.新建 WLAN 分组并配置该分组的 AP 参数。包含 SSID、VLAN、认证方式等;

3.分组策略关联。选择创建的 AP 分组,在 WLAN 分组中选择需要关联的 WLAN 分组;

4.WLAN-VLAN 关联。

# AP 分组表的结构,无需多解释,看一下创建 AP 分组表的语句就明白了。

CREATE TABLE ApGroup(
    ApMac           varchar(32)     not null,
    GroupName       varchar(32)     not null,
    Location        varchar(32)     default "",
    ApName          varchar(32)     default "",
    Description     varchar(128)    default "",
    primary key(ApMac)
);

添加记录实例

INSERT INTO ApGroup VALUES('00-17-7b-33-48-57','SXJTJ','松溪交通局','FJNAP-MA-WLAN-AP-SXJTJU-04-001','聚类商业楼宇');

AP 的信道、功率信息是存储在表 ApRadioConfig 中

CREATE TABLE ApRadioConfig(
    ApMac             varchar(32)     not null,
    RadioId               int            not null,
    BGChannel             int            default 0,
    RateSet               int            default 0, --0-auto value*10
    PowerCfgType          int            default 0, --0-auto switch 1-% 2-value
    PowerSet              int            default 0, --
    RadioType             int            default 5, --1-11b  2-11a 4-11g 8-11n
    RfSwitch              int            default 0, --0-enable 1-disable
    RateSet11n            int            default 0, --0,1-16
    SpatialMultiplexing   int            default 1, --1-1X1 2-2X2
    AMPDU                 int            default 0, --0-disable 1-enable
    ChannelBandwidth      int            default 0, --0-20MHz 1-auto 2-40- MHz 3-40+ MHz
    ShortGI               int            default 0, --0-Long(800us) 1-Short(400us)
    GreenfieldMixed       int            default 0, --0-Mixed 1-Greenfield
    AMSDU                 int            default 0, --0-disable 1-enable
    primary key(ApMac,RadioId)
);

实例

INSERT INTO ApRadioConfig VALUES('00-17-7b-33-48-57',1,1,0,1,1000,5,0,0,1,0,0,0,0,0);

# 创建 WLAN 分组
表结构

CREATE TABLE WlanGroup(
    WlanGroupId     int             not null,
    WlanGroupName   varchar(32)     not null,
    primary key(WlanGroupId)
);

实例

INSERT INTO WlanGroup VALUES(3,'SXJTJ');

WLAN 分组配置存储在表 WlanCfg 中

CREATE TABLE WlanCfg(
    WlanId                    int          not null,
    WlanGroupId               int          not null,
    WlanServiceIfIndex        int          default 0,
    MacType                   int          default 0,
    TunnelMode                int          default 0,
    SecurityMode              int          default 0,
    SecuConfigIndex           int          default 0,
    Ssid                      varchar(32)  default "",
    HideSsid                  int          default 0,
    VlanID                    int          default 0,
    QosLevel                  int          default 0,
    MaxUserNum                int          default 0,
    ConfigFlag                int          default 0,
    MacAclPolicy              int          default 0, --0:open,1:white,2:black
    MaxTraffic                int          default 0, --add  down traffic
    UserMaxTraffic            int          default 0, --add  down traffic
    MaxSsidUpTraffic          int          default 0, --add, up traffic
    MaxUserUpTraffic          int          default 0, --add, up traffic
    TrafficLimitType          int          default 0, --流量控制方式
    TransmitType              int          default 1, --接入转发方式
    primary key(WlanId, WlanGroupId)
);

实例

INSERT INTO WlanCfg VALUES(1,3,0,0,0,1,0,'CMCC',0,3843,0,20,1,0,0,0,0,0,0,0);

# 分组策略关联
表结构

CREATE TABLE GroupPolicy(
    ApGroupName           varchar(32)     not null,
    WlanGroupId           int             default 0,
    TimeLimitGrpId        int             default 0,
    primary key(ApGroupName)
);

注意该表的记录已经在前面的操作中自动创建,所以只需对其中的记录需改。

update GroupPolicy set WlanGroupId='3' where ApGroupName='SXJTJ';

# WLAN-VLAN 关联
表结构

CREATE TABLE WlanPortTable(
    WlanGroupId    int             not null,
    WlanId         int             not null,
    VlanId         int             default 0,
    Port           int             default 0,
    StackVlanId    int             default 0,
    Primary key(WlanId, WlanGroupId)
);

实例

INSERT INTO WlanPortTable VALUES(3,1,3843,0,0);

至此,热点添加完毕。

有 web 界面为何还要用 CLI 呢?效率!例如,某天运营商说要把每个热点的最大用户数从 32 改成 20 了,这时 web 界面就只能一个个热点去改,而用 CLI 只需一句

update WlanCfg set MaxUserNum='20' where MaxUserNum='32';

当然同样基于效率方面的考虑,新建 AP 分组通过 web 界面导入 csv 表格会快很多。其它的配置只要看一下对应的表结构就可以了,无需多言。下一次写 WLAN 组网方式或者就此不再写了。

views63 说:
2012年4月09日 12:57

@Garfileo: 还没着落。在这里资料都是挤牙膏似的要来的,大部分还是没用的。可以通过数据库操作还是我偶然发现的,生命都消耗发现别人造好的轮子上!

towry 说:
2012年5月08日 23:27

和SQL无两样啊,以后我也得学学网络通信方面的东西。

Avatar_small
views63 说:
2012年5月09日 02:20

@towry:就是 SQL 的语法……

Avatar_small
Nob0dy 说:
2012年12月24日 00:17

怎么样?现在做神马工作了?

Avatar_small
views63 说:
2012年12月29日 21:40

@Nob0dy: 转行比想象中的难,运维和网络工程师都去面试过,被刷了,现在在电脑城打杂……不好意思,最近有点忙,不常来看这边

Nob0dy 说:
2013年1月04日 21:01

我觉得还是网络比较容易转过去,继续找网络工程师的工作啊,至少你之前做的是和网络相关的,运维要求也是有点高的……

Avatar_small
views63 说:
2013年1月05日 20:02

@Nob0dy: 是的,相对来说转网络更容易一些。现在基础太差,不管哪个都得提升一下自己的能力才可以,自学或者参加培训

我为卿狂 说:
2014年1月28日 22:23

人的潜力都是被逼出来的,很多知识大学学的没用上,毕了业还是要继续学的。学无止境。

views63 说:
2014年1月29日 09:42

@我为卿狂: 后文是,我居然在电子城一做就是一年多。老板生意惨淡,现状何去何从又是问题了。

jackjohnny 说:
2021年6月28日 18:04

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. voyance-telephone-gaia.com

AP SSC History Model 说:
2022年9月15日 23:05

History can guide learners to see trends and processes from a broader, holistic perspective and to understand them. Through History, they come into contact with other cultures and societies and in this way they gain a more holistic understanding of the contemporary world and their place in this broader context. Telugu Medium, AP SSC History Model Paper English Medium & Urdu Medium Students of the State Board can download the AP 10th History Model Paper 2023 Pdf with Answers designed based on the revised syllabus and curriculum of the course. Class teachers and leading institutional experts are designed and suggested the Part-A, Part-B, Part-C, and Part-D exams like SA-1, SA-2, FA-1, FA-2, FA-3, FA-4 along with Assignments.

seo service london 说:
2023年11月06日 20:22

Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share. This is a great article thanks for sharing this informative information.

스타벳 이벤트 说:
2023年11月09日 14:15

Your post offers confirmed beneficial to me personally. It’s very informative and you’re simply certainly extremely knowledgeable in this region. You have opened up my eye to be able to various views on this particular matter together with interesting and strong content.

메이저사이트 说:
2023年11月09日 14:26

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusi

세콤도메인주소 说:
2023年11月09日 14:48

Fantastic beat ! I would like to apprentice at the same time as you amend your web site, how can i subscribe for a blog web site? The account aided me a acceptable deal. I were a little bit acquainted of this your broadcast offered brilliant transparent idea|

무지개 도메인 说:
2023年11月09日 15:14

There are a few fascinating points at some point in this post but I do not determine if I see all of them center to heart. There is some validity but I most certainly will take hold opinion until I take a look at it further. Good write-up , thanks so we want much more! Added to FeedBurner also

먹튀검증커뮤니티 说:
2023年11月09日 15:17

This is extremely intriguing substance! I have altogether delighted in perusing your focuses and have arrived at the resolution that you are ideal about a significant number of them. You are extraordinary What a good blog you have here. Please update it more often. This topics is my interest. Thank you. . .

해외라이브배팅 说:
2023年11月09日 15:27

Hi I found your site by mistake when i was searching yahoo for this acne issue, I must say your site is really helpful I also love the design, its amazing!. I don’t have the time at the moment to fully read your site but I have bookmarked it and also add your RSS feeds. I will be back in a day or two. thanks for a great site.

먹튀갤보증업체 说:
2023年11月09日 15:57

"Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first I think this is an enlightening post and it is exceptionally helpful and educated. in this manner. I might want to thank you for the endeavors you have made recorded as a hard copy this article.
"

사설토토사이트 说:
2023年11月09日 15:59

Nice post. I was continuously checking this blog and I am impressed! Extremely useful info particularly the last part .I care for such information much. I was seeking this particular info for a long time. Thank you and good luck That is the amazing piece of writing, Thanks a lot for the purpose of rendering everybody this. Have pos

안전토토사이트 说:
2023年11月09日 16:06

i am out of the blue here. I discovered this board and I in discovering It genuinely supportive and it helped me out a ton. I want to introduce something back and help other people, for example, you helped me I think this is an informative post and it is very useful and knowledgeable. therefore. I would like to thank you for the efforts you have made in writing this article.

토토배너순위 说:
2023年11月09日 16:24

Nice post. I was continuously checking this blog and I am impressed! Extremely useful info particularly the last part .I care for such information much. I was seeking this particular info for a long time. Thank you and good luck That is the amazing piece of writing, Thanks a lot for the purpose of rendering everybody this. Have pos

온라인카지노 说:
2023年11月09日 16:27

I think this is an instructive post and it is extremely valuable and proficient. along these lines, I might want to thank you for the endeavors you have made recorded as a hard copy this article. I love the blog. Great post. It is very true, people must learn how to learn before they can learn. lol i know it sounds funny but its very true. .

검증나라 说:
2023年11月09日 16:42

Excellent post. I was checking continuously this blog and I’m impressed! Very helpful information specially the last part :) I care for such information a lot. I was looking for this certain information for a long time. Thank you and best of luck. 

우리카지노 说:
2023年11月09日 16:46

Confusing information, immense and outlandish structure, as offer especially finished with sharp examinations and thoughts, heaps of striking information and inspiration, the two of which I require, because of offer such an incredible information here

토토어택 이용방법 说:
2023年11月09日 16:54

We are playground guard without advertising agency of Toto site.Please come to Playground Guard and enjoy betting on various sites such as Toto Site Safety Playground and Major Playground.The list of sites posted on our safe playground list is a list of sites where our watchdog has completed currency exchange and betting checks with multiple accounts for at least one month. is.

토토사이트 说:
2023年11月09日 17:05

Nice post. I was continuously checking this blog and I am impressed! Extremely useful info particularly the last part .I care for such information much. I was seeking this particular info for a long time. Thank you and good luck That is the amazing piece of writing, Thanks a lot for the purpose of rendering everybody this. Have pos

วิธีใช้งานคาสิโนออนไ 说:
2023年11月09日 17:13

First off I want to say ex to figure out how to begin. Any ideas or hints? Appreciate it!

먹튀신고 说:
2023年11月09日 17:16

Hey would you mind sharing which blog platform you’re working with? I’m planning to start my own blog soon but I’m having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique. P.S Sorry for getting off-topic but I had to ask!|

먹튀검증 说:
2023年11月09日 17:47

Excellent post. I was checkingng for this certain information for a long time. Thank you and best of luck. 

먹튀폴리스 说:
2023年11月09日 17:48

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.

카지노가입쿠폰 说:
2023年11月09日 18:06

Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first”. Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me.

검증커뮤니티 说:
2023年11月09日 18:11

Your post offers confirmed beneficial to me personally. It’s very informative and you’re simply certainly extremely knowledgeable in this region. You have opened up my eye to be able to various views on this particular matter together with interesting and strong content.

카지노사이트추천 说:
2023年11月09日 18:22

Nice blog right here! Additionally your website loads up fast! What web host are you the use of? Can I get your associate hyperlink in your host? I desire my web site loaded up as quickly as yours I feel a lot more people need to read this, very good info

실시간바카라 说:
2023年11月09日 18:28

In each article on our website, product reviews are always placed real reviews, positive and negative about a particular product, as well as links to authoritative sources, where customer feedback is left and recommendations of doctors, experts and specialists in the field of medicine, cosmetology and pharmaceutics are present

토토사이트추천 说:
2023年11月09日 18:28

Fantastic beat ! I would like to apprentice at the same time as you amend your web site, how can i subscribe for a blog web site? The account aided me a acceptable deal. I were a little bit acquainted of this your broadcast offered brilliant transparent idea|

동행복권로또 说:
2023年11月09日 18:46

There are a few fascinating points at some point in this post but I do not determine if I see all of them center to heart. There is some validity but I most certainly will take hold opinion until I take a look at it further. Good write-up , thanks so we want much more! Added to FeedBurner also

토토사이트검증 说:
2023年11月09日 18:53

Hi I found your site by mistake when i was searching yahoo for this acne issue, I must say your site is really helpful I also love the design, its amazing!. I don’t have the time at the moment to fully read your site but I have bookmarked it and also add your RSS feeds. I will be back in a day or two. thanks for a great site.

토토핫꽁머니 说:
2023年11月09日 18:54

Nice post. I was continuously checking this blog and I am impressed! Extremely useful info particularly the last part .I care for such information much. I was seeking this particular info for a long time. Thank you and good luck That is the amazing piece of writing, Thanks a lot for the purpose of rendering everybody this. Have pos

토토사이트 说:
2023年11月09日 19:19

Nice post. I was continuously checking this blog and I am impressed! Extremely useful info particularly the last part .I care for such information much. I was seeking this particular info for a long time. Thank you and good luck That is the amazing piece of writing, Thanks a lot for the purpose of rendering everybody this. Have pos

꽁나라주소 说:
2023年11月09日 19:23

I definitely enjoying ever contents. Keep up the good work. Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing.

경마사이트특징 说:
2023年11月09日 19:32

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.

토토왕국도메인 说:
2023年11月09日 19:40

Nice blog right here! Additionally your website loads up fast! What web host are you the use of? Can I get your associate hyperlink in your host? I desire my web site loaded up as quickly as yours I feel a lot more people need to read this, very good info

먹튀검증업체 说:
2023年11月09日 19:57

Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first”. Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me.

토블리주소 说:
2023年11月09日 20:15

"I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.Shocking post I should state and appreciative for the information. Bearing is clearly a sticky subject. In any case, is still among the focal subjects of our shot. I respect your post and envision more
"

먹튀신고 说:
2023年11月09日 20:36

I think this is an instructive post and it is extremely valuable and proficient. along these lines, I might want to thank you for the endeavors you have made recorded as a hard copy this article. I love the blog. Great post. It is very true, people must learn how to learn before they can learn. lol i know it sounds funny but its very true. .

먹튀사이트 说:
2024年1月15日 15:37

Hello First time I visite your website. I read some posts I got some good information from your posts. I got quality of work from your website. Now I'm your permanent user many Thanks for your writing

슬롯사이트 说:
2024年1月15日 17:45

Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you includ

먹튀검증 说:
2024年1月15日 18:37

Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing

슬롯사이트 说:
2024年1月15日 19:41

Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers.

ios industrial outdo 说:
2024年1月15日 20:23

I read this article. I think You put a great deal of exertion to make this article. I like your work.

카지노사이트 说:
2024年1月15日 21:00

Thankyou for taking the time to write this it was a great read. Good job!

카지노 说:
2024年1月16日 13:41

I should assert barely that its astounding! The blog is informational also always fabricate amazing entitys.

카지노 说:
2024年1月16日 14:10

Yavoo, I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.

카지노뱅크 说:
2024年1月16日 17:47

"Hi there, after reading this remarkable paragraph i am as well glad
to share my know-how here with colleagues."

seo service london 说:
2024年1月16日 19:14

Thanks again for the article post.Thanks Again. Really Great

온라인 카지노 说:
2024年1月18日 13:59

"This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.

"

토토사이트 说:
2024年1月18日 16:24

Thanks for sharing this product with us I have bookmarked it and I will share it more and I hope it will be beneficial for you.Regards

바카라 사이트 먹튀검증 说:
2024年1月22日 14:03

온라인 카지노 커뮤니티 온카허브 입니다. 온카허브는 카지노 먹튀 사이트들과 안전한 카지노 사이트 정보를 공유하고 있습니다. 카지노 먹튀검증 전문팀을 자체적으로 운영함으로써 철저한 검증을 진행하고 있습니다.

바카라 추천 说:
2024年1月22日 14:48

온라인 카지노 커뮤니티 온카허브 입니다. 온카허브는 카지노 먹튀 사이트들과 안전한 카지노 사이트 정보를 공유하고 있습니다. 카지노 먹튀검증 전문팀을 자체적으로 운영함으로써 철저한 검증을 진행하고 있습니다.

카지노사이트 说:
2024年1月24日 10:12

카지노사이트 바카라사이트 우리카지노 카지노는 바카라, 블랙잭, 룰렛 및 슬롯 등 다양한 게임을 즐기실 수 있는 공간입니다. 게임에서 승리하면 큰 환호와 함께 많은 당첨금을 받을 수 있고, 패배하면 아쉬움과 실망을 느끼게 됩니다.

하노이 가라오케 说:
2024年1月24日 10:32

하노이 꼭 가봐야 할 베스트 업소 추천 안내 및 예약, 하노이 밤문화 에 대해서 정리해 드립니다. 하노이 가라오케, 하노이 마사지, 하노이 풍선바, 하노이 밤문화를 제대로 즐기시기 바랍니다. 하노이 밤문화 베스트 업소 요약 베스트 업소 추천 및 정리.

베트남 유흥 说:
2024年1月25日 12:09

베트남 남성전용 커뮤니티❣️ 베트남 하이에나 에서 베트남 밤문화를 추천하여 드립니다. 베트남 가라오케, 베트남 VIP마사지, 베트남 이발관, 베트남 황제투어 남자라면 꼭 한번은 경험 해 봐야할 화끈한 밤문화로 모시겠습니다. https://vn-hyena.com/

안전놀이터 说:
2024年1月25日 12:20

No.1 먹튀검증 사이트, 먹튀사이트, 검증사이트, 토토사이트, 안전사이트, 메이저사이트, 안전놀이터 정보를 제공하고 있습니다. 먹튀해방으로 여러분들의 자산을 지켜 드리겠습니다. 먹튀검증 전문 커뮤니티 먹튀클린만 믿으세요!!

Coin exchange 说:
2024年6月01日 13:05

The tech-original mission is to help you better understand technology, and make better decisions in the fields of IT, Tech, and Crypto.
https://www.tech-original.com/

Coin exchange 说:
2024年6月07日 16:02

The tech-original mission is to help you better understand technology, and make better decisions in the fields of IT, Tech, and Crypto.
https://www.tech-original.com/


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee