2011 我的这一年

2011,这一年似乎走的太慢,又似乎走的太快,我竟无法一下子回忆起这一年的往事,甚至2010的事情竟也以为是发生在这一年。 记得前年的 2010,我的这一年是在手机上写完的,而今年在office完成我这一年的回忆和总结。

这一年,又进行了一次重大的选择,又进了一步,只是这一步走的有些忐忑,在同事的多番鼓励下方鼓起勇气,不过还好,我已经适应并努力做的更好

这一年,在老家找到了失散多年的初中同学

这一年,我和媳妇变得更忙,不再能像以前一样天天晚上做饭,这很郁闷

这一年,我参加了英语学习班,英语有了进步,还得努力

这一年,中间只回了一次老家

这一年,小侄女上了高中,大哥家的新房入住

这一年,大侄女开始实习了,岁月催人老,于是我知道自己老了

这一年,侄儿和其父母来北京旅游了一番,这是他第一次来北京,感慨说:北京就是北京。好吧。。。。。确实北京就是北京

这一年,外甥懂事了许多,好好学技术

这一年,北京的房租继续涨

这一年,老家的房子终于收房了,但却不能按时装修,开春尽快装修以便能让父母住进去

这一年,去了一次西安,终于不再欠贷

这一年,父母的身体依旧还好,对于老人来说,保持状态就是最好

这一年,第一次自费旅游了米国西部三个城市,这是我第一次自己给自己花钱旅游,希望2012能够带上老婆去云南

这一年,一个好友到底抢在我前面升级为了爸爸

这一年,到底还是没有执行升级计划。。。。不过已经从国外买了该准备的,明年坚决执行吧

这一年,老婆拿了驾照,申请了工作居住证

这一年,我申请工作居住证失败。。。。。。。汗

这一年,偶尔的波澜之外,归于平静,甚或平淡

这一年,过的些许累,些许浮躁,些许麻木

去年我说解决英语问题,释放压力。英语解决了一些,却还需努力;而压力,似乎我已经能淡然处之,虽不能处处次次淡然

2012, 加油在现有岗位上再出成绩!锻炼身体,坚定执行升级计划!2012让生活质量能有较大改善

V11新功能预览<个人版>

GUI-system下新增的文件管理,可管理data-group,证书,外部monitor脚本,实际存储位置是/config/filestore/files_d/Common_d

raid管理可以在GUI界面操作了

增加了磁盘使用情况的图形化显示

V11 的3A 组role映射可以在GUI界面操作了 而不用像以前那样必须用命令配置

GUI界面增加不同用户组对log内容的访问控制

新增tunnel功能,可配置ppp, gre,ipip,etherip,wccp-gre

新增IPSEC VPN功能(ESP, site2site,支持tunnel/transport/isession using tunnel) http://www.cnadn.net/post/109.html

ASM的CSRF配置支持wildcards  url list

ASM界面更友好

可以基于VS关闭autolast hop功能

新增 AVR-analytics (application visibility and reporter)profile 在VS的Application Monitoring Profile处调用

http profile 中的ramcache部分被单独提取为web acceleration profile

http profile中的 compression部分被单独提取为http compression profile, 多出 “Selective Compression”选项

VS新增NAT64 ,实现IPV6访问VS后自动转换为v4访问后台server。(http://en.wikipedia.org/wiki/IPv6_transition_mechanisms#NAT64)

新增DNS express功能

内置几十个快速应用部署模板 并可以支持自定义模板(自定义模板需要些很多脚本,看上去有些复杂) ,然后可以通过iapp的app service的快速部署生成配置,并可以展开该

tmsh 新增asm相关基本命令,并不全

b load ,b base load, b save命令被取消(其他尚未测试)改用tmsh命令

bigip_sys.conf文件在v11中被取消,内容被移植到bigip_base.conf里

新增 bigip_user.conf  放置用户配置

新增bigip_script.conf 放置 iapp中app service中的对象的components内容

route domain tips

parent RD 和其 sub RD之间的关系是:

1只能Sub RD查找parent RD的路由, parent RD 不能查找和使用sub-RD的路由

2.两个RD之间有上下关系意味着上级RD中的路由可以引用其sub-RD的资源(下一跳),是否意味sub-RD也可以引用parent RD的资源呢(待测)?

3.parent RD 和sub RD之间会自动取消 strict isolation。

PC(172.16.20.30)——-(172.16.20.254)-F5-(10.0.0.100)———–(10.0.0.254)-Router-(20.0.0.254)———PC(20.0.0.123)

|———————Route domain 0————-||——————————Route domain 10——————————–|

上述这样的一个结构中,如果希望两个PC能够相互PING通,需要如下配置:

1.两个vlan,vlan 1, vlan 2

2.新增route domain 10,并将vlan2关联到RD10

3. vlan1 selfip : 172.16.20.254, vlan2 self ip 10.0.0.100%10

4. 路由方案一:给route domain 0  配置缺省路由 :default route with resource 10.0.0.254%10

方案二:给route domain 0 配置 20.0.0.0/24 with resource 10.0.0.254%10  (注意这里跨RD引用资源),同时给route domain 10 配置 20.0.0.0:%10 with resource 10.0.0.254%10

5.配置两个全0 forwarding vs, 一个是 0.0.0.0 一个是0.0.0.0%10

6.将route domain 10 选择route domain 0 为其 parent RD , 是否勾选strcit isolation无所谓。

APM configurations tips. Updating.

更新中。。。。。未完

1.APM的一个VS只能关联一种类型的access profile,要么是network access profile,要么是web application profile,要么是web access management profile。
VS如果关联的是network access类型的profile,那就必须也关联connectivity profile。
VS如果关联的是WEB application类型的profile,那就必须关联rewrite profile。
VS可以同时关联connectivity profile 和 rewrite profile 但是由于一个access policy只能配置其中一种资源,所以实际无意义。
每一个profile 都只关联一个access policy。
每一个access policy只能包含一种resource 类型。
每一个access policy只能包含一种webtop,且 webtop必须和resource类型匹配。

2.对于web application类型配置

在配置web application resource( web application list) 时候,可以配置多个resource,每个resource里有可以配置多个resource item。 resource 和resource item都可以排序(排序功能??作用?)

事实上无论后台的实际web application是否作为资源配置在APM上,用户通过浏览器界面上出现的F5 tab条都可以输入内部资源访问地址。将不同的资源配置到APM上的意义在于为每个资源配置其独立的属性:
–是否压缩
–是否缓存
–是否显示tab条
–是否session超时控制
–是否SSO
–是否记录log

独立的资源属性一个更重要的方面是给不同应用关联其对应的SSO,由于不同的application需要定义不同类型的WEB SSO。此时需要特别注意在资源属性里关于Destination 和 paths配置是必须要能match上要进行SSO的application的。例如如果你的path定义的是/ABC/*那么/123/path下的资源就不能使用被关联的SSO PROFILE,且Destination也一定要和默认的webtop的起始URI一致(准确的说是IP或者host头一致)或者和 在F5 tab中输入的URI一致,否则APM不能自动调用关联的SSO。

但访问的URI满足可以调用SSO profile的条件,也不代表就要触发SSO,必须在SSO PROFILE里配置触发的URI,这样当用户点击这个触发的URI时候APM才会真正自动帮助SSO。

如果访问的是/ABC/资源,但是SSO触发的路径是/123/的话,或者要执行登录的程序压根就是另外一个domain 怎么办? (理论上应该用*这种通配符去匹配资源和SSO触发路径,然后在SSO PROFILE里设置触发URI)

(未定义的资源的属性遵循系统内置的缺省设置)

当对资源设置启是否启用压缩时功能的前提是VS的http profile要打开压缩功能,否则无效。当这里设置为启用压缩时候,APM对jpg图片依然执行压缩动作(问题1)。 当资源设置中的压缩控制和http profile中压缩控制冲突时以资源设置为准。

rewrite profile中的start URI是指的拨入VPN后的默认应用页面,也是F5 tab上的“主页”按钮所指应用。

如何处理web中的外部链接,如果APM也将这些链接替换为APM VS地址则会导致外部链接无法打开。 (问题2)

3. 对于network access类型

定义network access 资源的时候有开关选择是否压缩,具体的压缩设置则在connectivity profile里设置。

dnssec on win7 with NRPT

Wow, the response to Windows 7 so far has been fantastic!  PDC and WinHEC are over, the world has had a chance to finally get a preview of what we’ve been working on for over a year, and it is immensely satisfying to see such positive feedback.

Now let’s start talking about the different pieces of DNSSEC in Windows 7.  Let’s begin with the DNS client since I think it would be easier to digest to start off with.

So in my last blog post, I used a rather gory term to describe the DNS client in Windows 7.  I said it is a “non-validating security-aware stub-resolver”. It may sound scary, but if you look at it carefully, it is rather self-explanatory.  Still, let me help you understand this a bit better.

In a nutshell, what this means is that the DNS client will not perform DNSSEC validation on its own.  The client relies on its configured DNS server to perform validation on its behalf.  One positive side-effect of this is that Trust Anchors do not need to be configured on the clients, thus saving a big chunk of the deployment burden.  It is however security-aware, so it will expect the configured DNS server to indicate results of the validation when returning the response.  This is done so by setting the “AD” bit in the response.  If the DNS server failed to validate successfully (indicated by the AD bit not being set in the response), the DNS client will fail the query.

The security-aware behavior of the client is not a binary on/off.  It is a policy based mechanism whereby the “Name Resolution Policy Table” will tell the client on which domains it is to expect DNSSEC.  Only for those domains will the DNS client set the DO bit in the query and expect the AD bit in the response.  The Name Resolution Policy Table (or NRPT for short) is a table of settings and configuration which defines the DNS client’s behavior when sending out queries and tells it what to do when receiving responses.  The NRPT contains settings that pertain to DNSSEC as well as another new Windows 7 technology known as Direct Access.  I won’t go into Direct Access here though.

Let’s look at an example of the NRPT.  Below are a couple of rules in the table.  Note that I have simplified the table contents a little for illustration purposes.

Namespace DNSSEC validation Last hop – IPsec IPsec encryption level
*.example.com Set DO bit; Expect server to validate Secure last hop with IPsec High encryption
*.foo.example.com Don’t set DO bit; don’t expect server to validate Don’t secure last hop with IPsec n/a

So, rule 1 (*.example.com) applies to the example.com domain and all its subdomains.  If an application passes in a query such as www.example.com to the DNS client, that query will match this rule in the NRPT.  The rule then says that the DNS client must set the DO bit when issuing the query and check for the AD bit in the response.  The rule also says it must use IPsec when issuing this query to the DNS server.  And that’s exactly what the DNS client will do in this case.

Rule 2 is what we’d call an “exception”.  If you look at the namespaces for rule 1 and rule 2, foo.example.com is a subdomain of example.com, hence the rule for example.com would apply to queries for foo.example.com as well.  However, because a more specific rule is present in the table, any query under *.foo.example.com will match rule 2 and not rule 1.  Rule 2 says no DNSSEC, hence the DNS client won’t set the DO bit, won’t look for the AD bit in the response and won’t use IPsec either.  (Note that the above is what you’d do when you have a signed-to-unsigned delegation).

And there you have it…that in a nutshell is the DNS client’s behavior with respect to IPsec.

Simulating WAN network delay

Simulating WAN network delay

Motivation

When testing the version of AutoFS from RHEL-3, Update 4 in a global WAN environment I discovered an interesting bug. When logged into a client machine in London, every now & attempts to access a mount from an NFS server in Boston would fail perhaps 25% of the time. The server was clearly online, since mounts from other clients would work fine, and there were no obvious errors in the logs from either the client or server. After a little more testing I discovered that mounts between London and LA would fail 100% reliably [sic]. This led me to believe that there was some part of the AutoFS mount process which was sensitive to network round trip time. Sure enough, there was a piece of code which checked for ‘livliness’ of the server by sending an RPC ping and had a fixed timeout of 100ms. Well on my particuarly WAN, ping times between London and Boston were 100ms +/- 5ms – no wonder it failed seemingly at random. Once identified the bug itself was trivially fixable by letting the code fallback to a longer timeout, if no server being tested had replied within the short timeout. I then got on to thinking about how you might build a system under which AutoFS could be reliably tested in a lab, without requiring co-location of part of the system half-way around the globe.

Planned solution

The obvious solution is to figure out a way to introduce arbitrary network packet delay between two hosts on the same subnet. I considered two possibilities

  1. Setup a virtual interface on one of the hosts using the tun driver, and have the usre space daemon processing it queue up packets for Xms before sending them out. A few routing table entries and IPtables rules could then be used to redirect traffic on eth0 via the take tun0 interface.
  2. Use the IPtables QUEUE target to intercept traffic on the actual network interface, redirecting to a userspace program to delay them

In the end I chose the second one since it seem to potentially require less work to implement and setup.

Implementation

CPAN has a Perl module IPQueue.pm which backends onto the libipq.so library which is part of IPTable codebase. With this, the Perl userspace daemon becomes obscenely easy to write. In pseudo-code

forever
  foreach queued packet
     if queue time > requested delay
        accept packet

  wait for an incoming packet

  add packet to queue

The actual code is in the script delay-net.pl.

Running it

The first task is to load up the neccessary iptables kernel modules

modprobe iptable_filter
modprobe ip_queue
modprobe ipt_ttl

Now start the daemon – its important we do this before adding the IPTables rules to QUEUE traffic, otherwise you’ll potentially lock yourself out of the machine! It takes the number of milliseconds delay its only command line argument, so lets delay for 300 milliseconds

./delay-net.pl 300

Then add a rule to redirect incoming traffic from either the entire network, or better, from a particular host.

iptables -A INPUT --source 192.168.16.4 -j QUEUE

If you now run ‘ping’ from the host mentioned in the iptables rule, you should see an nice (approximate) 300ms delay.

Downloads

For convenience here are downloads of the various packages required to run on a RHEL-3 system