CCNP听课笔记

接入层 Access: DHCP NAT 端口密度       不需要关心设备性能         
RIPV2 OSPF EIGRP Static           
汇聚层 Distribution: 带宽要高    设备容余     最好不要做策略,影响吞吐量
核心层 Core: 链路容余  设备容余

Converged network traffic mix:
实时流量:Voice and Video traffic
语音呼叫流量:Voice application traffic
关键性流量:Mission-critical applications traffic
办公流量:Transactional traffic
路由更新流量:* Routing update traffic
网络管理流量:Network management traffic
Key requirements:
Performance (bandwidth,delay,jitter------抖动:偏移量)
Security (access,transmission)
 
 
EIGRP------园区网
hello包:建立邻居关系---物理上直连   5s点到点,以太网网络/60s         3 hello time = hold time   以接口为参照点
RTP用于保证EIGR包按顺序可靠的到达对方
DUAL保证100%无环路
PDMs保证支持多种网络协议
EIGRP Neighbor Table
EIGRP Topology Table
EIGRP Routing Table
宣告距离AD = cost between the next-top router and the destination 下一路到目标的开销
可行距离FD = cost from local router = AD of next-top router + cost between the local router and the next-hop router 本地路径到目标的开销
Lowest cost = FD cost
hello:Establish neighbor relationships
update:Send routing updates
query:Ask neighbors about routing information
reply:
ACK:
Same metric components as IGRP
k1 bandwidth
k3 delay
k2 reliability:接口丢包率
k4 loading负载:最大1最小255
k5 MTU
AS 自制系统 同一技术掌控和政策掌控下持续
主类网络边界:没有进行子网划分的情况下默认主网不同
一旦一个路由更新在经过主类网络边界的时候,路由更新的子网掩码会自动的向主类网络号靠拢
子网不连续------丢包------关闭自动汇总
汇总优点:
1.节约链路带宽资源
2.节约内存资源
3.隐藏网络的不稳定性
variance 默认1;当有多条链路
EIGRP所有包只能占用带宽的50%;若在广域网则需修改其占用带宽比例
R0 R1 以太 串口
    
int s1/0
ip addr 192.168.1.1 255.255.255.0
no shutdown
int lo1
ip addr 1.1.1.1 255.255.255.0
router eigrp 1
network 192.168.1.0
network 1.0.0.0
int f0/0
ip addr 172.168.1.1 255.255.255.0
no shutdown
int lo1
ip addr 2.2.2.2 255.255.255.0
router eigrp 1
network 192.168.1.0
network 2.2.2.2 0.0.0.0
no auto-summary
int l0
ip addr 133.133.0.1 255.255.255.0
int l1
ip addr 133.133.1.1 255.255.255.0
int l2
ip addr 133.133.2.1 255.255.255.0
int l3
ip addr 133.133.3.1 255.255.255.0
router eigrp 1
network 133.133.0.0
int s1/0
ip summary-address eigrp 1 133.133.0.0 255.255.252.0                  //手动汇总,需先关闭自动汇总,在出接口中配置
variance 15                         //不等价路径负载均衡
int s1/0
ip bandwidth-percent eigrp 1 20                //单位%
bandwidth 1                //单位Kb
ip bandwidth-percent eigrp 1 10000
Simple password: IS-IS OSPF RIPv2
MD5 authentication: OSPF RIPv2 BGP EIGRP
key chain x                   //两端钥匙链可不相同
key 1                         //序列号
key-string 123123             //密码,中间有空格则吃掉,末尾空格则作为密码
int f0/0
ip authentication key-chain eigrp 1 x     //调用
ip authentication mode eigrp 1 md5        //认证方式
无形中增加了通性延迟;用于密码迁移;一般不推荐使用
do show clock
key chain x
key 1
send-lifetime 1:1:1 jan 1 2009 infinite                //infinite永久有效       密码发送有限期
show key chain
key chain x
key 1
acc 1:1:1 jan 1 2009 infinite                         //密码接收有限期
缺点:
查询边界过大;带宽溃泛;Q--R---R丢包----180s-----置为sia----路由条目删除
EIGRP Stub------只使用在边缘路由器上
router eigrp 1
eigrp stub
show ip eigrp neighbors detail
防止边缘路由器转发数据包
receive-only 与后面的三个状态相互排斥 :其余路由不可学到此设置中的路由
connected:只发送直连路由
static
summary:只发送汇总路由
Default is connected and summary
 
 

OSPF
LSDB--链路状态数据库
精确,收敛快;资源占用较高
ABR 边界靠路由器鉴定;邻居关系hello包;hellotime 10s; 物理上直连
网络类型:
1. 点到点链路:T1/E1
2. 广播型多路访问:同一个网段上支持二个以上节点的接入,支持广播转发;eg. LAN
3. 非广播型多路访问(NBMA):支持三个或三个以上的节点接入,不支持广播包的转发;eg. FR, ATM,X.25, SDH
开销(cost)= 10^8/接口带宽 (BIT)
E:10
FE:1
GE:1
非骨干区域间通讯一定要通过骨干区域;骨干区域为传输区域;SPF算法只能在各自的区域内;常规区域路由环路靠OSPF骨干区域避免;骨干区域路由环路靠SPF算法避免;骨干区域链路状态;常规区域距离矢量
OSPF数据包类型:
1. hello包:建立和维持邻接关系
2. LSU:链路状态更新,里面存放链路状态宣告(LSA)
3. DDP:也叫DBD包,代表LSDB的目录摘要信息
4. LSR:链路状态请求,用于请求特定的LSA
5. LSAck:链路状态确认,用于确认收到的DDP和LSU
OSPF邻接的条件:
1. 物理上直连
2. 区域ID要匹配
3. hello time 和 dead time 要匹配
4. 一旦启用了OSPF路由认证,认证密钥要匹配
5. 如果启用了OSPF末节区域特性,区域内的所有路由器都要启用该特性
int f0/0
ip ospf 1 are 2              宣告

debug ip ospf adj                 动态跟踪(查看6个阶段)
clear ip ospf process        重启进程
串行电路不需选择DR/BDR;因此优先级为0,状态为FULL/-
router ospf 1
router-id 192.168.1.1        指定RD;生效需重启OSPF进程
show ip ospf 查看RD是否生效
物理接口作RD,一旦物理接口出故障时,会导致邻居失效;最好使用逻辑接口作RD
NBMA:不支持广播               2 Router, 1 FR
工业标准(基于RFC):    
1. 非广播(NBMA):hellotime 30s       需选DR/BDR                         手动指定邻居
2. 点到多点(P2M):hellotime 30s      不需选DR/BDR                       自动发现
CISCO标准:
1.广播型:hellotime 10s                需选DR/BDR                         自动发现
2.点到点(P2P):hellotime 10s         不需选DR/BDR                       自动发现
3.点到多点非广播(P2M-NBMA):hellotime 30s      不需选DR/BDR             手动指定邻居
int s0/0
ip ospf network point-to-point      //解决邻居问题   更改网络类型
不同的类型可混合搭配;仅限于特殊模式,一个选DR/BDR,一个不选DR/BDR是不可以混合搭配

3 Router, 1 FR
int s0/0
no ip addr
en f
no frame-relay inv
no shutd
int s0/0.1 poing-to-point
ip addr 192.168.1.1 255.255.255.252
frame-relay interface-dlci 102          点到点映射
exit
exit
int s0/0.2 poing-to-point
ip addr 192.168.1.2 255.255.255.252 
frame-relay interface-dlci 103
frame-relay map ip 192.168.1.2 201 broadcast
network 0.0.0.0 255.255.255.255 area 0
show frame-relay pvc
clear frame-relay inarp

点到多点
int s0/0.3 multipoint
do sh run int s0/0
ip addr 192.168.1.1 255.255.255.252
frame-relay map ip 192.168.1.2 102 broadcast
frame-relay map ip 192.168.1.3 103 broadcast
show ip interface s0/0.1
ip ospf network point-to-multipoint

点到多点非广播
ip ospf network point-to-multipoint non-broadcast
任一边
router ospf 1
neighbor 192.168.1.2    手动指物理接口
neighbor 192.168.1.3

3 Router, 3 loopback, 1 FR
int s0/0
en f
no frame inverse-arp
frame map ip 192.168.1.2 102 broadcast
router ospf
network 0.0.0.0 255.255.255.255 area 0
int s0/0
ip ospf network broadcast 
ip ospf priority 255
clear ip ospf process
选中心路由器作DR
DISR复用 (边缘路由器到边缘路由器)
int s0/0
frame map ip 192.168.1.3 201 broadcast
非广播
指定邻居
router ospf 1
neigh 192.168.1.2 priority 0

CPU占用过高,链路数据库体积变大;路由表体积增加因此OSPF分多个区域
同步只发生在同一区域内
ABR 边缘区域路由器
ASBR 自治系统边界路由器,用于连接边域网络和骨干网络
虚电路:连接被隔离的骨干区域;作用:备份
router ospf 1
area 1 virtual-link 1.1.1.1
show ip ospf neighbor     查看虚电路是否已启用
show ip ospf virtual-link

LSA Types
类型1: Router LSA  
类型2: Network LSA
类型3:  Network Summary LSA
类型4:  AS Summary LSA
类型5:  AS External LSA
类型6:  MOSPF LSA
类型7:  NSSA LSA
1. 它是什么
2. 谁产生
3. 洪泛的范围
类型1: Router LSA:
1. 包含自身所有链路状态信息:自身直连链路的IP前缀(网络号 + 掩码), 接口类型,接口开销,接口优先级
2. 每一个区域里的OSPF路由器都会产生一个用于描述自身链路状态信息的LSA,即Router LSA
3. 仅在本区域内洪泛(即不会经过ABR被洪泛到其它区域)
类型2: Network LSA:
1. 包含DR/BDR所连链路的链路状态信息:DR/BDR直连链路的IP前缀信息,接口类型,接口开销,接口优先级
2. 由DR/BDR产生,用于描述DR/BDR直连链路的信息
3. 仅在本区域内洪泛(即不会经过ABR被洪泛到其它区域)
备注:不需要选举DR/BDR的网络环境就不会产生类型2的LSA
结论:区域内的OSPF路由(表项:O),是由类型1和类型2的LSA生成的
类型3:  Network Summary LSA
1. 用于描述ABR所直连的不同区域之间的链路信息:ABR直连链路的IP前缀信息,接口类型,接口开销,接口优先级
2. ABR产生,用于描述ABR直连链路的信息
3. 可以在整个OSPF网络(区域之间)进行洪泛
备注:单区域(即不存在ABR)的情况下,看不到类型3的LSA
类型4:  AS Summary LSA
1. 用于描述能够到达OSPF网络以外的网络即描述ASBR的信息:ASBR的RID
2. ASBR产生关于自身信息的LSA:Router LSA,但ASBR所在区域的ABR随即将ASBR产生的类型1的LSA转化为类型4的LSA
3. 可以在整个OSPF网络(区域之间)进行洪泛
备注:没有ASBR的OSPF网络里,看不到类型4的LSA
结论:区域间的OSPF路由(表项是 O IA),是由类型3和类型4的LSA构成的
类型5:  AAS External LSA
1. 用于描述OSPF外部网络(如不同的路由协议,或不同OSPF进程)的路由信息
2. ASBR产生,ASBR负责将外部路由条目对应的转化为类型5的LSA
3. 可以在整个OSPF网络(区域之间)进行洪泛
备注:如果没有ASBR的情况下,看不到类型5的LSA
结论:域间的OSPF路由(表项是 O E2 或者是 O E1),是由类型5的LSA构成
O E2 :只计算ASBR到达外部网络的开销,默认模式
O E1 :计算ASBR到达网络的开销,同时,计算本地OSPF路由器到达ASBR的开销(计算内部成本)
router ospf 1
max-lsa 20000
show ip route 
int e0/0
ip ospf cost 200   //不生效,应在出栈接口修改
开销应在链路状态更新传播的出栈接口处修改

度量值全局放大
router ospf 1
auto-cost reference-bandwidth 200      //OSPF基数100,若想放大10倍,则改为1000
router ospf 1
int e0/0
ip ospf 1 area 0

OSPF 路由汇总
int lo0
ip ospf network point-to-point             //OSPF回环口自动改为/32因此须修改
show ip ospf database
router ospf 1
area 1 range 172.16.0.0 255.255.252.0         明细在area 1
域间汇总        OSPF 与  RIP    二种方法
router ospf 1
redistribute rip subnets
redistribute rip subnets metric-type 1
router ospf 1
summary-address 172.16.0.0 255.255.252.0 
summary-address 172.16.0.0 255.255.252.0 not-advertise    不宣告;测试用
summary-address 172.16.0.0 255.255.252.0 tag 1
默认路由(由ASBR产生)前提条件为路由表中有0.0.0.0的路由;二种方法
ip route 0.0.0.0 0.0.0.0 null 0
router ospf 1
default-information originate
router ospf 1
default-information originate always
 
 

show ip ospf database database-summary
stub network / transit network
router ospf 1
area 1 stub               //整个区域都需配置
stub area(工业标准):
1. 拒绝类型5的LSA
2. 一旦将某个区域配置成末节区域,那么,末节区域的ABR会自动的向末节区域宣告一条由类型3的LSA构成的默认路由(O* IA)
限制:
1. 不能是骨干区域
2. 末节区域里不能有ASBR
3. 末节区域上不能存在虚链路
完全末节区域
router ospf 1
area 1 stub no-summary          //中需在ABR路由器上作此设置,另一末节路由设置不变
totally stub area(Cisco私有):
1. 拒绝类型3,4,5的LSA
2. 一旦将某个区域配置成完全末节区域,那么,末节区域的ABR会自动的向末节区域宣告一条由类型3的LSA构成的默认路由(O* IA)
限制:
1. 不能是骨干区域
2. 末节区域里不能有ASBR
3. 末节区域上不能存在虚链路
no-so-stubby area (NSSA,工业标准)
1. 拒绝类型5的LSA
2. ASBR负责将类型5的LSA对应的转化为类型7的LSA
3. NSSA ABR不能够自动的向NSSA区域宣告默认路由,必须通过相应命令让NSSA ABR手动宣告一条基于类型7的LSA组成的默认路由 (O* N2)
router ospf 1
area 1 nssa                         有两个ASBR时,配成末节区域的特性
类型7:  NSSA LSA
1. 用于NSSA区域
2. ASBR产生,ASBR负责将外部类型5的LSA相应的转化为类型7的LSA
3. 只能在NSSA区域进行洪泛             
结论:NSSA区域的OSPF路由(表项是 O N2 或 O N1),由类型7的LSA构成
area 1 nssa default-information-originate
totally no-so-stubby area (totally NSSA, Cisco私有标准)
1. 拒绝类型3,4,5的LSA
2. ASBR负责将类型5的LSA对应的转化为类型7的LSA
3. NSSA ABR会自动的向NSSA区域宣告一条类型3的LSA构成的默认路由(O* IA)
area 1 nssa no-summary default-information-originate

OSPF路由认证类型:
aut:0 代表未启用认证
aut:1 代表明文认证
aut:2 代表MD5认证
debug ip ospf packet                查看OSPF认证
OSPF认证的实施类型:
1. 邻居间认证
2. 区域认证
3. 虚链路认证
认证实施步骤:
1. 先定义认证方式和密钥
2. 应用认证
邻居认证:
1. 明文认证
int s0/0
ip ospf authentication-key cisco
ip ospf authentication
2. MD5认证
int f1/0
ip ospf message-digest-key 1 md5 ciso            可定义多个密钥
ip ospf authentication message-digest            
区域明文认证
int s0/0
ip ospf authentication-key cisco
area 0 authentication
区域MD5认证
int f1/0
ip ospf message-digest-key 1 md5 ciso
area 0 authentication message-digest
ip ospf authentication null            某个接口不参与认证(忽略认证)
虚链路
router ospf 1
area 0 virtual-link 22.22.22.22 au
router ospf 1
area 0 v 11.11.11.11 au
show run | b r o
router ospf 1
area 1 veritual-link 33.33.33.33 authentication authentication-key cisco
area 1 v 22.22.22.22 authentication message-digest
area 1 v 22.22.22.22 message-digest-key 1 md5 cisco
 
 
 
 
IS-IS
ISO开发
L1 LSDB ---- intra area --- i L1  区域内 --- system ID
L2 LSDB ---- inter area --- i L2  区域间 --- area ID
度量标准
1. default -- 可用 
   两种体现: narrow style 接口开销默认值为10,固定,与带宽无关,0-63 狭义        
             wide style 广义 0-10^23
2. error
3. expense
4. delay
NSAP地址
8-26 bytes
area id 
system id --- 6 bytes
NSEL 鉴别上层应用      若值为0表示没有上层应用;路由器上一定为0即NET
49.0001.1111.1111.1111.00
AF area system         NSEL
SNPA
circuit ID
PDU
IS-IS: Hello LSP SNP (PSNP,CSNP)
ES-IS
CLNP
Hello
IIH(IS-IS): Level 1 IIH; Level 2 IIH    点到点为:point-to-point IIH
ISH(IS-ES)
ESH(ES-IS)
LSP
TLV: Type Length Value
扩展性高,后续兼容
DIS 10s广播CSNP --- DSNP --- PSNP
共通的数据库; L1不跨区域
SNP
router isis xx           若只有一个则可以不写      router isis
net 0001.1111.1111.1111.00
int f0/0
ip router isis
show isis topology         度量值
show isis neighbors
show isis database
show clns neighbors          邻居snpa
show clns route
show ip route
二种方式
router isis
is-type levle-1
int f0/0
isis circuit-type levle-1                限制邻接关系;本身数据库不产生变化
int s0/0
isis metric 20 levle-1        修改度量值;源到目下一跳的出站接口,指定相应的Levle
汇总
router isis
summary-address 133.133.133.0 255.255.252.0          默认levle 2
路由重分发:手动将路由协议的信息重新灌入到另一路由协议中
双向重分发(注意环路)/单向重分发+默认路由
router ospf
redistribute rip subnets
router rip
redistribute ospf 1 metric 2           默认度量值无穷大;OSPF默认为20
router eigrp 1
redistribute eigrp 2                自制系统号不同的EIGRP之间的重分发
router isis
redistribute eigrp 1                默认试题值为0
router eigrp 1
redistribute isis level-1 metric 100000 100 255 1 1500  默认level-2
redistribute isis connect metric 100000 100 255 1 1500  isis中重分发eigrp直连的需加此命令
路由策略
被动接口对路由更新做过滤
EIGRP 被动接口不收也不发
access-list 1 deny host 3.3.3.3
access-list 1 permit any any
router eigrp 1
distribute-list 1 out s0/0
isis不支持分发列表
针对链路状态协议只能用进方向
 
route map
不等价双链路 2 router  3 area    ospf
命名方式: 字符串        eg. route-map xx permit|deny 10     模块
挑选 match         match match之间或关系
策略 set           若仅有set无match则针对全体作策略
出栈接口作为ping包的源地址
access-list 1 permit host 1.1.1.1
router-map xx permit 10
match ip addr 1
set ip next-hop 192.168.1.2             强制
debug ip policy
debug ip packet
ping
ip local policy route-map xx 10              全局下,对自身无效
show route-map
route-map xx per 10
match ip add 1
set ip default next-hop 192.168.1.2           转发时先看路由表,下一跳down掉,才使用策略

redistribute rip route-map                调用
路由环路
掩码最长距离;管理距离
router eigrp 1
distance eigrp 100 200
router ospf 1
distance ospf intra-area 130
distance ospf external 130
router ospf 1
distance 125 192.168.1.2 0.0.0.0 1             访问控制列表序列号
access-list 1 permit 5.5.5.5 0.0.0.0          
distance 125 192.168.1.2 0.0.0.0

DHCP
discover 广播 ---- offer 单播 ---- request 单播 ---- acknowlegement 单播
分配地址方式: 
动态: 固定分配   随机
三层设备均可做DHCP服务器(Windows服务器)
基于UDP 68 69
int f0/0
ip addr 192.168.1.1 255.255.255.0
no shutd
service dhcp
no ip dhcp conflict logging           关闭冲突记录
ip dhcp pool x
network 192.168.1.0 /24
exit
ip dhcp excluded-address 192.168.1.1
ip dhcp pool x 
default-router 192.168.1.1
dns-server 61.139.2.69
lease 15
no import all
show ip dhcp binding
验证
int f0/0
ip address dhcp
show ip int bri
广播不跨网段
int e0/1   进栈接口
ip helper-address 192.168.1.1
router ospf 1
router-id 3.3.3.3
net 192.168.1.0 0.0.0.255 area 0
ip dhcp pool y
default-router 192.168.2.1
ip dhcp excluded-address 192.168.2.1
 
 
BGP as by as  自制系统之间   自制系统个数   路径属性    通过TCP连接
EGP: EGP BGP
IGP 度量选路  自制系统内部
Multihoming  多宿主
宿主以ISP为参照点
应用:
多宿主  进栈流量控制
不可用:
不需要策略   家庭上网    设备性能差   不懂BGP
netstat -n    TCP流量
BGP ------ neighbor不直连  BGP所有路由;到达目标网络的相应属性  IP routing最佳路由
BGP扫描进程   ----   IP routing 变化 ---->BGP 路由
open 只建立邻居关系;TCP连接建立好后,出现
keepalive 维持邻居关系 周期性保证
update
notification 当BGP产生故障时发送的包,接收后切断邻居关系
BGP: EBGP  IBGP
TCP链接:SYN----idle;SYN ACK----active;ACK               179
BGP对等体链接:open包----opensent----openconfire----enstablish
EBGP:必须要物理直连      TTL=1 ;通过AS号防环
IBGP:在同一个AS中;承载EBGP更新的桥梁;保证AS的可达性;IBGP水平分割防环,IBGP更新只发一跳,从IBGP对等体学到的更新不会发给任何IBGP对等体;出口之间建BGP会话
BGP重分发入OSPF后,BGP属性无,因此需要IBGP
路由黑洞:数据包从源网络到目标网络的过程中的意外丢弃行为;eg.下一跳不可达,不知道目标地址
解决:重分发(CD不跑IBGP)
BGP邻居关系不能自动建立,只能手动建立;路由宣告手动;原由:数据庞大
IBGP
router bgp 1           一台路由器只能跑一个BGP
neighbor 192.168.1.2 remote-as 1      只能指物理接口的IP
network 1.1.1.1 mask 255.255.255.0    精确匹配
路由条目,邻居手动
属性
well-known
1. well-known mandantory  知名强制   必需有的属性
2. well-known discretionary  知名任意  可有可无
optional
1. option transitive  可选传递        某台设备不支持该属性的BGP更新则原封不动的传下去
2. option nontransitive  可选非传递   丢弃,归为默认值
AS_PATH:经过AS号的顺序组合;不包含自身号码由起源属性代替;前面叠加
NEXT_HOP:源到目标下一站的出站接口;EBGP宣告下一跳该EBGP更新的接口地址
(其它协议:下一台路由器的进站接口);在AS内传递,下一跳不变
ORIGIN起源属性: IGP (i)     EGP(e)    Incomplete(?)         定义该BGP是怎样产生的
  IGP表示通过在BGP中通过network宣告出来的;EGP表示通过EGP重分发出来的;Incomplete表示起源属性不完整,起源源自IGP(OSPF,RIP,EIGRP)    IGP优先于EGP优先于Incomplete
前三种为知名强制
LOCAL_PREF  本地优先级只在IBGP更新中比较;用于影响出站流量;只在同一个AS中作比较
MED 在离开AS时MED会被剥离掉,默认值为0;用于AS之间的多出口且多出口还需是IBGP关系;值越小越优先,用于影响出站流量
后两种主要用于选路
权重特性: 0-65535   思科私有  本地产生为32768;对方学来的值越高越优先,默认为0;权重不传递
下一跳规则:
1. 如果宣告的路由器与接收路由器位于不同的AS中,那么下一跳是宣告路由器的接口IP地址
2.如果宣告路由器与接收路由器位于一个AS内,且update消息的NLRI指向的是同一个AS内的目的地,那么下一跳属性宣告该路由的邻居的IP地址
3.如果宣告路由器和接收路由器是内部peer,且update消息的ULRI指向的是不同的AS内的目的地,那么下一跳是外部对等体的IP地址
通过回环建邻居:
默认情况下BGP流量向外发送/接收时会做校验
router bgp 1
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source L0   定义BGP源出站接口
ip route 2.2.2.2 255.255.255.255 f0/0      静态路由
除IBGP负责BGP下一跳的收敛外,IBGP与BGP无任何关系
EBGP
router bgp 1
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source L0
neighbor 2.2.2.2 ebgp-multihop           修改TTL值

下一跳可达;修改更新源;对于EBGP修改TTL值
3 router ; 1 as1 ; 2 as2        AB--EBGP
BGP不用宣告直连网络
router bgp 1
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source L0
neighbor 2.2.2.2 ebgp-multihop  
ip route 2.2.2.2 255.255.255.255 f0/0
show ip bgp summary
RIB-failure BGP更新通过IBGP学到又通过静态学到,则混乱
ip route 1.1.1.1 255.255.255.255 2.2.2.2 30       管理距离改大来更正此问题
修改下一跳或BGP属性
neighbor 3.3.3.3 next-hop 
ip route 2.2.2.2 255.255.255.255 1.1.1.1
有路由ping不通:单项路由   --   traceroute 1.1.1.1  --  show ip route  --  下一跳递归解析
BGP同步(防止黑洞)
通过IBGP对等体学习到的外部EBGP更新,是不会宣告给自己的EBGP对等体,除非该BGP路由器已经通过IBGP学习到了该外部EBGP
no synchornogy    ----  重分发直连链路
BGP选路规则:
1. Prefer highest weight (local to router)
2. Prefer highest local prefernce (global within AS)
3. Prefer route originated by the local router (next hop = 0.0.0.0)
4. Prefer shortest AS path
5. Prefer lowest origin code (IGP<EGP<Incomplete)
6. Prefer lowest MED (exchanged between autonomous systems)
7. Prefer EBGP path over IBGP path
8. Prefer the path through the closest IGP neighbor
9. Prefer oldest route for EBGP paths
10. Prefer the path with the lowest neighbor BGP router ID
11. Prefer the path with the lowest neighbor IP address
1. 如果路径是内部的,同步要求打开,而路由没有被同步,则不选择这条路径
2. 如果这条路由下一跳不可达,则不选择这条路径
3. 通过最高的权重值来比较路由
4. 如果两条路径的权重值相同,就考虑起源属性,选择最高的本地优先属性
5. 如果本地优先属性相同,就考虑起源属性,本地始发的本地优先
6. 如果没有路径是本地起源的,就选择最短的AS path属性
7. 如果AS path 属性相同,选择最低的起源的值,IGP<EGP<Incomplete
8. 如果起源相同,选择最低的MED
9. 如果MED属性相同,在EBGP和IBGP之间,优先选择EBGP
10. 如果同步关闭,则只有内部路由,就选择最近的IGP邻居
11. 如果在EBGP路径中,选择存在时间最长的
12. 选择最低的邻居路由器ID的路由
neighbor 192.168.1.2 weight 100             生效手动
clear ip bgp *    硬清
clear ip bgp soft in/out    软清
clear ip bgp * soft         路由刷新,在另一路由中清
bgp default local-preference 200       本地优先,一改全改
route-map xx permit 10
set local-prefernce 200
exit
router bgp 1
nei 192.168.1.2 route-map xx out
route-map x per 10
set as-path prepend 3 3 3 3 3
exit
router bgp 1
nei 172.16.1.2 route-map x out              IBGP不可伪造,EBGP可,出站方伪造
起源属性改为EGP或Incomplete
router-map x per 10
set origin incomplete
修改MED值
router-map x per 10
set metric 10
show ip bgp
BGP对等体组
router bgp 2
nei xx peer-group  定义组名
nei xx remote 2    所在AS组
nei 192.168.1.2 peer-group xx
nei 172.16.1.2 pee xx
end
router bgp 2
nei xx route-map x out
end
sh ip bgp peer-group
show ip bgp neigh
IP单播欺骗---基于目标地址;防环机制基于路由
 
 

组播  Multicast --- 基于源地址,防环机制基于RPF(依赖单播路由表),大部分基于Push
应用:实时流量;企业与企业之间        基于UDP(无流控性--窗口机制,无序列号);安全
缺:
Best-effort delivery
No congestion avoidance
Duplicates
Out-of-sequence delivery
模式:
one to many:
many to many:
many to one:
保留地址:239.0.0.0 --- 239.255.255.255
知名本地链路地址:224.0.0.0 --- 224.0.0.225        不能跨网段
224.0.0.1  本网上的所有组播系统
224.0.0.2  本网上的所有组播路由器
二层组播
01005eXXXXXX       映射重复    三层28---二层23
SAP 区分同一组播会话,同一信道(会话过滤)
IGMPv2 互联网管理协议,动态地在组播成员之间作联系,特定组查询,组播离开消息
CGMP(Cisco Group Management Protocol)路由器和交换机都要用
IGMP snoopling:专门的ICMP芯片   通过CPU或ASICs
组播分发树:
有源树(最短路径树,一个组播分发树只能有一个组播源,SG):密集模式协议 Dense mode protocols
共享树(不能确定根,可有多个源,RP汇聚点,*G):稀释模式协议 Sparse mode protocols
Dense mode
初始化洪泛;表项空向源发送剪枝信息;a.3分钟流量修剪,b.新增加路由发送修复
适用于小型网,基于push
Sparse mode
适用于大型网,基于pull
support both source and shared trees
RP到接收方基于共享树
申请加入到共享树,申请源和RP建立有源树
RP值:静态;动态(灵活性) 可能多个RP,但只有一个RP转发流量
组播路由协议配置
Dense mode
ip multicast-routing           开启组播
int e0/0
ip pim dense-mode              每个接口配置pim
int l0
ip igmp join-group 224.1.1.1   加入源
show ip mroute
224.0.1.40      密集模式通讯地址

Sparse mode
int e0/0
#ip pim sparse-dense-mode    稀释转密集模式
ip pim sparse-mode
conf ter
ip pim rp-adress 172.16.1.2   每台路由都需告知RP, 静态
show ip pim rp mapping   
conf ter              动态
ip pim send-rp-announce lo0 scope 12 group-list 1             只能成为224.1.1.1这个组的RP
access-list 1 per 224.1.1.1               (循环 路由)

ip pim send-rp-discovery f0/0 scope 16
ip pim send-rp-discovery l0 scope 16             RP的映射代理(循环 路由)
 
 
IPv6
NAT 节约地址空间,TCP负载均衡,隐藏网络;消耗CPU资源,延迟         (IPv4)
IPsec   认证;加密;校验
x:x:x:x:x:x:x:x       完整表示法     2031:0000:0000:0000:0000:0000:0000:1111/128
2031:0:0:0:0:0:0:1111 简略表示法
2031::1111
2031:2:3:4:5:6:192.168.1.1  NATPT   作用:地址翻译
Unicast(Global , Link local -- FE80::/10 无三层设备也可暂时性通信)  
Multicast(FF02)0-permanent 1-temporary   
FF02::1 - all nodes       FF02::2 - all route 
Anycast
int f0/0
ipv6 addr 2001:3ff1::1/64
no shutd
RIPng    FF02::9
int l0
ip addr 2001:ffef::01/128
exit
ipv6 unicast-routing
ipv6 router rip x
int l0
ipv6 rip x enable
ping ipv6 2001:ffef::01

OSPFv3
纯IPv6也是基于IPv4的RID,因此需手动指定RID(除既有IPv6又有IPv4);数据包发送源以接口的Link local作为发送源;  FF02::5          FF02::6
non-broadcast
ipv6 unicast-routing
ipv6 router ospf 1
router-id 1.1.1.1       手动指定RID
int s0/0
ipv6 ospf 1 area 0
#ipv6 ospf priority 255
ipv6 ospf network broadcast
show ipv6 interface
frame-relay map ipv6 (link-local addr) 103 broadcast   (物理接口映射;link-local地址映射)

IPv6-to-IPv4
边缘是IPv6,传输网IPv4(运营商最后升级)
中间IPv6 --- NATPT  
将一种协议的PDU用另外一种协议的包头封装 --- Tunnel
int tunn 0
ipv6 addr 2001:2ffe::1/64
tun source 172.16.1.1
tun destination 172.16.1.2
tunnel mode ipv6ip
no shutd
ipv6 unicast-routing        回环口到tunnel的路由
ipv6 router rip cisco
int l0
ipv6 rip cisco enable
tunn 0
ipv6 rip cisco enable


本文转自 ltyluck 51CTO博客,原文链接:http://blog.51cto.com/ltyluck/187685

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值