CS 168 · DISCUSSION 05 · GUIDED REASONING WORKBOOK
这次所有 path 都先问“谁会告诉谁”,再问 shortest;没有被 export 的路径不属于候选集。
无需离开 CourseStack:先预测,再在表格、时间线或状态空间里完成推导;卡住时逐层打开提示,最后才展开解释与变式。
已阅读 Spring 2026 worksheet 与 official solution;以下是原创等价练习。官方 IDs 用于 coverage,对精确原题请回到页末 PDF。
对应官方 1.1、1.2、1.3、1.4
Why the official problem exists:区分 iBGP、IGP、path vector 与 classless prefix 的职责。
AS65000 有两个 border routers B1/B2 和内部 R1;B1 从外部学到 203.0.113.0/24。
先预测:谁负责让 R1 知道这条外部 route?
为 eBGP、iBGP、IGP 写“消息边界、携带什么、解决什么”;再给“BGP 总选最短 path”构造 local-pref 反例。
协议运行在 AS 边界还是内部?
外部 prefix knowledge 与到 border next hop 的内部 reachability 是两份 state。
先让 customer path 比 peer path 长。
eBGP 学外部路径;iBGP 在 AS 内传播;IGP 提供内部 next-hop reachability。AS-PATH 防环且支持策略;prefix 是 CIDR。高 local-pref customer path 可胜过短 peer path。
把 RIB 中“目的 prefix route”和 IGP 中“如何到 next hop”拆开,就不会把三个协议混成一个。
B2 的 IGP next hop 不可达但 iBGP route 仍存在;FIB 应发生什么?
对应官方 2.1、2.2、2.3、2.4、2.5
Why the official problem exists:推一条外部 prefix 进入、穿过 AS、被本地 cost/policy 选择的完整链。
Berkeley 同时向 Comcast 与 Verizon 购买 transit;Comcast 便宜,但停止向 Berkeley export Stanford route。
先预测:Berkeley 能否继续“选择便宜 Comcast”去 Stanford?
| stage | state/message | result |
|---|---|---|
| eBGP import | 两个 providers 的 UPDATE | ____ |
| policy select | cost/local-pref | ____ |
| iBGP | best external route | ____ |
| IGP | border next-hop | ____ |
先判断 route 是否存在,再比较偏好。
export filter 删除候选,local-pref 排序剩余候选。
Comcast withdraw/filter 后只剩 Verizon。
正常时可偏好 Comcast;filter 后 Berkeley 根本收不到那条 route,选择 Verizon。iBGP 把 chosen external reachability 带到内部 routers,IGP 决定怎样到 chosen border。
availability、policy ranking、internal delivery 是三个不同 transition。
Comcast 仍 export,但 Berkeley 将 Verizon local-pref 调高;对外可见性与内部出口分别怎样变?
对应官方 3.1、3.2、3.3、3.4、3.5、3.6
Why the official problem exists:训练 valley-free export 和非互惠 policy 导致的单向 reachability。
箭头旁的 customer 表示左侧是右侧的 customer。选择 customer > peer > provider;向 customer 可 export 全部 routes,向 peer/provider 只 export customer routes。
先预测:AS2 会把 peer-learned AS5 route 告诉 provider AS1 吗?
| case | 先反向传播 advertisement | 再写 data path / failure |
|---|---|---|
| 3.1 AS4→AS5 | AS5→AS3→AS2→AS4 | ____ |
| 3.2 AS6→AS5 | AS2 不把 peer route 给 AS1;AS7 路径可见 | ____ |
| 3.3 AS1→AS9 | AS9→AS8→AS7→AS1 | ____ |
| 3.4–3.5 alliance filter | 跨阵营不 export | 哪些方向断开? |
| 3.6 spy agreement | AS1→AS7 多给 customer routes | 缺失的 AS5 route 真被补上了吗? |
route propagation 与 data direction 相反。
customer route 可广泛 export;peer/provider route 只给 customers。
先从 AS5 向外画谁真正学得到。
AS4→AS5 走 4→2→3→5。AS6 不能经 2:AS2 从 peer AS3 学到的 route 不会给 provider AS1,因此走 6→1→7→8→5。AS1→AS9 走 1→7→8→9。阵营 filter 删除跨阵营 advertisements 后,相应 data reachability 消失。最后即便 AS1 向 AS7 多 export 自己的 customer routes,AS1 仍未从 AS2 得到 AS5 的 peer-learned route,所以 AS10→AS5 仍不成立。
data 只能走控制面实际传播出的 directed reachability graph。
把 AS2—AS3 从 peer 改为 customer-provider(AS3 是 AS2 customer),重新传播并指出新可达对。
给 7 个 AS 自造关系图,先从两个 destinations 传播 UPDATE,再回答三组双向 data reachability;每条选择标注 import、select、export。