2009年9月17日 | 分类: 大象杂谈 | 标签: , ,

罗永浩说他看电影常流泪,但文字能让他流泪的不多。接着就推荐了这篇文字。言下之意,这篇文字让傻逼老愤青都热泪盈眶。居于对老罗的一贯盲目信任,我以有了某种心理准备的情绪下阅读了此文,结果,我在这个暴雨的清晨,在办公室里,众目睽睽之下,泣不成声。

一个忘记历史的民族一定不会是一个伟大的民族,忘记过去,意味着背叛。感谢野夫,用如此温润而又让人血脉沸腾的笔触,以一个当事人的立场,向我们还原着那一段可歌可泣的历史往事。

人说乱世莫道儿女情,其实乱世儿女情更深。下笔至此,泪眼迷蒙,请看野夫文字!

——大象无形 【按】

“革命时期”的浪漫

作者:野夫

大理的冬天完全是个无雨之城。初来乍到,我几乎被每天的蓝天丽日烤枯了;许多年来积存在身体内部和心中的潮湿,仿佛正在一点点烘干。人如果不被往事浸润的话,在这个疏世独立的古城,原是有可能坐化成一具精神木乃伊的。

然而,很久不响的电话终于还是惊动了午后的枯坐――我想,在中古时代,这种铃声的旋律,大抵类同于雪夜柴扉的剥啄――多有可能是某位乘兴而过的高 朋,来云中访友了。但我看见屏幕上的来电显示,却是“无法识别”几个令人扫兴的汉字;就像都市中人透过猫眼,窥见门外的一张陌生面孔,多半连迎迓的兴趣也 会丧失。

一瞬间我想起趣友李斯,某次接到一个电话,对方是那种千娇百媚的女声,一听见他那粗哑的牛吼,急忙道歉说――对不起,我打错了。他急中生智赶忙说――也许你并没有错啊,我们何不聊聊?人生有一点美丽错误难道不是同样也愉快吗?女声咯咯的笑了起来,于是电话也就将错就错了。

李斯是我非常心服的知交,一个研究神学的人,常常能从俗世中发现真谛。他喜欢给我灌输一句名言――好运气只会敲一次门――意思就是说你要开门开晚 了,人家就去敲隔壁阿二的门去了。于是,我还是接听了这个来历不明的电话,潜意识似乎也在渴望李斯式的错误;用《简爱》中罗彻斯特先生的话说――是过错而 不是罪过。

80年代末期那个著名的“春夏之交”时,我正好也在南方的一个岛上享受太阳;海边的阳光向来潮润,而那一年,于记忆中则似乎更湿且蒸发着腥味。

我每天下班后,先回陋室脱下警服换上花里胡哨的便衣,然后骑上摩托就往海滩跑――对了,那时我竟然是该市的警察――连我妈都不怎么信。

那时这个国家已经沸腾了。好像除开总理府,从上到下都在同情那些街上的孩子。我过去也曾经是爱上街玩的孩子之一,现在脱下袍子换袈裟,自然就不便去 赶场子了。尽管许多过去的兄弟频频来信相邀,我依旧孤悬海外似的在做逍遥派。当时的形势正好还在喜剧和闹剧之间,绝大多数人都相信,这回恐怕大人要向孩子 赔礼了。于是,我对一些故人戏说:我就不来摘桃子了;万一你们挨打了,我再拿屁股来帮你们接板子。

岛上的孩子们要比大陆的上街晚一月多,于是警察们也就少受些累,我以为。某天我经过一中,看见一群孩子在募捐,那时我工资不够吃喝,心中有感,还是 忍不住塞了些散碎银子到那纸箱中去,以示雷子也是人嘛,天良未泯而已。次日上班,政治处的朋友笑着暗示我――你那点钱请我们喝酒不好?我才知道原来“国 家”并未逍遥如我,他们还是暗中忙着。

五月的黄昏我从海滨归来,只见满街突然人流如潮,往省府门口滚动。我几乎忘了我的职责时,一个头儿看见了旁观的我,严肃的说:快回去换衣服,到省府 集合,你负责陪局长。我急急如律令赶去时,但见红旗开处,两厢人马已然射住阵脚,各自席地而坐,仿佛歌咏比赛。我方对阵的是武警,咱们干警则不用去搞人墙 拔河,只在人群中游弋;我更舒服,当王朝马汉陪首长对话。

当月的流行词还是“对话”。各地都效仿京都,一方鼓噪着要和当家的对话,一方坚决只派宦官出场对话――其实双方皆未弄清到底要对什么鸟话。岛上气候 已经很热,孩子们都是夜里才出来爱国,我们也只好苍蝇陪着蚊子熬夜。等他们的代表和大内的寺人海阔天空“对话”完毕,五更时再派车送孩子们回校,我们才能 回去睡觉。

那时我依旧只是生活中的旁观者,每天颠倒黑白,作为内侍,在省府礼堂的对话室静观风云变幻和世相百态。我知道我心灵的方向,常常又忍不住为双方的愚 蠢而暗自捶胸或者面壁苦笑。其时,我真未意识到我会为这场八不相干的戏剧改变一生;当然,也没想到轰轰烈烈的街头革命正把一场浪漫情感,悄无声息地推进我 的心中。

运动的后期在海岛确实显得有趣而无聊。日复一日的夜坐,革命歌曲回放,然后瞌睡来了就结队往武警的人墙上冲,两厢比赛体力,都不兴出拳脚,顶多从后排往士兵一方扔拖鞋,累了再坐。干警只负责监视大人,谁要在背后演讲鼓动,那还是要请到局子里去的。

岛上当时是所谓的特区之特,“小姐”之多闻名举国。某夜一女士在人群中慷慨激昂,凌晨被密捕回来,一问,是在某桑拿上班的。处长拍案大怒――你一个小姐,你不去好好陪客,你来凑什么热闹?该女士义正辞严――小姐,小姐怎么了?小姐就不许爱国了?处长竟然一时语塞。

我确确乎有些疲倦了。我偶尔不免在想,我那些内地的哥们如果就是在参与这样一场猫捉耗子的游戏,实在也没什么劲道。于是,我开始在人群中用目光“猎艳”,搜寻一些美好的面孔,用以聊销长夜之无奈。

每夜的对话时间,都有记者团的围观――本质上他们也是凑热闹;我从未看见一篇写对话的文章发表出来过。我终于在大群女记者中发现了一张让人记得住的 脸,不,不是脸,但也不是身段。是什么使她吸引了我的眼神呢?我其时的身份使我可以放肆的在一边捉摸。我终于明白了,是整个的“态”。古人说女人之美,最 难描摹者在“态”,我为这个女孩的态弄得几乎忘记了我正身处于一场大历史之中。

准确的说,她并不漂亮,也不高,甚至还偏黑;剪的齐耳短发,不蔓不枝,素面朝天,衣饰也简朴之极――但她就是能从大片的脂粉裙钗中跳跃出来。她得体 地寻找机会采访各色人等,表情清纯,身上透出一种活力。这种态势确实能够打动人,尤其在那时的海岛,她就是一种耐人回味的舒服。

我甲胄在身,不便接近,只能隔着黑压压的愤怒人群远远的爱慕。人的目光有时仿佛一道引线,自会不知不觉中牵起一场缘分――我终于看见她一步一步朝我走来,然后止步,然后用一口纯正的北方话问我:警察同志,我可以采访你一下吗?

当然可以。但我在执勤,我现在不能以我职业的身份回答你;如果你乐意了解我的个人看法,我可以在天亮后无所不谈。――我这样的回答本来就会让记者敏 感,更让她吃惊的是我的外地口音。那时全岛几乎没几个大陆警官,我是建省后第一个去报到的所谓“人材”。于是,谈话由此展开。我来自鄂省,她来自豫地,在 那年的海岛,就自然有种老乡见老乡的亲近了。天亮时,人群散去,她的住地略嫌偏僻,岛上危机四伏,我主动要送她,她跨上了我的摩托,因而也必须要抓紧我的 腰背了。

在早晨潮湿而凉爽的海风中,一个年轻的警察,驮起一份与大革命极不协调的温柔,狂奔于市井巷陌之中。我至今想起那一初始画面,才觉得有些招摇而脸红。

那一段时间仿佛整个国家都在过一个漫长的狂欢节,许多行业都在休假,即使公门衙役的我辈,也都要求白天休息以便夜战――只有政保处的稍微忙点。孩子 们每天昼伏夜出,一如初恋般的马拉松式约会,准点且兴致盎然。我当时虽然有些置身事外的超脱,但却因为一个人的出场,而使我对这场周而复始的游戏渐生向 往。

她本不必夜夜光临,因为事实上并无新闻可言,但她却总是如期而至;而我们也总能在攒动的人头中迅速发现彼此,然后不经意的挤到一起。在两厢人马偶尔 的冲突时,我竟然有时忘记守卫局长,却去扮演一个保护弱雏的英雄。海岛的夏夜原本短暂,几乎尚未开聊就要被黎明打断。我送她到楼前,永远止步于楼前,看着 她爬停了电梯的12楼,我再崇高而疲惫的打道回府。

这种朦胧的交往起始于孩子们的推动,如果运动戛然而止,我们是否会中止这场随波逐流的相约,迄今我都并不清晰。张爱玲似乎说过――为了成全他们的 爱,一个城市倾覆了。放在那时的我来看,应该是一个国家都倾覆了。我已经不记得我潜意识里,是不是希望过孩子们的革命永不到底,以便我能夜夜张生,长待西 厢。

我开始邀约她参与我黄昏的海泳,半裸的人生也许更见坦诚和真实。最初我竟然提醒她,不要游得离我太远――我还以为在人海外自己仍是保护神。结果比翼 齐游,很快她就不见了,她朝外海游去,其玲珑的身影转眼就消失在潮线之下,我既不可望更不可及,只能游回黄昏的海滩等候,通常是晚霞散尽,她才拖着夜色回 来,然后轻松的说:今天大约才五公里吧。我内心不免紧张,万一她要被退潮拉走了,我该向谁交待,我甚至不知她的家人何在。

我们喜欢背对着海水座谈,海浪不时的打过来,把我们朝岸上推。那时的形势已经开始紧张起来,暮色日渐加深我内心的幽暗。我对这场运动的真实看法,开 始在她面前袒裎相露。她无意政治,却因我而不得不北望京华,夙夜兴叹。我们徘徊在水与岸之间,很难预知浪涛究竟会将我们打向哪一边。那时,我们连手都未曾 相挽,其实在人世的风波之中,原是很容易失散的。

我后来有过一首叫着《祭坛》的诗,有句子曰――绝伦的屠杀总是在最美丽的早晨开始。但远在边陲的我,事实上是在那个永不褪色的日子的当晚才知道,那时首善之区大约已经洗完街道了。

朋友雷跑来告诉我,那是在我的一个租住楼里,当时还住着梓夫和我几个朋友。我们听罢都哭了,一个小弟买来一瓶酒,大家望空酹祭。我对梓夫说――我决 定辞职,绝不当鹰犬了。梓夫知道我的性格,不便相劝,只是用红红的眼睛看着我。我醉醺醺的骑着摩托就出门了,海岛的初夏之夜似乎还充满着和平,我们所获得 的消息都来自于外电――那时的传言都是内战即将爆发。我别无选择,决心北上参加义战。此去生死未卜,我唯一想的起来要告别的,大约就只有短暂认识的她了。

我半夜爬上了她的12楼,她很吃惊我的到访。为了不打扰她的同屋,我们站在门外。她也已经知道了首都的剧变,我说我就是来告个别,明天就走了。她问 为什么,那时的我充满了慷慨激昂。她默然,然后说让我陪你下去走走吧。我们下楼,相对仍是无语,又确确乎有点难舍。我说那我就带你在小城兜一圈吧,也算我 和这个城市的作别。

我带着她狂奔在夜色中,我忽然感觉到她第一次将脸贴在了我的后背,我穿着短袖警服,顿时感到背心一股暖流――她在默默的流泪。那时的小城格外安静, 路灯很少,我的车灯忽然照见前方有一队人扛着花圈沉默地走来,整齐而毫无喧哗。我不明所以,停车于街心,队伍走近时,我才从花圈和祭幛的文字中发现,原来 是海大的几十个勇敢的学生,在遥祭那些无辜的死难者。我肃然起敬,对着他们行了个正规的军礼。他们突然看见这个拦路的警察没有恶意,且向他们致敬时,心中 的悲愤如河决堤,顿时集体痛哭起来。在那一刻,我自觉鼻酸喉哽,心中耿耿然一股浩然之气。

我带着她骑到了海滩,在一片漆黑中只听见大海的咆哮。面对着海峡的深远不可测,仿佛面对今后的命运。她只是隐隐的啜泣,我去扶起她的肩膀,她靠在了我的胸上。她断续的祈求――你把今夜留给我,好吗?

我默然,内心感念万分,但想到此后的不测,我只能拒绝。人在那一刻,原本是能因一些巨大悲哀而变得高尚的。我说还要回去写辞职信,还要收拾行装,还要处理许多事情;假若我还能活着回来,我们肯定还会重逢的。我们泪脸紧贴,像两个站在危崖上准备殉情的少年。

那时我们还处在一个信息不发达的社会,即便我在“内部”,也所知有限;但知道惯例,****之后必将是大搜捕――我想我的一些弟兄在劫难逃了。我在 深夜开始奋笔疾书我的辞职报告,洋洋数千言,青春的愤怒使我唇枪舌剑对当局大加挞伐,并义正辞严的发誓――绝不做鹰犬和刽子手。

次日早晨我进到办公室,平静地对几个同事说――我辞职了,请帮我把这些交给领导。我把报告放在警帽里,连同警号警徽等。大家知道我何以抉择,也并不 相劝,感叹着告别而去。等我到了广州,才知道京广线还没通车,我想请个的士开回武汉,司机都说兵荒马乱不敢上道。我只好在朋友处等到10号,终于才得以北 上。

母校14号还搞了一个十日祭,场面十分感人,作家班的朋友拟写的悼词风传世界。到了此时此地,我才知道没有反抗,只有逃亡,我无能为力,只能聊尽菲 薄。【此中的故事留待后日吧】我辞职去后,局长大为恼火,在全国系统内出现我这样的“叛徒”,于局里是难堪的。处里通知我家人,要我回去,只要认错,尚有 生机;父母操心如焚,辗转求我即使辞职,也先回去办好手续。我正好受人所托,也要回去一趟,正要成行,武汉的朋友告诉我,有个海岛的女孩来找你来了,一番 描述,我知道是她竟然寻找来了。那时如处乱世,我只留言岛上见,便先回了。

这已是七月了,原先还在观风的各地各部门,已知大势所向,终于开始行动了。内地的追捕组也都纷纷住进了“我局”。局里要我报告出逃一月的全部活动, 我拒绝,坚持辞职。而此时,w君的联络人也来到我处,她也从湖北回来了。我将来人藏在我租来的一所村居里,她隐约感到来人的重要,给我说可以安排到她那儿 去。我想此事的危险,还是不要祸及无辜为好,就拒绝了。

三天后的一个深夜,村居被包围,连我一起给抄了。我还算是现役警察,交给本局侦讯,来人则被航运走了。再之后,w君也被捕,牵连一圈人入狱。【事见 海外出版物《情义无价》】我在审查阶段,给局长长信两函【这个内心善良清醒的人已经去世,谨此哀悼】,局长在一个黄昏独自来看我,然后说,你辞职回去怎么 办?我说回山,当无大碍。他暗示我说,那你自己走吧,手续以后再说。我终于千里走单骑――一个人骑着摩托向故乡的深山赶回。

临行之际,我和她再次告别。乱世儿女,没有任何相约相誓,除开无可奈何的泪水,终也无从说起。

1992年的春天,我在武昌起义门55号勤奋的打扫高墙下的狭窄院子。身上穿着蓝底白杠的制服,头发则早就剃光了。那天的太阳似乎很好,一个外勤的 囚徒进来悄悄告诉我――你姐姐带了个女孩来看你,不让进来,你姐姐正和他们在吵架。我站在平台上守候,我急切地想看到是哪位朋友难中相访。李队长是个好 人,见我违纪张望,过来劝我进去,说他们正跟上面交涉。我说我只想知道是哪位来了,李说是你海南的女友;估计不会让你们见。

我大约猜到是她来了,果然一会儿,她出现在第二道铁门外。我们之间相距十几米,隔着铁栅栏可以相望,但不能大声喊话,于是只好互相傻笑;偶尔趁管教 不备,问一声还好吧。就这样痴痴傻傻的对望了十几分钟,心中有万千伤感,此际也唯余一笑了。我潇洒的拍拍秃头,表示一切皆无所谓,然后不断挥手让她离去, 我不想连带她再挨一场不必要的呵斥。

这一面,于今就算是最后的挥别了。那些年大抵有过一些通信,因为都要接受检阅,自然也只能各叙别况而已。我鼓励她去恋爱,她也清醒的认识到我并非一个可以做丈夫的人;经此剧变之后,人都忽然长大了,所谓百年心事归平淡,轻松交往之中,反而多了如许理解和爱惜。

1995年,我出来之前,她结婚了,正计划出国。我赶到海岛,隐约还想送行,以表达积年的谢意。她却正好回老家办手续去了,缘悭一面。之后,她隔年 会突然来信或者电话,告诉她做母亲了,又做母亲了,再做母亲了。大家寒暄问候,万里之外,聊存一分高谊。而我自己,则仍旧在人世间谑浪风尘。十几年过去, 许多故人都在人海里一去无迹,想到各有一份各自的福报,与其相濡以沫,还真不如相忘于江湖,渐渐往事也就开始漂淡了。

从青春革命到醇酒妇人,这几乎是我们那一代多数人的宿命。虽然并不曾为当初的激情理想和轻生躁进而后悔,但所有的浪漫最终都会复归于现实。而现实的 铁栏,何曾有过稍懈。那些被改变的命途,相对于那些被毁弃的生命来说,却又终归是轻如鸿毛的。而我们在苦难中所经历的温情,已然是苍白岁月里的灿烂底色, 对此,我们又何能怨怼。

又是音讯杳无的两年后,一个来自南太平洋的某个岛屿的电话打进了苍山脚下。她说她偶然上网读到了我的一些文章,她没想到在那之后,我又经历了许多。 我们依旧是笑着说话,嘻嘻哈哈的仿佛最初的时光。但17年意味着什么?一个那年出生的孩子已经开始上大学,但他【她】却可能完全不知道当年的血火故事,更 无法想象会有无数的人失踪或者远走天涯。

历史正被人有意的掩埋,当所有惊心动魄的往事都焚毁于心炉之后,一切确如昆德拉所说――万劫不复了,仿佛从未发生过一样。

她说你是该坐下来写了,你也许需要一个花园,一片草地,一个面朝大海的房子,当然最好还要个真正欣赏理解而又毫无要求的女人。她说可惜你还没有一个 可以自由写作的土壤,可惜我都老成三个孩子的母亲了,也无法帮你。然后我们就开怀大笑,那种真正纤尘不染的笑,一如当初一念不生的哭。

我们来到这个世界只为学会爱而不是恨,但恩怨尔汝的男女却往往彼此留下太多的伤。经由一个遥远的讯问,于这异乡的村居勾起些许遥远的记忆,放在多悲多怨的尘世,就算是温馨的茶酒了;咂一口,曾经涩辣的苦,竟是回味中的甘,我们对今生就该说――不虚此行了。

相关日志

2009年9月16日 | 分类: 大象杂谈 | 标签:

First they came for the communists, and I did not speak out–

because I was not a communist;

Then they came for the socialists, and I did not speak out–

because I was not a socialist;

Then they came for the trade unionists, and I did not speak out–

because I was not a trade unionist;

Then they came for the Jews, and I did not speak out–

because I was not a Jew;

Then they came for me–

and there was no one left to speak out for me.

相关日志

2009年9月5日 | 分类: 大象杂谈 | 标签:

真汉子才配吃老妈蹄花

真汉子才会在吃蹄花的时候面向监视的特务毫无畏惧的迎上去

真汉子才会举重若轻的主动问特务“你们是找我么”

真汉子才会指着官僚党徒的鼻子说“你丫就一混混!”

4caa0d1a3bd3ae3c8718bf06

相关日志

2009年9月4日 | 分类: 大象杂谈 | 标签: , , ,

缅甸果敢的骚乱使大批果然人民沦为难民,逃到中国避难。读过历史的人都知道,包括果敢在内的18万平方公里土地,历史上是属于中国的,果敢地区的难民也主要以华人为主。他们和我们一样,是同宗同族的中国同胞。只是由于历史的原因,这些同胞居住在了一个不被国际法承认的地方,但这并不是我们无视他们苦难的借口。

所幸的是,今天早上的【华尔街日报】最新消息,果敢战乱已经平息,难民开始陆续返回家园。为他们祈祷吧,饱经苦难的中国人!

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17

相关日志

2009年8月30日 | 分类: 他山之石 | 标签:

何为监狱?

我们来看看监狱的一般特征:
1、四周均为高墙所圉。
2、严格禁止墙外一切进入墙内。
3、墙内之人必须长期被迫听看管者的政治宣传和教育。
4、墙内之人没有表达自己政治立场、独立观点的权利。用某国的话说就是:“剥夺政治权利XX年”或“剥夺政治权利终身”。
5、墙内之人一切活动均处于看管者之下。

从以上几个监狱的一般特点分析,在互联网邻域,热烈祝贺“中华人民共和监狱”成立!

朝鲜人民发来贺电!
别习惯性的往下看了,没有了,没有别国的贺电了!

是不是很失望?这是必然的。

相关日志

2009年8月30日 | 分类: 大象杂谈 | 标签: ,

防民之口,甚于防川。两千年前,【国语】里这句话精炼的总结了禁言的危害与不可操作性。两千年后的今天,号称民主自由的某国,以“和谐”为治国理念的某国,出现这样的标语口号,实在不足为奇,因为某国的奇人奇事,民众早已习以为常。

20080710215918160 20080710215918161 20080710215918522 20080710215918878 20080710215948141 20080710215951599

一个公民,除非被逼到了忍无可忍、无路可走的地步,不会轻易走上艰难坎坷的上访之路。某国的信访环境众所周知,一个在法律里堂而皇之的写明公民有信访权的国家,出现上面的标语,这不是欺骗是什么?

文革式的、阶级斗争式的标语,到今天竟然还有生存的土壤,在民主宪政、公民政治成为全球普世价值的当今,不能不说是某国的一大特色,不愧“某国特色的社会主义”的大名。

中共喉舌【求是】杂志的副刊【小康】杂志近日的一份民调显示,农民、宗教职业者名列最讲诚信群体的前两名,而大约有7.9%的受调查网民则认为性工作者有诚信,居调查的第三位。

《中国日报》的社论指出,"这样的一个名单既让人震惊也令人尴尬。"

民众对政府官员的信任度远远落后,这次调查的结果显示,有接近90%的受访者对官方的调查数据表示"绝对是假的,从来都不信"。

宁信婊子,不信官员;宁听农民,不听专家。中共政府的信用事实上已经破产,所有有人说:赤裸裸的耍流氓,是一个信用破产者的最后武器。

因此老夫在此告诫各位为了维权而辛苦上访的访民们,不要再走上访之路,这是一条没有尽头的黑暗之路,中共政府的中下层官员,为了阻扰上访者,可以派人进京捉拿访民,可以在访民家安装摄像机,可以派人强奸访民,可以公然打出“违法上访、坐牢罚款”的光辉响亮口号,为了阻止丑行捅到北京,他们还有什么做不出来的?

一个有效的办法是,访民应该学会有效利用现代传媒手段和法律工具,在体制内和侵权者进行斗争,争取自己的合法权益。从过去几年的经验表明,合理利用互联网或者传统媒体使侵权案件得到曝光,引起公众极大关注后,中共官方往往不得不迅速动作,针对案件进行立案侦查,并给出一个相对符合民意的结果。另一方面,当发生侵权、冤案等之后,可以联系一些有正义感的、有公民意识的律师,进行咨询,与律师商榷,通过法律工具,在体制内对侵权者进行制衡。这两个方法一般不用坐牢罚款,而且比起上访风险小、成本低,可操作性强,访民兄弟可以借鉴。

相关日志

2009年8月26日 | 分类: 他山之石 | 标签: ,

关于FreeBSD7.2 disk1 不能引导出现No /boot/loader的问题解决办法
症状:
        使用非FreeBSD7.2版本的安装光盘可以正常进行引导安装,但使用 7.2安装光盘在某些机器上出现问题:

         /i386 boot
     Default: 0:ad(0,a)/boot/kernel/kernel
     boot:
     No /boot/kernel/kernel

     其实这是个已知问题,官方描述在:http://www.freebsd.org/releases/7.2R/errata.html

     如下:

[20090501] Some machines do not recognize the i386 disc1 as bootable and fall through to   booting   off the next boot device. All affected machines did see the other discs as bootable. As a workaround, you can boot using the bootonly or livefs CDROM and then swap in disc1 once sysinstall(8) starts.

    大意就是说,FreeBSD7.2 disk1盘,不能被某些机器正确辨识从而引导失败,解决方法是使用bootonly or livefs CDROM正确引导安装后到了sysinstall界面,再把 disk1放入光驱,继续安装即可!

相关日志

2009年8月26日 | 分类: 他山之石 | 标签: ,

FreeBSD 5.2.1 boot0(启动扇区代码分析)
Luonix Luo <Luonix@21cn.com>;
欢迎转载,转载时请保留原作者信息。

FreeBSD完整的内核代码在FreeBSD的“/sys”目录下。其中,FreeBSD 的 Boot Manager代码是 sys\boot\i386\boot0\boot0.s,它是FreeBSD自带的Boot Manager,其功能虽然不如Linux的lilo和Grub功能强大,但它只需按一个键就可以引导,界面直观。小小的512字节,可以给你一个简单明了的启动选择界面,还能记住你上次的选择。 以下,就对此代码进行详细分析。
当我们打开计算机电源时,计算机叽叽嘎嘎进行设备和内存检测过后就读取硬盘或者软盘的引导扇区,这个扇区只有512字节,显然这512字节不能够有多大作用,这512字节的代码被BIOS放在地址从0×0000:0×7c00开始处。然后直接跳转到0×0000:0×7c00处去执行。以上工作是BIOS 干的,你什么也不用作 。操作系统需要通过这个引导扇区代码再装载操作系统的其他部分。
在还没有跳转到这段代码之前,也就是BIOS把磁盘的引导扇区读入到内存之后,其DL和ES、SI寄存器的内容如下:
DL:表示启动设备,例如,如果计算机是从软盘启动的则DL=0,若是从IDE的C、D盘(严格来说是物理磁盘一和物理磁盘二,而不是逻辑磁盘分区)启动的则DL分别为0×80和0×81。如果是从硬盘启动的话,ES:SI是指向BIOS中的硬盘分区表存放的地址。
好了,我们现在已经知道,计算机的BIOS已经把引导扇区的512字节的内容读入到了0:0×7c00处,然后就跳转到0:0×7C00处去执行,也就是执行引导扇区代码,引导扇区代码boot0执行代码dump如下(它很有用,以后我们还不时回头来看):
0000:  FC 31 C0 8E C0 8E D8 8E-D0 BC 00 7C 89 E6 BF 00 .1………|….
0010:  06 B9 00 01 F3 A5 89 FD-B1 08 F3 AB FE 45 F2 E9 ………….E..
0020:  00 8A F6 46 BB 20 75 04-84 D2 78 03 8A 56 BA 88 …F. u…x..V..
0030:  56 00 E8 FC 00 52 BB C2-07 31 D2 88 6F FC 0F A3 V….R…1..o…
0040:  56 BB 73 1B 8A 07 BF 83-07 B1 03 F2 AE 74 10 B1 V.s……….t..
0050:  0B F2 AE 75 03 83 C7 0B-8A 0D 01 CF E8 C3 00 42 …u………..B
0060:  80 C3 10 73 D6 58 2C 7F-3A 06 75 04 72 05 48 74 …s.X,.:.u.r.Ht
0070:  0D 30 C0 04 B0 88 46 B8-BF B2 07 E8 A4 00 BE 77 .0….F……..w
0080:  07 E8 B0 00 8A 56 B9 4E-E8 8C 00 30 E4 CD 1A 89 …..V.N…0….
0090:  D7 03 7E BC B4 01 CD 16-75 12 30 E4 CD 1A 39 FA ..~…..u.0…9.
00A0:  72 F2 8A 46 B9 EB 1B B0-07 E8 94 00 30 E4 CD 16 r..F……..0…
00B0:  88 E0 3C 1C 74 EC 2C 3B-3C 04 76 06 2C C7 3C 04 ..<.t.,;<.v.,.<.
00C0:  77 E5 98 0F A3 46 0C 73-DE 88 46 B9 BE 00 08 8A w….F.s..F…..
00D0:  14 89 F3 3C 04 9C 74 0A-C0 E0 04 05 BE 07 93 C6 …<..t………
00E0:  07 80 53 F6 46 BB 40 75-08 BB 00 06 B4 03 E8 59 ..S.F.@u…….Y
00F0:  00 5E 9D 75 06 8A 56 B8-80 EA 30 BB 00 7C B4 02 .^.u..V…0..|..
0100:  E8 47 00 72 A2 81 BF FE-01 55 AA 75 9A 56 BE 81 .G.r…..U.u.V..
0110:  07 E8 1A 00 5E FF E3 B0-46 E8 24 00 B0 31 00 D0 ….^…F.$..1..
0120:  EB 17 0F AB 56 0C BE 74-07 E8 EB FF 89 FE E8 03 ….V..t……..
0130:  00 BE 81 07 AC A8 80 75-05 E8 04 00 EB F6 24 7F …….u……$.
0140:  53 BB 07 00 B4 0E CD 10-5B C3 8A 74 01 8B 4C 02 S…….[..t..L.
0150:  B0 01 56 89 E7 F6 46 BB-80 74 13 66 6A 00 66 FF ..V…F..t.fj.f.
0160:  74 08 06 53 6A 01 6A 10-89 E6 48 80 CC 40 CD 13 t..Sj.j…H..@..
0170:  89 FC 5E C3 20 20 A0 0A-44 65 66 61 75 6C 74 3A ..^. ..Default:
0180:  A0 0D 8A 00 05 0F 01 04-06 0B 0C 0E 83 9F A5 A6 …………….
0190:  A9 0C 0D 0C 0B 0A 09 08-0A 12 0D 10 0F 3F BF 44 ………….?.D
01A0:  4F D3 4C 69 6E 75 F8 46-72 65 65 42 53 C4 90 90 O.Linu.FreeBS…
01B0:  66 BB 44 72 69 76 65 20-00 00 80 0F B6 00 00 00 f.Drive ……..
01C0:  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 …………….
01D0:  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 …………….
01E0:  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 …………….
01F0:  00 00 00 00 00 00 00 00-00 00 00 00 00 00 55 AA …………..U.
     图(一)(注:上图中的4×16个字节是保留的4个分区信息,具体解释见下面图(三))
下面,我们对FreeBSD启动扇区代码boot0.s进行逐步分析。boot0.s代码如下:
#
# Copyright (c) 1998 Robert Nordier
# All rights reserved.
#
# Redistribution and use in source and binary forms are freely
# permitted provided that the above copyright notice and this
# paragraph and the following disclaimer are duplicated in all
# such forms.
#
# This software is provided "AS IS" and without any express or
# implied warranties, including, without limitation, the implied
# warranties of merchantability and fitness for a particular
# purpose.
#
以上的Coyright就不用翻译了。
# $FreeBSD: src/sys/boot/i386/boot0/boot0.s,v 1.27 2003/11/20 20:28:18 jhb Exp $
以上供版本管理软件使用
# A 512-byte boot manager.
        .set NHRDRV,0×475     # Number of hard drives
        .set ORIGIN,0×600     # Execution address
        .set FAKE,0×800       # Partition entry
        .set LOAD,0×7c00      # Load address
        .set PRT_OFF,0×1be     # Partition table
        .set TBL0SZ,0×3     # Table 0 size
        .set TBL1SZ,0xb     # Table 1 size
        .set MAGIC,0xaa55     # Magic: bootable
        .set B0MAGIC,0xbb66     # Identification
        .set KEY_ENTER,0×1c     # Enter key scan code
        .set KEY_F1,0×3b         # F1 key scan code
        .set KEY_1,0×02         # #1 key scan code
#
# Addresses in the sector of embedded data values.
# Accessed with negative offsets from the end of the relocated sector (%ebp).
#
        .set _NXTDRV,-0×48         # Next drive
        .set _OPT,-0×47             # Default option
        .set _SETDRV,-0×46         # Drive to force
        .set _FLAGS,-0×45         # Flags
        .set _TICKS,-0×44         # Timeout ticks
        .set _FAKE,0×0             # Fake partition entry
        .set _MNUOPT,0xc # Menu options
以上是定义相关的参数值,例如“.set NHRDRV,0×475”类似于C语言中的“#define NHRDRV 0×475”
        .globl start     # Entry point
        .code16          # This runs in real mode
#
# Initialise segments and registers to known values.
# segments start at 0.
# The stack is immediately below the address we were loaded to.
#
start:
        cld             # String ops inc
        xorw %ax,%ax     # Zero
        movw %ax,%es     # Address
        movw %ax,%ds     #  data
        movw %ax,%ss     # Set up
        movw $LOAD,%sp     #  stack
以上代码:
1)首先使用“cld”指令清除方向标志,使得以下的进行“rep”操作时SI和DI的值递增。
2)使ax清零,并使除代码段cs外的另外两个数据段寄存器es、ds和堆栈段ss清零。当然,此时cs
   由于reset或初始上电已经为零了。
3)BIOS已经把引导扇区的512字节的内容读入到了0:0×7c00处,movw $LOAD,%sp 使得堆栈指针指向扇区
   代码(或曰本段代码 0:0×7c00)的顶部。虽然堆栈向下生长可能会影响代码的内容,但下面我
   们马上就把位于0:7c00处代码移到其他地方去执行。
#
# Copy this code to the address it was linked for
#
        movw %sp,%si         # Source
        movw $start,%di     # Destination
        movw $0×100,%cx     # Word count
        rep                 # Relocate
        movsw                 #  code
把位于0:7c00处的代码搬移到0:0×600处。注意,此时由于代码连接的重定向,$start=0×600。
#
# Set address for variable space beyond code, and clear it.
# Notice that this is also used to point to the values embedded in the block,
# by using negative offsets.
        movw %di,%bp     # Address variables
        movb $0×8,%cl     # Words to clear
        rep             # Zero
        stosw             #  them
通过以上一段代码的执行,本代码已被搬移到0:0×600处,此时si=di=0×600+0×100, 以上代码
把di的值保存到bp,bp此时指向本程序搬移后的未用的空间的首部,且把此bp所指的16字节空间
清零。以上过程如下图所示:
                        ┏>;0:0×600 ┏━━━━━┓
                        ┃         ┃          ┃
                        ┃         ┃    搬    ┃
                        ┃         ┃    移    ┃
                        ┃         ┃    之    ┃
                        ┃         ┃    后    ┃
                        ┃         ┃    的    ┃
                        ┃         ┃    代    ┃
                        ┃         ┃    码    ┃
                        ┃         ┃          ┃
                        ┃ 0:0×7ff ┣━━━━━┫
                        ┃         ┃    0     ┃<-bp指向这里(0:0×800), 以此开始的16字节被清零。
                        ┃         ┣━━━━━┫以下所称的fake partition entry就是指这里。
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┣━━━━━┫
                        ┃         ┃    0     ┃
                        ┃         ┗━━━━━┛
0:0×7c00 ┏━━━━━┓ ┛
         ┃          ┃
         ┃    搬    ┃
         ┃    移    ┃
         ┃    之    ┃
         ┃    前    ┃
         ┃    的    ┃
         ┃    代    ┃
         ┃    码    ┃
         ┃          ┃
0:0×7dff ┗━━━━━┛
                      图(二)
#
# Relocate to the new copy of the code.
#
        incb -0xe(%di) # Sector number
        jmp main-LOAD+ORIGIN # To relocated code
把以上清零的16字节的第二个字节置为1,表示我们已经读取了一个分区。然后跳转到搬
移之后的新代码的main处执行。
#
# Check what flags were loaded with us, specifically, Use a predefined Drive.
# If what the bios gives us is bad, use the ‘0′ in the block instead, as well.
#
main:
        testb $0×20,_FLAGS(%bp)       # Set number drive?
        jnz main.1                     # Yes
        testb %dl,%dl                 # Drive number valid?
        js main.2                     # Possibly (0×80 set)
main.1:
        movb _SETDRV(%bp),%dl # Drive number to use
上面说过,BIOS把磁盘的引导扇区读入到内存之后,其dl的内容表示启动设备,但我们 安装好FreeBSD
之后,我们可以改变此引导扇区的内容,其中的一个改变就是可以使我们可以“手动指定”我们实际安
装FreeBSD的分区,如果我们希望指定FreeBSD所在的boot分区,那么我们在bp-0×45处的位置
(即_FLAGS(%bp)处)的bit 0×20置1,那么上面的“movb _SETDRV(%bp),%dl”一句中movb
_SETDRV(%bp),%dl(即bp-0×46)即指向我们“手动指定”FreeBSD所在分区 代码,例如,IDE的C、D
盘(严格来说是第一个物理磁 盘的第一个和第二个分区)的代码分别为 0×80和0×81。如果没有“手动指
定”启动分区,那么,我们 缺省使用机器当前启动的分区,上面说过,机器当前启动的分区代码放在dl中。
因为FreeBSD Boot Manager 不可能安装到软盘(如果从软盘启动则dl为0),所以,使用testb %dl,%dl
来判断驱动器代码是否合法(volid)。
有关_FLAGS(%bp)中其他bit位表示的意义,在随后的代码分析中慢慢给你道来。
#
# Whatever we decided to use, now store it into the fake
# partition entry that lives in the data space above us.
#
main.2:
        movb %dl,_FAKE(%bp) # Save drive number
        callw putn # To new line
        pushw %dx # Save drive number
以上第一句把FreeBSD启动分区的代码保存到_FAKE(%bp)(bp-0)处,也就是说,上图(二)的bp
处保存的是FreeBSD启动分区的代码(_FAKE=0)。
“callw putn”一句在屏幕上打印“回车”和“换行”,“pushw %dx”一句把启动分区
的值压入堆栈。
#
# Start out with a pointer to the 4th byte of the first table entry
# so that after 4 iterations it’s beyond the end of the sector.
# and beyond a 256 byte boundary and has overflowed 8 bits (see next comment).
# (remember that the table starts 2 bytes earlier than you would expect
# as the bootable flag is after it in the block)
#
        movw $(partbl+0×4),%bx # Partition table (+4)
        xorw %dx,%dx # Item number
以上代码首先把%bx指向分区表partbl的的第四个字节,这里存放的是分区类型,如82表示
Linux Native分区83表示Linux Swap 分区,有关分区表的细节请详见本文的尾部。然后dx清零 ,
此后,dx将作为遍历磁盘分区的列举代号使用。 启动分区代码dl的原来的值在上面已经压入
了堆栈保存。
#
# Loop around on the partition table, printing values until we
# pass a 256 byte boundary. The end of loop test is at main.5.
#
main.3:
        movb %ch,-0×4(%bx)     # Zero active flag (ch == 0)
        btw %dx,_FLAGS(%bp)     # Entry enabled?
        jnc main.5             # No
上面首先使得第一个分区的活动标志为0,标志它不为活动标志,因为ch的值为0。至
于第二句“btw %dx,_FLAGS(%bp)”中的_FLAGS(%bp)是上面我们说到的“手动指定我们
实际安装FreeBSD的分区代码”。其中的bit 0×20我们在上面已经提到过。_FLAGS(%bp)
中的其他 位表示是否我们需要检查相应的磁盘分区。缺省情况下,我们需要检查所有
的磁盘分区。检查磁盘分区看是否有可以启动的磁盘分区,例如,可能磁盘上的某个
分区为WindowsXP或者是Linux等。如果我们没有改变在磁盘上该处的值,则相应的bit
位的值 为0,表示所有的分区都要检查(因为此时_FLAGS(%bp)中的值为0),否则,
只针对FLAGS(%bp)中相应的bit位未被设置为1的分区进行检查。
大家知道,FreeBSD Manager启动时可能出现以下的提示:
F1    FreeBSD
F2    ??
F3    BSD
F4    ??
Default    F1
其中,上面的提示中出现了令人讨厌的“??”,为了避免出现“??”的提示,我们可以设置相应的
第一分区和第四分区不检查,就需要正确设置_FLAGS(%bp)中的bit位。设置好后,屏幕可能
出现以下的提示:
F1    FreeBSD
F2    BSD
Default    F1
#
# If any of the entries in the table are
# the same as the ‘type’ in the slice table entry,
# then this is an empty or non bootable partition. Skip it.
#
        movb (%bx),%al         # Load type
        movw $tables,%di     # Lookup tables
        movb $TBL0SZ,%cl     # Number of entries
        repne                 # Exclude
        scasb                 #  partition?
        je main.5             # Yes
我们从上面已经知道起始(%bx)指向的是MBR中分区信息1(16字节)的位置(见图(三)),
以上代码在“忽略的分区类型$tables”中查找看是否本分区是不可启动的或者不合法的分区。
不可启动的或者不合法的分区类型有3($TBL0SZ=3)个,它们是“0×0, 0×5, 0xf”,见下面的
$tables处。如果是不可启动的或者不合法的分区类型则跳转到main.5,进行下一轮循环。
#
# Now scan the table of known types
#
        movb $TBL1SZ,%cl         # Number of entries
        repne                     # Known
        scasb                     #  type?
        jne main.4                 # No
#
# If it matches get the matching element in the
# next array. if it doesn’t, we are already
# pointing at its first element which points to a "?".
#
        addw $TBL1SZ,%di     # Adjust
main.4:
        movb (%di),%cl # Partition
        addw %cx,%di #  description
        callw putx # Display it
上面检查看所检查的分区类型是否为我们知道的分区类型,知道的分区类型有11($TBL1SZ=0xb)
个,它们是:“0×1, 0×4, 0×6, 0xb, 0xc, 0xe, 0×83,0×9f, 0xa5, 0xa6, 0xa9”,见
下面的$tables处。如果不是以上的类型,则跳转到main.4。那么,(%di)所指的字串是“??”,
如果分区类型是“0×1, 0×4, 0×6, 0xb, 0xc, 0xe, 0×83,0×9f, 0xa5, 0xa6, 0xa9”
之一,则(%di)所指的字串是“DOS”、“Linux”、“FreeBSD”或“BSD”等。
见下面的“os_misc”、“os_dos”、“os_linux”、“os_freebsd”、“os_bsd”等
标记。
callw putx调用putx函数,在屏幕上打印:“Fx   XXX”。其中XXX为DOS”、“Linux”、
“FreeBSD”或“BSD”等。
main.5:
        incw %dx # Next item
        addb $0×10,%bl # Next entry
        jnc main.3 # Till done
遍历磁盘分区的举代号dx加1,重复下一轮循环查找。bl加上0×10(0×10=16)表示寻址到下
一个分区信息(加16字节)入口。循环直到255字节边界。
#
# Passed a 256 byte boundary..
# table is finished.
# Add one to the drive number and check it is valid,
#
        popw %ax                 # Drive number
        subb $0×80-0×1,%al     # Does next
        cmpb NHRDRV,%al         #  drive exist? (from BIOS?)
        jb main.6                 # Yes
“popw %ax”把上面压入堆栈的bx(当前的启动扇区)值弹出到ax中。例如,如果计算机是从软盘
启动的则dl=0,若是从IDE的C、D盘启动的则dl分别为 0×80和0×81。然而,FreeBSD的Boot Manerger不能够
安装到软盘上,所以,dl只能为0×80、0×81,0×82…等。
在计算机的BIOS地址0:0×475处存放的是计算机的硬盘的数目,“subb $0×80-0×1,%al”一句等于“sub
$0×79,%al”,例如,即当前驱动器如果是C盘,则al的值是ox80-0×79=1,然后再与计算机的硬盘的数目比
较,如果当前所在硬盘不是最后一个硬盘,则直接跳转到main.6。如果当前所在硬盘是最后一个硬盘,则继
续执行。
# If not then if there is only one drive,
# Don’t display drive as an option.
#
        decw %ax         # Already drive 0?
        jz main.7         # Yes
如果只有一个硬盘,则直接跳转到main.7,这样,本计算机只有一个硬盘,所以不用显示其他
磁盘相关的提示。
# If it was illegal or we cycled through them,
# then go back to drive 0.
#
        xorb %al,%al # Drive 0
下面的内容表示多于一个磁盘的情况。此时“al”清0,与磁盘列举相关。
#
# Whatever drive we selected, make it an ascii digit and save it back
# to the "next drive" location in the loaded block in case we
# want to save it for next time.
# This also is part of the printed drive string so add 0×80 to indicate
# end of string.
#
main.6:
        addb $’0′|0×80,%al         # Save next
        movb %al,_NXTDRV(%bp)         #  drive number
        movw $drive,%di             # Display
        callw putx             #  item
首先,在_NXTDR(%bp)处置入“0字符高位置1”的字符,以代表第二个驱动器,
然后在屏幕上显示“Fx Drive”,表示更换另外的磁盘启动。注意, 在调用
putx之前,di中保存的是下面字串“Drive ”的首地址。dl中存放的是当前
遍历的到的可启动的或者合法的分区类型递增序数,al与dl是不同的,al是ASCII码,
dl是“Fx”中的x值。
#
# Now that we’ve printed the drive (if we needed to), display a prompt.
# Get ready for the input byt noting the time.
#
main.7:
        movw $prompt,%si     # Display
        callw putstr         #  prompt
        movb _OPT(%bp),%dl     # Display
        decw %si             #  default
        callw putkey         #  key
        xorb %ah,%ah         # BIOS: Get
        int $0×1a             #  system time
        movw %dx,%di             # Ticks when
        addw _TICKS(%bp),%di   #  timeout
上面的代码首先在屏幕上打印出字符串“Default: ”,缺省启动的磁 盘号放在
“_OPT(%bp)”中,这里有个小小的技巧,在执行“decw %si”和“callw putkey”
两句后屏幕会显示“Fx”,x是_OPT(%bp)的ASCII。
然后取得当前的tickes放到%di中,等待用户按键超时的时间从_TICKS(%bp)中取出,
加到当前的tickes即是最后超时时间到的tickes。
#
# Busy loop, looking for keystrokes but
# keeping one eye on the time.
#
main.8:
        movb $0×1,%ah     # BIOS: Check
        int $0×16         #  for keypress
        jnz main.11         # Have one
        xorb %ah,%ah         # BIOS: Get
        int $0×1a         #  system time
        cmpw %di,%dx         # Timeout?
        jb main.8         # No
等待用户按下“Fx”键,同时检查当前等待是否超时,如果有用户按键则跳转到main.11,
如果超时时间不到则继续等待。
#
# If timed out or defaulting, come here.
#
main.9:
        movb _OPT(%bp),%al # Load default
        jmp main.12 # Join common code
超时时间到,此时表示用户使用缺省分区启动,把缺省的启动分区号置入al中,然后跳转
到main.12。
#
# User’s last try was bad, beep in displeasure.
# Since nothing was printed, just continue on as if the user
# hadn’t done anything. This gives the effect of the user getting a beep
# for all bad keystrokes but no action until either the timeout
# occurs or the user hits a good key.
#
main.10:
        movb $0×7,%al # Signal
        callw putchr #  error
用户输入错误,只是响铃提示,其他什么也不发生。
#
# Get the keystroke.
#
main.11:
        xorb %ah,%ah         # BIOS: Get
        int $0×16             # keypress
        movb %ah,%al         # Scan code
用户按下了一个键,把键值扫描码放到al中。
#
# If it’s CR act as if timed out.
#
        cmpb $KEY_ENTER,%al         # Enter pressed?
        je main.9                 # Yes
如果用户按下“Enter”键,和超时等同处理,这样,就启动缺省的boot分区。
#
# Otherwise check if legal
# If not ask again.
#
        subb $KEY_F1,%al         # Less F1 scan code
        cmpb $0×4,%al             # F1..F5?
        jna main.12                 # Yes
        subb $(KEY_1 – KEY_F1),%al         # Less #1 scan code
        cmpb $0×4,%al                 # #1..#5?
        ja main.10                     # No
如果是除“Enter”键外其他的键,则检查是不是F1…F5键,如果不是,
表示输入不合法,跳回到main.10处理。
#
# We have a selection.
# but if it’s a bad selection go back to complain.
# The bits in MNUOPT were set when the options were printed.
# Anything not printed is not an option.
#
main.12:
        cbtw                     # Option
        btw %ax,_MNUOPT(%bp)   #  enabled?
        jnc main.10             # No
如果是F1…F5键,则检查是否在我们提示的范围内,其中,_MNUOPT(%bp)的相应
bit位为1,表示是一个合法的选项,如果不是,跳回到 main.10处理。
#
# Save the info in the original tables
# for rewriting to the disk.
#
        movb %al,_OPT(%bp)         # Save option
把我们按下的F1…F5键保存到_OPT(%bp)位置。
        movw $FAKE,%si             # Partition for write
        movb (%si),%dl             # Drive number
把原来的启动分区代码取回到dl中。
        movw %si,%bx                 # Partition for read
        cmpb $0×4,%al                 # F5 pressed?
        pushf                     # Save
        je main.13             # Yes
如果我们按下的是F5键则直接跳转到main.13处理。
        shlb $0×4,%al             # Point to
        addw $partbl,%ax             #  selected
        xchgw %bx,%ax               #  partition
        movb $0×80,(%bx)             # Flag active
上面,我们从按键Fx选择中得到图(三)中的我们选择的四个分区信息中的某一分区信息,
上面计算出的bx为我们选择的分区信息的首地址,我们把此选择到的分区信息的第一个
个字节置为0×80表示它是当前的活动分区。
#
# If not asked to do a write-back (flags 0×40) don’t do one.
#
main.13:
        pushw %bx                     # Save
        testb $0×40,_FLAGS(%bp)         # No updates?
        jnz main.14                 # Yes
        movw $start,%bx         # Data to write
        movb $0×3,%ah             # Write sector
        callw intx13             #  to disk
检查回写标志_FLAGS(%bp)的bit位0×40为,如果设置的是可回写,则把当前选择到的boot
分区作为下次缺省的启动分区。
main.14:
        popw %si             # Restore
        popf                 # Restore
#
# If going to next drive, replace drive with selected one.
# Remember to un-ascii it. Hey 0×80 is already set, cool!
#
        jne main.15                 # If not F5
恢复上面保存的si和标志寄存器的内容。如果不是按键F5,则直接跳转到main.15去执行。
        movb _NXTDRV(%bp),%dl         # Next drive
        subb $’0′,%dl                 #  number
否则的话,我们选择下一个驱动器作为启动盘。
#
# load  selected bootsector to the LOAD location in RAM.
# If it fails to read or isn’t marked bootable, treat it
# as a bad selection.
# XXX what does %si carry?
#
main.15:
        movw $LOAD,%bx         # Address for read
        movb $0×2,%ah             # Read sector
        callw intx13         #  from disk
        jc main.10             # If error
把我们上面选择到的分区读到0×7c00处,就象我们刚刚才加电启动一样,只是活动分区改变
了而已。如果发生读错误则直接跳转到main.10。使用户重新选择启动分区。
        cmpw $MAGIC,0×1fe(%bx)         # Bootable?
        jne main.10             # No
判断引导扇区的最后两个字节是否是“0×55AA”,如果不是,则表示此扇区是不可引导的,或
不合法的引导扇区则直接跳转到main.10。使用户重新选择启动分区。
        pushw %si             # Save
        movw $crlf,%si         # Leave some
        callw puts             #  space
        popw %si             # Restore
打印“回车”和“换行”。
        jmp *%bx             # Invoke bootstrap
跳转到我们选择的引导扇区去执行。整个Boot Manager代码到此执行完毕。
#
# Display routines
#
putkey:
        movb $’F',%al         # Display
        callw putchr         #  ‘F’
        movb $’1′,%al         # Prepare
        addb %dl,%al         #  digit
        jmp putstr.1         # Display the rest
“putkey”函数在屏幕上打印“F1”、“F2”或“F3”等。如果dl为0则打印“F1”,
如果dl为1则打印“F2”,如果dl为3则打印“F3”。和调用“putstr”在屏幕上打印
es:si指向的以最高位置1为结束字符的字符串。
#
# Display the option and note that it is a valid option.
# That last point is a bit tricky..
#
putx: #首先,把_MNUOPT(%bp)的第dx位(bit)置1,表示此菜单选项被显示。然后在
屏幕上打印空格和es:di指向的以最高位置1为结束字符的字符串。
        btsw %dx,_MNUOPT(%bp)         # Enable menu option
        movw $item,%si                 # Display
        callw putkey                 #  key
        movw %di,%si                 # Display the rest
puts: #调用“putstr”在屏幕上打印es:si指向的以最高位置1为结束字符的字符串。
        callw putstr                 # Display string
putn: #“putn”打印“回车/换行”后在屏幕上打印es:si指向的以最高位置1为结束字符的字符串。
        movw $crlf,%si                 # To next line
putstr: #“putstr”在屏幕上打印es:si指向的以最高位置1为结束字符的字符串。
        lodsb                     # Get byte
        testb $0×80,%al         # End of string?
        jnz putstr.2             # Yes
putstr.1:
        callw putchr             # Display char
        jmp putstr                 # Continue
putstr.2:
        andb $~0×80,%al             # Clear MSB
putchr:
        pushw %bx                 # Save
        movw $0×7,%bx           # Page:attribute
        movb $0xe,%ah             # BIOS: Display
        int $0×10                 #  character
        popw %bx                 # Restore
        retw                     # To caller
“putchr”在屏幕上显示“al”中的字符。
# One-sector disk I/O routine
intx13:
        movb 0×1(%si),%dh             # Load head
        movw 0×2(%si),%cx             # Load cylinder:sector
        movb $0×1,%al                 # Sector count
        pushw %si                     # Save
        movw %sp,%di                 # Save
        testb $0×80,_FLAGS(%bp)         # Use packet interface?
        jz intx13.1                 # No
        pushl $0×0                 # Set the
        pushl 0×8(%si)             # LBA address
        pushw %es                 # Set the transfer
        pushw %bx                 #  buffer address
        push  $0×1                 # Block count
        push  $0×10                 # Packet size
        movw %sp,%si             # Packet pointer
        decw %ax                 # Verify off
        orb $0×40,%ah             # Use disk packet
intx13.1:
        int $0×13                 # BIOS: Disk I/O
        movw %di,%sp             # Restore
        popw %si                 # Restore
        retw                     # To caller
# Menu strings
item:
        .ascii "  ";      .byte ‘ ‘|0×80
prompt:
        .ascii "\nDefault:"; .byte ‘ ‘|0×80
crlf:
        .ascii "\r";      .byte ‘\n’|0×80
# Partition type tables
tables:
#
# These entries identify invalid or NON BOOT types and partitions.
#
        .byte 0×0, 0×5, 0xf
#
# These values indicate bootable types we know the names of
#
        .byte 0×1, 0×4, 0×6, 0xb, 0xc, 0xe, 0×83
        .byte 0×9f, 0xa5, 0xa6, 0xa9
#
# These are offsets that match the known names above and point to the strings
# that will be printed.
#
        .byte os_misc-.         # Unknown
        .byte os_dos-.         # DOS
        .byte os_dos-.         # DOS
        .byte os_dos-.         # DOS
        .byte os_dos-.         # Windows
        .byte os_dos-.         # Windows
        .byte os_dos-.         # Windows
        .byte os_linux-.         # Linux
        .byte os_bsd-.         # BSD/OS
        .byte os_freebsd-.         # FreeBSD
        .byte os_bsd-.         # OpenBSD
        .byte os_bsd-.         # NetBSD
#
# And here are the strings themselves. 0×80 or’d into a byte indicates
# the end of the string. (not so great for Russians but…)
#
        os_misc: .ascii "?";    .byte ‘?’|0×80
        os_dos: .ascii "DO";   .byte ‘S’|0×80
        os_linux: .ascii "Linu"; .byte ‘x’|0×80
        os_freebsd: .ascii "Free"
        os_bsd: .ascii "BS";   .byte ‘D’|0×80
.org PRT_OFF-0xe,0×90
.word B0MAGIC # Magic number
#
# These values are sometimes changed before writing back to the drive
# Be especially careful that nxtdrv: must come after drive:, as it
# is part of the same string.
#
drive:
        .ascii "Drive "
nxtdrv:
        .byte 0×0         # Next drive number
opt:
        .byte 0×0         # Option
setdrv:
        .byte 0×80         # Drive to force
flags:
        .byte FLAGS         # Flags
ticks:
        .word TICKS         # Delay
#
# here is the 64 byte partition table that fdisk would fiddle with.
#
        partbl: .fill 0×40,0×1,0×0     # Partition table
        .word MAGIC                    # Magic number MAGIC=0×55AA
以上保留0×40(十进制为64)个字节“伪”分区空间,且全部清零。partbl相对引导
山区代码的位置为0×1BE(见下图)。
MBR(Main Boot Record),按其字面上的理解即为主引导记录区,位于整个硬盘的0磁道0
柱面1扇区。不过,在总共512字节的主引导扇区中,MBR只占用了其中的446个字节(偏移
0–偏移1BDH),另外的64个字节(偏移1BEH–偏移1FDH)交给了DPT(Disk Partition Table
硬盘分区表)(见下表),最后两个字节"0×55aa"(偏移1FEH-偏移1FFH)是分区的结束标志。
这个整体构成了硬盘的主引导扇区。大致的结构如图(二):详见王巍的文章:《第一讲
操作系统简介及Win98安装》
0000┏━━━━━━━━━━━━━━━━━━┓
    ┃                                    ┃
    ┃                                    ┃
    ┃                                    ┃
    ┃                                    ┃
    ┃                                    ┃
    ┃    主引导记录(MBR) 446字节       ┃
    ┃                                    ┃
    ┃                                    ┃
    ┃                                    ┃
    ┃                                    ┃
01BD┃                                    ┃
    ┣━━━━━━━━━━━━━━━━━━┫
01BE┃      分区信息1(16字节)           ┃<–partbl指向这里。
    ┣━━━━━━━━━━━━━━━━━━┫
01CE┃      分区信息2(16字节)           ┃
    ┣━━━━━━━━━━━━━━━━━━┫
01DE┃      分区信息3(16字节)           ┃
    ┣━━━━━━━━━━━━━━━━━━┫
01EE┃      分区信息4(16字节)           ┃
    ┣━━━━━━━━┳━━━━━━━━━┫
01FE┃      0×55      ┃       0xAA       ┃
    ┗━━━━━━━━┻━━━━━━━━━┛
                    图(三)
其中,分区信息1-4的内容如下图所示:
偏移
长度
所表达的意义
0
字节
分区状态:如0–>;非活动分区
80–>; 活动分区
1
字节
该分区起始头(HEAD)
2

该分区起始扇区和起始柱面
4
字节
该分区类型:如82–>; Linux Native分区
83–>; Linux Swap 分区
5
字节
该分区终止头(HEAD)
6

该分区终止扇区和终止柱面
8
双字
该分区起始绝对分区
C
双字
该分区扇区数
                   图(四)
注:任何转载或摘抄请保留作者信息和注明文章出处(中文FreeBSD用户组 http://www.cnfug.org)

相关日志

2009年8月25日 | 分类: 数据通信 | 标签: ,

Network Working Group                                          S. Knight
Request for Comments: 2338                                     D. Weaver
Category: Standards Track                    Ascend Communications, Inc.
                                                              D. Whipple
                                                         Microsoft, Inc.
                                                               R. Hinden
                                                               D. Mitzel
                                                                 P. Hunt
                                                                   Nokia
                                                            P. Higginson
                                                                M. Shand
                                                 Digital Equipment Corp.
                                                               A. Lindem
                                                         IBM Corporation
                                                              April 1998

                   Virtual Router Redundancy Protocol

Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

Abstract

   This memo defines the Virtual Router Redundancy Protocol (VRRP).
   VRRP specifies an election protocol that dynamically assigns
   responsibility for a virtual router to one of the VRRP routers on a
   LAN.  The VRRP router controlling the IP address(es) associated with
   a virtual router is called the Master, and forwards packets sent to
   these IP addresses.  The election process provides dynamic fail over
   in the forwarding responsibility should the Master become
   unavailable.  This allows any of the virtual router IP addresses on
   the LAN to be used as the default first hop router by end-hosts.  The
   advantage gained from using VRRP is a higher availability default
   path without requiring configuration of dynamic routing or router
   discovery protocols on every end-host.

[Page 1]

Table of Contents

   1.  Introduction………………………………………..2
   2.  Required Features……………………………………5
   3.  VRRP Overview……………………………………….6
   4.  Sample Configurations………………………………..8
   5.  Protocol……………………………………………9
      5.1  VRRP Packet Format………………………………10
      5.2  IP Field Descriptions……………………………10
      5.3  VRRP Field Descriptions………………………….11
   6.  Protocol State Machine………………………………13
      6.1  Parameters……………………………………..13
      6.2  Timers…………………………………………15
      6.3  State Transition Diagram…………………………15
      6.4  State Descriptions………………………………15
   7.  Sending and Receiving VRRP Packets……………………18
      7.1  Receiving VRRP Packets…………………………..18
      7.2  Transmitting Packets…………………………….19
      7.3  Virtual MAC Address……………………………..19
   8.  Operational Issues………………………………….20
      8.1  ICMP Redirects………………………………….20
      8.2  Host ARP Requests……………………………….20
      8.3  Proxy ARP………………………………………20
   9.  Operation over FDDI and Token Ring……………………21
      9.1  Operation over FDDI……………………………..21
      9.2  Operation over Token Ring………………………..21
   10. Security Considerations……………………………..23
      10.1  No Authentication………………………………23
      10.2  Simple Text Password……………………………23
      10.3  IP Authentication Header………………………..24
   11. Acknowledgments…………………………………….24
   12. References…………………………………………24
   13. Authors’ Addresses………………………………….25
   14. Full Copyright Statement…………………………….27

1.  Introduction

   There are a number of methods that an end-host can use to determine
   its first hop router towards a particular IP destination.  These
   include running (or snooping) a dynamic routing protocol such as
   Routing Information Protocol [RIP] or OSPF version 2 [OSPF], running
   an ICMP router discovery client [DISC] or using a statically
   configured default route.

   Running a dynamic routing protocol on every end-host may be
   infeasible for a number of reasons, including administrative
   overhead, processing overhead, security issues, or lack of a protocol
   implementation for some platforms.  Neighbor or router discovery

[Page 2]

   protocols may require active participation by all hosts on a network,
   leading to large timer values to reduce protocol overhead in the face
   of large numbers of hosts.  This can result in a significant delay in
   the detection of a lost (i.e., dead) neighbor, which may introduce
   unacceptably long "black hole" periods.

   The use of a statically configured default route is quite popular; it
   minimizes configuration and processing overhead on the end-host and
   is supported by virtually every IP implementation.  This mode of
   operation is likely to persist as dynamic host configuration
   protocols [DHCP] are deployed, which typically provide configuration
   for an end-host IP address and default gateway.  However, this
   creates a single point of failure.  Loss of the default router
   results in a catastrophic event, isolating all end-hosts that are
   unable to detect any alternate path that may be available.

   The Virtual Router Redundancy Protocol (VRRP) is designed to
   eliminate the single point of failure inherent in the static default
   routed environment.  VRRP specifies an election protocol that
   dynamically assigns responsibility for a virtual router to one of the
   VRRP routers on a LAN.  The VRRP router controlling the IP
   address(es) associated with a virtual router is called the Master,
   and forwards packets sent to these IP addresses.  The election
   process provides dynamic fail-over in the forwarding responsibility
   should the Master become unavailable.  Any of the virtual router’s IP
   addresses on a LAN can then be used as the default first hop router
   by end-hosts.  The advantage gained from using VRRP is a higher
   availability default path without requiring configuration of dynamic
   routing or router discovery protocols on every end-host.

   VRRP provides a function similar to a Cisco Systems, Inc. proprietary
   protocol named Hot Standby Router Protocol (HSRP) [HSRP] and to a
   Digital Equipment Corporation, Inc. proprietary protocol named IP
   Standby Protocol [IPSTB].

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [ 2119].

   The IESG/IETF take no position regarding the validity or scope of any
   intellectual property right or other rights that might be claimed to
   pertain to the implementation or use of the technology, or the extent
   to which any license under such rights might or might not be
   available.  See the IETF IPR web page at http://www.ietf.org/ipr.html
   for additional information.

[Page 3]

1.1  Scope

   The remainder of this document describes the features, design goals,
   and theory of operation of VRRP.  The message formats, protocol
   processing rules and state machine that guarantee convergence to a
   single Virtual Router Master are presented.  Finally, operational
   issues related to MAC address mapping, handling of ARP requests,
   generation of ICMP redirect messages, and security issues are
   addressed.

   This protocol is intended for use with IPv4 routers only.  A separate
   specification will be produced if it is decided that similar
   functionality is desirable in an IPv6 environment.

1.2  Definitions

   VRRP Router            A router running the Virtual Router Redundancy
                          Protocol.  It may participate in one or more
                          virtual routers.

   Virtual Router         An abstract object managed by VRRP that acts
                          as a default router for hosts on a shared LAN.
                          It consists of a Virtual Router Identifier and
                          a set of associated IP address(es) across a
                          common LAN.  A VRRP Router may backup one or
                          more virtual routers.

   IP Address Owner       The VRRP router that has the virtual router’s
                          IP address(es) as real interface address(es).
                          This is the router that, when up, will respond
                          to packets addressed to one of these IP
                          addresses for ICMP pings, TCP connections,
                          etc.

   Primary IP Address     An IP address selected from the set of real
                          interface addresses.  One possible selection
                          algorithm is to always select the first
                          address.  VRRP advertisements are always sent
                          using the primary IP address as the source of
                          the IP packet.

   Virtual Router Master  The VRRP router that is assuming the
                          responsibility of forwarding packets sent to
                          the IP address(es) associated with the virtual
                          router, and answering ARP requests for these
                          IP addresses.  Note that if the IP address
                          owner is available, then it will always become
                          the Master.

[Page 4]

   Virtual Router Backup  The set of VRRP routers available to assume
                          forwarding responsibility for a virtual router
                          should the current Master fail.

2.0 Required Features

   This section outlines the set of features that were considered
   mandatory and that guided the design of VRRP.

2.1 IP Address Backup

   Backup of IP addresses is the primary function of the Virtual Router
   Redundancy Protocol.  While providing election of a Virtual Router
   Master and the additional functionality described below, the protocol
   should strive to:

    – Minimize the duration of black holes.
    – Minimize the steady state bandwidth overhead and processing
      complexity.
    – Function over a wide variety of multiaccess LAN technologies
      capable of supporting IP traffic.
    – Provide for election of multiple virtual routers on a network for
      load balancing
    – Support of multiple logical IP subnets on a single LAN segment.

2.2 Preferred Path Indication

   A simple model of Master election among a set of redundant routers is
   to treat each router with equal preference and claim victory after
   converging to any router as Master.  However, there are likely to be
   many environments where there is a distinct preference (or range of
   preferences) among the set of redundant routers.  For example, this
   preference may be based upon access link cost or speed, router
   performance or reliability, or other policy considerations.  The
   protocol should allow the expression of this relative path preference
   in an intuitive manner, and guarantee Master convergence to the most
   preferential router currently available.

2.3 Minimization of Unnecessary Service Disruptions

   Once Master election has been performed then any unnecessary
   transitions between Master and Backup routers can result in a
   disruption in service.  The protocol should ensure after Master
   election that no state transition is triggered by any Backup router
   of equal or lower preference as long as the Master continues to
   function properly.

[Page 5]

   Some environments may find it beneficial to avoid the state
   transition triggered when a router becomes available that is more
   preferential than the current Master.  It may be useful to support an
   override of the immediate convergence to the preferred path.

2.4 Extensible Security

   The virtual router functionality is applicable to a wide range of
   internetworking environments that may employ different security
   policies.  The protocol should require minimal configuration and
   overhead in the insecure operation, provide for strong authentication
   when increased security is required, and allow integration of new
   security mechanisms without breaking backwards compatible operation.

2.5 Efficient Operation over Extended LANs

   Sending IP packets on a multiaccess LAN requires mapping from an IP
   address to a MAC address.  The use of the virtual router MAC address
   in an extended LAN employing learning bridges can have a significant
   effect on the bandwidth overhead of packets sent to the virtual
   router.  If the virtual router MAC address is never used as the
   source address in a link level frame then the station location is
   never learned, resulting in flooding of all packets sent to the
   virtual router.  To improve the efficiency in this environment the
   protocol should: 1) use the virtual router MAC as the source in a
   packet sent by the Master to trigger station learning; 2) trigger a
   message immediately after transitioning to Master to update the
   station learning; and 3) trigger periodic messages from the Master to
   maintain the station learning cache.

3.0 VRRP Overview

   VRRP specifies an election protocol to provide the virtual router
   function described earlier.  All protocol messaging is performed
   using IP multicast datagrams, thus the protocol can operate over a
   variety of multiaccess LAN technologies supporting IP multicast.
   Each VRRP virtual router has a single well-known MAC address
   allocated to it.  This document currently only details the mapping to
   networks using the IEEE 802 48-bit MAC address.  The virtual router
   MAC address is used as the source in all periodic VRRP messages sent
   by the Master router to enable bridge learning in an extended LAN.

   A virtual router is defined by its virtual router identifier (VRID)
   and a set of IP addresses.  A VRRP router may associate a virtual
   router with its real addresses on an interface, and may also be
   configured with additional virtual router mappings and priority for
   virtual routers it is willing to backup.  The mapping between VRID
   and addresses must be coordinated among all VRRP routers on a LAN.

[Page 6]

   However, there is no restriction against reusing a VRID with a
   different address mapping on different LANs.  The scope of each
   virtual router is restricted to a single LAN.

   To minimize network traffic, only the Master for each virtual router
   sends periodic VRRP Advertisement messages.  A Backup router will not
   attempt to pre-empt the Master unless it has higher priority.  This
   eliminates service disruption unless a more preferred path becomes
   available.  It’s also possible to administratively prohibit all pre-
   emption attempts.  The only exception is that a VRRP router will
   always become Master of any virtual router associated with addresses
   it owns.  If the Master becomes unavailable then the highest priority
   Backup will transition to Master after a short delay, providing a
   controlled transition of the virtual router responsibility with
   minimal service interruption.

   VRRP defines three types of authentication providing simple
   deployment in insecure environments, added protection against
   misconfiguration, and strong sender authentication in security
   conscious environments.  Analysis of the protection provided and
   vulnerability of each mechanism is deferred to Section 10.0 Security
   Considerations.  In addition new authentication types and data can be
   defined in the future without affecting the format of the fixed
   portion of the protocol packet, thus preserving backward compatible
   operation.

   The VRRP protocol design provides rapid transition from Backup to
   Master to minimize service interruption, and incorporates
   optimizations that reduce protocol complexity while guaranteeing
   controlled Master transition for typical operational scenarios.  The
   optimizations result in an election protocol with minimal runtime
   state requirements, minimal active protocol states, and a single
   message type and sender.  The typical operational scenarios are
   defined to be two redundant routers and/or distinct path preferences
   among each router.  A side effect when these assumptions are violated
   (i.e., more than two redundant paths all with equal preference) is
   that duplicate packets may be forwarded for a brief period during
   Master election.  However, the typical scenario assumptions are
   likely to cover the vast majority of deployments, loss of the Master
   router is infrequent, and the expected duration in Master election
   convergence is quite small ( << 1 second ).  Thus the VRRP
   optimizations represent significant simplifications in the protocol
   design while incurring an insignificant probability of brief network
   degradation.

[Page 7]

4.  Sample Configurations

4.1  Sample Configuration 1

   The following figure shows a simple network with two VRRP routers
   implementing one virtual router.  Note that this example is provided
   to help understand the protocol, but is not expected to occur in
   actual practice.

                  +—–+      +—–+
                  | MR1 |      | BR1 |
                  |     |      |     |
                  |     |      |     |
     VRID=1       +—–+      +—–+
     IP A ———->*            *<——— IP B
                     |            |
                     |            |
                     |            |
   ——————+————+—–+——–+——–+——–+–
                                        ^        ^        ^        ^
                                        |        |        |        |
                                      (IP A)   (IP A)   (IP A)   (IP A)
                                        |        |        |        |
                                     +–+–+  +–+–+  +–+–+  +–+–+
                                     |  H1 |  |  H2 |  |  H3 |  |  H4 |
                                     +—–+  +—–+  +–+–+  +–+–+

  Legend:
           —+—+—+–  =  Ethernet, Token Ring, or FDDI
                        H  =  Host computer
                       MR  =  Master Router
                       BR  =  Backup Router
                        *  =  IP Address
                     (IP)  =  default router for hosts

   The above configuration shows a very simple VRRP scenario.  In this
   configuration, the end-hosts install a default route to the IP
   address of virtual router #1 (IP A) and both routers run VRRP.  The
   router on the left becomes the Master for virtual router #1 (VRID=1)
   and the router on the right is the Backup for virtual router #1.  If
   the router on the left should fail, the other router will take over
   virtual router #1 and its IP addresses, and provide uninterrupted
   service for the hosts.

   Note that in this example, IP B is not backed up by the router on the
   left.  IP B is only used by the router on the right as its interface
   address.  In order to backup IP B, a second virtual router would have
   to be configured.  This is shown in the next section.

[Page 8]

4.2  Sample Configuration 2

   The following figure shows a configuration with two virtual routers
   with the hosts spitting their traffic between them.  This example is
   expected to be very common in actual practice.

                  +—–+      +—–+
                  | MR1 |      | MR2 |
                  |  &  |      |  &  |
                  | BR2 |      | BR1 |
     VRID=1       +—–+      +—–+         VRID=2
     IP A ———->*            *<———- IP B
                     |            |
                     |            |
                     |            |
   ——————+————+—–+——–+——–+——–+–
                                        ^        ^        ^        ^
                                        |        |        |        |
                                      (IP A)   (IP A)   (IP B)   (IP B)
                                        |        |        |        |
                                     +–+–+  +–+–+  +–+–+  +–+–+
                                     |  H1 |  |  H2 |  |  H3 |  |  H4 |
                                     +—–+  +—–+  +–+–+  +–+–+

  Legend:
           —+—+—+–  =  Ethernet, Token Ring, or FDDI
                        H  =  Host computer
                       MR  =  Master Router
                       BR  =  Backup Router
                        *  =  IP Address
                     (IP)  =  default router for hosts

   In the above configuration, half of the hosts install a default route
   to virtual router #1’s IP address (IP A), and the other half of the
   hosts install a default route to virtual router #2’s IP address (IP
   B).  This has the effect of load balancing the outgoing traffic,
   while also providing full redundancy.

5.0  Protocol

   The purpose of the VRRP packet is to communicate to all VRRP routers
   the priority and the state of the Master router associated with the
   Virtual Router ID.

   VRRP packets are sent encapsulated in IP packets.  They are sent to
   the IPv4 multicast address assigned to VRRP.

[Page 9]

5.1  VRRP Packet Format

   This section defines the format of the VRRP packet and the relevant
   fields in the IP header.

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |Version| Type  | Virtual Rtr ID|   Priority    | Count IP Addrs|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Auth Type   |   Adver Int   |          Checksum             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         IP Address (1)                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            .                                  |
      |                            .                                  |
      |                            .                                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         IP Address (n)                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                     Authentication Data (1)                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                     Authentication Data (2)                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

5.2  IP Field Descriptions

5.2.1  Source Address

   The primary IP address of the interface the packet is being sent
   from.

5.2.2  Destination Address

   The IP multicast address as assigned by the IANA for VRRP is:

       224.0.0.18

   This is a link local scope multicast address.  Routers MUST NOT
   forward a datagram with this destination address regardless of its
   TTL.

5.2.3  TTL

   The TTL MUST be set to 255.  A VRRP router receiving a packet with
   the TTL not equal to 255 MUST discard the packet.

[Page 10]

5.2.4  Protocol

   The IP protocol number assigned by the IANA for VRRP is 112
   (decimal).

5.3 VRRP Field Descriptions

5.3.1  Version

   The version field specifies the VRRP protocol version of this packet.
   This document defines version 2.

5.3.2  Type

   The type field specifies the type of this VRRP packet.  The only
   packet type defined in this version of the protocol is:

       1      ADVERTISEMENT

   A packet with unknown type MUST be discarded.

5.3.3  Virtual Rtr ID (VRID)

   The Virtual Router Identifier (VRID) field identifies the virtual
   router this packet is reporting status for.

5.3.4  Priority

   The priority field specifies the sending VRRP router’s priority for
   the virtual router.  Higher values equal higher priority.  This field
   is an 8 bit unsigned integer field.

   The priority value for the VRRP router that owns the IP address(es)
   associated with the virtual router MUST be 255 (decimal).

   VRRP routers backing up a virtual router MUST use priority values
   between 1-254 (decimal).  The default priority value for VRRP routers
   backing up a virtual router is 100 (decimal).

   The priority value zero (0) has special meaning indicating that the
   current Master has stopped participating in VRRP.  This is used to
   trigger Backup routers to quickly transition to Master without having
   to wait for the current Master to timeout.

5.3.5  Count IP Addrs

   The number of IP addresses contained in this VRRP advertisement.

[Page 11]

5.3.6  Authentication Type

   The authentication type field identifies the authentication method
   being utilized.  Authentication type is unique on a per interface
   basis.  The authentication type field is an 8 bit unsigned integer.
   A packet with unknown authentication type or that does not match the
   locally configured authentication method MUST be discarded.

   The authentication methods currently defined are:

       0 – No Authentication
       1 – Simple Text Password
       2 – IP Authentication Header

5.3.6.1 No Authentication

   The use of this authentication type means that VRRP protocol
   exchanges are not authenticated.  The contents of the Authentication
   Data field should be set to zero on transmission and ignored on
   reception.

5.3.6.2 Simple Text Password

   The use of this authentication type means that VRRP protocol
   exchanges are authenticated by a clear text password.  The contents
   of the Authentication Data field should be set to the locally
   configured password on transmission.  There is no default password.
   The receiver MUST check that the Authentication Data in the packet
   matches its configured authentication string.  Packets that do not
   match MUST be discarded.

   Note that there are security implications to using Simple Text
   password authentication, and one should see the Security
   Consideration section of this document.

5.3.6.3 IP Authentication Header

   The use of this authentication type means the VRRP protocol exchanges
   are authenticated using the mechanisms defined by the IP
   Authentication Header [AUTH] using "The Use of HMAC-MD5-96 within ESP
   and AH" [HMAC].  Keys may be either configured manually or via a key
   distribution protocol.

   If a packet is received that does not pass the authentication check
   due to a missing authentication header or incorrect message digest,
   then the packet MUST be discarded.  The contents of the
   Authentication Data field should be set to zero on transmission and
   ignored on reception.

[Page 12]

5.3.7 Advertisement Interval (Adver Int)

   The Advertisement interval indicates the time interval (in seconds)
   between ADVERTISEMENTS.  The default is 1 second.  This field is used
   for troubleshooting misconfigured routers.

5.3.8 Checksum

   The checksum field is used to detect data corruption in the VRRP
   message.

   The checksum is the 16-bit one’s complement of the one’s complement
   sum of the entire VRRP message starting with the version field.  For
   computing the checksum, the checksum field is set to zero.

5.3.9  IP Address(es)

   One or more IP addresses that are associated with the virtual router.
   The number of addresses included is specified in the "Count IP Addrs"
   field.  These fields are used for troubleshooting misconfigured
   routers.

5.3.10  Authentication Data

   The authentication string is currently only utilized for simple text
   authentication, similar to the simple text authentication found in
   the Open Shortest Path First routing protocol [OSPF].  It is up to 8
   characters of plain text.  If the configured authentication string is
   shorter than 8 bytes, the remaining space MUST be zero-filled.  Any
   VRRP packet received with an authentication string that does not
   match the locally configured authentication string MUST be discarded.
   The authentication string is unique on a per interface basis.

   There is no default value for this field.

6.  Protocol State Machine

6.1 Parameters

6.1.1 Parameters per Interface

   Authentication_Type     Type of authentication being used.  Values
                           are defined in section 5.3.6.

   Authentication_Data     Authentication data specific to the
                           Authentication_Type being used.

[Page 13]

6.1.2 Parameters per Virtual Router

   VRID                    Virtual Router Identifier.  Configured item
                           in the range 1-255 (decimal).  There is no
                           default.

   Priority                Priority value to be used by this VRRP
                           router in Master election for this virtual
                           router.  The value of 255 (decimal) is
                           reserved for the router that owns the IP
                           addresses associated with the virtual
                           router.  The value of 0 (zero) is reserved
                           for Master router to indicate it is
                           releasing responsibility for the virtual
                           router.  The range 1-254 (decimal) is
                           available for VRRP routers backing up the
                           virtual router.  The default value is 100
                           (decimal).

   IP_Addresses            One or more IP addresses associated with
                           this virtual router.  Configured item.  No
                           default.

   Advertisement_Interval  Time interval between ADVERTISEMENTS
                           (seconds).  Default is 1 second.

   Skew_Time               Time to skew Master_Down_Interval in
                           seconds.  Calculated as:

                              ( (256 – Priority) / 256 )

   Master_Down_Interval    Time interval for Backup to declare Master
                           down (seconds).  Calculated as:

                              (3 * Advertisement_Interval) + Skew_time

   Preempt_Mode            Controls whether a higher priority Backup
                           router preempts a lower priority Master.
                           Values are True to allow preemption and
                           False to not prohibit preemption.  Default
                           is True.

                           Note: Exception is that the router that owns
                           the IP address(es) associated with the
                           virtual router always pre-empts independent
                           of the setting of this flag.

[Page 14]

6.2 Timers

   Master_Down_Timer       Timer that fires when ADVERTISEMENT has not
                           been heard for Master_Down_Interval.

   Adver_Timer             Timer that fires to trigger sending of
                           ADVERTISEMENT based on
                           Advertisement_Interval.

6.3  State Transition Diagram

                          +—————+
               +———>|               |<————-+
               |          |  Initialize   |              |
               |   +——|               |———-+   |
               |   |      +—————+          |   |
               |   |                                 |   |
               |   V                                 V   |
       +—————+                       +—————+
       |               |———————->|               |
       |    Master     |                       |    Backup     |
       |               |<———————-|               |
       +—————+                       +—————+

6.4  State Descriptions

   In the state descriptions below, the state names are identified by
   {state-name}, and the packets are identified by all upper case
   characters.

   A VRRP router implements an instance of the state machine for each
   virtual router election it is participating in.

6.4.1   Initialize

   The purpose of this state is to wait for a Startup event.  If a
   Startup event is received, then:

    – If the Priority = 255 (i.e., the router owns the IP address(es)
      associated with the virtual router)

       o Send an ADVERTISEMENT
       o Broadcast a gratuitous ARP request containing the virtual
         router MAC address for each IP address associated with the
         virtual router.
       o Set the Adver_Timer to Advertisement_Interval
       o Transition to the {Master} state

[Page 15]

      else

       o Set the Master_Down_Timer to Master_Down_Interval
       o Transition to the {Backup} state

      endif

6.4.2   Backup

   The purpose of the {Backup} state is to monitor the availability and
   state of the Master Router.

   While in this state, a VRRP router MUST do the following:

    – MUST NOT respond to ARP requests for the IP address(s) associated
      with the virtual router.

    – MUST discard packets with a destination link layer MAC address
      equal to the virtual router MAC address.

    – MUST NOT accept packets addressed to the IP address(es) associated
      with the virtual router.

    – If a Shutdown event is received, then:

       o Cancel the Master_Down_Timer
       o Transition to the {Initialize} state

      endif

    – If the Master_Down_Timer fires, then:

       o Send an ADVERTISEMENT
       o Broadcast a gratuitous ARP request containing the virtual
         router MAC address for each IP address associated with the
         virtual router
       o Set the Adver_Timer to Advertisement_Interval
       o Transition to the {Master} state

      endif

    – If an ADVERTISEMENT is received, then:

         If the Priority in the ADVERTISEMENT is Zero, then:

          o Set the Master_Down_Timer to Skew_Time

         else:

[Page 16]

            If Preempt_Mode is False, or If the Priority in the
            ADVERTISEMENT is greater than or equal to the local
            Priority, then:

             o Reset the Master_Down_Timer to Master_Down_Interval

            else:

             o Discard the ADVERTISEMENT

            endif
         endif
      endif

6.4.3   Master

   While in the {Master} state the router functions as the forwarding
   router for the IP address(es) associated with the virtual router.

   While in this state, a VRRP router MUST do the following:

    – MUST respond to ARP requests for the IP address(es) associated
      with the virtual router.

    – MUST forward packets with a destination link layer MAC address
      equal to the virtual router MAC address.

    – MUST NOT accept packets addressed to the IP address(es) associated
      with the virtual router if it is not the IP address owner.

    – MUST accept packets addressed to the IP address(es) associated
      with the virtual router if it is the IP address owner.

    – If a Shutdown event is received, then:

       o Cancel the Adver_Timer
       o Send an ADVERTISEMENT with Priority = 0
       o Transition to the {Initialize} state

      endif

    – If the Adver_Timer fires, then:

       o Send an ADVERTISEMENT
       o Reset the Adver_Timer to Advertisement_Interval

      endif

[Page 17]

    – If an ADVERTISEMENT is received, then:

         If the Priority in the ADVERTISEMENT is Zero, then:

          o Send an ADVERTISEMENT
          o Reset the Adver_Timer to Advertisement_Interval

         else:

            If the Priority in the ADVERTISEMENT is greater than the
            local Priority,
            or
            If the Priority in the ADVERTISEMENT is equal to the local
            Priority and the primary IP Address of the sender is greater
            than the local primary IP Address, then:

             o Cancel Adver_Timer
             o Set Master_Down_Timer to Master_Down_Interval
             o Transition to the {Backup} state

            else:

             o Discard ADVERTISEMENT

            endif
         endif
      endif

7.  Sending and Receiving VRRP Packets

7.1  Receiving VRRP Packets

   Performed the following functions when a VRRP packet is received:

      – MUST verify that the IP TTL is 255.
      – MUST verify the VRRP version
      – MUST verify that the received packet length is greater than or
        equal to the VRRP header
      – MUST verify the VRRP checksum
      – MUST perform authentication specified by Auth Type

   If any one of the above checks fails, the receiver MUST discard the
   packet, SHOULD log the event and MAY indicate via network management
   that an error occurred.

      – MUST verify that the VRID is valid on the receiving interface

   If the above check fails, the receiver MUST discard the packet.

[Page 18]

      – MAY verify that the IP address(es) associated with the VRID are
        valid

   If the above check fails, the receiver SHOULD log the event and MAY
   indicate via network management that a misconfiguration was detected.
   If the packet was not generated by the address owner (Priority does
   not equal 255 (decimal)), the receiver MUST drop the packet,
   otherwise continue processing.

      – MUST verify that the Adver Interval in the packet is the same as
        the locally configured for this virtual router

   If the above check fails, the receiver MUST discard the packet,
   SHOULD log the event and MAY indicate via network management that a
   misconfiguration was detected.

7.2 Transmitting VRRP Packets

   The following operations MUST be performed when transmitting a VRRP
   packet.

      – Fill in the VRRP packet fields with the appropriate virtual
        router configuration state
      – Compute the VRRP checksum
      – Set the source MAC address to Virtual Router MAC Address
      – Set the source IP address to interface primary IP address
      – Set the IP protocol to VRRP
      – Send the VRRP packet to the VRRP IP multicast group

   Note: VRRP packets are transmitted with the virtual router MAC
   address as the source MAC address to ensure that learning bridges
   correctly determine the LAN segment the virtual router is attached
   to.

7.3 Virtual Router MAC Address

   The virtual router MAC address associated with a virtual router is an
   IEEE 802 MAC Address in the following format:

      00-00-5E-00-01-{VRID} (in hex in internet standard bit-order)

   The first three octets are derived from the IANA’s OUI.  The next two
   octets (00-01) indicate the address block assigned to the VRRP
   protocol.  {VRID} is the VRRP Virtual Router Identifier.  This
   mapping provides for up to 255 VRRP routers on a network.

[Page 19]

8.  Operational Issues

8.1 ICMP Redirects

   ICMP Redirects may be used normally when VRRP is running between a
   group of routers.  This allows VRRP to be used in environments where
   the topology is not symmetric.

   The IP source address of an ICMP redirect should be the address the
   end host used when making its next hop routing decision.  If a VRRP
   router is acting as Master for virtual router(s) containing addresses
   it does not own, then it must determine which virtual router the
   packet was sent to when selecting the redirect source address.  One
   method to deduce the virtual router used is to examine the
   destination MAC address in the packet that triggered the redirect.

   It may be useful to disable Redirects for specific cases where VRRP
   is being used to load share traffic between a number of routers in a
   symmetric topology.

8.2  Host ARP Requests

   When a host sends an ARP request for one of the virtual router IP
   addresses, the Master virtual router MUST respond to the ARP request
   with the virtual MAC address for the virtual router.  The Master
   virtual router MUST NOT respond with its physical MAC address.  This
   allows the client to always use the same MAC address regardless of
   the current Master router.

   When a VRRP router restarts or boots, it SHOULD not send any ARP
   messages with its physical MAC address for the IP address it owns, it
   should only send ARP messages that include Virtual MAC addresses.
   This may entail:

    – When configuring an interface, VRRP routers should broadcast a
      gratuitous ARP request containing the virtual router MAC address
      for each IP address on that interface.

    – At system boot, when initializing interfaces for VRRP operation;
      delay gratuitous ARP requests and ARP responses until both the IP
      address and the virtual router MAC address are configured.

8.3 Proxy ARP

   If Proxy ARP is to be used on a VRRP router, then the VRRP router
   must advertise the Virtual Router MAC address in the Proxy ARP
   message.  Doing otherwise could cause hosts to learn the real MAC
   address of the VRRP router.

[Page 20]

9.  Operation over FDDI and Token Ring

9.1 Operation over FDDI

   FDDI interfaces remove from the FDDI ring frames that have a source
   MAC address matching the device’s hardware address.  Under some
   conditions, such as router isolations, ring failures, protocol
   transitions, etc., VRRP may cause there to be more than one Master
   router.  If a Master router installs the virtual router MAC address
   as the hardware address on a FDDI device, then other Masters’
   ADVERTISEMENTS will be removed from the ring during the Master
   convergence, and convergence will fail.

   To avoid this an implementation SHOULD configure the virtual router
   MAC address by adding a unicast MAC filter in the FDDI device, rather
   than changing its hardware MAC address.  This will prevent a Master
   router from removing any ADVERTISEMENTS it did not originate.

9.2  Operation over Token Ring

   Token ring has several characteristics which make running VRRP
   difficult. These include:

    – In order to switch to a new master located on a different bridge
      token ring segment from the previous master when using source
      route bridges, a mechanism is required to update cached source
      route information.

    – No general multicast mechanism supported across old and new token
      ring adapter implementations. While many newer token ring adapters
      support group addresses, token ring functional address support is
      the only generally available multicast mechanism. Due to the
      limited number of token ring functional addresses these may
      collide with other usage of the same token ring functional
      addresses.

   Due to these difficulties, the preferred mode of operation over token
   ring will be to use a token ring functional address for the VRID
   virtual MAC address. Token ring functional addresses have the two
   high order bits in the first MAC address octet set to B’1′.  They
   range from 03-00-00-00-00-80 to 03-00-02-00-00-00 (canonical format).
   However, unlike multicast addresses, there is only one unique
   functional address per bit position. The functional addresses
   addresses  03-00-00-10-00-00 through 03-00-02-00-00-00 are reserved
   by the Token Ring Architecture [TKARCH] for user-defined
   applications.  However, since there are only 12 user-defined token
   ring functional addresses, there may be other non-IP protocols using
   the same functional address. Since the Novell IPX [IPX] protocol uses

[Page 21]

   the 03-00-00-10-00-00 functional address, operation of VRRP over
   token ring will avoid use of this functional address. In general,
   token ring VRRP users will be responsible for resolution of other
   user-defined token ring functional address conflicts.

   VRIDs are mapped directly to token ring functional addresses. In
   order to decrease the likelihood of functional address conflicts,
   allocation will begin with the largest functional address. Most non-
   IP protocols use the first or first couple user-defined functional
   addresses and it is expected that VRRP users will choose VRIDs
   sequentially starting with 1.

   VRID      Token Ring Functional Address
   —-      —————————–
      1             03-00-02-00-00-00
      2             03-00-04-00-00-00
      3             03-00-08-00-00-00
      4             03-00-10-00-00-00
      5             03-00-20-00-00-00
      6             03-00-40-00-00-00
      7             03-00-80-00-00-00
      8             03-00-00-01-00-00
      9             03-00-00-02-00-00
     10             03-00-00-04-00-00
     11             03-00-00-08-00-00

   Or more succinctly, octets 3 and 4 of the functional address are
   equal to (0×4000 >> (VRID – 1)) in non-canonical format.

   Since a functional address cannot be used used as a MAC level source
   address, the real MAC address is used as the MAC source address in
   VRRP advertisements. This is not a problem for bridges since packets
   addressed to functional addresses will be sent on the spanning-tree
   explorer path [802.1D].

   The functional address mode of operation MUST be implemented by
   routers supporting VRRP on token ring.

   Additionally, routers MAY support unicast mode of operation to take
   advantage of newer token ring adapter implementations which support
   non-promiscuous reception for multiple unicast MAC addresses and to
   avoid both the multicast traffic and usage conflicts associated with
   the use of token ring functional addresses. Unicast mode uses the
   same mapping of VRIDs to virtual MAC addresses as Ethernet.  However,
   one important difference exists. ARP request/reply packets contain
   the virtual MAC address as the source MAC address. The reason for
   this is that some token ring driver implementations keep a cache of
   MAC address/source routing information independent of the ARP cache.

[Page 22]

   Hence, these implementations need have to receive a packet with the
   virtual MAC address as the source address in order to transmit to
   that MAC address in a source-route bridged network.

   Unicast mode on token ring has one limitation which should be
   considered.  If there are VRID routers on different source-route
   bridge segments and there are host implementations which keep their
   source-route information in the ARP cache and do not listen to
   gratuitous ARPs, these hosts will not update their ARP source-route
   information correctly when a switch-over occurs. The only possible
   solution is to put all routers with the same VRID on the same source-
   bridge segment and use techniques to prevent that bridge segment from
   being a single point of failure. These techniques are beyond the
   scope this document.

   For both the multicast and unicast mode of operation, VRRP
   advertisements sent to 224.0.0.18 should be encapsulated as described
   in [RFC1469].

10. Security Considerations

   VRRP is designed for a range of internetworking environments that may
   employ different security policies.  The protocol includes several
   authentication methods ranging from no authentication, simple clear
   text passwords, and strong authentication using IP Authentication
   with MD5 HMAC.  The details on each approach including possible
   attacks and recommended environments follows.

   Independent of any authentication type VRRP includes a mechanism
   (setting TTL=255, checking on receipt) that protects against VRRP
   packets being injected from another remote network.  This limits most
   vulnerabilities to local attacks.

10.1 No Authentication

   The use of this authentication type means that VRRP protocol
   exchanges are not authenticated.  This type of authentication SHOULD
   only be used in environments were there is minimal security risk and
   little chance for configuration errors (e.g., two VRRP routers on a
   LAN).

10.2 Simple Text Password

   The use of this authentication type means that VRRP protocol
   exchanges are authenticated by a simple clear text password.

[Page 23]

   This type of authentication is useful to protect against accidental
   misconfiguration of routers on a LAN.  It protects against routers
   inadvertently backing up another router.  A new router must first be
   configured with the correct password before it can run VRRP with
   another router.  This type of authentication does not protect against
   hostile attacks where the password can be learned by a node snooping
   VRRP packets on the LAN.  The Simple Text Authentication combined
   with the TTL check makes it difficult for a VRRP packet to be sent
   from another LAN to disrupt VRRP operation.

   This type of authentication is RECOMMENDED when there is minimal risk
   of nodes on a LAN actively disrupting VRRP operation.  If this type
   of authentication is used the user should be aware that this clear
   text password is sent frequently, and therefore should not be the
   same as any security significant password.

10.3 IP Authentication Header

   The use of this authentication type means the VRRP protocol exchanges
   are authenticated using the mechanisms defined by the IP
   Authentication Header [AUTH] using "The Use of HMAC-MD5-96 within ESP
   and AH", [HMAC].  This provides strong protection against
   configuration errors, replay attacks, and packet
   corruption/modification.

   This type of authentication is RECOMMENDED when there is limited
   control over the administration of nodes on a LAN.  While this type
   of authentication does protect the operation of VRRP, there are other
   types of attacks that may be employed on shared media links (e.g.,
   generation of bogus ARP replies) which are independent from VRRP and
   are not protected.

11. Acknowledgments

   The authors would like to thank Glen Zorn, and Michael Lane, Clark
   Bremer, Hal Peterson, Tony Li, Barbara Denny, Joel Halpern, Steve
   Bellovin, and Thomas Narten for their comments and suggestions.

12.  References

   [802.1D]  International Standard ISO/IEC 10038: 1993, ANSI/IEEE Std
             802.1D, 1993 edition.

   [AUTH]    Kent, S., and R. Atkinson, "IP Authentication Header",
             Work in Progress.

   [DISC]    Deering, S., "ICMP Router Discovery Messages", 1256,
             September 1991.

[Page 24]

   [DHCP]    Droms, R., "Dynamic Host Configuration Protocol", 2131,
             March 1997.

   [HMAC]    Madson, C., and R. Glenn, "The Use of HMAC-MD5-96 within
             ESP and AH", Work in Progress.

   [HSRP]    Li, T., Cole, B., Morton, P., and D. Li, "Cisco Hot Standby
             Router Protocol (HSRP)", 2281, March 1998.

   [IPSTB]   Higginson, P., M. Shand, "Development of Router Clusters to
             Provide Fast Failover in IP Networks", Digital Technical
             Journal, Volume 9 Number 3, Winter 1997.

   [IPX]     Novell Incorporated., "IPX Router Specification", Version
             1.10, October 1992.

   [OSPF]    Moy, J., "OSPF Version 2", STD 54, 2328, April 1998.

   [RIP]     Hedrick, C., "Routing Information Protocol", 1058,
             June 1988.

   [RFC1469] Pusateri, T., "IP over Token Ring LANs", 1469, June
             1993.

   [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
             Requirement Levels", BCP 14, 2119, March 1997.

   [TKARCH]  IBM Token-Ring Network, Architecture Reference, Publication
             SC30-3374-02, Third Edition, (September, 1989).

13. Authors’ Addresses

   Steven Knight                        Phone: +1 612 943-8990
   Ascend Communications                EMail: Steven.Knight@ascend.com
   High Performance Network Division
   10250 Valley View Road, Suite 113
   Eden Prairie, MN USA 55344
   USA

   Douglas Weaver                       Phone: +1 612 943-8990
   Ascend Communications                EMail: Doug.Weaver@ascend.com
   High Performance Network Division
   10250 Valley View Road, Suite 113
   Eden Prairie, MN USA 55344
   USA

[Page 25]

   David Whipple                        Phone: +1 206 703-3876
   Microsoft Corporation                EMail: dwhipple@microsoft.com
   One Microsoft Way
   Redmond, WA USA 98052-6399
   USA

   Robert Hinden                        Phone: +1 408 990-2004
   Nokia                                EMail: hinden@iprg.nokia.com
   232 Java Drive
   Sunnyvale, CA 94089
   USA

   Danny Mitzel                         Phone: +1 408 990-2037
   Nokia                                EMail: mitzel@iprg.nokia.com
   232 Java Drive
   Sunnyvale, CA 94089
   USA

   Peter Hunt                           Phone: +1 408 990-2093
   Nokia                                EMail: hunt@iprg.nokia.com
   232 Java Drive
   Sunnyvale, CA 94089
   USA

   P. Higginson                         Phone: +44 118 920 6293
   Digital Equipment Corp.              EMail: higginson@mail.dec.com
   Digital Park
   Imperial Way
   Reading
   Berkshire
   RG2 0TE
   UK

   M. Shand                             Phone: +44 118 920 4424
   Digital Equipment Corp.              EMail: shand@mail.dec.com
   Digital Park
   Imperial Way
   Reading
   Berkshire
   RG2 0TE
   UK

   Acee Lindem                          Phone: 1-919-254-1805
   IBM Corporation                      E-Mail: acee@raleigh.ibm.com
   P.O. Box 12195
   Research Triangle Park, NC  27709
   USA

[Page 26]

14.  Full Copyright Statement

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

[Page 27]

相关日志

2009年8月25日 | 分类: 他山之石 | 标签: ,

clip_image001

clip_image001[1]

现在的小孩子真是牛…… ­

这是云南师大附中现高三一位同学的原创 ­

­

clip_image004­

clip_image006­

­

clip_image008­

­

clip_image010­

­

clip_image012­

­

clip_image014­

­

clip_image016­

­

clip_image018­

­

clip_image020­

­

clip_image022­

­

clip_image024­

­

clip_image026­

­

clip_image028­

­

clip_image030­

­

clip_image032­

­

clip_image034­

­

clip_image036­

­

clip_image038­

­

clip_image040­

­

clip_image042­

­

clip_image044­

­

clip_image046­

­

clip_image048­

­

clip_image050­

­

clip_image052­

­

clip_image054­

­

clip_image056­

­

clip_image058­

­

clip_image060­

­

clip_image061­

­

相关日志

2009年8月21日 | 分类: 大象杂谈 | 标签: ,

腾讯新闻上说,章子怡到南京宣传新片,迟到到场,并不向现场等待的观众和媒体说明原因,有女记者问其上次杭州媒体见面会亦迟到,并撒谎,何解?章竟“当场飙泪”。章大牌被“force to the corner”后,竟然玩起了如此下三滥招式,实在令人不齿。如此说来,章还不如戴文青木。

1142903369990

相关日志

Page 1 of 2712345»...Last »
本WordPress博客由爱写字提供技术支持