BGP border gateway protocol 边界网关路由协议
内部网关协议 IGP:rip ospf isis (eigrp)
外部网关协议 EGP:EGP(现今已经被淘汰了)
ospf 支持的网络20000条
BGP
针对大型网络 大型运营商(电信 联通 中小型企业较少用)
BGP运行在IGP上
BGP可以跨路由器建立邻居
BGP常见的报文:open、keepalive、update
BGP更重要的作用是传递路由,不单仅是通信。
ospf用组播建立邻居
bgp用单播建立邻居
bgp传递路由的两种方式
network
import引入
R1
in lo 0
ip add 1.1.1.1 24
in g0/0
ip add 12.1.1.1 24
R2
in lo0
ip add 2.2.2.2 24
in g0/0
ip add 12.1.1.2 24
R1
ospf 1
area 0
net 1.1.1.0 0.0.0.255
net 12.1.1.0 0.0.0.255
R2
ospf 1
area 0
net 2.2.2.0 0.0.0.255
net 12.1.1.0 0.0.0.255
R