OSPF: Open Shortest Path First Distributed Link state protocol Using SPF algorithm
OSPF: Open Shortest Path First OSPF --- Three Key Points Who: Exchange Link State with ALL routers Flooding What: Link State with neighborhood routers Especial METRIC When: Link State changes
OSPF: Open Shortest Path First OSPF Building a link state database in all routers Synchronous link state for all routers network topology Fast convergence Flooding
OSPF: Open Shortest Path First Area in OSPF Big network Divided into several AREA Area ID: 32 bits, dotted decimal No more than 200 routers in an area
OSPF: Open Shortest Path First Backbone Area Backbone Router Boarder Router 至其他自治系统 自治系统 AS 主干区域 0.0.0.0 网 1 R 1 R 3 R 5 R 6 R 7 网 6 R 9 R 2 网 2 R 4 网 7 网 3 网 5 R 8 网 8 网 4 区域 0.0.0.1 区域 0.0.0.3 区域 0.0.0.2
位 OSPF 分组 0 8 16 31 版 本 类 型 分 组 长 度 ( 包含首部 ) 路 由 器 标 识 符 ( 路由器 IP) 区 域 标 识 符 检 验 和 鉴别类型 (1: 使用,0: 不使用 ) 鉴 别 鉴 别 24 字节 OSPF 分组首部 类型 1 至类型 5 的 OSPF 分组 IP 数据报首部 OSPF 分组 IP 数据报
OSPF: Open Shortest Path First 5 Packet Types Hello: 1 hello/10s, 40s no hello Finding and keeping neighbor routers Database Description Giving the description of link state Link State Request Requesting link state of a router Link State Update Update the detail link state with flooding Link State Acknowledgment Confirm the link state updating
OSPF 的基本操作 确定可达性 达到数据库的同步 新情况下的同步 问候问候数据库描述数据库描述数据库描述数据库描述链路状态请求链路状态更新链路状态确认
OSPF 使用的是可靠的洪泛法 t 1 更新报文 R t 2 R t 3 R t t 4 R ACK 报文
OSPF: Open Shortest Path First Other Characteristics Refresh link states in the database every 30 minutes Better performance than RIP Fast response for BAD news Less than 100ms LAN with several routers: Designated router Speaker
BGP: Boarder Gateway Protocol Different with IGP Huge network scale: Hard to route among the AS: Hard to define a meaningful objective function Optimal routing Achievable routing Optimal -- Achievable
BGP: Boarder Gateway Protocol BGP Speaker Typical the boarder router Connect and Build a BGP Session Using TCP: Exchange Routing Information
BGP: Boarder Gateway Protocol BGP Speaker AS 1 BGP 发言人 BGP 发言人 AS 2 BGP 发言人 BGP 发言人 AS 4 AS 3 BGP 发言人 AS 5
BGP: Boarder Gateway Protocol A Question of connected graph AS 1 AS 2 AS 3 AS 4 AS 5 AS 1 AS 2 AS 3 AS 4 AS 5
BGP: Boarder Gateway Protocol Speakers exchange Path Vector 自治系统 AS 2 的 BGP 发言人通知主干网的 BGP 发言人 : 要到达网络 N 1, N 2, N 3 和 N 4 可经过 AS 2 主干网 (AS 1 ) 地区 ISP (AS 2 ) 地区 ISP (AS 3 ) 本地 ISP(AS 4 ) N 1, N 2 本地 ISP(AS 5 ) N 3, N 4 本地 ISP(AS 6 ) N 5 本地 ISP(AS 7 ) N 6, N 7
BGP: Boarder Gateway Protocol Characters Numbers of Routing Nodes: Number of AS Numbers of Speakers: Usually boarder routers Support CIDR Only Exchange Routing Information that changed
BGP: Boarder Gateway Protocol 4 Types of Messages: Open Connect a neighborhood BGP speaker Update Send routing information Keepalive Confirm update and say hello to neighborhood periodically Notification Send detected error
Router A Specific Computer Multi input interface Multi output interface Task: Transmitting packet
Typical Router Structure 3 网络层 2 数据链路层 1 物理层 路由选择处理机 路由选择协议 路由表 路由选择 输入端口 输出端口 1 2 3 分组处理 3 2 1 输入端口 转发表 输出端口 分组转发 1 2 3 交换结构 3 2 1
Router Differences between Forwarding and Routing Routing Finding path Using routing algorithm Dynamic Forwarding After routing Transmitting packets with the path
Processing Packet 输入端口的处理 从线路接收分组 物理层处理 数据链路层处理 网络层处理分组排队 查表和转发 交换结构 输出端口的处理 交换结构 网络层处理分组排队 缓存管理 数据链路层处理 物理层处理 向线路发送分组
Packet Discard Buffer Overflow Most important reason of packet discard Switching Structure I 1 I 2 I 3 (b) 通过总线 总线 O 1 O 2 O 3 I 1 O 1 I 1 互连网络 I 2 I 3 存储器 O 2 O 3 I 2 I 3 (a) 通过存储器 (c) 通过互连网络 O 1 O 2 O 3
Multicast IGMP Multicast Routing 视频服务器 M 90 个 多播组成员共有 90 个 视频服务器 M 发送 1 次多播 1 个 R 2 30 个 R 1 30 个 R 3 30 个 R 4 30 个 30 个 30 个 R 2 多播 1 个 1 个 R 1 复制 1 个 1 个 R 3 R 4 多播 1 个多播 1 个
IGMP (Internet Group Management Protocol) Protocol) 128.56.24.34 135.27.74.52 R 1 IGMP 130.12.14.56 IGMP R 2 多播组 226.15.37.123 R 3 IGMP IGMP R 4 130.12.14.43
Multicast Routing RPB (Reverse Path Broadcasting) R 1 源点 转发多播数据报 收到后即丢弃 R 2 R 3 R 4 R 5 剪除没有组成员的树枝 R 6 R7 R 8
Multicast Routing Tunneling 网 1 ( 支持多播 ) R 1 不支持多播的网络 网 2 ( 支持多播 ) R 2 首部 多播数据报 数据 隧道 网 1 和网 2 中的多播数据报 首部数据 单播 IP 数据报 隧道中通行的单播 IP 数据报 IP in IP
VPN (Virtual Private Network) Local Address Private Address 10.0.0.0 10.255.255.255 10.255.255.255 172.16.0.0 172.31.255.255 172.31.255.255 192.168.0.0 192.168.255.255 192.168.255.255 Used for intra-communication Router refusing to transmit Global Address
VPN (Virtual Private Network) VPN Using Tunneling 本地地址 全球地址 本地地址 125.1.2.3 隧道 194.4.5.6 X 10.1.0.1 部门 A R R 1 2 因特网 部门 B Y 10.2.0.3 使用隧道技术 网络地址 = 10.1.0.0 ( 本地地址 ) 网络地址 = 10.2.0.0 ( 本地地址 )
VPN (Virtual Private Network) VPN Using Tunneling 加密的从 X 到 Y 的内部数据报 外部数据报的数据部分 数据报首部 源地址 :125.1.2.3 目的地址 :194.4.5.6 125.1.2.3 隧道 194.4.5.6 X 10.1.0.1 部门 A R R 1 2 因特网 部门 B Y 10.2.0.3 使用隧道技术 X 10.1.0.1 部门 A 125.1.2.3 194.4.5.6 R R 1 2 虚拟专用网 VPN 部门 B Y 10.2.0.3
NAT (Network Address Translation) Private Address IPx Global Address IPg Destination Address IPy