JNCIP读书笔记_full.doc_第1页
JNCIP读书笔记_full.doc_第2页
JNCIP读书笔记_full.doc_第3页
JNCIP读书笔记_full.doc_第4页
JNCIP读书笔记_full.doc_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

EBGP:问题一:建立EBGP session之前的注意事项:验证本AS全部都有full-mesh ibgp connection,并且能收到AS内部其他BGP ROUTER的192.168.x.0/24的bgp路由,确认并验证所有bgp外网的路由器端口可以ping通问题二:要求做到一个router的两个ebgp peer负载均衡和一个router的双链路的一个ebgp peer负载均衡一个router的两个ebgp peer的负载均衡用Multipath命令,一个router双链路,如下做法:首先,创建静态路由到ebgp peer的loopback address,两个下一跳,no-readvertise,然后用source based ping测试连通性其次,protocols bgp group ebgp-LB下local-address用loopback address,neighbor是ebgp peer的loopback address再次,加上multihop命令JUNOS的bgp authentication对于ibgp/ebgp配置是一样的,就一条命令,注意要写在特定的配置层次下authentication-key xxxx问题三:p1只有一个peer statement,并且p1的ip地址不知道,如果做到r1/r2任何一个断了的话,AS全局上来讲,与p1的peer关系短时间内就可以恢复这个要做反向工程debug,由于r1/r2预先已经做了vrrp,就好办了,首先随便设置一个neighbor,然后开traceoptions flag open detail,然后monitor traffic interface fe-0/0/0.0,取得对端IP地址和p1对端的TCP连接,类似于22:09:58.351962 In VID 0: 150 10.0.5.254.1045 10.0.5.200.bgp: S3318404620:3318404620(0) win 16384 tos 0xc0 ,相应修改配置,注意vrrp-group里一定要加上accept-data允许ping才能建立ebgp session(默认是不许ping的),还有注意ebgp session要用local-address vrrp_virtual_ip才可以问题四:damping配置注意事项默认的decay half-time=15minutesmax.hold-down time=60minutesreuse threshold=750cut-off(suppress)threshold=3000细化路由的damping应该比粗放的路由更加aggressiveHalf-life越小,damping越timidSuppress越小,damping越aggressive配置上既要做import damping policy又要在bgp全局上写damping,policy的顺序就是不damping的先写,清除damping的命令是clear bgp damping,查看damping的命令是show route damping suppressed问题五:martian table和rfc1918,还有policy处理的顺序如果题目要求过滤掉rfc1918路由,就是172.16/12 orlonger、192.168/16 orlonger、10/8 orlonger三个Prefix-length-range /xx-/yyThrough x.x.x.x/y如果说要求“no 0-127 routes with prefix lengths less than /8”,命令为route-filter 0/1 prefix-length-range /1-/7 reject如果要求的话,不要忘记最后加上reject的term问题六:regular-expression的问题简单应用term 3 from as-path c2;then next policy;edit policy-optionslabr7# show as-path c2.* 65020;特别要注意regular-expression的应用,.*以后要空格再写数字,就表示从那个相邻as间过来的路由问题七:community-tagging的问题所有路由器的policy-options下都要写community设置,否则不认,基本格式是ASN:NUMBER,如下所示:edit policy-optionslabr6# set community transit members 65412:100edit policy-optionslabr6# set community peers members 65412:200edit policy-optionslabr6# set community customers members 65412:300问题七:next-hop self问题注意next-hop self的配置位置:在边界路由器上配置,在对ibgp peer的group里的export policy里设置,不要写accept,测试结果就是看ibgp neighbor是不是已经没有hidden route了问题八:对外广播路由的过滤JUNOS默认的是把收到的BGP路由都公布给所有的EBGP/IBGP PEER,所以policy里不用写accept,只有汇聚并公布本AS内部地址段的时候才用accept。对于考试要求的特定的deny的match条件最好用community作条件。特别要注意的是:本地公布的192.168.x.0/24的地址段要自行过滤掉,单独分出一个term来写!问题九: aggregate route in a ospf stub/isis level 1 area,汇聚路由造成IBGP PEER中断Generated route/ qualified next-hop static route with a higher route preferenceScenario: r1/r2因为要汇聚10/8给p1,在本地做了一个aggregate,因为是ospf stub area/isis level 1的关系,使得本地的汇聚路由成为最长匹配,从而aggregate 10/8成为best route,因为aggregate route是下一跳为reject/discard的,就有了路由黑洞了;方法一: 只有在r3上作本地汇聚,然后通过ibgp发过来,然后r1本地上做一个generate route 10/8,才能再把IBGP peer带起来,同时又能满足对ebgp peer p1发放10/8汇聚路由的需要。方法二:不用generate route,但是Lab里允许一些静态路由,可以在r1上配两条静态路由,主路由正常配置,次级路由下一跳为qualified-next-hop并且调高route preference使得比主路由不优先方法三:在ibgp export policy里修改本地的aggregate route 10/8的下一跳Another solution to the hidden aggregate route problem described in this section, without using generated or static routes, is to use policy to alter the BGP next hop associated with the aggregate route so that the associated BGP next hop is no longer resolved through the summary route. The following policy statement, applied to r3, will cause the BGP next hop for the 10/8 aggregate route to be 10.0.4.13. Because this address is present in the IS-IS level 1 area (and in an OSPF totally stubby area), the advertised BGP next hop will no longer need to recurse through the 10/8 aggregate, allowing it to become active. The following policy term, when applied as part of an IBGP export policy, will achieve this goal: edit policy-options policy-statement ibgp-export term agg-routelabr3# showfrom route-filter 10.0.0.0/8 exact;then next-hop 10.0.4.13;问题十:对端(p1)错误的把一些路由prepend了你的AS号吗,你必须配置你的边界路由器接受这些路由BGP默认是不接受带有自己AS号码的路由的,这是为了避免环路,To complete this objective, you must tell r1 and r2 that they should accept routes that contain the local AS number in the path:edit routing-optionslabr1# set autonomous-system loops 2loops后面的数字代表路由能穿越指定AS的次数,默认为1,这里给设置为2以后才能生效。记住commit以后要clear bgp neighbor一下,让对端重新发所有路由问题十一:如何引导入网流量两种方法,都是用med(特别注意,JUNOS的默认不发med的意思就代表med=0,是med最低也就是最优先的意思)第一种方法,使用ebgp export policy,但是这里有一些要注意的,就是如果要修改已经有的ebgp export policy的term一般在最后一条增加then metric xxx,这里对前面已经有accept的term的路由是无效的,因为比如10/8的已经跳出policy了,造成了10/8的路由的metric并没有被修改。解决这个问题的方法是:另外创建一个ebgp export policy then metric xxx和原有的一起 作policy chain,并且把这个新创建的policy放在前面先处理改变顺序第二种方法,直接在BGP下使用metric-out命令,注意,肯定是要在neighbor-level下配置此命令,并且如果两种方法同时使用的话,policy下的metric设置优先问题十二:如何引导出网流量以及local-preference设置引导出网流量可以使用local-preference,local-pref越高的路由越优先选择,配置方面是在ibgp group下直接写local-preference xxx,相当于对这台路由器说,我对这个IBGP group下的所有neighbor公布的全部路由的local-preference是xxx问题十三:如果在收到路由超出时告警,并写入syslog文件labr4# show protocols bgp group c1type external;multihop;local-address 10.0.3.4;family inet unicast prefix-limit maximum 10;peer-as 65010;neighbor 200.200.0.1 authentication-key $9$n2/i9tOMWx7VY; # SECRET-DATA以上配置,不加teardown选项是不会down掉bgp peer的,仅仅是告警信息记入日志文件问题十四:show route advertising-protocol bgp和show route receive-protocol bgp区别show route advertising-protocol bgp出来的结果是在Remove-private和export policy之前show route receive-protocol bgp是在import policy执行之后问题十五:transit provider的policy的match条件问题term tag-t1 from neighbor 172.16.0.14;then community add trans-1;term tag-t2 from neighbor 172.16.0.18;then community add trans-2;在r3上可以按照如上方法写,这就保证了两个transit community的独特性和唯一性#问题十六:要求对外公布3种NLRI信息:你的10/8地址段,OSPF路由器发过来的路由,OSPF的直联网段,不准修改r2/r3/r6/r7的routing-options的配置,不能用generate route,但是可以使用不超过2条的静态路由在r5上routing-options下定义aggregate 10/8,192.168/22,172.16.40/29,然后定义policy如下:term 2 from protocol aggregate;route-filter 10.0.0.0/8 exact;route-filter 192.168.0.0/22 exact;route-filter 172.16.40.0/29 exact;then accept;labr5# show routing-options aggregateroute 10.0.2.0/23;route 10.0.8.0/21;route 192.168.0.0/22;route 172.16.40.0/29;route 10.0.0.0/8;这里发现r4不对自己的ebgp peer发布192.168/22和172.16.40/29的路由,因为r4已经有这些网段的isis路由而不是bgp路由(bgp route is inactive),在r4上使用set protocols bgp advertise-inactive就可以解决了。这里又发现r1/r2不对外发布10/8的路由,解决方法是定义10/8的静态路由,下一跳为正常下一跳,还要设置一个qualified-next-hop并且把preference设得大一些,然后r1/r2上的peer-export policy就是from protocol static route-filter 10/8 exact then accept即可,其他的都是默认就发送出去咯!问题十七:如果要求transit provider使用连接到到r6的link来转发流量到customer的目标地址,并不许在r3上设置medMed不设置已经是最低了(为0),所以,不能用med比大小的方法解决。解决方法是在r3的bgp配置下到transit provider的配置上设置export policy来prepend AS号码,使得r3-t2这个link比r6-t2的link优先级低bgp check-list:查看ibgp peer/ebgp peer是否建立查看所有BGP ROUTER有无hidden路由,如果有,是否为合法的hidden路由(被filter掉)Export policy是否成功应用Martian route是否被filter掉根据要求是否设立了med/local-pref/prepended AS/community tagsConnectivity是否建立,本地要测试,所有的ebgp peer也要测试(ping/traceroute)traceroute查看本AS内部是不是走的最优路径本地路由器是否能够traceroute到每个ebgp peer路由器的loopback地址,是否走的是最优路径,如有特殊路径要求是否走的是要求的路径Damp工作吗?Ibgp/ebgp负载均衡是否工作所有的边界路由器对相应的EBGP PEER的收发路由要特别仔细检查!IBGP:问题一:如果要求log bgp session的建立以及down的过程到一个特定的rn-bgp的文件,如何做?首先肯定不能配syslog,思路是用traceoptions flag state detail file rn-bgp,并且traceoptions配置要在IBGP group里问题二:bgp authentication的问题&注意要点set group xxx authentication jnx以及set neighbor x.x.x.x authentication-key jni越specific的越优先,并且就不处理粗的了,比方说在group level配了认证,并且在neighbor level也配了不同的认证时,对这个neighbor只处理neighbor level下的认证,并忽略group level的认证问题三:RR的问题r3/r4同时作RR而又没有confederation的时候(注:不是在confed内部做RR),一定要注意r3/r4不能为同一个cluster ID,否则如果r3/r4与自己的RR client断的时候,其中一个RR因为与另外一个RR的cluster ID相同,导致了不接受带有相同cluster ID的route update,也就是说只有r3/r4的cluster ID不同并且同时为r1/r2提供route reflection service的时候才能提供冗余问题四:RR的router ID导致的问题(看起来好像是错误的,但实际上是正确的):这是因为r1/r2/r3/r4使用的是OSPF TSA/ISIS LEVEL 1,造成了的问题,就是从r1/r2上看到,原来r1/r2的route table里看到r3的下一跳是主路由(因为r3的router ID低,所以选择r3作主的RR),现在手动关闭r3-r5的接口,但是结果r1/r2里看的路由还和原来一样,好像是并没有发生切换,请注意这是正常的。问题五:confed的配置命令以及注意事项set routing-options autonomous-system 65000配置本AS内的confed号码,即sub-ASset routing-options confederation 65412 配置真实的AS号码,即主AS,也就是对外显示的AS号码set routing-options confederation members 65000/65001/65002,指明在主AS号码下有哪些sub-AS特别注意的是即使是r3/r4/r5之间的连接的bgp type应该是external,但是应该使用lo0 based peering加上multihop选项(虽然local-pref等属性在confed之间传递是不变的,但是配置上来讲,confed之间的BGP应该按照EBGP对待)IBGP配置方面,应该建立两个组,一个是本confederation内部的,名字为65xxx,type为普通的internal IBGP,一个为confederation之间的,名字为c-bgp,type为external with multihop using lo0 based peering问题六:验证IBGP路由的一些问题主要就是show route protocol bgp terse | match 192.168 | count看能够学到另外6台路由器的loopback地址,这里注意,如果r1/r2所在为OSPF TSA/ISIS LEVEL 1的话,会有两条default ospf/isis route,这会影响BGP的,会让r2上的bgp到r6/r7 loopback地址的路由以为有两个下一跳,但是其实你只要traceroute目标地址就会发现,还是只走metric值优先的那一条的。labkjw_M7i show route detail inet.0: 173976 destinations, 173979 routes (173976 active, 0 holddown, 0 hidden)0.0.0.0/0 (1 entry, 1 announced) *BGP Preference: 170/-101 Next-hop reference count: 521859 Source: 211.99.58.1 Next hop: 61.51.26.113 via ge-1/3/0.77, selected Next hop: 61.51.26.117 via ge-1/3/0.78 Protocol next hop: 211.99.58.1 Indirect next hop: 85cb100 262143 State: Local AS: 24403 Peer AS: 17431 Age: 7w3d 7:39:57 Metric2: 0 Task: BGP_17431.211.99.58.1+179 Announcement bits (3): 0-KRT 2-BGP.0.0.0.0+179 3-Resolve tree 1 AS path: 17431 4808 I Localpref: 100 Router ID: 211.99.58.1这里的意义如下:Source表示广播这条路由的bgp speaker的router IDNext hop表示转发表的next-hop,就是流量实际经过的物理/逻辑口Protocol next hop表示如果此条路由是active并且是最优的的话,流量应该被发送到的地址(也就是the address where packets source from)问题七:转发进来的路由让r5负载均衡并且要求r5里显示bgp为active,如何做?r5上设置set protocols bgp preference xxx低于IGP,并且r5对于r1/r2/r3/r4的confed的bgp group里要做multipath问题八:BGP keepalive interval的修改不能直接修改,必须要通过修改hold-time来修改(默认keepalive interval是hold-time的1/3)问题九:注意community no-export的使用!命令为set community xxx members no-export问题十:如何禁用RR服务?set protocols bgp group xxxxx no-client-reflect,注意如果禁用RR服务的话,几个client router都要full-mesh啊问题十一:routers must prefer r2s advertisement of 192.168.100/24 by using communities.在r2的ibgp export policy里加上community,然后所有routers都设置community,并做import policy from route-filter 192.168.100/24 then preference 20问题十二:如果r5要通过IBGP来load-balance RIP的路由怎么办?先做好r6/r7的policy,然后r5的ibgp group里写multipath选项,然后如果是IGP的优先的话(肯定是IGP external route),就调整IGP的external-preference,命令是set protocols ospf external-preference 171问题十三:要求r1/r2从r3/r4通过IBGP收到RIP的summary路由,并且不能改变r3/r4的protocol reference,并且r1/r2学到的BGP protocol next-hop必须与r5上看到的一样,如何实现?首先不能用r3/r4的ospf-to-bgp redistribution,那样的话bgp protocol next-hop就是r3/r4了。只能在r3/r4上用advertise-inactive命令来广播inactive的路由Initial Config & System Mgmt:问题一:配置指定用户权限的方法,只让用户看show interfaces结果和能够pingset class ops permissions networkset ops allow-commands “show interface 空格”set ops deny-commands “traceroute|telnet|ssh”然后把用户加入到ops的组里,主要不要改动operator/read-only/superuser/unauthorized这四个预定义的组问题二:题目要求如下:Place authorization messages into a log file named authPermit five copies of the auth file, each no larger than 5MB注意,先删除默认的file messages authorization,然后set file auth authorization info/set file auth archive files 5 size 5m,注意一定不要把配置层次搞错了,否则就是应用到syslog下所有文件问题三:题目要求如下:l Only allow SNMP access from the SNMP serverl Only allow SNMP access over the fxp0 interfacel Use a community string of testl Send all link up and down related traps to the SNMP serveredit snmplabJuniper-Lab# show interface fxp0.0;community test clients 10.0.200.2/32; trap-group interface-log categories link; targets 10.0.200.2; 另外,默认的snmp community的权限是read-only,如果要改就使用命令set community test authorization read-write验证trap-group的配置可以用monitor traffic interface fxp0 matching udp来看结果是不是有问题四:题目要求如下:In this example, you will configure NTP on the local router to meet the following criteria:l The router must synchronize to the NTP server.l The router clock cannot set automatically at boot.l NTP version 4 must be used, with MD5 authentication using key ID 101 and a key value of jni.edit system ntplabJuniper-Lab# show authentication-key 101 type md5 value $9$km5FIRSreW; # SECRET-DATAserver 10.0.200.2 key 101; # SECRET-DATAtrusted-key 101;第二个要求启动时不自动同步就是不设置ntp boot-server,还有注意NTP client只有和server时间相差128ms到128s之间才会同步,所以必要时在 operational mode下set date吧,还有,别忘记设置time-zone问题五:注意如果load merge terminal不好用的话就用load merge terminal relative,这个好用!问题六:fxp0.0接口要注意做了静态路由以后要加上no-readvertise,否则都进到你的IGP里去了Interface-Config:问题一:interface address上的prefer和primary参数有什么区别,分别用在哪儿?简单的说: prefer就是一个接口配多个IP以后,到达对端同一个subnet的目的地址使用哪一个为源IP地址primary就是一个接口配多个IP以后,到达不是同一个subnet的目的地址使用哪一个为源IP地址labJuniper-Lab# help topic interfaces preferred Configuring the Preferred Address for an Interface The preferred address on an interface is the default local address used for packets sourced by the local routing platform to destinations on the subnet. By default, the numerically lowest local address is chosen. For example, if the addresses 172.16.1.1/12, 172.16.1.2/12, and 172.16.1.3/12 are configured on the same interface, the preferred address on the subnet (by default, 172.16.1.1) would be used as a local address when you issue a ping 172.16.1.5 command. To set a different preferred address for the subnet, include the preferred statement: preferred; You can include this statement at the following hierarchy levels: * edit interfaces interface-name unit logical-unit-number family family address address * edit logical-routers logical-router-name interfaces interface-name unit logical-unit-number family family address addresslabJuniper-Lab# help topic interfaces primary-address Configuring the Primary Address for an Interface The primary address on an interface is the address that is used by default as the local address for broadcast and multicast packets sourced locally and sent out the interface. For example, the local address in the packets sent by a ping interface so-0/0/0.0 255.255.255.255 command is the primary address on interface so-0/0/0.0. The primary address flag also can be useful for selecting the local address used for packets sent out unnumbered interfaces when multiple non-127 addresses are configured on the loopback interface, lo0. By default, the primary address on an interface is selected as the numerically lowest local address configured on the interface. To set a different primary address, include the primary statement: primary; You can include this statement at the following hierarchy levels: * edit interfaces interface-name unit logical-unit-number family family address address * edit logical-routers logical-router-name interfaces interface-name unit logical-unit-number family family address address问题二,配置POS接口,例题如下:l 32-bit FCS (CRC)l Payload scrambling enabledl MTU of 4474 bytesl SDH framing, path trace set to “JNCIP test bed”l Internal timingl Cisco HDLC encapsulation with 5-second keepalivesl Hold setting of 20 milliseconds配置如下所示:labJuniper-Lab# show interfaces so-0/2/0 keepalives interval 5;hold-time up 20 down 20;clocking internal;encapsulation cisco-hdlc;sonet-options fcs 32; path-trace JNCIP test bed; payload-scrambler;还有特别要注意pos的framing不在接口配置层次下,而是应该用命令set chasis fpc 0 pic 2 framing sdh问题三,POS接口封装问题注意事项以及例题:l Use DLCI 100l Use the ITU Annex A version of PVC management protocol (LMI)l Keepalive parameters:l DTE poll interval 5 seconds, full status every polll Set a line up/down threshold of 2/3 events首先注意,LAB里都是BACK-TO-BACK连接没有FR/ATM SWITCH,所以一定有一端是DCEDTE端配置labJuniper-Lab# show hold-time up 20 down 20;clocking internal;encapsulation frame-relay;lmi n391dte 1; n392dte 2; n393dte 3; lmi-type itu;sonet-options fcs 32; path-trace JNCIP test bed; payload-scrambler;unit 100 dlci 100; family inet mtu 1600; address 172.16.0.3/32 destination 192.168.0.4; 对端DCE的配置里除了dce以外,还一定要有n392dce 2和n393dce 3才可以问题四,hub-spoke的帧中继的接口配置(JUNOS叫作p2mp的配置)edit interfaces(这是HUB ROUTER的接口配置)labJuniper-Lab# show so-0/2/0 encapsulation frame-relay;unit 0 multipoint; family inet address 10.0.1.1/24 multipoint-destination 10.0.1.2 dlci 200; multipoint-destination 10.0.1.3 dlci 300; 问题五:带用户验证的PPP配置是如何做的呢editlabJuniper-Lab# show interfaces so-0/2/0 encapsulation ppp;ppp-options chap access-profile test; local-name r3; unit 0 family inet address 192.168.0.5/30; editlabJuniper-Lab# show access profile test client r4 chap-secret $9$nDpC9tOMWxNds; # SECRET-DATA问题六:ATM 接口配置细节例题以及注意事项This ATM interface configuration example will use the default physical device settings withth

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论