下一代互聯網技術:
2016.10.6
一、ipv6靜態路由小結:
靜態路由分爲3類:
1.直連靜態路由配置:(config)#ipv6 route 目標網段+本地送出接口
2.遞歸靜態路由配置:(config)#ipv6 route 目標網段+下一跳地址
3.完全靜態路由配置:(config)#ipv6 route 目標網段+本地送出接口+下一跳地址
還有相關命令:
#show ipv6 interface
#show ipv6 route
#show ipv6 neighbors
(config)#interface loopback x(序號) 進環回接口
2016.10.7
二、ipv6 RIP配置小結:
1、配置基本rip:
(1)先在全局模式下聲明配置某RIPng進程。注:cisco ios 僅支持4個RIPng進程,各進程通過名字區分
(config)#ipv6 unicast-routing
(config)#ipv6 router rip xxx(Rip進程名)
(2)再在相關接口下指定對應的RIPng進程。
(config)#int fx/x
(config-if)#ipv6 rip xxx enable
2、重分佈ipv6網段:(將剩餘的網段重分佈進RIPng)
(config)# route-map xxx(自定義名) permit x (自定義序號)
(config-route-map)# match interface f x/x(接口號)
//以上命令可根據要接入的網段數重複n條,自定義序號無關聯。
(config)# ipv6 router rip xxx(Rip進程名)
(config-rtr)#redistribute connected route-map xxx
//進入相應的rip進程中重分佈路由
3、過濾ipv6路由:(只想保留想要的網段,通過distribute-list過濾)
(config)# ipv6 prefix-list xxx(列名) permit xxxxxxx(欲留網段)
(config)# ipv6 router rip xxx(Rip進程名)
(config-rtr)# distribute-list prefix-list xxx(列名) in fx/x(接口)(下一跳接口)
2016.10.8
三、ipv6 OSPF配置小結:
1、配置基本ospf:
(1)聲明配置某OSPF進程。
(config)#ipv6 unicast-routing
(config)#ipv6 router ospf x(ospf進程號)
(config-rtr)#router-id x.x.x.x(ipv4地址)
(2)再在相關接口下指定對應的OSPF進程。
(config)#int f x/x
(config-if)#ipv6 ospf x area x(區號)
2、重分佈ipv6網段:(將剩餘的網段重分佈進ospf)
(config)# route-map abc(自定義名) permit x(自定義序號)
(config-route-map)# match interface f x/x(接口號)
//以上命令可根據要接入的網段數重複n條,自定義序號無關聯。
(config)# ipv6 router ospf xxx(ospf進程名)
(config-rtr)# redistribute connected route-map abc(自定義名)
//進入相應的ospf進程中重分佈路由
3、過濾ipv6路由:(只想保留想要的網段,通過distribute-list過濾)
(config)#ipv6 prefix-list xxx(列名) permit xxxxxxx/x(欲留網段)
(config)#ipv6 router ospf xxx(ospf進程名)
(config-rtr)# distribute-list prefix-list xxx(列名) in f x/x(接口)(下一跳接口)
4.彙總ospf外部路由
(config)#ipv6 router ospf x
(config-rtr)#summary-prefix x:x:x::/x(類似ipv4多條路由彙總所得最大網段)
還有相關命令:
#show ipv6 ospf neighbor
#show ipv6 interface brief s|f x/x
#show ipv6 route ospf
5.若倆路由器間非以太網連接而是通過幀中繼連接,則需配置兩路由器連接幀中繼的那端接口:
(config)#interface seri x/x
(config-if)#encapsulation frame-relay
(config-if)#no frame-relay inverse-arp
(config-if)#no arp frame-relay
(config-if)#ipv6 address x.x.x.x/x(本接口配置的ipv6/網絡位)
(config-if)#frame-relay map ipv6 x.x.x.x(對端接口ipv6) xxx(本端接幀中繼的DLCI) broadcast
6.解決ospf鄰居問題:
法一:手工指定鄰居
(1)只需一方在連接的接口下指定對方的鏈路本地地址
(config)#int seri x/x
(config-if)#ipv6 ospf neighbor x:x:x:x
(2)創建幀中繼網絡下雙方接口的鏈路本地地址的PVC相互映射
(config-if)#fram map ipv6 x:x:x:x(對端鏈路本地地址) xxx(本端接幀中繼的DLCI) broadcast
法二:將網絡類型從非廣播網絡類改爲允許廣播網絡類型,例如point-to-point類型
7.解決OSPF路由掩碼問題:
屬於loopback接口網段學到的爲128位主機路由,與想要的掩碼不一致,所以要將網絡類型改爲point-to-point類型
(config)#int loopback x
(config-if)#ipv6 ospf network point-to-point
四、ipv4 EIGRP配置小結:
(config)#ip routing
(config)#router eigrp x(自治系統區號)
(config-rtr)#network x.x.x.x(聲明網段)
2016.10.12
IPv6 ERGIP配置小節:
1、配置基本eigrp:
(1)聲明配置某eigrp進程。
(config)#ipv6 unicast-routing
(config)#ipv6 router eigrp x(自治區號)
(config-rtr)#router-id x.x.x.x(ipv4地址)
(config-rtr)#no shutdown //路由器默認關閉,必須手動開啓!
(2)再在相關接口下指定對應的eigrp進程。
(config)#int f x/x
(config-if)#ipv6 eigrp x(區號)
2、重分佈ipv6網段:(將剩餘的網段重分佈進eigrp)
(config)# route-map abc(自定義名) permit x(自定義序號)
(config-route-map)# match interface f x/x(接口號)
//以上命令可根據要接入的網段數重複n條,自定義序號無關聯。
(config)# ipv6 router ergip x(區號)
(config-rtr)# redistribute connected route-map abc(自定義名)
//進入相應的eigrp進程中重分佈路由
3、過濾ipv6路由:(只想保留想要的網段,通過distribute-list過濾)
(config)# ipv6 prefix-list xxx(列名) permit xxxxxxx/x(欲留網段)
(config)# ipv6 router eigrp x(區號)
(config-rtr)# distribute-list prefix-list xxx(列名) in f x/x(接口)(下一跳接口)
還有相關命令:
#show ipv6 eigrp neighors
#show ipv6 route eigrp
2016.10.12
IPv4_BGP配置小結:
1.給所有路由器接口配置ip
2.配置eigrp路由:
(config)#router eigrp x(自治區號)
(config-router)#network x.x.x.x(網段) x.x.x.x(掩碼) //聲明本所有網段
(config-router)#no auto-summary //關閉自動彙總
3.所有路由器啓動BGP進程:
(config)#router bgp xxx(區號)
(config-router)#bgp router-id x.x.x.x //配置BGP路由器ID(本某端口已配置的ip)
(config-router)#neighbor x.x.x.x(鄰居ip) remote-as xxx
//指定所有e/iBGP鄰居路由器,及其所在bgp的AS區號
(config-router)#neighbor x.x.x.x(igrp鄰居路由器) update-sourceloopback xxx (本某端口) //定製更新源
(config-router)#network x.x.x.x(網段) mask x.x.x.x(掩碼)
//通告必要的bgp本網段,使網絡可通告路由
(config-router)#no synchronization //關閉同步
(config-router)#no auto-summary //關閉自動彙總
(config-router)#neighbor x.x.x.x(EIGRP鄰居ip) next-hop-self
//注:只有連接跨BGP區的路由器才需要配置,從而使本路由器作爲發送BGP更新的下一跳,來通報給IBGP內部鄰居。(即ebgp和ibgp中介)
相關命令:
#show tcp brief //查看使用BGP路由的TCP連接信息摘要
#show ip bgp neighbors //查看鄰居的TCP和BGP連接的詳細信息
#show ip bgp summary //查看BGP連接的摘要信息
#show ip bgp //查看BGP表的信息
#show ip route
#show bgp xxx(區號)
(config-router)#synchronization //打開同步
#clear ip bgp* //重置BGP連接
#show ip bgp
2016.10.20
BGP之地址聚合 //注:能地址聚合的前提是在BGP表中至少含有該聚合地址的一條明細路由
(1)地址聚合不帶任何參數
(config)#router bgp x
(config-router)#aggregate-address x.x.x.x x.x.x.x(聚合網段及掩碼)
//路由聚合後,則該聚合地址下的所有明細都會丟失
(2)地址聚合含as-set參數
(config)#router bgp x
(config-router)#aggregate-address x.x.x.x x.x.x.x(聚合網段及掩碼) as-set
//帶有as-set參數的路由聚合,其聚合地址下的所有明細都會保留
(3)地址聚合含summary-only參數
(config)#router bgp x
(config-router)#aggregate-address x.x.x.x x.x.x.x(聚合網段及掩碼) summary-only
//
(4)地址聚合含suppress-map參數
2016.10.26
BGP之origin屬性
(1)配置基礎網路
(2)配置IGP,使同屬區域的底層路由互相連通,例如用eigrp
(config)#router eigrp xxx(自治區) //自治區號必須相同
(config-router)#no auto-summary //關閉自動彙總
(config-router)#network x.x.x.x(網段) x.x.x.x(掩碼) //聲明所有網段,使區域內底層路由都可達
(3)配置EGP即BGP
(config)#router bgp xxx(bgp區號)
(config-router)#no autosummary
(config-router)#no synchronization //關閉同步
(config-router)#bgp router-id x.x.x.x(指定router-id的IP)
(config-router)#neighbor x.x.x.x(鄰居ip) remote-as xxx(所屬bgp區號)
(config-router)#neighbor x.x.x.x update-sourceloopback x
//更新源使用的端口
(config-router)#neighbor x.x.x.x next-hop-self
//以自己作爲下一跳(只有該鄰居和自己直連才設爲自己)
(config-router)#network x.x.x.x(網段) mask x.x.x.x(掩碼)
//聲明必要網段,使bgp區域間路由可達
(4)配置bgp的origin屬性
(config)#access-list xxx(accesslistnumber) permitx.x.x.x x.x.x.x(網段及掩碼)或:
(config)#ip prefix-list xxx(prefixlistname/number)permit x.x.x.x/x(網段及網段位數)
(config)#route-map xxx(routemapname) permitxxx(number)
(config-route-map)#match ip addressxxx(accesslistnumber)或:
(config-route-map)#match ip addressprefix-listxxx(prefixlistname/number)
(config-route-map)#set orgin egp xxx(as-number) //設置起源區號
(config)#router bgp xxx
(config-router)#neighbor x.x.x.x route-mapxxx(routemapname) out
//爲去往鄰居的出去方向的路由設置策略
#show ip bgp
BGP之as-path屬性
(4)配置bgp的origin屬性
(config)# ip prefix-list xxx(prefixlistname/number)permit x.x.x.x/x(網段及網段位數)
(config)#route-map xxx(routemapname) permitxxx(number)
(config-route-map)#match ip address prefix-listxxx(prefixlistname/number)
(config-route-map)#set as-path prepend x x x ...(可配一連串的區域路徑) //爲匹配的路由追加AS
(config)#router bgp xxx
(config-router)#neighbor x.x.x.x route-map xxx(routemapname)out
#show ip bgp
BGP在路由判定時,AS-PATH屬性優先於ORIGIN屬性!!!
xxxxxxxxxxxxxxxx更多內容還再進一步編寫,敬請期待xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
由於小菜目前能力有限,以上內容可能有所錯漏,還望各大神能多多賜教、指點迷津,感謝!!!