1. How router advertise control and data packet. Flow of Routing Information Routing information is the information about routes learned by the routing protocols from a router’s neighbors. This information is stored in routing tables. The routing protocols advertise active routes only from the routing tables. An active route is a route that is chosen from all routes in the routing table to reach a destination. To To control control which routes the routing protocols protocols place in the routing routing tables and which routes the the routing routing protocols protocols advertise advertise from the routing tables, you can congure routing policies, which are sets of rules that the policy framework uses to preempt default routing policies. The Routing Routing ngine, ngine, which which runs the router!s router!s control control plane plane software, software, handles handles the "ow "ow of routing routing information information between between the routing protocols and the routing tables and between the routing tables and the forwarding table. The Routing ngine runs the #unos $% and routing policies and stores the active router conguration, the master routing table, and the master forwarding table, Flow of Data Packets
&ata packets are chunks of data that transit the router as they are being forwarded from a source to a destination. 'hen a router receives a data packet on an interface, it determines where to forward the packet by looking in the forwarding table for the best route to a destination. The router then forwards the data packet toward its destination through the appropriate interface. The (acke (ackett )orwarding )orwarding ngine, ngine, which which is the central central processing processing element element of the router’s router’s forwarding forwarding plane, plane, handles handles the "ow of of data packets in and out of the router’s physical interfaces. Although the (acket )orwarding ngine contains *ayer + and *ayer header information, it does not contain the packet data itself -the packet!s payload. Router. /. What is dierence between ! "witch and Router. 0 *+ %witch do switching at layer + by preserving the source and destination mac and preservin g the TT* value of the ( header of the 1st routed packet, so the rst packet is routed routed using normal routing lookup, but after that all packet are are switched. 0 router do normal routing lookup, but by introducing fast switching and 2), packets are also now switched on a router. 0 %witches doesnt support some 3o% features. 0 %witches doesnt support 4AT. 0 The forwarding on switches is done on A%2 -Application %pecic ntegrated 2ircuits which is done in hardware rather than a software. 0 )orwarding on routers are done in a software. 0 router supports di5erent 'A4 technologies -modules unlike switches.
+. How does forwarding happens in router. router. . Distributed vs #entrali$ed architecture
)ollowing gure illustrates the architecture of a router with distributed forwarding capabilities. n this architecture, each interface processor -or line card has independent ability of forwarding packet. A route processor is running one kind of routing protocol to build R6 which is shared by all interface processors.
$n the other hand, following is another router architecture which is called centrali7ed. n this condition, the interface processors have no ability of forwarding packet. nstead, they forward the packet to the centrali7ed packet processor which forward the packet based on the R6.
8. Where does %ueuing happens in router. http9::wiki.nil.com:3ueuing;(rinciples;in;2isco;$% A router has two types of
. Wh& mac address is needed. %ince actual data communication happens in */ so mac address is needed. ?. Wh& 'DR is elected (rst. http9::www.rfc0base.org:t=t:rfc0/+/@.t=t )or graceful reset and reduce the convergence time. The reason reason behind behind the election election algorithm!s algorithm!s comple=ity comple=ity is the desire for an orderly orderly transition transition from from 6ackup 6ackup &esignated &esignated Router Router to &esignated Router, when the current &esignated Router fails. This orderly transition is ensured through the introduction of hysteresis9 no new 6ackup &esignated Router can be chosen until the old 6ackup accepts its new &esignated Router responsibilities. 4ote Also that if Router is the only attached router that is eligible to become &esignated Router, it will select itself as &esignated Router and there will be no 6ackup &esignated Router for the network. @. Does serial interface have mac address ) A serial line has only two ends, so it is fairly obvious where to send the packets. That is why a serial line doesn!t have a BA2 address. C. Fast switching vs packet switching n telecommunications, fast packet switching is a variant of packet switching that increases the throughput by eliminating overhead associated with "ow control and error correction functions, which are either oDoaded to upper layer networking protocols or removed altogether. ATB and )rame Relay are two maEor implementations of fast packet switching. 1F. #ut*through+ "tore and forwarding and fragment free concept 2ut0through 9 forwarding based on destination mac address %tore and forwarding 9 forwarding based on once complete frame is received. )ragment free 9 $nce rst > bytes of data is received. 11. Wh& we need ",P in -. To To avoid loops loops in layer layer / and provide redundancy redundancy 1/. Wh& cant we replace H"RP with ",P G%R( works at *+, basically at the edge of network for gateway redundancy but stp works at */ for avoid loops and to provide redundancy. 1+. #ontents of 'PD/ Type, Type, 6ridge &, Root Root path cost, cost, hello timer, timer, forward forward delay delay , "ags , ma= ma= age timer. timer. 1. 'hich switch is responsible for advertising 6(&H in %T( Root 'ridge
18. In case of multiple vlan if i run default ",P+ ",P+ what will be the conse%uences. *egacy %T( is based on per vlan instance hence we need to use B%T. 1>. Wh& we need root bridge. Root bridge act as a reference point in topology to forward the packets. 1?. Does link connected to P# run ",P) 4o link connected to (2 is set as edge or portfast to reduce convergence time.
1@. How trunking will work. Does trunk allows all vlans. 4ote9 The allowed I*A4 list on both the ends of the trunk link should be the same. 6y default a trunk link carries all the I*A4s that e=ist on the switch. This is because all I*A4s are active on a trunk linkJ and as long as the I*A4 is in the switch!s local database, traKc for that I*A4 is carried across the trunks. Lou can elect to selectively remove and add I*A4s from a trunk link 1C. How native vlan works . The terminology terminology of of trunk ports ports and native native I*A4s is non0standar non0standard. d. Anne= & to the 1CC@ @F/.13 @F/.13 standard standard uses the concept concept of trunk links, but the current standard does not use the terms trunk or native. %ome vendors -most notably 2isco use the concepts of a trunk ports and b native I*A4. The proprietary term native I*A4 is similar to the @F/.13 (I& -port I*A4 identier, which is used Mto associate a I& with untagged and priority0tagged received frames.M A trunk port can refer a port that sends and receives tagged frames on all I*A4s, e=cept the native I*A4, if one is congured. The term trunk may also be used to refer to a connection using link aggregation. )rames belonging to the native I*A4 do not carry I*A4 tags when sent over the trunk. 2onversely, if an untagged frame is received on a trunk port, the frame is associated with the native I*A4 congured on that port. )or e=ample, if an @F/.13 port has I*A4s /, + and assigned to it, with I*A4 / being the native I*A4, frames on I*A4 / that are sent from the aforementioned port are not given an @F/.13 header -i.e. they are plain thernet frames. )rames that are received on that port and have no @F/.13 header are assigned to I*A4 /. Tagging of frames sent to or received from I*A4s + and is the same as if no native I*A4 had been congured N all frames on those I*A4s must carry tags to identify their I*A4 membership. 4ote that une=pected results may occur if the native I*A4 conguration is not the same on all sending and receiving ports on a link. 2ontinuing the above e=ample, if I*A4 / is not congured as the native I*A4 on some other @F/.13 port, that port will send tagged frames on I*A4 /. 'hen the local port, on which I*A4 / is congured as the native I*A4, receives these une=pectedly tagged frames, it will still assign them to I*A4 /, but it will send only untagged frames for I*A4 /. $n receipt, the distant port will either associate the untagged frames with a di5erent I*A4 & -the one locally congured as the native I*A4 or it will discard the untagged frames if it has no native I*A4 congured. -%ymmetrically, this remote port will send only untagged frames on its congured native I*A4, which will be associated with a di5erent I*A4 & by the local port. /F. If we con(gure access between two switches. Will it work ) Les, Les, you can can connect two two switches with access ports, and you Eust need need to say Mswitchport Mswitchport mode mode accessM and and Mswitchport Mswitchport access vlan &M on the ports that you would connect between the switches. /1. If one side of a switch has vlan 01 and other side is con(gured with vlan -1. ,hen how things will work) 'e need to use inter vlan routing ie router on a stick concept. //. What is advantage of having double tag %egregate vlans of customer from each other. /+. What is advantage of having lacp *A2( is used to control the link in case of ether channel. *A2( is dynamic. /. What is 2ratuitous 3RP. To To detect duplicate duplicate ip address in a network, network, gratuitous gratuitous arp is used. Oratuitous AR( is a sort of Madvance noticationM, it updates the AR( cache of other systems before they ask for it -no AR( re. Wh& show ip ospf neighbour shows -wa&6DR5,H7R) &R and 6&R will only have full relation with other routers in segment but rest of the routers among themselves will have /0 way relationship. /?. Is 5"PF distance vector as well) nter area routing routing in ospf work e=actly as distance vector
/@. What is the need for master6slave in ospf) The master master controls controls the synchroni7ation synchroni7ation process process and and ensures ensures that only one one && packet packet is outstanding outstanding at at a time. /C. How internal routers in 5"PF identif& 3'R Type Type + *%A -%ummary -%ummary *%A is advertised advertised by the the A6R of originating originating area to advertise network network from from other areas areas so we should check the A6Rs rst +F. Will 3'R summari$e t&pe ! "38s) Les. Les. +1. Wh& t&pe 9 "3+ when &ou have t&pe : that tells about 3"'R router) Type Type 0 A%6R0%ummary A%6R0%ummary *%A *%A 0 this is needed needed because because Type 8 =ternal =ternal *%As are are "ooded to all areas areas e=cept e=cept stub and the detailed ne=t0hop information may not be available in those other areas. This is solved by an Area 6order Router "ooding the information for the router -i.e. the Autonomous %ystem 6oundary Router where the type 8 originated. The link0state & is the router & of the described A%6R for type *%As. +/. What is the link*state retransmit interval) $%() must send acknowledgment of each newly received link0state advertisement -*%A. t does this by sending *%A packets. *%As are retransmitted until they are acknowledged. The link0state retransmit interval denes the time between retransmissions. Lou can use the command ip ospf retransmit0interval to set the retransmit interval. The default value is 8 seconds. ++. #an an 5"PF default be originated into the s&stem based on e;ternal information on a router that does not itself have a default) $%() generates a default only if it is congured using the command default0information originate and if there is a default network in the bo= from a di5erent process. The default route in $%() is F.F.F.F. f you want an $%()0enabled router to generate a default route even if it does not have a default route itself, use the command default0information originate always. +. How can I give preference to 5 "PF inter*area routes over intra*area routes) This rule rule of preference preference cannot be changed. Gowever, it it applies only only within a single $%() $%() process. process. f a router router is running running more more than one $%() process, route comparison occurs. 'ith route comparison, the metrics and administrative distances -if they have been changed of the $%() processes are compared. Route types are disregarded when routes supplied by two di5erent $%() processes are compared. +8. When a route is redistributed between 5"PF processes+ are all "PF metrics preserved+ or is the default metric value used) The %() metrics metrics are are preserved. preserved. The redistributio redistribution n between them is like like redistribution redistribution between between any two ( routing routing processes. processes. +>. #an I have one numbered side and leave the other side unnumbered in 5"PF) 4o, $%() does not work if you have one side numbered and the other side unnumbered. This creates a discrepancy in the $%() database that prevents routes from being installed in the routing table. +?. #an I control the P*bit when importing e;ternal routes into a not*so*stubb& area <=""3>) 'hen e=ternal routing information is imported into an 4%%A in a type ? link0state advertisement -*%A, the type ? *%A has only area "ooding scope. To further distribute the e=ternal information, type ? *%As are translated into type 8 *%As at the 4%%A border. The (0bit in the type ? *%A $ptions eld indicates whether the type ? *%A should be translated. $nly those *%As with the (0bit set are translated. 'hen you redistribute information into the 4%%A, the (0bit is automatically set. A possible workaround applies when the Autonomous %ystem 6oundary Router -A%6R is also an Area 6order Router -A6R. The 4%%A A%6R can then summari7e with the not0advertise keyword, which results in not advertising the translated type ? *%As. +@. Does 5"PF form ad?acencies with neighbors that are not on the same subnet) The only time that $%() $%() forms adEacencie adEacencies s between neighbors neighbors that are not on the same same subnet subnet is when the neighbors neighbors are connected through point0to0point links. This may be desired when using the ip unnumbered command, but in all other cases, the neighbors must be on the same subnet. +C. How often does 5"PF send out l ink*state advertisements <"3s>) $%() sends out its self0originated *%As when the *%A age reaches the link0state refresh time, which is 1@FF seconds ie +F mins. F. When I have two t&pe : link*state advertisements <"3s> for the same e;ternal network in the 5"PF database+ which path should be installed in the IP routing table) 'hen you have two type 8 *%As for the same e=ternal network in the $%() database, prefer the e=ternal *%A that has the shortest path to the Autonomous %ystem 6oundary Router -A%6R and install that into the ( routing table. Hse the show ip ospf border0routers command to check the cost to the A%6R. 1. Is there a wa& to manipulate and prefer the ,&pe ! "3s to originate from two dierent areas sent to t he non*backbone area) Type Type + *%A is originated originated by by the Area Area 6order 6order Router Router -A6R as as a summary summary route. Banipulati Banipulating ng the summary summary route is not possible in an A6R router. ,wo*Wa& "tate) /. Wh& does the show ip ospf neighbor #ommand Reveal =eighbors "tuck in ,wo*Wa& Gello not received from neighbor.
+. 5"PF =""3 t&pe*@ to ,&pe*: translator election
'hen multiple A6Rs connect the 4%%A to area F, the A6R with the highest router0id is elected as the Type0? to 8 translator, and is responsible for re0originating the Type08 *%A into area F. This election process is an optimi7ation of the $%() database, and relates to how the Type0? 4%%A =ternal route uses the forward address eld to ensure optimal routing. . Wh& does the show ip ospf neighbor #ommand Reveal =eighbors in the Init "tate) The most likely likely reason reason that a local router router is not not listed in a neighbor!s neighbor!s hello packets packets is that the neighbor neighbor has has not received received hello hello packets from the local router. (ossible reasons for this are9 Hse the ping and traceroute commands to verify that links between routers are operational. f a ping between routers is not successful, the link is not functioning properly and you need to be troubleshoot it. Refer to troubleshooting pages related to *ayer / technology you are using, such as %&4, thernet, ATB, etc. f there are any access lists dened on the neighbor!s interface, the destination ( of //.F.F.8 must be permitted in the input access list. $%() hello packets have a destination address of //.F.F.8 -the all ospf routers multicast address. There might be a second layer layer or conguratio conguration n problem problem a5ecting multicast packets packets from reaching reaching the neighboring neighboring router router.. Lou Lou can test this with the ping command on the multicast address //.F.F.8 and conrm that responses are received from the neighboring router-s. n non0broadcast media such as )rame Relay, ./8, and %&4, mapping is re commands, you must congure the keyword broadcast to avoid encapsulation failure every time $%() tries to send the multicast hello packet. The debug ip packet detail command used with the access list shows if there are any encapsulation failures. Authentication is not enabled on both sides. The router on which authentication is not enabled still processes hello packets from the neighbor and sees the neighbor in the init state. n order to correct this problem, enable authentication on both sides. ,able) 8. Wh& 3re "ome 5"PF Routes in the Database but =ot in the Routing ,able) Reason 19 4etwork Type Bismatch Reason /9 'rong Address Assignment in &ual %erial *ink %etup Reason +9 $ne %ide of (oint0to0(oint *ink ncluded in 'rong BaEornet or %ubnet Reason 9 $ne %ide s Hnnumbered and the $ther %ide s 4umbered Reason 89 6roken (I2 in )ully Beshed )rame Relay nvironment Reason >9 )orwarding Address Pnown via an =ternal Route Reason ?9 &istribute *ist s 6locking the Routes
>. Wh& 3re 5"PF =eighbors "tuck in 7;start67;change "tate) The problem problem occurs occurs most fre) 2omparing three fundamental concepts of link state protocols, concepts that even most $%() beginners understand, easily derives the answer to the
6ecause inter0area $%() is distance vector, it is vulnerable to routing loops. t avoids loops by mandating a loop0free inter0 area topology, in which traKc from one area can only reach another area through area F. C. Passive interface behaviour in 5"PF) n $%() the passive0interface has a similar behavior to OR(. The command suppresses hello packets and hence neighbor relationships. 8F. Dierence between "PF and #"PF #ust as the names names sound, sound, %() is an algorithm that calculates calculates the shortest shortest path through through a network network for destinations destinations in the network. 2%() does the same thing but it also considers constraints which the admin species e.g available bandwidth on the interface. %o, while %() may take for e=ample path R10R/0R+0R to get to R, 2%() can choose R10R/0R?0R@0RC0R to get to R. This all depends on the constraints specied and its used in conEunction with R%I( for B(*% T. 81. What are the '2P path selection criteria) weight, local pref, self origin, A% path, origin, m&, e=ternal alwa&s*compare*med and deterministic*med) 8/. What is the dierence between alwa&s*compare*med There are two 6O( conguration conguration commands commands that that can in"uence in"uence the B&0based B&0based path selection, selection, the bgp deterministic0med deterministic0med and the bgp always0compare0med commands. nabling the bgp deterministic0med command ensures the comparison of the B& variable when choosing routes advertised by di5erent peers in the same autonomous system. nabling the bgp always0compare0med command ensures the comparison of the B& for paths from neighbors in di5erent autonomous systems. The bgp always0compare0med command is useful when multiple service providers or enterprises agree on a uniform policy for setting B&. Thus, for network , if nternet %ervice (rovider A -%( A sets the B& to 1F, and %( 6 sets the B& to /F, both %(s agree that %( A has the better performing path to .
4ote9 The bgp deterministic0med and bgp always0compare0med commands are not enabled by default. Also, the two commands are separateJ enabling one does not automatically enable the other. 8+. Does the route reBector change the ne;t hop attribute of a reBected pre(;) 6y default, the ne=t hop attribute is not changed when a pre= is re"ected by route re"ector. Gowever, you can issue the neighbor ne=t0hop0self command in order to change the attribute of the ne=t hop for pre=es re"ected from an e6O( peer to any route re"ector client. 8. Wh& I2P in '2P) Peep in mind these rules when using 6O( with other O( protocols9 6O( will not put routes that it cannot verify reachability for in the main ( routing table. )or routers to successfully use 6O( routes, they must always have a route to the ne=t0hop ( address in the main ( routing table. Hnless otherwise congured, 6O( stores only the best path to a destination network in the main ( routing table. Gowever, you can use the 6O( ma=imum0paths command to congure more than one path. 6O( advertises only the best path to a destination network. Lou can control 6O( path selection using 6O( attributes, and you can control the best path selection process using certain 2isco $% %oftware 6O( conguration commands. 6O( follows its own best path decision process to nd the most eKcient pathJ this path is stored in the main routing table. 6O( forms peer relationships only with e=plicitly congured peers, and only advertises networks that it was e=plicitly congured to advertise. 6O( does not redistribute its routes into O(s unless e=plicitly congured to do so. 6O( is an e=tremely customi7able protocolJ it can be as dynamic or static as it is congured to be. Lou can advertise and control route policies in a number of di5erent ways. 88. Dierence between '2P s&nchroni$ation and split*hori$on rule. '2P "plit hori$onC This is for for ibgp only only and when when you have more than than / routers routers in ibgp you have to think about about this, f only only two routers routers you are are ok. f a routes is learned by an ibgp neighbor that route will not be advertised to another ibgp neighbors The solution solution is full mesh00 number number of bgp bgp Sn-n01:/ where where n is number of routers routers 6ut this leads to lots of congs so solution is either Route Re"ector or confederation-sub A% within main A% "&nchroni$ationC
6O( routers try to synchroni7e between O( table-show ip route bgp and bgp table-show ip bgp n order for bgp route to be used and advertised, it must be learned by an O(-another routing protocol rip:eigrp:ospf etc 6ut if you run only bgp and if same routes are not advertised by O(, you may want to turn o5 this automatic synchroni7ation between O( table of 6O(-show ip route bgp and 6O( table-show ip bgp with -cong0routerno sync 4ow in new $% Mno syncM is default. 8>. What does r RI'*Failure mean in the show ip bgp command output R1U show ip bgp 6O( table version is 8, local router & is /FF./FF./FF.1 %tatus codes9 s suppressed, d damped, h history, V valid, U best, i 0 internal, r R60failure $rigin codes9 i 0 O(, e 0 O(, W 0 incomplete 4etwork 4e=t Gop Betric *oc(rf 'eight (ath rU >.>.>.F:/ 1F.1F.1+.+ F 1+F F +F i VU ?.?.?.F:/ 1F.1F.1+.+ F 1/8 F +F i A. 'hen 6O( tries to install the bestpath pre= into Routing nformation 6ase -R6 -for e=ample, the ( Routing table, R6 might reEect the 6O( route due to any of these reasons9
Route with better administrative distance already present in O(. )or e=ample, if a static route already e=ists in ( Routing table. Bemory failure. The number number of routes routes in I(4 routing:forwar routing:forwarding ding -IR) e=ceeds e=ceeds the route0limit route0limit congured congured under under the IR) IR) instance. instance. 8?. RIP rules for sending and receiving updates Rules for sending update 0 2heck maEor network of outgoing interface s it sameW N 4o summari7e and send update. 1+?.CC.@@.F:/ will get summari7e ( Hnnumbered =ception 9 Router will send this network with subnet bit information in R( update packet. N Les 0 2heck subnetmask is it sameW N Les Les %end the update. [email protected]:/ will go now 0 4o s it the host route with :+/ maskW 0 Les Les %end it as host route route with host bit set in update. [email protected]:+/ will be sent as update. 0 4o &rop the network [email protected]:/? [email protected]:/ ? will be dropped here. Rules for Receiving update
0 2heck BaEor 4etwork is it the same as on source interfaceW 0 Les Les s it the host route with :+/ mask and host bit set on update packetW 0 Les Apply :+/ mask and keep advertise the route to whole world. [email protected]:+/ [email protected] :+/ will be installed in routing table 0 4o Apply the mask of incoming interface and install in routing table. [email protected]:/ [email protected]: / will be in routing table. N 4o is any subnet of recieved maEor network in any interface other than source interface. 0 Les &rop the route 0 4o Accept the route and apply the default mask. 1+?.CC.F.F:1> route will be installed in the routing table. ( Hnnumbered =ception 9 R( update packet should have the subnet bit information and link between the router’s is unnumbered. 8@. wh& RIP does not support discontiguous net work and "4 'ith discontiguous networks, you must use static routes to establish connectivity between the discontiguous subnetworks 8C. Dierence in RIPv0 and vRouting Information Protocol ersion 0 R(v1 is a &istance0Iector Routing protocol. R(v1 is a 2lassful routing protocol. 2lassful routing protocols support only the networks which are not subnetted. 2lassful routing protocols do not send subnet mask information with their routing updates. n other words, if you have a subnetted network in your R(v1 routing domain, R(v1 will announce that network to other as unsubnetted network. R(v1 does not support I*%B -Iariable *ength %ubnet Basking. R(v1 support ma=imum metric -hop count value of 18. Any router farther than 18 hops away is considered as unreachable. R(v1 send routing updates periodically every +F seconds as broadcasts using destination ( address as limited broadcast ( adddress /88./88./88./88. %ince the updates are sent using the destination ( address of limited broadcast ( adddress /88./88./88./88, every router need to process the routing update messages -whether they are running R(v1 or not. R(v1 does not support authentication of update messages -plain0te=t or B&8. Routing Information Protocol ersion -
R(v/ is a Gybrid Routing (rotocol. A Gybrid Routing (rotocol is basically a &istance0Iector protocol which some characteristics of *ink %tate routing protocols. R(v/ is classless routing, which allows us to use subnetted networks also. R(v/ has the option for sending network mask in the update to allow classless routing. R(v/ support I*%B -Iariable *ength %ubnet Basking. R(v/ support ma=imum metric -hop count value of 18. Any router farther than 18 hops away is considered as unreachable. R(v/ supports triggered updates. R(v/ routing updates are sent as Bulticast traKc at destination multicast address of //.F.F.C. Bulticast updates reduce the network traKc. The Bulticast routing updates also helps in reducing routing update message processing overhead in routers which are not running R(v/. $nly the routers running R(v/ Eoin to the multicast group //.F.F.C. $ther routers which are not running R(v/ can simply lter the routing update packet at *ayer /. R(v/ support authentication of R(v/ update messages -plain0te=t or B&8. Authentication helps in conrming that the updates are coming from authori7ed sources. >F. Wh& was the metric chosen as 0E) 'hy not 1?X1@YW in R( sum of all timers is e1. How checksum is calculated in IP Header) Take Take the the following following truncated truncated e=cerpt e=cerpt of an (v (v packet. packet. The header header is shown shown in bold bold and the checksum checksum is is underlined. underlined. 8FF FF?+ FFFF FFF F11 bE0 cFa@ FFF1 cFa@ FFc? FF+8 eC?c FF8f /?Cf 1eb @1@F To To calculate calculate the checksum, checksum, we can can rst calculate calculate the sum of each each 1> bit value value within the the header, skipping only the checksum checksum eld itself. 4ote that the values are in he=adecimal notation. 8FF Z FF?+ Z FFFF Z FFF Z F11 Z cFa@ Z FFF1 Z cFa@ Z FFc? S /?C2 -e1 in he=adecimal, he=adecimal, as as shown underlined underlined in the original original ( packet packet header header.. >/. #ontent of ,#P and IP header) ,he (elds in the IP header and their descriptions areC
Iersion 0 A 0bit eld that identies the ( version being used. The current version is , and this version is referred to as (v. G*ength[A 0bit eld containing the length of the ( header in +/0bit increments. The minimum length of an ( header is /F bytes, or ve +/0bit increments. The ma=imum length of an ( header is / bytes, or si= +/0bit increments. Therefore, the header length eld should contain either 8 or >. &i5erentiated %ervices 2ode (oint -&%2([A >0bit eld used to identify the level of service a packet receives in the network. &%2( is a +0bit e=pansion of ( precedence with the elimination of the To% bits. Total Total *ength[%peci *ength[%pecies es the length length of the ( packet packet that includes includes the ( header header and the user data. data. The length length eld is / bytes, so the ma=imum si7e of an ( packet is /\1> N 1 or >8,8+8 bytes. dentier, )lags, and )ragment $5set[As an ( packet moves through the nternet, it might need to cross a route that cannot handle the si7e of the packet. The packet will be divided, or fragmented, into smaller packets and reassembled later. These elds are used to fragment and reassemble packets. Time to *ive -TT*[t -TT*[t is possible possible for an an ( packet packet to roam roam aimlessly aimlessly around around the nternet. nternet. f there there is a routing routing problem problem or a routing loop, then you don!t want packets to be forwarded forever. A routing loop is when a packet is continually routed through the same routers over and over. The TT* eld is initially set to a number and decremented by every router that is passed through. 'hen TT* reaches F the packet is discarded. (rotocol[n the layered protocol model, the layer that determines which application the data is from or which application the data is for is indicated using the (rotocol eld. This eld does not identify the application, but identies a protocol that sits above the ( layer that is used for application identication. Geader 2hecksum[A value calculated based on the contents of the ( header. Hsed to determine if any errors have been introduced during transmission. %ource ( Address[+/0bit ( address of the sender. &estination ( Address[+/0bit ( address of the intended recipient. $ptions and (adding[A eld that varies in length from F to a multiple of +/0bits. f the option values are not a multiple of +/0 bits, Fs are added or padded to ensure this eld contains a multiple of +/ bits. ,#P Header Format %ource port -1> bits identies the sending port
&estination &estination port -1> bits identies the receiving port %eF bytes, allowing for up to F bytes of options in the header. This eld gets its name from the fact that it is also the o5set from the start of the T2( segment to the actual data. Reserved -+ bits for future use and should be set to 7ero )lags -C bits -aka 2ontrol bits contains C 10bit "ags 4% -1 bit N 240nonce concealment protection -added to header by R)2 +8F. 2'R -1 bit N 2ongestion 'indow Reduced -2'R "ag is set by the sending host to indicate that it received a T2( segment with the 2 "ag set and had responded in congestion control mechanism -added to header by R)2 +1>@. 2 -1 bit N 240cho has a dual role, depending on the value of the %L4 "ag. t indicates9 f the %L4 "ag is set -1, that the T2( peer is 24 capable. f the %L4 "ag is clear -F, that a packet with 2ongestion =perienced "ag in ( header set is received during normal transmission -added to header by R)2 +1>@. HRO -1 bit N indicates that the Hrgent pointer eld is signicant A2P -1 bit N indicates that the Acknowledgment eld is signicant. All packets after the initial %L4 packet sent by the client should have this "ag set. (%G -1 bit N (ush function. Asks to push the bu5ered data to the receiving application. R%T -1 bit N Reset the connection %L4 -1 bit N %ynchroni7e se bits
the si7e of the receive window, which species the number of window si7e units -by default, bytes -beyond the se bits The 1>0bit 1>0bit checksum eld is used used for error error0checking 0checking of the header header and data data Hrgent pointer -1> bits if the HRO "ag is set, then this 1>0bit eld is an o5set from the se+. How tcp ! wa& handshake works and ,#P connection termination as well) #onnection establishmentC To To establish establish a connection, connection, T2( T2( uses a three0wa three0way y handshake. handshake. 6efore 6efore a client client attempts to connect with with a server, server, the server must rst bind to and listen at a port to open it up for connections9 this is called a passive open. $nce the passive open is established, a client may initiate an active open. To establish a connection, the three0way -or +0step handshake occurs9 %L49 The active open is performed by the client sending a %L4 to the server. The client sets the segment!s se
>. Which device does reassembl& and wh& Always end device will do reassembly. Reason is bu5er issue and all fragments packets should pass through same router. >8. What is gratuitous 3RP. http9::wiki.wireshark.org:Oratuitous;AR( 2ratuitous 3RP
Oratuitous AR( could mean both gratuitous AR( re but could be used in some cases. A gratuitous AR( re
>>. Dierence between "4+ #IDR and super*netting 2lassless nter0&omain Routing. is also called supernetting. The main purpose of 2&R is aggregate route it is also known as supernetting or summari7ation. 2&R addresses reduce the si7e of routing tables. Iariable0*ength %ubnet Basking -I*%B or %ubnetting is used to better utili7e address space. %ubnets divide a single network into smaller pieces. %ubnetting is dividing a network into several smaller parts -subnets, each having its own sub0network address. %upernetting is combining several small networks -e.g. of class 2 into a big one to create a large range of addresses. I*%B is used to to increase usability of %ubnets >?. tp modes of operation) IT( Bodes of $peration. IT( has three di5erent modes of operation within a domain9 %erver, 2lient and Transparent. IT( %erver very catalyst switch is a server by default. very network or domain re@. Forwarding decision in the routing table and route selection criteria The main considerations considerations while while building building the routing routing table are9 Administrative distance 0 This is the measure of trustworthiness of the source of the route. f a router learns about a destination from more than one routing protocol, administrative distance is compared and the preference is given to the routes with lower administrative distance. n other words, it is the believability of the source of the route. Betrics 0 This is a measure used by the routing protocol to calculate the best path to a given destination, if it learns multiple paths to the same destination. ach routing protocol uses a di5erent metric. (re= length To To understand understand this better, better, let!s look look at an e=ample. e=ample. Assume Assume a router router has four four routing routing processes processes running9 running9 OR(, OR(, $%(), R(, R(, and OR(. 4ow, all four of these processes have learned of various routes to the 1C/.1>@./.F:/ network, and each has chosen its best path to that network through its internal metrics and processes. ach of these four processes attempts to install their route toward 1C/.1>@./.F:/ into the routing table. The routing processes are each assigned an administrative distance, which is used to decide which route to install. Default 3dministrative Distances 2onnected F %tat %tatic ic 1 e6O( /F OR( -inter ternal CF OR( 1FF $%() 11F %0% 118 R( 1/F OR( OR( -e -e=ter =tern nal 1?F 1?F i6O( /FF OR( su summary ro route 8 %ince the internal OR( route has the best administrative distance -the smaller the administrative distance, the higher the preference, it!s installed in the routing table. How 4etrics Determine the Route "election Process
Routes are chosen and built in the routing table based on the routing protocol!s administrative distance. The routes learned from the routing protocol with the lowest administrative distance are installed in the routing table. f there are multiple paths to the same destination from a single routing protocol, then the multiple paths would have the same administrative distance and the best path is selected based on the metrics. Betrics are values associated with specic routes, ranking them from most preferred to least preferred. The parameters used to determine the metrics di5er for di5erent routing protocols. The path with the lowest metric is selected as the optimal path and installed in the routing table. f there are multiple paths to the same destination with e
*et!s look at the three routes we Eust installed in the routing table, and see how they look on the router. router show ip route ....
& 1C/.1>@.+/.F:/> 1C/.1>@.+/.F:/> ]CF:/8?@C/1?^ via 1F.1.1.1 R 1C/.1>@.+/.F:/ 1C/.1>@.+/.F:/ ]1/F:^ via 1F.1.1./ $ 1C/.1>@.+/.F:1C 1C/.1>@.+/.F:1C ]11F://C@F^ via 1F.1.1.+ .... f a packet arrives on a router interface destined for 1C/.1>@.+/.1, which route would the router chooseW t depends on the pre= length, or the number of bits set in the subnet mask. *onger pre=es are always preferred over shorter ones when forwarding a packet. n this case, a packet destined to 1C/.1>@.+/.1 is directed toward 1F.1.1.1, because 1C/.1>@.+/.1 falls within the 1C/.1>@.+/.F:/> network -1C/.1>@.+/.F to 1C/.1>@.+/.>+. t also falls within the other two routes available, but the 1C/.1>@.+/.F:/> has the longest pre= within the routing table -/> bits verses / or 1C bits. *ikewise, if a packet destined for 1C/.1>@.+/.1FF arrives on one of the router!s interfaces, it!s forwarded to 1F.1.1./, because 1C/.1>@.+/.1FF 1C/.1>@.+/.1FF doesn!t fall within 1C/.1>@.+/.F:/> -1C/.1>@.+/.F -1C/.1>@.+/.F through 1C/.1>@.+/.>+, but it does fall within the 1C/.1>@.+/.F:/ destination -1C/.1>@.+/.F through 1C/.1>@.+/./88. Again, it also falls into the range covered by 1C/.1>@.+/.F:1C, but 1C/.1>@.+/.F:/ has a longer pre= length. >C. How i'2P works) GGGRoutes learnt from 5ne I'2P Peer cannot be advertised to another I'2P Peer. Peer. GGG split hori$on rule
'hen two 6O( neighbors send update messages to each other they do not add the A%4 in A%;(ath attribute in the update because both of them are in the same A% and the A%;(ath will not change. %ince 6O( uses the A%4 in the A%;(ath attribute to avoid loops, and 6O( will not add the A%4 to A%;(ath when sending updates in the same A%, this can cause a potential routing loop. To avoid such loops 6O( has to follow a rule which says that when a route is learnt from an 6O( neighbor, that route cannot be advertised to another 6O( (eer. 2onsider the e=ample below. RTR0A is advertising 1.1.1.F:/ to RTR06. RTR06 learns the route but will not advertise that route to RTR02. %imilarly RTR06 will also learn the route /././.F:/ )rom RTR02 but will not advertise this route to RTR0A. %ince all the three routers are in the same A% and in same A% 6O( does not advertise routes that have been learned from an 6O( peer to another 6O( peer. This is a partially meshed meshed 6O( 6O( network hence RTR0 RTR0A A and RTR02 RTR02 are not not e=changing e=changing the 4*R. 4*R. This can be resolved resolved by creating creating a logical logical connection connection between between RTR0 RTR0A A and RTR02 RTR02.. A 6O( %ession %ession can be established established between between RTR0A and RTR02 to allow both of them to e=change their 6O( learnt Routes. The T2( %ession that RTR0A and RTR02 use to establish the 6O( passes through RTR06, so it is important that the data link addresses interconnecting RTR0A and RTR02 are known to them.
n i6O(, the routes learnt from one i6O( neighbor are not advertised to another i6O( neighbor due to the 6O( %plit Gori7on Rule. To overcome the issues generated by this rule, one option is to have a full mesh of i6O( routers, where each i6O( router is peering directly with all other i6O( routers in the A%. The solution is feasible if you have a small number of i6O( routers, but it will not scale if you need a large number of i6O( speaking routers in the A%. ,he number of i'2P "essions needed i n an 3" for Full mesh I'2P are calculated with the formula =<=*0>6-.
%o assuming you have 1F i6O( routers then the number of i6O( peering sessions would be 1F-1F01:/ S 8 i6O( %essions to manage within the A%. That’s a lot of conguration and a lot of room for errors and may become diKcult to troubleshoot. ,here are - alternatives to creating a Full 4esh i'2P Routing+ which are 0. Route ReBectors -. #onfederations
Rule of "&nchroni$ation 9 )or A Route to be learnt from an 6O( neighbor, it must rst be known via an O(. Any route learnt from 6O( is entered into the routing table only if that route is rst learnt by an O( 4ote9 n some case %ynchroni7ation is not practical and this rule can be turned o5 by command9 4o %ynchroni7ation.
%ynchroni7ation re
1. 4ot all routes can be redistributed into O( -%ince the nternet Routing table is very large and O( cannot scale to it then have all the 6O( routers fully meshed and then turn o5 the %ynchroni7ation rule with no synchroni7ation command. /. Redistribute all e=ternal routes into O(. 4ot a feasible solution as O( will not scale to hold all the internet routes. ?F. How link between etherchannel works) What happens when one of the link goes down) &escribed in another
This is not not a valid scenario scenario.. %ince both both switches are are in di5erent di5erent broadcast broadcast domains. domains. ?/. #an we have multiple area o8s in a network . 4o we can’t have multiple area Fs. Always we have one area F ie backbone area. This is used to avoid looping in ospf while interacting between areas. ?+. Wh& netconf is used instead of "=4P) %4B( is too limited to be useful for e=changing conguration data. %4B( is stateless. Therefore cannot handle multi0stage data transactions. 4ot able to backup:restore elements N one %4B( sets a variable there is no recovery action. Therefore, setting multiple %4B( variable is risky and diKcult. 6ecause of this, very few applications perform %4B( writes. ?. How "=4P operates. How data transfer between manager and agent happens) Hnderstanding the Banagement nformation 6ase -B6 'hen an %4B( manager re
& of the I*A4 which a port belongs to )orwarding egress port numbers on the local switch 'hen forwarding a packet, an thernet switch adopts one of the two forwarding methods based upon the BA2 address table entries. Hnicast forwarding9 f the destination BA2 address carried in the packet is included in a BA2 address table entry, the switch forwards the packet through the forwarding egress port in the entry. 6roadcast forwarding9 f the destination BA2 address carried in the packet is not included in the BA2 address table, the switch broadcasts the packet to all ports e=cept the one receiving the packet. ach hardware device that you connect to your thernet network has a uni,FFF entries. entries. The switch uses uses the table to store the BA2 addresses of the network nodes connected to its ports, along with the port number on which each address was learned. The switch switch learns the BA2 addresses addresses of the end end nodes by e=amining e=amining the source source address address of each each packet packet received received on a port. port. t adds the address and port on which the packet was received to the BA2 table if the address has not already been entered in the table. The result is a table that contains all the BA2 addresses of the devices that are connected to the switch’s ports, and the port number where each address was learned. 'hen the switch receives a packet, it also e=amines the destination address and, by referring to its BA2 address table, determines the port where the destination node is connected. t then forwards the packet to the appropriate port and on to the end node. This increases network bandwidth by limiting each frame to the appropriate port when the intended end node is located, freeing the other switch ports for receiving and transmitting data. f the switch receives a packet with a destination address that is not in the BA2 address table, it "oods the packet to all the ports on the switch. f the ports have been grouped into virtual *A4s, the switch "oods the packet only to those ports which belong to the same I*A4 as the port on which the packet was received. This prevents packets from being forwarded onto inappropriate *A4 segments and increases network security. 'hen the destination node responds, the switch adds its BA2 address and port number to the table. f the switch receives a packet with a destination address that is on the same port on which the packet was received, it discards the packet without forwarding it on to any port. 6ecause both the source node and the destination node for the packet are located on the same port on the switch, there is no reason for the switch to forward the packet. This too increases network performance by preventing frames from being forwarded unnecessarily to other network devices. The type of of BA2 address address described described above above is referr referred ed to as a dynamic BA2 BA2 address. address. &ynamic &ynamic BA2 addresse addresses s are addresses addresses that the switch learns by e=amining the source BA2 addresses of the frames received on the ports. &ynamic BA2 addresses are not stored indenitely in the BA2 address table. The switch deletes a dynamic BA2 address from the table if it does not receive any frames from the node after a specied period of time. The switch assumes that the node with that BA2 address is no longer active and that its BA2 address can be purged from the table. This prevents the BA2 address table from becoming lled with addresses of nodes that are no longer active. The period period of time that the switch switch waits before before purging purging an inactive inactive dynamic dynamic BA2 address address is called the age0out age0out time. The default value is +FF seconds -8 minutes and the range is 18 to +FFF seconds. )or instructions on changing the aging timer, refer to %etting the Age0$ut Time. ?>. If switch is connected to four ports. ,hen how man& mac address will be there in switch ) )or every port, there will be one mac address. Apart from this switch has one default mac address ie for vlan 1 used for management purpose-used in case of managed switch. ??. What happens when hub is connected in between of two switches . what will happen when one of the links connected to hub goes down . how stp work) Gub won’t have any e5ect in topology since hub is *1 device. topolog&. Will loop occur) ?@. When three routers are connected back to back in ospf topolog&. 4o loop will not occur. f cost is same for both links N load balancing will happen otherwise best route is choosen based on se
n a link0state routing protocol, such as $%() or %0%, a routing loop disappears as soon as the new network topology is "ooded to all the routers within the routing area. ink "tate 3dvertisements *%As contain a se
All $%() routers synchroni7e their link state databases -*%&6 and then run the shortest path rst -%() algorithm -all the routers have the very same topology information but set themself as root of the tree, so the calculations result in loop0free shortest paths to the destinations. This is a key property of link0state routing protocols. $%() is link state protocol, Router e=change routing information through *%A in $%() domain. 'hen any change occures in network, *%A e=change happens.*%A have se
Also known as the gateway of last resort, a default route is a special type of static route with an all07eros network and network mask. The default route is used to route any packets to a network that a router does not directly know about to a ne=t0hop router. 6y default, if a router receives a packet to a destination network that is not in its routing table, it drops the packet. 'hen a default route is specied, the router does not drop the packet. nstead, it forwards the packet to the ( address specied in the default route. @F. What is the ma?or dierence between '2P and I2P route summari$ation) 'hen a summary address is created with an O( -OR(, $%(), and %0%, the specic routes of the summary are not advertised. 6O( advertises the summary, and all the specic routes of the summary unless they are specically suppressed. @1. Wh& does I'2P re%uire a full mesh) 6O( uses the A% ;(ATG attribute for loop detection. f a router sees its own A% number in a 6O( advertisement, the advertisement is dropped. 6O( routers have the same A% number so the A% number cannot be used for loop detection. 6O( neighbors will not advertise pre=es learned from one 6O( neighbor to another 6O( neighborJ therefore, a full mesh is re. Default '2P timers) There are two primary timers timers in 6O( 6O(.. The rst is the Gold &own timer, timer, the other is the Peepalive Peepalive nterval. nterval. The Gold Gold &own Timer Timer indicates indicates how long long a router router will will wait between between hearing hearing messages messages from it!s neighbor. neighbor. The Gold Gold &own Timer defaults to 1@F seconds seconds on a 2isco 2isco router, router, but can be be recongured. recongured. cisco default setting9 >F seconds To To be certain certain that a 6O( 6O( session stays stays up and functional, functional, Peepalive Peepalive messages messages are e=change e=changed. d. The Peepalive Peepalive nterval counts counts down to 7ero and then sends out another Peepalive. There is no timer for route updates, as updates happen dynamically on an incremental basis. @?. What is recursive lookup in '2P and how it works) The router router looks up the 6O( route and and the 6O( ne=t hop to reach a destination destination in the remote remote A%. Then Then the router router looks looks up the route to reach the 6O( ne=t hop using the O(. @@. What is an IP Helper address feature and wh& is it re%uired in a DH#P environment &G2( &iscover packets are broadcast packets. This means that a &G2( &iscover packet which is sent from the client would not reach the &G2( %erver , if the server resides on a di5erent network. This is because, routers are re
2reating vlans in */ switch and communicating between vlans is not possible. 2ommunication between vlans is possible in *+ %witch. 'ith *+ switch we can connect to 'A4 link but it is not possible with */ switch. C/. #hanging the reference bandwidth for the cost on 5"PF interfaces ach interface on which $%() is enabled has a cost associated with it. The device advertises its interfaces and their costs to $%() neighbors. )or e=ample, if an interface has an $%() cost of ten, the device advertises the interface with a cost of ten to other $%() routers. 6y default, an interface’s $%() cost is based on the port speed of the interface. The cost is calculated by dividing the reference bandwidth by the port speed. The default reference bandwidth is 1FF Bbps, which results in the following default costs9 1F Bbps port 0 1F All other port speeds 0 1 Lou L ou can change change the referenc reference e bandwidth, bandwidth, to change change the costs calculated calculated by by the software. software. The software software uses uses the following following formula formula to calculate calculate the cost9 2ost S reference0bandwidth:interface0speed f the resulting cost is less than 1, the software rounds the cost up to 1. The default reference bandwidth results in the following costs9 1F Bbps port’s cost S 1FF:1F S 1F 1FF Bbps port’s cost S 1FF:1FF S 1 1FFF Bbps port’s cost S 1FF:1FFF S F.1F, which is rounded up to 1 1F Obps port’s cost S 1FF:1FFFF S F.F1, which is rounded up to 1 The bandwidth bandwidth for interfaces that consist of of more than than one physical physical port port is calculated calculated as follows9 follows9 *AO group 0 The combined bandwidth of all the ports. Iirtual interface 0 The combined bandwidth of all the ports in the port0based I*A4 that contains the virtual interface. The default default reference reference bandwidth bandwidth is 1FF Bbps. Lou Lou can change change the referenc reference e bandwidth bandwidth to a value value from 1 0 /CC>?. f a change to the reference bandwidth results in a cost change to an interface, the device sends a link0state update to update the costs of interfaces advertised by the device. 4$T9 f you specify the cost for an individual interface, the cost you specify overrides the cost calculated by the software. C+. Wh& the forwarding address is set to 1.1.1.1 instead of 001.011.0.0) The forwarding forwarding address is set to F.F.F.F F.F.F.F if the A%6R A%6R redistributes redistributes routes routes and $%() $%() is not enabled enabled on the ne=t hop hop interface interface for those routes. These conditions conditions set set the forwarding forwarding address address eld eld to a non07ero non07ero address9 address9 $%() is enabled on the A%6R’s ne=t hop interface A4& A%6R’s ne=t hop interface is non0passive under $%() A4& A%6R’s ne=t hop interface is not point0to0point A4& A%6R’s ne=t hop interface is not point0to0multipoint A4& A%6R’s ne=t hop interface address falls under the network range specied in the router ospf command. C. Which two options are advantages of =etFlow version over =etFlow version :) 4et)low version C adds support for (v> headers. 4et)low version C adds support for B(*% labels. 9. what is 7therchannel)
ther2hannel is a term used to describe bundling or aggregating /0@ parallel links. ther2hannel provides a level of link redundancy. f one link in the bundle fails, traKc sent through that link is automatically moved to an adEacent link in the bundle. 4ormally multiple links between switches creates the potential for bridging loops, but because an ther2hannel bundle is treated as a single logical link by both switches, it avoids the problem. %panning Tree sees the bundle as a single link so individual ports will not be placed in a blocked %T( state, allowing greater bandwidth utili7ation. f there are two redundant ther2hannel bundles, one entire ther2hannel will be blocked by %T( to prevent a loop. Any changes made to an interface after the ther2hannel has been created will be automatically make the same change to all other ports in that bundle. Also N bundles cannot form if any of the assigned ports are %(A4 ports. ther2hannel links can be either access or trunk links, but if they are trunked -usually the case, they re
ther2hannel link negotiation protocols (Ag( -(ort Aggregation (rotocol 2isco proprietary )orms ther2hannel only if ports are congured for identical static I*A4s or trunking 'ill automatically modify interface parameters on all ports of the bundle if the ther2hannel interface is changed %T( sends packets over only one physical link in a (Ag( bundle. 6ecause %T(’s algorithm uses the lowest port priority -priority Z port &, if defaults are set, %T( will always use the lowest number port for 6(&Hs. *A2( -*ink Aggregation 2ontrol (rotocol An open standard to (Ag( @F/.+ad
Hses priority system for end switches %witch with the lowest system priority -/ byte value followed by BA2 N lowest wins determines which ports are active in the ther2hannel at any given time Hses port priority to determine which ports to place in standby mode if hardware limitations do not allow all ports to participate in the ther2hannel Bost implementations leave the system and port priority to defaults C>. How load balancing happens in 7ther #hannel) therchannel *oad 6alancing The bundles bundles use an algorithm to determine determine each link’s load, load, so they will will never be able to operate at at 1FF` capacity capacity of the sum of the links. That means the load will not be balanced e
*AO is a process of inter0connecting two switches with two or more links between them -or between a switch and a server, so that multiple links are combined into one bigger virtual link that can carry a higher -combined bandwidth. All these multiple links participating in a *ink Aggregation Oroup act like a single large -virtual link. *AO is also used for increasing link reliability. %ince multiple links connect two devices, even if one fails the other links keep carrying the information and the traKc on the failed link is also transferred to them. That way, loss of a single link between two switches doesn’t stop the communication between them. Bultiple links participating in a *AO can also load0balance the traKc between them so that traKc is evenly distributed. The number number of links links that can combine combine to form form a larger larger link link between between two devices devices is generally generally restricted restricted by the the hardware hardware vendor. *AO is a static protocol and needs to be congured individually for each pair of physical ports. *AO is a standard. 3#P ink 3ggregation #ontrol Protocol
*A2( is similar to *AO, where multiple ports:links between two switches combine to provide higher bandwidth links between them. Additionally, ports that are *A2( enabled can automatically congure themselves into trunk groups, without any manual conguration:intervention. The main purpose of of *A2( is to automatically automatically add:delete add:delete individual individual links links to the aggregate aggregate bundle, bundle, while adding new new links and and also after recovering from link failures. *A2( can monitor to verify if all the links are connected to the right group. 6asically, *A2( helps automate the conguration and maintenance of *AO’s. *A2( is a dynamic protocol. t is suKcient if multiple ports on various devices are *A2( enabled, once. *A2( is a standard and hence *A2( can be implemented between multi0vendor switches. *A2( should be enabled on the trunk ports initially in order for both the participating switches:devices that support the standard, to use it. f there are more links -between two devices than what is supported by the vendor for *A2(, the additional links are placed in stand0by mode and activated automatically when a link fails. *A2(, otherwise known as I777 1-.0a; *ink Aggregation 2ontrol (rotocol, is simply a way to dynamically build an ther2hannel. ssentially, the Qactive end of the *A2( group sends out special frames advertising the ability and desire to form an ther2hannel. t’s possible, and wants to communicate with another computer <#-> in a 3= segment) 'hen it comes to the *ayer / communications between networked systems, ( address is not used. %o, within a *A4 segment computers identify each other and communicate with each other using the BA2 Address. %o, when 2omputer -21 gets the target ( address of the 2omputer -2/ it wants to communicate with, t rst looks at its own AR( cache -which is a table that contains the ( addresses and their corresponding BA2 addresses for computers: systems within a network to see if it already has the BA2 address for the computer -2/, it wants to communicate with. f the BA2 address of 2/ is present in its AR( cache table, it can then append the message with the corresponding BA2 address and send it over the network -cable, switch. f the BA2 address of 2/ is not present in its AR( cache table, 21 will broadcast an AR( re)
As you see in the above e=ample, an AR( N Address Resolution (rotocol is used to translate an ( address into BA2 address. There are two type of AR( messages N AR( re, there is a protocol called 4eighbor &iscovery (rotocol -4&( that does the same function as the AR( in (v. 1F1. What is an 3RP #ache 6 #ache ,able) ,able) %ince computers cannot send broadcast messages every time they need to connect with another network device, they store the ( addresses and the corresponding BA2 addresses of systems they fre
times or to multiple systems -sometimes more than thousand re
1F>. which packet contains 4,/ parameter in case of 5"PF) nterface BTH is present in the &atabase description packet of $%(). 1F?. If 4,/ si$e mismatch happens in router in '2P .Will sessions be up ) %essions will not come up . #on(guring 4,/ Discover& for '2P "essions T2( path ma=imum ma=imum transmission transmission unit -BTH -BTH discovery discovery enables enables 6O( to discover discover the best T2( T2( path BTH BTH for each each 6O( session session automatically. n #unos $%, T2( path BTH discovery is disabled by default for all 6O( neighbor sessions. 'hen BTH discovery is not enabled, T2( sessions that are not directly connected transmit packets of 81/0byte ma=imum segment si7e -B%%. These small packets minimi7e the chances of packet fragmentation at a device along the path to the destination. Gowever, when you consider that most links use an BTH of at least 18FF bytes, 81/0byte packets do not result in the most eKcient use of link bandwidth. )or directly connected 6O( sessions, BTH mismatches prevent the 6O( session from being established. As a workaround, enable path BTH discovery within the 6O( group. (ath BTH discovery dynamically determines the BTH si7e on the network path between the source and the destination, with the goal of avoiding ( fragmentation. (ath BTH discovery works by setting the &on’t )ragment -&) bit in the ( headers of outgoing packets. 'hen a device along the path has an BTH that is smaller than the packet, the device drops the packet. The device also sends back an 2B( )ragmentation 4eeded -Type +, 2ode message that contains the device BTH, thus allowing the source to reduce its path BTH appropriately. The process repeats until the BTH is small enough to traverse the entire path without fragmentation. To To enable BTH discovery, discovery, include include the mtu0discover mtu0discovery y statement9 6O( (ath BTH &iscovery 'hen a host generates &ata, the packeti7ation layer -T2(:H&( will decide the packet si7e based on the BTH si7e of the outgoing interface. 'hen the packet traverses along the path to ultimate destination, it may get fragmented if the BTH of outgoing interface on any router is less than the packet si7e. (acket fragmentation on intermittent router is always considered ineKcient as it may result in below9 1. $ne fragment lost will result in entire packet sent from the source. /. ntroduce 2(H:bu5er burden. (ath BTH &iscovery is introduced to reduce the chances of ( packet getting fragmented along the path. The ultimate source will use this feature to identify the lowest BTH along the path to destination and will decide the packet si7e. 01. How does P4,/D works)
'hen the host generates the packet, it decides the si7e as BTH si7e of the outgoing interface and set the &) bit. Any receiving intermittent device who has BTH less than the packet si7e on outgoing interface have two choices9 1. )ragment and send if the &) bit is not set
/. &rop the packet and send an 2B( error message with TypeS+ -&estination HnreachableJ 2odeS -)ragmentation needed and &) bit set 2B( error message will have the BTH details of the outgoing interface in Q4e=t0Gop Q4e=t0Gop BTH eld. %ource on receiving the error message will now send the packet with mentioned BTH. This continues till it reaches the ultimate destination. '2P support for Path 4,/ Discover&
ntroducing (ath BTH &iscovery on 6O( session allows the 6O( router to discover the best BTH si7e along the path to neighbor resulting in eKcient way of e=changing 6O( packets. 2onsider the below scenario for further reading,
nitial T2( negotiation between R1 and R8 will have B%% value eF as B%%. As the initial negotiation packets are very small, it mostly moves the 6O( to stablished state with B%% as same value. R1sh ip bgp nei inc &ata &atagrams -ma= data segment is 1>F bytes9 After T2( negotiation, when the 6O( update packets are sent, &) bit will be set wich will result in 2B( error message from R+ with +FF as 4e=t0Gop BTH. 4ow the B%% is reduced to />F -+FF N F bytes of ( header. R1sh ip bgp nei inc &ata &atagrams -ma= data segment is />F bytes R1 4ow, with the same topology, when some intermittent device is not able to forward 2B( -some )irewall in between, end to end (ath BTH discovery will not be successful. This may result in 6O( session "ap. 'e have congured A2* on R/ to block 2B( message towards R1. %o 2B( error message from R+ will not reach R1. As soon we have 6O( congured between R1 and R8, T2( negotiation will be successful and 6O( will move to stablished state. 4ow when the 6O( Hpdate is sent to R8, it will send the same with &) bit set. 'hen a 6O( router send 6O( Hpdate to any neighbor, it will not send keepalive. R+ on receiving it, will send an 2B( error message to R1 which is getting blocked in R/. R8 after 6O( session is up will e=cept either 6O( update or keepalive from R1 to reset the hold down timer. After 1@F seconds, it will neither receive Hpdate nor keepalive resulting in sending 6O( 4otication to R1 with error message as QGold time e=pired. R1sh ip bgp nei inc &ata &atagrams -ma= data segment is 1>F bytes9 R1 VBar // 1891>9/+.F++9 `6O(0+04$T)2AT$49 received from neighbor 18F.1.8.8 :F -hold time e=pired F bytes R1 VBar // 1891>9/+.F++9 `6O(080AGA4O9 neighbor 18F.1.8.8 &own 6O( 4otication received R1 VBar // 1891>988.>/19 `6O(080AGA4O9 neighbor 18F.1.8.8 Hp R1 VBar // 1891C98>.FC9 `6O(0+04$T)2AT$49 received from neighbor 18F.1.8.8 :F -hold time e=pired F bytes R1 VBar // 1891C98>.FC9 `6O(080AGA4O9 neighbor 18F.1.8.8 &own 6O( 4otication received R1 VBar // 189/F91+.+>19 `6O(080AGA4O9 neighbor 18F.1.8.8 Hp 1FC.How does a router knows whether it has to fragment a packet or not) IP Fragmentation An ( packet that is larger than the Ba=imum Transmission Hnit -BTH of an interface, is too large for transmission over that interface. The packet must either be fragmented, or discarded -and an 2B( error message returned to the sender. n either case, the original data will be fragmented into smaller packets -less than the smallest BTH in order to allow it to be received by the nal destination system. There are two approaches approaches to doing doing this fragmentation9 fragmentation9 ( Router %egmentation 0 performing the fragmentation in the routers ( (ath BTH &iscovery 0 forcing the sender to perform the fragmentation IP Fragmentation processing at a Router The simplest simplest approach approach from from the end0system end0system point of of view is not not to worry worry about the BTH BTH si7e. n this simple simple approach, approach, the sender simply has to ensure that each packet is less than the BTH of the link on which it is sent. -The router always knows this from the link interface conguration information. *arge ( packets that e=ceed the BTH of the link between R1 and R/ are fragmented by R1 in to two or more ( packets each smaller than the BTH si7e. The network network layer then has to arrange arrange to cut packets packets up into smaller smaller fragments fragments whenever whenever a router router encounters encounters a link link with an BTH smaller than the received ( packet si7e. All the fragments of an ( packet carry the same & in the ( packet header -allowing the nal receiver to reassemble the fragmented parts into the original (&H. This is called M( fragmentationM or M( segmentationM. The problem is, this oDoads a lot of work on to routers, and in the worst case, can also result in packets being segmented by several ( routers one after another, resulting in very peculiar fragmentation. Fragmentation 4ethod To To fragment:segment fragment:segment a long internet internet packet, packet, a router router -R1 in the gure gure below creates creates a new ( packet packet and and copies the the contents of the ( header elds from the long packet into the new ( header. The data of the long packet is then divided into two portions on a @ byte -> bit boundary, so that the rst packet is less than the BTH of the out0going interface. The more0
fragments "ag -B) in the rst packet is set to one -to indicate that more fragments of this packet follow. The Bore )lag may already be set in this packet if it has already been fragmented by another system. This packet is forwarded. The second second created created new packet packet is then processed. processed. The The packet packet header eld eld is identical identical to that that of the original original packet packet -including -including the same value of the packet &, the total length eld, the more0fragments "ag -B) and the fragment o5set eld in the original packet. The packet header eld is updated with a new o5set eld, by adding the number of payload bytes sent in the rst fragment. f this new packet is larger than the allowed link BTH, the packet is again fragmented.
IP Router Fragmentation Any packet that has a more fragments -B) "ag set, must have an integral multiple of @ bytes. -The nal fragment, which does not have this "ag set, may have an arbitrary number of bytes. ( Router fragmentation is not recommended in the modern nternet, and this feature was not carried0forward when the ne=t generation nternet (rotocol -(v> was specied. IP Fragmentation processing at a "ender
(ath BTH &iscovery allows a sender to fragment:segment a long internet packet, rather than relying on routers to perform (0 level fragmentation. This is more eKcient and more scalable. t is therefore the recommended method in the current nternet. This is also also the only only method supported supported in (v>. IP Reassembl& processing at the Receiving 7nd "&stem
( fragmentation and reassembly employs updating and using the values in the second +/ bits of the (v packet header. An end system that accepts an ( packet -with a destination ( address that matches its own ( source address will also reassemble any fragmented ( packets before these are passed to the ne=t higher protocol layer. The system stores stores all all received received fragments fragments -i.e., ( packets packets with with a more0fragme more0fragments nts "ag -B) set set to one, or or where where the fragment fragment o5set is non07ero, in one of a number of bu5ers -memory space. (ackets with the same 1>0bit dentication value are stored in the same bu5er, at the o5set specied by the fragment o5set eld specied in the packet header. (ackets which are incomplete remain stored in the bu5er until either all fragments are received, $R a timer e=pires, indicating that the receiver does not e=pect to receive any more fragments. 2ompleted packets are forwarded to the ne=t higher protocol layer. 11F. What are the issues with IP fragmentation) There are several several issues issues that make make ( fragmentation fragmentation undesirable undesirable.. There There is a small increase increase in 2(H and memory memory overhead overhead to fragment an ( datagram. This holds true for the sender as well as for a router in the path between a sender and a receiver. 2reating fragments simply involves creating fragment headers and copying the original datagram into the fragments. This can be done fairly eKciently because all the information needed to create the fragments is immediately available. )ragmentation causes more overhead for the receiver when reassembling the fragments because the receiver must allocate memory for the arriving fragments and coalesce them back into one datagram after all of the fragments are received. Reassembly on a host is not considered a problem because the host has the time and memory resources to devote to this task. 6ut, reassembly is very ineKcient on a router whose primary Eob is to forward packets as
value is not negotiated between hosts. The sending host is re8C>P was allocated on a receiving station to be able to store the T2( data contained within a single ( datagram. B%% was the ma=imum segment -chunk of data that the T2( receiver was willing to accept. This T2( segment could be as large as >P -the ma=imum ( datagram si7e and it could be fragmented at the ( layer in order to be transmitted across the network to the receiving host. The receiving host would reassemble the ( datagram before it handed the complete T2( segment to the T2( layer. 6elow are a couple of scenarios showing how B%% values are set and used to limit T2( segment si7es, and therefore, ( datagram si7es. %cenario 1 illustrates the way B%% was rst implemented. Gost A has a bu5er of 1>P and Gost 6 a bu5er of @P. They send and receive their B%% values and adEust their send B%% for sending data to each other. 4otice that Gost A and Gost 6 will have to fragment the ( datagrams that are larger than the interface BTH but still less than the send B%% because the T2( stack could pass 1>P or @P bytes of data down the stack to (. n Gost 6!s case, packets could be fragmented twice, once to get onto the Token Ring *A4 and again to get onto the thernet *A4. %cenario 1
Gost A sends its B%% value of 1>P to Gost 6. Gost 6 receives the 1>P B%% value from Gost A. Gost 6 sets its send B%% value to 1>P. Gost 6 sends its B%% value of @P to Gost A. Gost A receives the @P B%% value from Gost 6. Gost A sets its send B%% value to @P. n order to assist in avoiding ( fragmentation at the endpoints of the T2( connection, the selection of the B%% value was changed to the minimum bu5er si7e and the BTH of the outgoing interface -0 F. B%% numbers are F bytes smaller than BTH numbers because B%% is Eust the T2( data si7e, which does not include the /F byte ( header and the /F byte T2( header. B%% is based on default header si7esJ the sender stack must subtract the appropriate values for the ( header and the T2( header depending on what T2( or ( options are being used. The way B%% B%% now works works is that each each host will will rst compare compare its its outgoing interface BTH with its its own bu5er bu5er and choose choose the lowest value as the B%% to send. The hosts will then compare the B%% si7e received against their own interface BTH and again choose the lower of the two values. %cenario / illustrates this additional step taken by the sender to avoid fragmentation on the local and remote wires. 4otice how the BTH of the outgoing interface is taken into account by each host -before the hosts send each other their B%% values and how this helps to avoid fragmentation. %cenario /
Gost Gost Gost Gost
A compares its B%% bu5er -1>P and its BTH -18FF 0 F S 1>F and uses the lower value as the B%% -1>F to send to 6. 6 receives Gost A!s send B%% -1>F and compares it to the value of its outbound interface BTH 0 F -//. 6 sets the lower value -1>F as the B%% for sending ( datagrams to Gost A.
Gost 6 compares its B%% bu5er -@P and its BTH ->/0F S // and uses // as the B%% to send to Gost A. Gost A receives Gost 6!s send B%% -// and compares it to the value of its outbound interface BTH 0F -1>F. Gost A sets the lower value -1>F as the B%% for sending ( datagrams to Gost 6. 1>F is the value chosen by both hosts as the send B%% for each other. $ften the send B%% value will be the same on each end of a T2( connection. n %cenario /, fragmentation does not occur at the endpoints of a T2( connection because both outgoing interface BTHs are taken into account by the hosts. (ackets can still become fragmented in the network between Router A and Router 6 if they encounter a link with a lower BTH than that of either hosts! outbound interface. http9::www.cisco.com:c:en:us:support:docs:ip:generic0routing0encapsulation0gre:/8@@80pmtud0ipfrag.htmltopic/ 11/. 7;plain ping packet format) An cho is simply what we networking engineers call a !ping!. The cho Reply Reply is, as most would guess, the !ping reply!. 2B( chos are used mostly for troubleshooting. 'hen there are / hosts which have communication problems, a few simple 2B( cho re
f the above packet was an 2B( cho -ping, then the Type eld takes a value of @. f it!s an 2B( cho Reply -ping reply then it would take a value of F. The picture picture below is a screen screen shot took took when doing doing a simple simple ping from from my workstation9 workstation9
$kay, now looking at the screen shot above, you can see !pinged! www.rewall.c=. The rst thing my workstation did was to resolve that HR* to an ( address. This was done using &4%. $nce the &4% server returned the ( address of www.rewall.c=, the workstation generated an 2B( packet with the Type eld set to @. Gere is the proof9
The picture picture above is a screenshot screenshot from from my packet packet sni5er the the same time this e=periment e=periment was taking place. place. The packet packet displayed is one of the packets which were sent from my workstation to the webserver of rewall.c= 4otice the 2B( typeS@ cho eld right under the 2B( Geader section. This clearly shows that this packet is being sent from the workstation and not received. f it was received, it would have been an !cho Reply! and have a value of F. The ne=t ne=t weird thing, thing, if anyone anyone noticed, noticed, is the data data eld. *ook *ook at the screen shot from command prompt prompt above above and notice notice the value there and the value the packet sni5er is showing on the left. $ne says +/ 6ytes, and the other F 6ytes The reason reason for this this is that the packet packet sni5er is taking into account the the 2B( header header les les -2B( type, type, code, checksum checksum and identier, and !ll prove it to you right now. *ook at the top of this page where we analysed the 2B( headers , you will notice that the lengths -in 6its of the various elds are as follows9 @, @, 1>, 1>, 1>. These add up to a total of > 6its. 4ow @ 6its S 1 6yte, therefore > 6its S @ 6ytes. Take the +/ 6ytes of data the workstation!s command prompt is showing and add @ 6ytes .... and you have F 6ytes in total. 11+. ,wo routers 3 and ' are connected back to back with hub in between. Router 3 ip is -.-.-.- and Router ' ip !.!.!.!. Will ping happens) Will 3RP happens) (ing will fail so do arp. Routerping +.+.+.+ Type Type escape se
Oateway of last resort is not set /.F.F.F:/ is subnetted, 1 subnets 2 /././.F is directly connected, )astthernetF:F Router Router Routershow arp (rotocol Address Age -min Gardware Addr Type Type nterface nternet /./././ 0 FFF?.2+6./C28 AR(A )astthernetF:F Routers b/k interfaces need to be in same subnet. 4ow congured router 6 interface as /././.1 Routerping /././.1 Type Type escape seF.?F+C.?CCA FF>F.?F+C.?C CA AR(A )astthernetF:F astthernetF: F nternet /./././ 0 FFF?.2+6./C28 AR(A )astthernetF:F 11. ospf hello packets are multicast or unicast or broadcast) $spf hello packets are multicast and sent to all ospf routers address ie //.F.F.8 118. 7;plain ospf packet overview)
11>. What is primar& dierence between I'2P and 7'2P in case of '2P) The primary primary di5erence di5erence between between 06O( 06O( and 06O( 06O( is a di5erence di5erence in T2( T2( endpoint endpoint conventions. conventions. The endpoints endpoints of T2( T2( connections for 0 6O( sessions are the addresses of the physical interfaces over which the 06O( session runs. The endpoints of T2( connections for 06O( sessions correspond to a virtual -loopback T2( connection over which the 06O( session runs, and re"ect a fully meshed network conguration 11?. Wh& area 1 is re%uired in case of 5spf)
6ackbone QArea F -level / is a central -transition area to which all other areas are connected, which distributes routing information between areas, and has the same properties as other areas. 6ackbone routers use the same procedures and algorithms as nternal Routers. 11@. Describe ospf ad?acenc& process) $%() Routers go through various states e=changing messages as they proceed form &own to )ull AdEacency. They initiate the Gello process and decide on initiali7ation parameters, for the adEacency they decide on a master:slave relationship, and then they e=change:load each others databases using &atabase &escription and *%A packets. 'hen the databases are synchroni7ed the routers are considered to be in Qfull adEacency. 11C. Does ospf provide fragmentation) $spf does not provide any e=plicit fragmentation:reassembly support. 'hen fragmentation is necessary, ( fragmentation:reassembly is used. 1/F. What is ospf Interface 4,/) nterface BTH N The si7e in bytes of the largest ( datagram that can be sent out the associated interface, without fragmentation. nterface BTH should be set to F in &atabase &escription packets sent over virtual links. 1/1. Wh& do &ou re%uire a limit on the minimum si$e of 7thernet frame) Ans. To detect collision, it is essential that a sender continue sending a frame and at the same time receives another frame sent by another station. 2onsidering ma=imum delay with ve thernet segments in cascade, the si7e of frame has been found to be > bytes such that the above condition is satised. 1//. What is dierence in #ontrol plane+ Data plane and Forwarding Plane) http9::networkstatic.net:the0control0plane0data0plane0and0forwarding0plane0in0networks: protocol other than ",P ",P ) 1/+. Is there an& - redundanc& protocol therchannels can be used for redundancy at */. $ther than this we have IRR( and G%R( but these are used for gateway redundancy at *+.
1/. What are the troubleshooting points for 7therchannels) ,roubleshooting 7ther#hannels ther2hannel issues usually fall into one of three categories9 1. very port participating in an ther2hannel must have identical speed, duple=, access or trunk settings. f an ther2hannel isn’t forming, check each port conguration. /. 6oth sides of the ther2hannel must be congured as a bundle directly or by using a link aggregation protocol -*A2( or (Ag(. f one side is congured as an ther2hannel and the other side is not, look for error0disabled ther2hannel ports on the ther2hannel0enabled switch. +. f traKc is only "owing over a single link in a bundle, it is likely that the hash algorithm should be adEusted to use di5erent seed values. Also note that link bundles should be used in even numbered pairs like /, , @, etc. 1/8. What are dierent '2P databases) '2P Databases *ike most modern routing protocols, 6O( has two separate databases N a neighbor database and a 6O(0specic database. 4eighbor &atabase *ists all of the congured 6O( neighbors Router show ip bgp summary 6O( &atabase *ists all networks known by 6O( along with their attributes. Router show ip bgp 1/>. What are bene(ts of routing) 6roadcast control Bulticast control $ptimal path determination TraKc TraKc management management *ogical addressing *ayer + security 1/?. 'ene(ts of ! "witching) Gardware0based packet forwarding Gigh0performance packet switching Gigh0speed scalability *ow latency *ower per0port cost )low accounting %ecurity 3o% *ayer + switching is hardware0based routing. A full *ayer + switch does everything to a packet that a traditional router does. *ayer + switching is a combination of *ayer / switching and *ayer + routing to that provides integrated switching and routing. 'hile a router is like a mailroom with a single chute, a switch provides multiple chutes to direct data. Traditionally, applications at *ayer / are responsible for the validity and integrity of transmission from node to node. Gowever, the advent
of the nternet has meant that most network traKc is now on a backbone system. %mart switches are now able to do most of the functions of a router. *ayer + switches can be used to prioriti7e traKc and can control larger networks than *ayer / switches, reducing the need to create subnets isolated by routers. The primary primary di5erence di5erence between between the packet0swi packet0switching tching operation operation of a router and a *ayer + switch is the the physical implementation. n general0purpose routers, microprocessor0based engines typically perform packet switching. A *ayer + switch performs packet switching with hardware. *ayer + devices can interrogate packets to determine priorities to allocate bandwidth, and this is where 3uality of %ervice -3o% features are usually implemented. 'hen performing *ayer + functions, a switch reads the T2( and Hser &atagram (rotocol -H&( elds to determine what type of information the packet is carrying. The network manager can then program the switch to prioriti7e traKc by application. 'hen being used for 3o% purposes, this means that a videoconferencing application might be granted more bandwidth than an e0mail message. f the network is only at 8F percent capacity on the backbone, each user or application on the network is already getting the same 3o% without *ayer switching. 1/@. What is multila&er "witch) 2ombines functionality of9 *ayer / switching *ayer + switching *ayer switching Gigh0speed scalability *ow latency Bultilayer %witching is the combination of traditional *ayer / switching with *ayer + protocol routing in a single bo=, usually through a fast hardware implementation. Bultilayer switches are not called routers because multilayer switches are much faster and generally less e=pensive than a router with the same *ayer + throughput. The 2atalyst 2atalyst family of switches does the following9 following9 As a *ayer + switch, caches "ows based on the ( or ( addresses. As a *ayer switch, caches "ows based on the source address, destination address, source port, and destination port. Bultilayer %witching products with high0speed hardware ( routing o5er signicant improvements in scalability and performance over simple *ayer / switches or traditional routers. 1/C. What is auto*negotiation) The Auto04egotiatio Auto04egotiation n function is is an optional optional part of of the thernet thernet standard standard that makes makes it possible possible for devices devices to e=change e=change information about their abilities over a link segment. This, in turn, allows the devices to perform automatic conguration to achieve the best possible mode of operation over a link. At a minimum, Auto04egotiation can provide automatic speed matching for multi0speed devices at each end of a link Bulti0 speed thernet interfaces can then take advantage of the highest speed o5ered by a multi0speed hub port. %tress9 Auto0negotiation is not a fully implemented standard and, therefore, the behavior of the link cannot be guaranteed when using this feature. 2isco strongly recommends that each end of the link be manually congured for the desired duple= and speed. 1+F. What is ping used for) The ping command sends sends a specied specied number number of 2B( 2B( echo re
1++. How trunk negotiation happens) &ynamic Trunk (rotocol -&T( handles the negotiation of trunk links The &ynamic &ynamic Trunk Trunk (rotocol (rotocol -&T( -&T( makes makes trunking conguration conguration easier easier. &T( negotiates negotiates port capability capability and and conguration conguration with with its neighboring peer ports for a proper trunk type9 an %* trunk, an @F/.13 trunk, or an access link. Also, a variety of hardware may e=ist with di5erent capabilities[some capable of %* only, some capable of @F/.13 only, or some capable of both %* and @F/.13. &T( negotiation also takes into account these variations of hardware capabilities before it congures the port to be a particular type of trunk. &uring &T( negotiation, the ports will not participate in the %panning0Tree (rotocol. $nly after the port type is congured to be one of the three types -access, %* trunk, or @F/.13 trunk, the port will be added to spanning tree. The basic re. De(ne the three ,P modes of operation and describe how the& work. The three three di5erent di5erent IT( modes modes are server, client, client, and transpare transparent. nt. %erver mode allows I*A4s to be created, deleted, and modied on the switch. n addition it saves the I*A4 information to 4IRAB so that the I*A4s are known the ne=t time the switch is reset. %erver mode I*A4s are called Qglobal I*A4s because they will be copied by all other switches in the IT( domain. 2lient mode does not allow I*A4s to be created, deleted, or modied. A client switch must receive all I*A4 information from another switch in order to know that a I*A4 e=ists. $nce the client knows that the I*A4 e=ists it can have its ports assigned to that I*A4. A client does not save its I*A4 information to 4IRAB. Transpar Transparent ent mode means means that the switch switch does not not participate participate in the IT( IT( domain. domain. I*A4s can be created, created, deleted, and and renamed on the switch however they will not be advertised to any other switch. I*A4s are called Qlocal I*A4s as they will not be copied to other switches. The IT( domain information must be given to the transparent switch, however, as it will pass IT( advertisements for other server and client switches. 1+?. Describe the use of ,P pruning. 7;plore the same solution without ,P pruning 6y default all broadcasts and multicasts must be sent to every switch in a IT( domain if the trunk link supports the I*A4. This is done done even if if the switch has has no ports ports other than the trunk link link in the I*A4. IT( (runing (runing is a process process that that prevents prevents broadcasts from being sent to switches that do not have ports in a I*A4. Another way of eliminating the broadcast traKc is to clear the trunk link of the I*A4. f there are no ports assigned to the I*A4 on the switch there may be no reason for the I*A4 to be carried on the trunk link. 1+@. ist the (ve "panning*, "panning*,ree Protocol port states and describe their function. The ve %panning %panning Tree states states are 6locked 6locked,, *isten, *earn, *earn, )orwar )orward, d, and &isabled. &isabled.
6locked is the initial state of the port. A port will also be placed in a blocked state if there is a redundant redundant path to the Root 6ridge and the port does not have the best cost. 6locked means that the port can send and receive 6(&Hs but cannot send or receive data. 1+C. Identif& at least one network problem caused b& "panning*,ree "panning*,ree Protocol. )ollowing are three network problems caused by %panning Tree 2onvergence time after a network failure. The time that it takes takes a port to move into forwardin forwarding g mode will will cause many many workstations workstations to time time out while while attempting to attach to a service. (aths can be sub0optimal if network is not designed correctly 1F. 7;plain the solutions developed to improve %T( convergence time. %panning0Tree %panning0Tree (rotocol operation. The following following solutions solutions improve improve spanning spanning tree (ort)ast N enables a port to bypass %panning Tree operations Hplink)ast N creates an Hplink)ast group of ports that can be used to perform a rapid failover in the case of a direct link failure. 6ackbone)ast N e=pires the Ba= Age timer when it stops hearing the superior 6(&H but continues hearing the inferior 6(&H ther2hannel N bundles parallel ports together which allows %panning Tree to treat them as one port Root 6ridge N correct placement of the Root 6ridge and modication of the diameter will improve path selection and convergence time. (ort (riority and (ort 2ost N Hsed to in"uence the path selections made by %panning Tree 11. Discuss the purpose of an inferior 'PD/. The loss of a superior superior 6(&H and and the receipt receipt of an an inferior inferior 6(&H trigger trigger the 6ackbone) 6ackbone)ast ast process. process. 6ackbone)ast is initiated when a Root port or blocked port on a switch receives inferior 6(&Hs from its designated bridge. An inferior 6(&H identies one switch as both the Root 6ridge and the designated bridge. 'hen a switch receives an inferior 6(&H, it indicates that a link to which the switch is not directly connected -an indirect link has failed -that is, the designated bridge has lost its connection to the Root 6ridge. Hnder normal spanning0tree rules, the switch ignores inferior 6(&Hs for the congured ma=imum aging time. 1/. 7;plain how the routing and switching functions of a #isco 4" switch work together to enable multila&er switching. Bultilayer switching -B*% is a techni
As long as the B%*0% detects both the candidate and enable packets for the new route, a "ow entry will be entered into the B*% cache . 18. #an I bundle two dierent t&pe of interface e;. a fastethernet with gigabitethernet) 4o, it is not possible 1>. How man& number of routes carried b& RIP packet) ach R( router advertises all R( routes periodically via R( updates. ach update can contain a ma=imum of /8 route advertisements. This limit is imposed by R( specications. R( can sometimes be congured to send as many as /88 routes per update. 1?. How man& network t&pes available in 5"PF) There are 8 types types of $%() network network types types (oint to point 6roadcast 4on broadcast 46BA (oint to multipoint 09. What is the re%uirement of doing summari$ation) To To reduce reduce the si7e of the ospf *%&6 *%&6 0:0. If an& of the 5"PF area is not stabili$ed+ does it impact another area)
f the area F is not stable then the %() will be calculated with in the areaF for *%A1 and *%A / these *%As are summary *%As for the other areas, so other area routers will calculate the %() for summary *%A, when ever wrong happens in area F. now the point is other area routers will not calculate the spf for their own area but for areaF. 0:-. What is the use of forwarding address in "3 : and "3 @)
2overed in another
'e can have multiple process but it can have one process per interface. 0::. 3fter con(guring new router*id+ automaticall& it will be used or do we need to use some t&pe of command to get it operational.
'e need to clear the ospf process to get is re"ected. 0:@. If DR is down and no 'DR is con(gured what will happen) The &R must must be elected elected in a Bulti Bulti access network. f &R goes down and there is no other 6&R, either a new election will occur to nd the new &R. or if no other router are eligible to become &R because their (riority was set to F, then all the Routers will not form adEacency to each other.T here has to be &R atleast. This happens when you e=plicitly denes a certain router to be a &R and other routers not to become &R or 6&R ever. a common practice found in GH6 and %($P style 46BA networks.in which GH6 is always a &R and there is no need for a %poke router to participate in &R.:6&R election process f the $ld &R comes back after a new &R is elected or 6&R is promoted to become &R. it cannot dominate $%() running topology until the current &esignated router goes oDine. $%() &R:6&R election process is pretty much similar to %panning0Tree (rotocol Root election process. 0:. What is the dierence between a neighbor and ad?acent neighbor)
4eighbors are routers who are in the same area who e=change hello packets, but not *%A information. %uch as, between two &R$ther routers. AdEacent routers are routers who have fully e=changed their *%A information and are stable. *ets take a broadcast access medium topology like a *A4 for e=ample, to illustrate the di5erences. As you know, in a *A4 environment you have a &R election. After this election, the &R and 6&R are elected, and all other routers- &R$thers form adEacencies with the &R:6&R. Beaning, they pass the /'AL state into e=0start and start e=changing *%A headers to begin the route e=change. Gowever, between two &R$ther routers, you will never pass beyond /'AL. That is to say, they will e=change hello packets, but will never enter e=start, never e=change *%A headers, never converge into adEaceny neighbors. 0:. What is # and R in 5"PF debug)
Ans9 2 stands for local router and R stands for remote router. 1>F. De(ne various tools which participates in 5"PF fast convergence $%() have various tool and techni1. In la&er - domain do we need ip address for communication) 4o we don’t. */ works on mac address 0E!. How to perform inter vlan routing without la&er ! device) Les Les this is possible possible by congurin conguring g link between between the two switches as access ports. ports. http9::www.mplsvpn.info:/F1F:F?:inter0vlan0routing0without0layer0+.html
1>. what is the importance of P4,/ in bgp) T2( BTH path discovery discovery allows 6O( 6O( to use the largest largest packets packets possible 'ithout (BTH discovery, we can support 1FF peers with 1/F,FFF routes each 'ith (BTH discover, we can support 1?8 peers with 1/F,FFF routes each
1>8. How to avoid route reBector loops) 4ever peer through a route re"ector client to reach a route re"ector 1>>. arger the IP datagram less the overhead+ is it true or false) Les, Les, true 0E@. In RIP wh& do we have hop count of 0:)
Ratio of %ummation of all the timers yield to 18 0E. when is a '2P route invalid) The ne=t0hop ne=t0hop must be be accessible accessible and reachable reachable for for a path to a 6O( network network to be be valid.
1>C. What e;catl& is a control plane ) $ther control plane protocols -6O(, $%(), *&(, *A2(, 6)& ... are more clear0cut N they run between individual network devices -usually adEacent, but there’s also targeted *&( and multihop 6O( and could be -at least in theory made to run across a separate control plane network -or IR). 2ontrol plane protocols usually run over data plane interfaces to ensure shared fate N if the packet forwarding fails, the control plane protocol fails as well N but there are scenarios -e=ample9 optical gear where the data plane interfaces cannot process packets, forcing you to run control plane protocols across a separate set of interfaces. Typical Typical control control plane plane protocols protocols aren’t aren’t data0driven9 data0driven9 6O(, *A2( *A2( or 6)& packet packet is never sent sent as a direct direct response response to a data data plane packet. 2B( is di5erent9 some 2B( packets are sent as replies to other 2B( packets, others are triggered by data plane packets -2B( unreachables and 2B(v> neighbor discovery. Trying Trying to classify classify protocols protocols based based on where where they’re they’re run is also also misleading. misleading. t’s true true that the networking networking device device 2(H almost always generates 2B( re
1?8. What is the use of forwarding address in "3 :) )orwarding Address is used in $%() to avoid e=tra hop count when traKc is routed to an e=ternal A%6R. The value of forwarding address in *%A 8 can either be 7ero or non07ero. The forwarding address sets to F.F.F.F when the A%6R redistributes the e=ternal routes and $%() is not enabled on ne=t hop interface. The forwarding address sets to non07ero when any of the following condition occurs90 1.$%() is enabled on the A%6R’s ne=t hop interface. /.A%6Rs ne=t hop interface is not point to point and point to multipoint. +.A%6Rs ne=t hop interface falls under the network range specied in the router $%(). 1?>. What is the use of bidirectional detection forwarding) 6usiness critical application demands convergence very fast but on shared ( infrastructure, it’s diKcult to meet the re88+8. The primary primary mode is is known as as Asynchronous Asynchronous mode. mode. n this mode, mode, the systems systems periodically periodically send send 6)& 2ontrol 2ontrol packets packets to one another, and if a number of those packets in a row are not received by the other system, the session is declared to be down. 1??. What is Inter Packet 2ap or Inter Frame 2ap) *et!s assume if a Oigi port which could transfer raw data up to 1/8,FFF,FFF bytes per second with minimum frame si7e of > bytes. &evice must need some time to process one packet after another. The di5erence of time to process from one packet to another is known as inter0frame or inter0packet gap. The minimum inter frame gap period is C> bits or 1/ bytes which amounts to C> nano seconds Z ? byte of preamble and 1 byte of delimiter conse
f an interface is fast switched, per destination load sharing is performed. f an interface is process switched, per packet load sharing is performed. 1@+. What is a recursive table lookup) A recursive routing table lookup occurs when a router cannot ac. 7;plain how an "PF algorithm works. A router builds a shortest path tree by rst adding itself as the root. Hsing the information in the topological database, the router creates a list of all of its directly connected neighbors. The lowestcost link to a neighbor becomes a branch of the tree, and that router!s neighbors are added to the list. The list is checked for duplicate paths, and if they e=ist, the higher0cost paths are removed from the list. The lowest0cost router on the list is added to the tree, that router!s neighbors are added to the list, and the list is again checked for duplicate paths. This process continues until no routers remain on the list. 1@?. How do areas bene(t a link state internetwork) 'ithin a routing domain, areas are subdomains. They make link state routing more eKcient by limiting the si7e of the link state database of each router in the area. 1@@. How man& updates must be missed before a route entr& will be marked as unreachable in RIP) A route entry is marked as unreachable if si= updates are missed. 1@C. What is the purpose of the garbage collection timer) The garbage garbage collection collection timer, timer, or "ush timer, is set set when a route route is declared declared unreach unreachable. able. 'hen 'hen the timer e=pires, e=pires, the the route is is "ushed from the route table. This process allows an unreachable route to remain in the routing table long enough for neighbors to be notied of its status. 1CF. Wh& is a random timer associated with triggered updates) What is the range of this timer) The random random timer, whose range range is 1 to 8 seconds, prevents prevents a MstormM MstormM of triggered triggered updates updates during a topology change. 1C1. What is the dierence between a RIP Re%uest message and a RIP Response message) A Re. What is the purpose of the Route ,ag 'hen another routing protocol uses the R(v/ domain as a transit domain, the protocol e=ternal to R(v/ can use the Route Tag Tag eld to communicate communicate information information to its peers on the the other side side of the R(v/ R(v/ domain. domain.
1C?. Which one feature must a routing protocol have to be a classless routing protocol) A classless routing protocol does not consider the maEor network address in its route lookups, but Eust looks for the longest match. 1C@. What is an 5"PF neighbor) )rom the perspective of an $%() router, a neighbor is another $%() router that is attached to one of the rst router!s directly connected links. 1CC. What is an 5"PF ad?acenc&) An $%() adEacency is a conceptual link to a neighbor over which *%As can be sent.
/FF. What is 4a;3ge) Ba=Age, 1 hour, is the age at which an *%A is considered to be obsolete. /F1. What is the dierence between 5"PF network entries and 5"PF router entries) $%() network entries are entries in the route table, describing ( destinations. $%() router entries are entries in a separate route table that record only routes to A6Rs and A%6Rs. /F/. Which three (elds in the "3 header distinguish dierent "3s) Which three (elds in the "3 header distinguish dierent instances of the same "3W The three three elds in in the *%A header header that distinguish distinguish di5erent di5erent *%As are the Type, Advertising Advertising Router, Router, and the *ink %tate %tate & elds. elds. The three three elds in in the *%A header header that distinguish distinguish di5erent di5erent instances instances of the same *%A are are the %e. How is the null interface useful when summari$ing routes) A router that originates a summary route should use the null interface as the ne=t hop of the summary route. Any packets that match the summary route, but for which there is no more0specic route to the packet!s destination address, will be dropped. This prevents the router from forwarding MlostM packets. /F?. How are route maps similar to access l ists) How are the& dierent) Route maps are similar to access lists in that they dene match criteria and an action to take in the event of a match. Route maps are di5erent from access lists in that they not only specify match criteria but also specify set criteria. The set action can modify a route or route a packet according to the parameters of the packet. /F@. What are polic& routes) (olicy routes are static routes that use route maps to determine which packets should be routed and where the packets should be routed. /FC. What are route tags) Route tags are elds within routing information packets that allow e=ternal information to be carried through the routing domain. /1F. In what wa& do route tags aect routing protocols) Route tags have no e5ect on the routing protocols that carry them /11. Does static routing support load balancing) Les Les . 6oth routes routes will get installed installed in the routing routing tabletable- provided provided these are are for the same same pre= pre= but it will be be the switching switching process that will do the load0sharing and default is 2) which load0shares per session- src0dst ( pair. http9::freelabworkbook.blogspot.in:/F1F:FC:static0route0load0balancing.html /1/. #an we use 5"PF without backbone area) $%() uses a central area, area F, to e=change routes between other areas. This is part of the reason area F e=ists to stop routing loops. if you have multiple areas without an area F they are in fact treated as separate $%() processes and would not e=change routes anyway. anyway. /1. Does route reBector come in actual path during traAc forwarding) RR is deployed as a control plane to reduce the re. How man& links can be assigned for load balancing or sharing in '2P load sharing can be achieved when there are multiple -up to a ma=imum of si=, e
/1@. What are the ma;imum number of secondar& IP address that can be con(gured on a router interface) There are no limits on congurin conguring g secondary secondary ( addresses addresses on a router interface.
/1C. How do I connect two dierent I"Ps and route dierent traAc to dierent I"Ps) (olicy based routing -(6R is the feature that allows you to route the traKc to di5erent %(s based on the source address. //F. What is the dierence between the two methods to create static routes) There are two methods to create create static static routes9 The ip route route 1F.1.1.1 /88./88./88.F /88./88./88.F eth F:F command command generates generates an AR( AR( broadcast broadcast that looks looks for the the ne=thop ne=thop ( address. address. The ip route route 1F.1.1.1 /88./88./88.F /88./88./88.F 1?/.1>.1.1 command does does not generate generate an AR( re
//+. What is dierence between distance vector and link state protocols)
//. 7;plain 1-.0K tunneling) http9::packetlife.net:blog:/F1F:Eul:1/:ieee0@F/01<0tunneling: @F/.13 tunneling can be used to achieve simple layer two I(4 connectivity between sites by encapsulating one @F/.13 trunk inside another. The topology below illustrates a common scenario where @F/.13 -or M3in3M tunneling can be very useful.
A service provider has infrastructure connecting two sites at layer two, and desires to provide its customers transparent layer two connectivity. A less0than0ideal solution would be to assign each customer a range of I*A4s it may use. Gowever, this is very limiting, both in that it removes the customers! "e=ibility to choose their own I*A4 numbers, and there may not be enough I*A4 numbers -we can only use a ma=imum of ,FC or so available on large networks. @F/.13 tunneling solves both of these issues by assigning each customer a single I*A4 number, chosen by the service provider. 'ithin each customer I*A4 e=ists a secondary @F/.13 trunk, which is controlled by the customer. ach customer packet traversing the service provider network is tagged twice9 the inner0most @F/.13 header contains the customer0chosen I*A4 &, and the outer0most header contains the I*A4 & assigned to the customer by the service provider.
@F/.13 Tunnel 2onguration 6efore we get started with the conguration, we must verify that all of our switches support the necessary ma=imum transmission unit -BTH, 18F bytes. 'e can use the command show system mtu to check this, and the global conguration command system mtu to modify the device BTH if necessary -note that a reload will be re
4e=t, we!ll congure our backbone trunk to carry the top0level I*A4s for customers A and 6, which have been assigned I*A4s 11@ and /FC, respectively. 'e congure a normal @F/.13 trunk on both %( switches. The last conguration line below restricts the trunk to carrying only I*A4s 11@ and /FCJ this is an optional step. %1-cong interface fF:1+ %1-cong0if switchport trunk encapsulation dot1< %1-cong0if switchport mode trunk %1-cong0if switchport trunk allowed vlan 11@,/FC %/-cong interface fF:1+ %/-cong0if switchport trunk encapsulation dot1< %/-cong0if switchport mode trunk %/-cong0if switchport trunk allowed vlan 11@,/FC 4ow for the interesting bit9 the customer0facing interfaces. 'e assign each interface to the appropriate upper0level -service provider I*A4, and its operational mode to dot1<0tunnel. 'e!ll also enable *ayer two protocol tunneling to transparently carry 2&( and other layer two protocols between the 2( devices. %1-cong interface fF:1 %1-cong0if switchport access vlan 11@ %1-cong0if switchport mode dot1<0tunnel %1-cong0if l/protocol0tunnel %1-cong0if interface fF:+ %1-cong0if switchport access vlan /FC %1-cong0if switchport mode dot1<0tunnel %1-cong0if l/protocol0tunnel %/-cong interface fF:/ %/-cong0if switchport access vlan 11@ %/-cong0if switchport mode dot1<0tunnel %/-cong0if l/protocol0tunnel %/-cong0if interface fF: %/-cong0if switchport access vlan /FC %/-cong0if switchport mode dot1<0tunnel %/-cong0if l/protocol0tunnel 'e can use the command show dot1<0tunnel on the %( switches to get a list of all interfaces congured as @F/.13 tunnels9 %1 show dot1<0tunnel dot1<0tunnel mode *A4 (ort-s 00000000000000000000000000000 )aF:1 )aF:+ 4ow that our tunnel congurations have been completed, each customer I*A4 has transparent end0to0end connectivity between sites. This packet capture shows how customer traKc is double0encapsulated inside two @F/.13 headers along the %( backbone. Any traKc left untagged by the customer -i.e., traKc in the native I*A4 1 is tagged only once, by the service provider. //8. 7;plain 7therchannel) http9::packetlife.net:blog:/F1F:Ean:1@:etherchannel0considerations: ther2hannel is 2isco!s term for bundling two or more physical thernet links for the purposes of aggregating available bandwidth and, to a lesser e=tent, providing a measure of physical redundancy. Hnder normal conditions, all but one redundant physical link between two switches will be disabled by %T( at one end.
'ith ther2hannel congured, multiple links are grouped into a port0channel, which is assigned its own congurable virtual interface. The bundle is treated as a single link.
ther2hannel 4egotiation An ther2hannel can be established using one of three mechanisms9 (Ag( 0 2isco!s proprietary negotiation protocol *A2( - @F/.+ad 0 %tandards0based negotiation protocol %tatic (ersistence -M$nM 0 4o negotiation protocol is used Any of these three mechanisms will suKce for most scenarios, however the choice does deserve some consideration. (Ag(, while perfectly able, should probably be dis
To To congure congure an ther2han ther2hannel nel using *A2( *A2( negotiation, negotiation, each each side must be be set to either either active or or passiveJ only only interfaces interfaces congured in active mode will attempt to negotiate an ther2hannel. (assive interfaces merely respond to *A2( re
$nly a single line is needed to congure a group of ports as an ther2hannel9 %1-cong interface range fF:1+ 018 %1-cong0if0range channel0group 1 mode W active nable *A2( unconditionally auto aut o nable (Ag( only if a (Ag( device is detected desirable nable (Ag( unconditionally on nable therchannel only passive nable *A2( only if a *A2( device is detected %1-cong0if0range channel0group 1 mode active 2reating a port0channel interface (ort0channel 1 As noted, a virtual port0channel interface (ort0channel1 has been created to represent the logical link. %witchport congurations applied to this interface are replicated to the physical member interfaces. 'e can inspect the health of the ther2hannel with the show etherchannel summary command9 %1 show etherchannel summary )lags9 & 0 down ( 0 bundled in port0channel 0 stand0alone s 0 suspended G 0 Got0standby -*A2( only R 0 *ayer+ % 0 *ayer/ H 0 in use f 0 failed to allocate aggregator B 0 not in use, minimum links not met u 0 unsuitable for bundling w 0 waiting to be aggregated d 0 default port 4umber of channel0groups in use9 1 4umber of aggregators9 1 Oroup (ort0channel (rotocol (orts 000000Z0000000000000Z00000000000Z00000000000000000000000000000000000000000000000 1 (o1-%& *A2( )aF:1+-& )aF:1-& )aF:18-& The opposite opposite side of of the *A2( ther2hann ther2hannel el will typically typically be congured congured as passive, passive, however it can be active active as well. well. %/-cong0if0range channel0group 1 mode passive 2reating a port0channel interface (ort0channel 1 'hen the member ports on both sides of the ther2hannel are enabled, the port0channel interface also transitions to the up state. Gowever, note the timing of the system messages9 VBar 1 FF9898F.>?9 `*4P0+0H(&$'49 nterface )astthernetF: )astthernetF:1, 1, changed state to up VBar 1 FF9898F.>@+9 `*4P0+0H(&$'49 nterface )astthernetF: )astthernetF:1+, 1+, changed state to up VBar 1 FF9898F.>C19 `*4P0+0H(&$'49 nterface )astthernetF: )astthernetF:18, 18, changed state to up VBar 1 FF9898+.@?9 `*4P0+0H(&$'49 nterface (ort0channel1, changed state to up Almost a full three seconds elapsed between the member ports transitioning to the up state and the port0channel interface coming up. $nce it did, we can see the state of the ther2hannel has changed to Min useM9 %1 show etherchannel summary )lags9 & 0 down ( 0 bundled in port0channel 0 stand0alone s 0 suspended G 0 Got0standby -*A2( only R 0 *ayer+ % 0 *ayer/ H 0 in use f 0 failed to allocate aggregator B 0 not in use, minimum links not met u 0 unsuitable for bundling w 0 waiting to be aggregated d 0 default port 4umber of channel0groups in use9 1 4umber of aggregators9 1 Oroup (ort0channel (rotocol (orts 000000Z0000000000000Z00000000000Z00000000000000000000000000000000000000000000000
1 (o1-%H *A2( )aF:1+-( )aF:1-( )aF:18-( 4ote the % indicating layer two operationJ on multilayer platforms, ther2hannel interfaces can be congured for routed operation as well. )or comparison, let!s recongure the ther2hannel to function without a negtiation protocol -MonM mode9 %1-cong no interface po1 %1-cong interface range fF:1+ 018 %1-cong0if0range channel0group 1 mode on 2reating a port0channel interface (ort0channel 1 %1-cong0if0range no shutdown This time we we observe that that the port0channel port0channel interface interface is enabled as soon as as its rst member member port comes comes up, as there there is no delay imposed by negotiation9 VBar 1 FF98>91/./?19 `*4P0+0H(&$'49 nterface )astthernetF: )astthernetF:1+, 1+, changed state to up VBar 1 FF98>91/./@?9 `*4P0+0H(&$'49 nterface (ort0channel1, changed state to up VBar 1 FF98>91/./C19 `*4P0+0H(&$'49 nterface )astthernetF: )astthernetF:1, 1, changed state to up VBar 1 FF98>91/.+F?9 `*4P0+0H(&$'49 nterface )astthernetF: )astthernetF:18, 18, changed state to up n the 2ampus 4etwork Gigh Availability &esign Ouide, 2isco recommend forgoing the use of a negotiation protocol and conguring ther2hannels for static Mon:onM operationJ however they also caution that this approach o5ers no protection against the e5ect of miscongurations. ther2hannel *oad06alancing Another consideration to make when implementing ther2hannels is the type of load0balancing in e5ect. ther2hannel provides load0balancing only per frame, not per bit. A switch decides which member link a frame will traverse by the outcome of a hash function performed against one or more elds of each frame. 'hich elds are considered is dependent on the switch platform and conguration. )or e=ample, a 2atalyst +88F can match only against a frame!s destination or source BA2 address9 %1-cong port0channel load0balance W dst0mac &st Bac Addr src0mac %rc Bac Addr The show etherchannel etherchannel load0balan load0balance ce command command reveals reveals that source source BA2 address load0balancing load0balancing is default on the 2atalyst 2atalyst +88F9 %1 show etherchannel load0balance ther2hannel *oad06alancing 2onguration9 src0mac ther2hannel *oad06alancing Addresses Hsed (er0(rotocol9 4on0(9 %ource BA2 address (v9 %ource BA2 address Bore powerful platforms can match against ( address-es or layer four port-s. Oenerally speaking, higher layer elds are more favorable as they tend to be more dynamic, resulting in a more granular distribution of traKc across member links. &irection of "ow is also an important detail. )or e=ample, consider the following topology9
Routed packets entering the subnet from %1 are always sourced from the BA2 address of the I*A4 interface. f source BA2 load0balancing is in use, these frames will be forwarded down only one member link, because the outcome of the hash function will always be the same. 2onguring destination BA2 load0balancing on %1 is recommended to achieve a more varied distribution of frames and make better use of the available bandwidth.
The opposite opposite is true on %/9 %ince %ince all frames frames entering entering the ther2hannel ther2hannel from *A4 hosts hosts are destined destined for the BA2 address of the gateway -I*A4 interface, source BA2 address load0balancing works better here. ther2hannel 6andwidth and 2osts )inally, remember that the perceived bandwidth of a port0channel interface is e. 3re lan locall& signi(cant) http9::packetlife.net:blog:/FF@:apr:11:vlans0are0locally0signicant: $ne common misconception regarding I*A4s is that they are signicant beyond a single switch. $f course, I*A4 numbers have to match for trunking to work, and IT( can be used to automatically propagate I*A4 information. Gowever, a I*A4, being essentially little more than a number, is signicant only within a device. 2onsider the following scenario9
All of the ports on switch A are set to access mode in I*A4 1F, and all of the ports on switch 6 are set to access mode in I*A4 /F. 4ote that the connection between the two switches is not a trunkJ each end is congured as an access port in the respective I*A4. $ur two hosts A and 6 are similarly connected to di5erent I*A4s, but still reside in the same ( subnet. 2an hosts A and 6 communicateW The answer answer is yes. )ollow )ollow the path path of a frame frame leaving leaving host A destined destined for host host 6. %witch %witch A receives receives this frame frame on a port port in I*A4 1F, so it can only egress out another port in I*A4 1F or a trunk port. t performs the usual BA2 lookup to determine the appropriate outbound port is its link to switch 6. 4ow, here!s the key9 the frame is forwarded to switch 6 without a I*A4 tag, because this is an access port. %witch 6 receives the frame on an interface it considers I*A4 /F and performs the same switching decision to forward the frame to host 6. %o, does it workW Lep s it a good ideaW (robably not. n an instance where I*A4s are used, you!re probably using more than one. )or this reason and others, it!s recommended to always trunk between switches using @F/.1< or -less favorably 2isco %*. //C. Wh& '2P /ses ,#P and I2Ps Dont) http9::packetlife.net:blog:/F1F:Eun:/:why0bgp0uses0tcp0and0igps0dont: 2onvenience Arguably the most obvious motivation to design 6O( to run over T2( is simple convenience. Remember that 6O( is essentially Eust another application layer protocol to the T2(:( stackJ at the time of 6O(!s creation T2( was already out there and working, so why not take advantage of itW )rom R)2 /?19 6O( uses T2( as its transport protocol. This eliminates the need to implement e=plicit update fragmentation, retransmission, acknowledgement, and se
'hen a host needs to transmit data out an interface, it references the interface!s Ba=imum Transmission Hnit -BTH to determine how much data it can put into each packet. thernet interfaces, for e=ample, have a default BTH of 18FF bytes, not including the thernet header or trailer. This means a host needing to send a T2( data stream would typically use the rst /F of these 18FF bytes for the ( header, the ne=t /F for the T2( header, and as much of the remaining 1>F bytes as necessary for the data payload. ncapsulating data in ma=imum0si7e packets like this allows for the least possible consumption of bandwidth by protocol overhead. Hnfortunately, not all links which compose the nternet have the same BTH. The BTH o5ered by a link may vary depending on the physical media type or congured encapsulation -such as OR tunneling or (sec encryption. 'hen a router decides to forward an (v packet out an interface, but determines that the packet si7e e=ceeds the interface!s BTH, the router must fragment the packet to transmit it as two -or more individual pieces, each within the link BTH. )ragmentation is e=pensive both in router resources and in bandwidth utili7ationJ new headers must be generated and attached to each fragment. -n fact, the (v> specication removes transit packet fragmentation from router operation entirely, but this discussion will be left for another time.
To To utili7e a path in the most eKcient eKcient manner possible, hosts must nd nd the path BTHJ BTHJ this is the smallest smallest BTH of any any link in the path to the distant end. )or e=ample, for two hosts communicating across three routed links with independent BTHs of 18FF, @FF, and 1/FF bytes, the smallest -@FF bytes must be assumed by each end host to avoid fragmentation.
$f course, it!s impossible to know the BTH of each link through which a packet might travel. R)2 11C1 denes path BTH discovery, a simple process through which a host can detect a path BTH smaller than its interface BTH. Two components are key to this process9 the &on!t )ragment -&) bit of the ( header, and a subcode of the 2B( &estination Hnreachable message, )ragmentation 4eeded.
%etting the &) bit in an ( packet prevents a router from performing fragmentation when it encounters an BTH less than the packet si7e. nstead, the packet is discarded and an 2B( )ragmentation 4eeded message is sent to the originating host. ssentially, the router is indicating that it needs to fragment the packet but the &) "ag won!t allow for it. 2onveniently, R)2 11C1 e=pands the )ragmentation 4eeded message to include the BTH of the link necessitating fragmentation. A )ragmentation 4eeded message can be seen in packet > of this packet capture.
4ow that the actual path BTH has been learned, the host can cache this value and packeti7e future data for the destination to the appropriate si7e. 4ote that path BTH discovery is an ongoing processJ the host continues to set the &) "ag so that it can detect further decreases in BTH should dynamic routing in"uence a new path to the destination. R)2 11C1 also allows for periodic testing for an increased path BTH, by occasionally attempting to pass a packet larger than the learned BTH. f the packet succeeds, the path BTH will be raised to this higher value. Lou Lou can test test path BTH discovery across across a live network network with a tool like like tracepath -part of the *inu= (utils (utils package package or mturoute -'indows only. Gere!s a sample of tracepath output from the lab pictured above, with the BTH of )F:1 reduced to 1FF bytes using the ip mtu command9 Gost tracepath 0n 1C/.1>@.1./ 19 1C/.1>@.F./ 1C/.1>@.F./ F.FC?ms pmtu 18FF 19 1C/.1>@.F.1 F.8+8ms 19 1C/.1>@.F.1 F.+88ms /9 1C/.1>@.F.1 F.+Fms pmtu 1FF /9 1C/.1>@.1./ F.?>+ms reached Resume9 pmtu 1FF hops / back /8 /++. Lou are the network administrator for a small network that has two routers that are connected via serial interfaces. Lou have used the command Ip route 0!.1.1.1 -::.1.1. 1 0-.1.1.- on R0 to (nali$e con(guration. What happens if the serial interface on R- shuts down)
The route route of 1+.F.F.F remains remains on router router R1. 6ecause you are using static routing, there is no way for router R1 to know that the interface is down on router R/. This means that the route is still valid on router R1 as far as router R1 is concerned. /+. Lou Lou have t&ped the following following command on switch "W0. "W0. /sing the (gure below+ below+ what eect will the commands have on the network) nterface fF:/ %witchport mode access
-A All systems in I*A4 1F can communicate with one another. -6 %ystems will not be able to communicate between the two switches. -2 All systems in I*A4 /F can communicate with one another. -& %ystems can communicate between the two switches. 6. %ystems will not be able to communicate between the two switches. n order for systems to communicate across switches to other systems in the same I*A4, you need to congure port )F:/ as a trunk port instead of an access port. 2onguring )F:/ as a trunk port will allow it to carry I*A4 traKc between the two switches. /+8. /sing the (gure below+ which of the following statements are true of router R0)
-A There are too many sub0interfaces on fF:F. -6 nterface fF:F should be congured as an access port. -2 nterface fF:F should be congured as a trunk port. -& nterface )F:1 should be congured as a trunk port. 2. nterface fF:F should be congured as a trunk port. 'hen creating a router on a stick scenario, you will need to create the sub0interfaces on the port connected to the switch, but you also need to enable the port on both the router and the switch as a trunk port so that it can carry I*A4 traKc. n this case, the router is only asking what you should do with router R1. -!E. Which 5"PF command turn 5"PF on all interfaces of a router)
Answer9 network F.F.F.F /88./88./88./88 /+?. Refer the e;hibit
'hat two results would occur if the hub were to be replaced with a switch that is congured with one thernet I*A4W -2hoose two A. The number of collision domains would remain the same. 6. The number of collision domains would decrease. 2. The number of collision domains would increase. &. The number of broadcast domains would remain the same. . The number of broadcast domains would decrease. ). The number of broadcast domains would increase. Answer9 2 &
/+@. ,he network administrator normall& establishes a ,elnet session with the switch from host 3. ,he administrator8s attempt to establis h a connect via ,elnet to the switch from host ' fails+ but pings from host ' to other two hosts are successful. What is the issue for this problem)
A. Gost 6 and the switch need to be in the same subnet. 6. The switch needs an appropriate default gateway assigned. 2. The switch interface connected to the router is down. &. Gost 6 need to be assigned an ( address in vlan 1. 3nswerC 6 7;planation
Gost A -1?/.1C.1.1 and the management ( address of the %witch -1?/.1C.1./8F are in the same subnet so telnet from host A to the switch can be successful even if a default gateway is not set on host A. 6ut host 6 -1?/.1C.+/./ and the management ( address of the %witch -1?/.1C.1./8F are not in the same subnet so host 6 needs a default gateway to telnet to the switch. The default gateway on host 6 should be 1?/.1C.+/./8. /+C. Refer to the topolog& and router output shown in the e;hibitC
A technician is troubleshooting host connectivity issues on the switches. The hosts in I*A4s 1F and 18 on %w11 are unable to communicate with hosts in the same I*A4s on %w1/. Gosts in the Admin I*A4 are able to communicate. The port0to0I*A4 assignments are identical on the two switches. 'hat could be the problemW A. The )aF:1 port is not operational on one of the switches. 6. The *ink connecting the switches has not been congured as a trunk. 2. At lease one port needs to be congured in I*A4 1 for I*A4s 1F and 18 to be able to communicate. &. (ort )astthernet F:1 needs to be congured as an access link on both switches. . A router is re
'hat commands must be congured on the /C8F switch and the router to allow communication between host 1 and host /W -2hoose two Router-conginterface fastethernet F:F Router-cong0ifno shutdown Router-conginterface fastethernet F:F.1 Router-cong0subifencapsulation dot1< 1F Router-cong0subifip address 1C/.1>@.1F.1 /88./88./88.F Router-cong0subifinterface fastethernet F:F./ Router-cong0subifencapsulation dot1< /F Router-cong0subifip address 1C/.1>@./F.1 /88./88./88.F %witch1-cong interface fastthernet F:1 %witch1-cong0if switchport mode trunk /1. Refer to the topolog& shown in the e;hibit. Which ports will be ",P designated ports if all the links are operating at the same bandwidth) <#hoose three>
A. %witch A N )aF:F 6. %witch A N )aF:1 2. %witch 6 N )aF:F &. %witch 6 N )aF:1 . %witch 2 N )aF:F ). %witch 2 N )aF:1 Answer9 6 2 & =planation )irst by comparing their BA2 addresses we learn that switch 6 will be root bridge as it has lowest BA2. Therefore all of its ports are designated ports 0U 2 X & are correct. $n the link between switch A X switch 2 there must have one designated port and one non0designated -blocked port. 'e can gure out which port is designated port by comparing their BA2 address again. A has lower BA2 so )aF:1 of switch A will be designated port while )aF:1 of switch 2 will be blocked 0U 6 is correct. //. Refer to the e;hibit. 7ach of these four switches has been con(gured with a hostname+ as well as being con(gured to run R",P. R",P. =o other con(guration changes have been made. Which three of these show the correct R",P port roles for the indicated switches and interfaces) <#hoose three>
A. %witchA, )aF:/, designated 6. %witchA, )aF:1, root 2. %witch6, OiF:/, root &. %witch6, OiF:1, designated . %witch2, )aF:/, root ). %witch&, OiF:/, root Answer9 A 6 ) =planation The
switch always advertises its cost to the root bridge in its 6(&H. The receiving switch will add its local port cost value to the cost in the 6(&H. $ne more thing to notice is that a root bridge always advertises the cost to the root bridge -itself with an initial value of F. 4ow let’s have a look at the topology again
%witch2 advertises its cost to the root bridge with a value of F. %witch & adds -the cost value of 1Obps link and advertises this value - to %witch6. %witch6 adds another and learns that it can reach %witch2 via OiF:1 port with a total cost of @. The same process happens for for %witchA and %witch6 %witch6 learns learns that it can reach reach %witch2 %witch2 via OiF:/ OiF:/ with a total total cost of /+ 0U %witch 6 chooses OiF:1 as its root port 0U & is not correct. 4ow our last task is to identify the port roles of the ports between %witchA X %witch6. t is rather easy as the BA2 address of %witchA is lower than that of %witch6 so )aF:/ of %witchA will be designated port while OiF:/ of %witch6 will be alternative port 0U A is correct but 2 is not correct. 6elow summaries all the port roles of these switches9
Z &(9 &esignated (ort -forwarding state Z R(9 Root (ort -forwarding state Z A(9 Alternative (ort -blocking state /+. 5n corporate network+ hosts on the same 3= can communicate with each other+ other+ but the& are unable to communicate with hosts on dierent 3=s. What is needed to allow communication between the 3=s)
A. a router with subinterfaces congured on the physical interface that is connected to the switch 6. a router with an ( address on the physical interface connected to the switch 2. a switch with an access link that is congured between the switches &. a switch with a trunk link that is congured between the switches Answer9 A
/. A frame from I*A41 of switch %1 is sent to switch %/ where the frame received on I*A4/. 'hat causes this behaviorW
A. trunk mode mismatches 6. vlans that do not correspond to a uni
A. The link between Gost1 and %witch1 is down. 6. T2(:( is not functioning on Gost1 2. The link between Router1 and Router/ is down. &. The default gateway on Gost1 is incorrect. . nterface )aF:F on Router1 is shutdown. ). The link between %witch1 and Router1 is down. Answer9 2 =planation n this
nterface )aF:F on Router1 replies for the ping packets from Gost1 so it is up 0U is not correct. f the interface )aF:F on Router is shutdown then we will receive a message of QRe. Refer to the e;hibit. ,he network administrator re%uires eas& con(guration options and minimal routing protocol traAc. Which two options provide ade%uate routing table information for traAc that passes between the two routers and satisf& the re%uests of the network administrator)
A. a dynamic routing protocol on nternetRouter to advertise summari7ed routers to 2entralRouter. 6. a dynamic routing protocol on 2entralRouter to advertise summari7ed routers to nternetRouter. 2. a static route on nternetRouter to direct traKc that is destined for 1?/.1>.F.F:1> to 2entralRouter. &. a dynamic routing protocol on nternetRouter to advertise all routes to 2entralRouter. . a dynamic routing protocol on 2entralRouer to advertise all routes to nternetRouter ). a static, default route on 2entralRouter that directs traKc to nternetRouter. Answer9 2 ) /?. Refer to the e=hibit9
After GostA pings Gost6, which entry will be in the AR( cache of GostA to support this transmissionW Gost A knows host 6 is in another network so it will send the pings to its default gateway 1C/.1>@.>.1. Gost A sends a broadcast frame asking the BA2 address of 1C/.1>@.>.1. These information -( and BA2 address of the default gateway is saved in its AR( cache for later use.
/@. Refer to the e;hibit. ,he following commands are e;ecuted on interface fa160 of -:1"witch. /C8F%witch-cong0ifswitchport port0security /C8F%witch-cong0ifswitchport port0security mac0address sticky /C8F%witch-cong0ifswitchport port0security ma=imum 1 The thernet thernet frame that is shown shown arrives on interface interface faF:1. 'hat 'hat two functions functions will occur when when this frame frame is received received by /C8F%witchW -2hoose two
A. The BA2 address table will now have an additional entry of faF:1 )))).)))).)))). 6. $nly host A will be allowed to transmit frames on faF:1. 2. This frame will be discarded when it is received by /C8F%witch. &. All frames arriving on /C8F%witch with a destination of FFFF.FFaa.aaaa will be forwarded out faF:1. . Gosts 6 and 2 may forward frames out faF:1 but frames arriving from other switches will not be forwarded out faF:1. ). $nly frames from source FFFF.FFbb.bbbb, the rst learned BA2 address of /C8F%witch, will be forwarded out faF:1. Answer9 6 & /C. Host 0 is tr&ing to communicate with Host -. ,he e1 interface on Router # is down. Which of the following are true) <#hoose two>
A. Router 2 will use 2B( to inform Gost 1 that Gost / cannot be reached. 6. Router 2 will use 2B( to inform Router 6 that Gost / cannot be reached. 2. Router 2 will use 2B( to inform Gost 1, Router A, and Router 6 that Gost / cannot be reached. &. Router 2 will send a &estination Hnreachable message type. . Router 2 will send a Router %election message type. ). Router 2 will send a %ource 3uench message type. Answer9 A & =planation The last known known good good router router will try to inform you you that the destination destination cannot cannot be reached reached -with -with a &estination &estination Hnreachabl Hnreachable e message type so from that information you can learn how far your packets can travel to and where the problem is. /8F. Refer to the e;hibit.
All switches have default bridge priorities, and originate 6(&Hs with BA2 addresses as indicated. The numbers shown are %T( link metrics. 'hich two ports are in blocking state after %T( convergesW -2hoose two
A. the port on switch %'& that connects to switch %' 6. the port on switch %') that connects to switch %'O 2. the port on switch %'& that connects to switch %'2 &. the port on switch %'6 that connects to switch %'& Answer9 2 & /81. Refer to the e=hibit.
All switches have default bridge priorities, and originate 6(&Hs with BA2 addresses as indicated. The numbers shown are %T( link metrics. 'hich two ports are forwarding traKc after %T( convergesW -2hoose two A. The port connecting switch %'& with switch %' 6. The port connecting switch %'O with switch %') 2. The port connecting switch %'2 with switch %' &. The port connecting switch %'6 with switch %'2 Answer9 2 &
/8/. Refer to the e;hibit. router ospf 1FF router0id ... area 11F nssa summary0address 1C/.1>@.F.F /88./88.F.F nssa0only redistribute redistri bute static metric0type 1 subnets tag ?F network 11F.11F.F.F F.F./88./88 area 11F This is the congur conguration ation of the A%6R of area area 11F. 11F. 'hich option option e=plains e=plains why the remote A6R A6R should should not translate translate the type ? *%A for the pre= 1C/.1>@.F.F:1> into a type 8 *%AW A. The remote A6R translates all type ? *%A into type 8 *%A, regardless of any option congured in the A%6R. 6. The A%6R sets the forwarding address to F.F.F.F which instructs the A6R not to translate the *%A into a type 8 *%A. 2. The A%6R originates a type ? *%A with age eFF. &. The A6R clears the ( bit in the header of the type ? *%A for 1C/.1>@.F.F:1>.
3nswerC & 7;planation
'hen e=ternal routing information is imported into an 4%%A, *%A Type ? is generated by the A%6R and it is "ooded within that area only. To further distribute the e=ternal information, type ? *%A is translated into type 8 *%A at the 4%%A border. The (0bit in *%A Type ? eld indicates whether the type ? *%A should be translated. This (0bit is automatically set by the 4%%A A6R -also the )orwarding Address -)A is copied from Type ? *%A. The (0bit is not set only when the 4%%A A%6R and 4%%A A6R are the same router for the area . f bit ( S F, then the 4%%A A6R must not translate this *%A into Type 8.
The nssa*onl& keyword instructs the device to instigate Type0? *%A with cleared (0bit, thereby, preventing *%A translation to Type T ype 8 on 4%%A 4%%A A6R device. device. 4ote9 f a router is attached to another A% and is also an 4%%A A6R, it may originate a both a type08 and a type0? *%A for the same network. The type08 *%A will be "ooded to the backbone and the type0? will be "ooded into the 4%%A. f this is the case, the (0bit must be reset -(SF in the type0? *%A so the type0? *%A isn’t again translated into a type08 *%A by another 4%%A A6R. /8+. Which statement about a t&pe 9 "3 in 5"PF is true) A. t is an *%A that is originated by an A6R, that is "ooded throughout the A%, and that describes a route to the A%6R. 6. t is an *%A that is originated by an A%6R, that is "ooded throughout the A%, and that describes a route to the A%6R. 2. t is an *%A that is originated by an A%6R, that is "ooded throughout the area, and that describes a route to the A%6R. &. t is an *%A that is originated by an A6R, that is "ooded throughout the A%, and that describes a route to the A6R. . t is an *%A that is originated by an A6R, that is "ooded throughout the area, and that describes a route to the A%6R. Answer9 =planation *%A Type -called %ummary A%6R *%A is generated by the A6R to describe an A%6R to routers in other areas so that routers in other areas know how to get to e=ternal routes through that A%6R.
/8. Refer to the e;hibit.
R+ prefers the path through R1 to reach host 1F.1.1.1. 'hich option describes the reason for this behaviorW A. The $%() reference bandwidth is too small to account for the higher speed links through R/. 6. The default $%() cost through R1 is less than the cost through R/. 2. The default $%() cost through R1 is more than the cost through R/. &. The link between R/ and R1 is congested. Answer9 A =planation The default default formula formula to calculate calculate $%() bandwidth bandwidth is is 6' S 6andwidth 6andwidth Referen Reference ce : interface interface bandwidth bandwidth ]bps^ S 1F\@ 1F\@ : : interface bandwidth ]bps^ 6' of the R10R+ link S 1F\@ : 1FFBbps S 1F\@ : 1F\@ S 1 6' of the R/0R+ link S 1F\@ : 1Obps S 1F\@ : 1F\C S 1 -round up Therefore Therefore $%() $%() considers considers the two above above links have the same same 6andwidth 6andwidth 0U R+ will will go to 1F.1.1.1 1F.1.1.1 via the the R10R+ link. link. The solution here is to increase the 6andwidth Reference to a higher value using the Qauto0cost reference0bandwidth command under $%() router mode. )or e=ample9 Router-congrouter ospf 1 Router-cong0routerauto0cost reference0bandwidth 1FFFF This will increase increase the referenc reference e bandwidth bandwidth to 1FFFF Bbps Bbps which increa increases ses the 6' 6' of the R/0R+ R/0R+ link to 1F\1F : 1F\@ 1F\@ S 1FF. /88. Refer to the e;hibit.
A%1 and A%/ have multiple 6O( connections with each other. A%1 wants all return traKc that is destined to the pre= 1F.1F.1F.1:+/ to enter through the router R1 from A%/. n order to achieve this routing policy, the A% 1 advertises a lower B& from R1, compared to a higher B& from R+, to their respective 6O( neighbor for the pre= 1F.1F.1F.F:/. 'ill this measure guarantee that the routing policy is always in e5ectW A% 1 and A% / have multiple 6O( connections with each other. A% 1 wants all return traKc that is destined to the pre= 1F.1F.1F.1:+/ to enter through the router R1 from A% /. n order to achieve this routing policy, the A%1 advertises a lower B& from R1, compared to a higher B& from R+, to their respective 6O( neighbor for the pre= 1F.1F.1F.F:/. 'ill this measure guarantee that the routing policy is always in e5ectW A. Les, because B& plays a deterministic role in return traKc engineering in 6O(. 6. Les, because a lower B& forces 6O( best0path route selection in A% / to choose R1 as the best path for 1F.1F.1F.F:/. 2. Les, because a lower B& in A% / is the highest 6O( attribute in 6O( best0path route selection. &. 4o, A% / can choose to alter the weight attribute in R/ for 6O( neighbor R1, and this weight value is cascaded across A% / for 6O( best0path route selection. . 4o, A% / can choose to alter the local preference attribute to overwrite the best0path route selection over the lower B& advertisement from A% 1. This local preference attribute is cascaded across A% / for the 6O( best0path route selection. Answer9 /8>. Refer to the e;hibit. 3ll i'2P routes should have the i'2P peer as the ne;t hop address. Wh& is this not the case for '2P routes learned between R0 and R-)
A. R/ is missing the ne=t0hop0self option under the neighbor command for R1 6. %(0A is missing the ne=t0hop0self option under the neighbor command for R1 2. %(06 is missing the ne=t0hop0self option under the neighbor command for R1 &. R/, %(0A, and %(06 are missing the ne=t0hop0self option under the neighbor command for R1 Answer9 A =planation n this case networks 1F.F.F.F, 1?/.1?.F.F, 1?/[email protected], 1C/.1>@.>F.F, 1C/.1>@.?F.F are networks learned and advertised from R/. 'e see that the ne=t0hop of these networks are /FC.1>8./F/.18@ while they should be /FC.1>8./F/.1+F. 'ith the ne=t0 hop of /FC.1>8./F/.18@, R1 may not know how to send traKc to above networks and the traKc is dropped. To avoid this failure we should congure the ne=t0hop0self’ under the neighbor command for R1 like this9 R/-cong0routerneighbor /FC.1>8./F/.1/C ne=t0hop0self /8?. During a recent 5"PF election among three routers. R,3 was elected the DR and R,' was elected the 'DR+ as seen in the graphic. 3ssume that R,3 fails+ and that R,' takes the place of the DR while R,# becomes the new 'DR. What will happen when R,3 R,3 comes back online)
A N RTA will take the place of &R immediately upon establishing its adEacencie 6 N RTA will take the place of &R only if RT6 fails 2 N RTA will take the place of &R only if both RT6 and RT2 fail & N A new election will take place establishing an all new &R and 6&R based on congured priority levels and BA2 addresses Answer9 2 /8@. Refer to the e;hibit. During the process of con(guring a virtual link to connect area - with the backbone area+ the network administrator received this console message on R!C VBar 1 FF9/89F1.F@9 `$%()00RRR2I9 Received invalid packet9 mismatch area &, from backbone area must be virtual link but not found from /F./F./F.1, %erial F Gow should the virtual link be congured on the $%() routers to establish full connectivity between the areasW
A N R1-cong0router area 1 virtual0link +F.+F.+F.+ R+-cong0router area 1 virtual0link /F./F./F.1 6 N R1-cong0router area 1 virtual0link /F./F./F./ R+-cong0router area 1 virtual0link +F.+F.+F./ 2 N R1-cong0router area F virtual0link 1.1.1.1 R+-cong0router area / virtual0link +.+.+.+ & N R1-cong0router area 1 virtual0link +.+.+.+ R+-cong0router area 1 virtual0link 1.1.1.1 N R1-cong0router area 1 virtual0link /./././ R+-cong0router area 1 virtual0link /./././ Answer9 & =planation 'hen designing a multi0area $%() network, all areas should be connected to the backbone area. Gowever, there may be instances when an area will need to cross another area to reach the backbone area like area / in this case. A virtual link has the following two re
area area0id virtual0link neighbor0router0id The area0id area0id is the number of of the transit area, area, in in this e=ample e=ample Area Area 1 and neighbor neighbor0router 0router0id 0id is the ( address address of the highest highest loopback interface congured or can be manually set on the neighboring router. Rela& network. 3ll P#s are active. However+ However+ /8C. 3s shown in the e;hibit +5"PF is con(gured over a Frame Rela& P9"0 and P9"! fail to see all 5"PF routes in their routing tables. ,he show ip ospf neighbor command e;ecuted on P9"- displa&s the state of the neighbors. In order to (; the problem + what should be done)
A N The neighbor command should be congured under the $%() routing process on all routers 6 N The ip ospf network broadcast command should be congured on each )rame Relay interface 2 N The ip ospf network non0broadcast command should be congured on each )rame Relay interface & N The ip ospf priority value on the spoke routers should be set to F Answer9 & =planation n an 46BA network topology, neighbors are not discovered automatically. $%() tries to elect a &R and a 6&R due to the multi0access nature of the network, but the election fails since neighbors are not discovered because 46BA environment doesn’t forward broadcast and multicast packets. 4eighbors must be congured manually to overcome these problems. Also, additional conguration is necessary in a hub and spoke topology to make sure that the hub routers, which have connectivity with every other spoke router, are elected as the &R and 6&R. Lou must set the spoke interfaces to an $%() priority of 7ero, this ensures that the spokes will not become the &R or 6&R. />F. Refer to the e;hibit. 5"PF is con(gured on all routers in the network. 5n the basis of the show ip ospf neighbor output+ what prevents R0 from establishing a full ad?acenc& with R-)
A. Router R1 will only establish full adEacency with the &R and 6&R on broadcast multiaccess networks. 6. Router R/ has been elected as a &R for the broadcast multiaccess network in $%() area 2. Routers R1 and R/ are congured as stub routers for $%() area 1 and $%() area /. &. Router R1 and R/ are congured for a virtual link between $%() area 1 and $%() area /. . The Gello parameters on routers R1 and R/ do not match. Answer9 A =planation )rom the output, we learn that R is the &R and R+ is the 6&R so other routers will only establish full adEacency with these routers. All other routers have the two0way adEacency established 0U A is correct.
/>1. Refer to the e;hibit. 5n the basis of the con(guration provided+ how are the Hello packets sent b& Rhandled b& R: in 5"PF area :)
A. The Gello packets will be e=changed and adEacency will be established between routers R/ and R8. 6. The Gello packets will be e=changed but the routers R/ and R8 will become neighbors only. 2. The Gello packets will be dropped and no adEacency will be established between routers R/ and R8. &. The Gello packets will be dropped but the routers R/ and R8 will become neighbors. Answer9 2 =planation Recall that in $%(), two routers will become neighbors when they agree on the following9 Area0id, Authentication, Gello and &ead ntervals, %tub area "ag. 'e must specify Area 8 as a stub area on the A6R -R/ and all the routers in that area -R8 in this case. 6ut from the output, we learn that only R/ has been congured as a stub for Area 8. This will drop down the neighbor relationship between R/ and R8 because the stub "ag is not matched in the Gello packets of these routers. />/. Refer to the e;hibit. ,wo routers are connected b& Frame Rela& and are running 5"PF between them. 7ach router has been con(gured with the appropriate network statements under router ospf 0+ but the routers are not forming an ad?acenc&. Which of the following three commands could be con(gured on each router to correct this problem) <#hoose three>
A. Router2-cong0if ip ospf network broadcast Router&-cong0if ip ospf network broadcast 6. Router2-cong0ifip ospf network point0to0point Router&-cong0ifip ospf network point0to0point 2. Router2-cong0routerneighbor 1F.1FF.1FF. Router&-cong0routerneighbor 1F.1FF.1FF.+ &. Router2-cong0routerneighbor 1F./88./88./8 Router&-cong0routerneighbor 1F./88./88./8+ Answer9 A 6 &
=planation 6y default, )rame Relay is classied as a non0broadcast network, meaning it doesn’t send any broadcasts:multicasts like R(, $%() or OR( updates across the network -hello packets of $%() are multicast to //.F.F.8. Gence, in 46BA network, the neighbors are not discovered automaticallyJ they must be congured manually. There are two ways to simulate a broadcast model on an 46BA network9 Z &ene the network type as broadcast with the Qip ospf network broadcast interface sub0command Z 2ongure the neighbor statements under router ospf mode -though conguring the neighbor statement on one end is suKcient to form adEacency, it is a good practice to have it congured on both the ends 6esides these two ways, another way for making $%() work with )rame Relay is conguring the network as a (oint0to0(oint network -or (oint0to0Bultipoint, notice that $%() treats (oint0to0Bultipoint network as a collective of point0to0point links. %ome information about (oint0to0Bultipoint -or (oint0to0(oint network9 4ote9 (oint0to0Bultipoint networks do not maintain a &R:6&R relationship. />+. What are two dierent t&pes of bgp sessions) There are two di5erent di5erent types of 6O( 6O( sessions9 internal internal and e=ternal. e=ternal. The internal internal one is established established between routers routers inside inside the same A% and the e=ternal session is established between routers in di5erent A%. />. Refer to the e;hibit. What is the eect of the 5"PF con(guration on router ')
A. All interfaces will be in area F. 6. The router will be an A6R with s1:F in area F and F:F and F:1 in area 1. 2. The router will be an A6R with s1:F in area F and F:F and F:1 in area /. &. The router will be an A6R with s1:F in area F, fF:F in area 1, and fF:1 in area /. Answer9 & />8.
RouterAdebug ip ospf events $%() events debugging is on RouterA F9+91>9 $%()9 Rev pkt from 1F.+.F./, thernetF:1, area F.F.F.1 mismatch area F.F.F./ in the header F9+91C9 $%()9 Rev hello from 1F.1FF.1FF.+ area F from thernetF:F 1F.1.F.1 F9+91C9 $%()9 nd of hello processing Refer to the e=hibits. 'hat can be done to = the problemW A. 2hange router 6 F:1 interface to area F. 6. 2hange router A interface F:1 to area F.F.F./. 2. 2ongure the F:1 interfaces of router A and router 6 to be in area F. &. %hut down the F:1 interfaces in router A and router 6 as $%() does not allow Qback doors between areas. . Remove the F:1 interfaces in router A and router 6 from the $%() process. Hse static routes to route data directly from router A to router 6 to avoid passing data through router 2 in area F. Answer9 2
,otall& />>. Refer to the e;hibit. What additional commands should be used to con(gure 5"PF area : as a ,otall& "tubb& area)
A. area F stub on routers R and R8 6. area 8 stub on routers R and R8 2. area 8 stub no0summary on routers R and R8 &. area F stub no0summary on router R and area 8 stub no0summary on router R8 . area 8 stub no0summary on router R and area 8 stub on router R8 Answer9 =planation To To dene a totally stub area, use the area area area0id area0id stub no0summary no0summary command command on the A6R -in $%() router router conguration conguration and and the area area0id stub on the totally stub router. The A6R will inEect a default route into the area so routers in this type of area only see routing information local to their area, plus a default route pointing to the A6R, from which they can reach all other areas and all other networks />?. Refer to the e;hibit. Which statement is true about the con(guration)
A. RTA will not establish an $%() adEacency with RT6. 6. RTA will not accept $%() hello packets from RT6. 2. RTA will send $%() hello packets, but will not send $%() updates. &. RTA will send $%() updates, but will not establish an adEacency with RT6. Answer9 A =planation (assive0interface command is used to disable sending updates out from a specic interface. )or $%() it prevents Gello packets from being sent out or received through the interface. This will not allow to create a neighbor adEacency and prevent a router from learning pre=es from those neighbors. )or R(, conguring an interface as passive will still allow the interface to listen to incoming routing updates for other R( neighbors, but the interface will no longer send them. 4ote9 The passive0interface command is used in router conguration mode, not interface mode. />@. Refer to the e;hibit. 3ll routers have simultaneousl& been reloaded+ and the DR election has concluded as e;pected. Which state is R,# in)
A. /'AL:&R$TGR /'AL:&R$TGR 6. /'AL:6&R /'AL:6&R 2. /'A / 'AL:&R L:&R &. )H**:&R$TGR . )H**:6&R ). )H**:&R Answer9 =planation All the routers are allowed to take part in the &R:6&R election because all the Q(ris -(riority are 1 and they are eC. Refer to the diagram. Which 5"PF con(guration command is re%uired to con(gure 3rea ! as a totall& stubb& area)
A. $n the A6R router ospf 1F area + nssa 6. $n the A6R router ospf 1F area + stub 2. $n all Area + routers router ospf 1F area + stub no0summary &. $n all Area + routers router ospf 1F area + stub . $n the A6R router ospf 1F area + stub no0summary Answer9 =planation To To make make an area area Qtotally stubby we must must apply the Qarea area0id area0id stub no0summary no0summary command command on the A6R A6R -the middle middle router in this case and area area0id stub commands to all other routers in that area. /?F. Refer to the e;hibit. 5"PF has been con(gured on all routers in the network. However+ However+ router R0 does not receive a default route to router R- as intended. Which con(guration change would ensure that R0 would receive a default route from R-)
A. Add the area 1 stub command on routers R1. 6. Add the always keyword to the default0information originate conguration command on router R/. 2. Remove the default information originate conguration command from router R/ and place it on router R1. &. Add the ip route 8.F.F.F /88./88./88.F F.F.F.F command to router R/. Answer9 6 =planation The default0infor default0information mation originate originate command command advertises advertises a default default route route into a normal normal area, area, provided provided the advertising advertising router already has a default route. f we want the router to advertise the default route even if it does not have a default route then we can append the keyword always after the above command. n this .F.F./ so the Qdefault0information originate will not advertise this default route to R1 0U 'e need to add the keyword Qalways or declare a default route 0U 6 is correct. /?1. Refer to the e;hibit. 5"PF is con(gured on all routers in the network. 3rea : is con(gured as an =""3 area. ,he RIPv- routes are redistributed into the 5"PF domain on router R:. What two t&pes of "3s will be originated b& router R:) <#hoose two>
A. type 1 Router *%A 6. type / 4etwork *%A 2. type + 4etwork %ummary *%A &. type A%6R %ummary *%A . type 8 A% =ternal *%A ). type ? 4%%A =ternal *%A Answer9 A ) =planation ach router creates Type 1 *%A to describe itself, its interfaces, and neighbors 0U A is correct. 4otice that *%A Type ? is generated by an A%6R inside a 4ot0so0stubby area -4%%A to describe routes redistributed into the 4%%A 0U ) is correct. )or your information, the main di5erence between *%A Type ? and Type 8 is Type ? is generated inside a 4%%A while Type 8 is generated inside a standard area. /?/. Refer to the e;hibit. Will redistributed RIP routes from 5"PF 3rea - be allowed in 3rea 0)
A. 6ecause Area 1 is an 4%%A, redistributed R( routes will not be allowed. 6. Redistributed R( routes will be allowed in Area 1 because they will be changed into type 8 *%As in Area F and passed on into Area 1. 2. 6ecause 4%%A will discard type ? *%As, redistributed R( routes will not be allowed in Area 1. &. Redistributed R( routes will be allowed in Area 1 because they will be changed into type ? *%As in Area F and passed on into Area 1. . R( routes will be allowed in Area 1 only if they are rst redistributed into OR(. Answer9 A =planation Area 1 is a 4%%A so we can inEect OR( routes into this area with Type ? *%As. 4otice that Type ? *%As can only be e=isted in a 4%%A. The 4%%A A6R of area 1 must converted it into *%A Type 8 before "ooding to the whole $%() domain. 'hen redistribute R( into area /, *%A Type 8 will be created an sent through area F. 6ut a 4%%A is an e=tension of a stub area. The stub area characteristics still e=ist, which includes no type 8 *%As allowed. 4ote9 A stub area only allows *%A Type 1, / and +. /?+. Refer to the e;hibit. 5"PF has been con(gured on all routers in the network and 3rea 0 has been con(gured as a =""3. Which statement is true about the =""3 3rea 0)
A. Redistributed R( and OR( routes will appear in Area 1. They will be advertised via type 8 *%As. 6. $nly redistributed R( routes will appear in Area 1. They will be advertised via type ? *%As. 2. $nly redistributed OR( routes will appear in Area 1. They will be advertised via type ? *%As. &. 4o redistributed routes can appear in Area 1, only summary routes. Answer9 2 =planation %ame e=planation of 3uestion >. (lease notice that the OR( routes are redistributed to 4%%A area 1 via *%A Type ?. The 4%%A A6R of area 1 will convert it into a *%A Type 8 before "ooding to area F X area /. /?. Refer to the e;hibit. 5"PF is running throughout the network. Lou want to minimi$e the p ropagation of "3s into and out of 3rea 0. Which 5"PF feature would best achieve this goal)
A. stub 6. totally stubby 2. 4%%A &. totally 4%%A Answer9 & =planation 'e need to redistribute R( from R1 to Area 1 so Area 1 cannot be a stub or totally stubby area. To minimi7e the propagation of *%As into and out of Area 1 we should congure it as a totally 4%%A. 4otice that a 4%%A allows *%A Type + X ? while a Totally Totally 4%%A only allows allows *%A Type Type ?. 4ote9 6oth Totally %tubby Area X Totally %tubby 4%%A do not accept e=ternal A% routes or inter0area routes -*%A Types +, and 8. They recogni7e recogni7e only only intra0area intra0area routes routes and the the default route route F.F.F.F. F.F.F.F. The main main di5erence di5erence between between them is Totally %tubby %tubby 4%%A accepts routes from other A% while Totally %tubby Area does not. 6elow summari7es the *%A Types allowed and not allowed in area types9 Area Area Type Type 1 X / -with -within in area area %tandard X backbone Les %tub Les Totally Totally stubby stubby Les 4%%A Les Totally Totally -stubby -stubby 4%%A Les
Type + -from -from other other area areas s Les Les 4o 4o Les 4o 4o
Type Type Type 8Type 8Type ? Les Les 4o 4o 4o 4o 4o 4o 4o 4o Le Les 4o 4o Les
/?8. Refer to the e;hibit. 3 compan& would prefer all Internet*bound 5"PF routed traAc to use I"P 3'# with I"P D7F as a backup. 3s the network consultant+ what t hree con(guration changes might &ou make) <#hoose three>
A. The default0information originate command should be congured on router 61 and 6. 6. The default0information originate command should be congured on router 6/ and 6+. 2. f the metric value for %( A62 is set at the default, the %( &) metric value should be set to 1.
&. f the metric value for %( A62 is set at the default, the %( &) metric value should be set to /8. . The metric type value should be set to type 1. ). The metric type value should be set to type /. Answer9 6 & ) =planation Routers 6/ X 6+ need to advertise a default route to the nternet for Qinside $%() routers so we should use the Qdefault0 information originate command with a default route -something like Qip route F.F.F.F F.F.F.F pointing to the %( router 0U 6 is correct. f no metric is specied, $%() puts a default value of /F when redistributing routes from all protocols e=cept 6O( routes -6O( routes get a metric of 1. 'e use %( &) as a backup so its metric value should be set to a higher value than /F 0U & is correct. There are two types of e=ternal e=ternal routes9 routes9 e=ternal e=ternal type 1 and e=ternal e=ternal type type /. The di5erenc di5erence e between the the two is in the way the cost -metric of the route is being calculated9 Z The cost of a type / route is always the e=ternal cost, irrespective of the interior cost to reach that route. Z Type 1 cost is the addition of the e=ternal cost and the internal cost used to reach that route. 0U 'e should congure the type / e=ternal route to make sure the %( A62 is always referred over %( &) because internal routing does not determine the path. 4ote9 / is the default e=ternal metric, but 1 is preferred over / if two e. Refer to the e;hibit. 3 network administrator wants to reduce the number of 5"PF routes advertised from 3rea 0 into 3rea -. 3s the router con(guration specialist+ what two things would &ou do to accomplish this goal) <#hoose two>
A. nter the conguration on router 61. 6. nter the conguration on router 6. 2. $n the same router, enter the %ummary0address 1F.1F.1.F /88./88./88.1/@ subcommand. &. $n the same router, enter the Area 1 range 1F.1F.1.F /88./88./88.1/@ subcommand. . $n the same router, enter the Area / range 1F.1F.1.F /88./88./88.1/@ subcommand. Answer9 A & /??. Refer to the e;hibit. 2iven the e;hibited router output+ which command se%uence can be added to R0 to generate a default route into the 5"PF domain)
A. default0router 6. ip default0network 2. default0information originate always &. ip default0gateway Answer9 2
=planation The default0infor default0information mation originate originate command command advertises advertises a default default route route to other routers, routers, telling something something like like Qplease Qplease send me your unknown traKc. 'ith the always parameter, the default route is advertised even if there is no default route in the router’s routing table. n this case we don’t see any default route in the conguration of R1 -like ip route F.F.F.F F.F.F.F Y. so it must include the keyword Qalways so that the default route is advertised. /?@. 2iven the above 5"PF network+ which command will R,' use to summari$e routes for the 0-.0E.0E.16-supernet before in?ecting them into 3rea 1)
A. area 1F range 1C/.1>@.1>.F /88./88./8/.F 6. summary0address 1C/.1>@.1>.F /88./88./8/.F 2. ip summary0address ospf 1F1 1C/.1>@.1>.F /88./88./8/.F &. area F range 1C/.1>@.1>.F /88./88./8/.F . ip summary0address area F 1C/.1>@.1>.F /88./88./8/.F Answer9 A /?C. Refer to the e;hibit. Which statement is true)
A. RTA will redistribute the R( routers into the 4%%A as type ? *%As. RT6 will translate the type ? *%As into type 8 *%As and "ood them throughout the $%() backbone. 6. RTA will redistribute the R( routers into the 4%%A as type ? *%As. RT6 will "ood the type ? *%As throughout the backbone. 2. RTA will redistribute the R( routers into the 4%%A as type 8 *%As. RT6 will "ood the type 8 *%As throughout the backbone. &. RTA will redistribute the R( routers into the 4%%A as type 8 *%As. RT6 will translate the type of 8 *%As into type ? *%As and "ood them throughout the $%() backbone. . RTA will not redistribute the R( routers into the 4%%A. Ans9 A /@F. Refer to the network topolog& diagram shown in the e;hibit. ,he routing table of R! contains all the proper 5"PF routes e;cept the 01.9.9.16-9 5"PF route. Which show command on R! will be the most useful to determine the cause of this problem and wh&)
A. (erform show ip ospf virtual0link to e=amine if the virtual link between R+ and R is congured and in the up state.
6. (erform show run to e=amine if area + is congured as a stubby area. 2. (erform show run to e=amine if area + is congured as a nssa area. &. (erform show ip ospf neighbor to e=amine which router is elected as the &R on the e/ interface. . (erform show ip ospf database to e=amine the $%() database entries. Answer9 A However+ the /@1. 3 network administrator recentl& redistributed RIP routes into an 5"PF domain. However+ administrator wants to con(gure the network so t hat instead of !- e;ternal t&pe*: "3s Booding into the 5"PF network+ there is onl& one. What must the administrator do to accomplish this)
A. 2ongure summari7ation on R1 with area 1 range 1?/.1>.+/.F /88./88.//.F 6. 2ongure summari7ation on R1 with summary0address 1?/.1>.+/.F /88./88.//.F 2. 2ongure area 1 as a stub area with area 1 stub &. 2ongure area 1 as a 4%%A area with area 1 stub nssa Answer9 6 /@/. Refer to the e;hibit. Routers R-+ R!+ R9+ and R: have 5"PF enabled. What should be con(gured on the routers in area 0 to ensure that all default summar& routes and redistributed 7I2RP routes will be forwarded from RE to area 0+ and onl& a default route for all other 5"PF routes will be forwarded from R: to area 0.
A. R8-cong0router area 1 stub R>-cong0router area 1 stub 6. R8-cong0router area 1 stub no0summary R>-cong0router area 1 stub 2. R8-cong0router area 1 nssa R>-cong0router area 1 nssa &. R8-cong0router area 1 nssa no0summary R>-cong0router area 1 nssa Answer9 & /@+. Refer to the e;hibit. Router RIP is attempting to establish '2P neighbor relationships with routers R,0 and R,!. 5n the basis of the information that is presented in the e;hibit+ which two statements are true) <#hoose two>
A N RTR has a 6O( password set but neighbor 1F.F.F.1 does not 6 N RTR has a 6O( password set but neighbor 1F.F.F.8 does not 2 N RTR has a 6O( password set but neighbor 1F.F.F.1 has an incorrect password set & N RTR has a 6O( password set but neighbor 1F.F.F.8 has an incorrect password set N 4eighbor 1F.F.F.1 has a 6O( password set but RTR does not ) N 4eighbor 1F.F.F.8 has a 6O( password set but RTR does not Answer9 A & =planation9 Lou Lou can congur congure e B&8 authentication authentication between between two 6O( peers, peers, B&8 authentication authentication must be congured congured with the same same password on both 6O( peersJ otherwise, the connection between them will not be made. f a router has a password congured for a peer, but the other peer does not, a message Q4o B&8 digest fromY will appear on the console while the routers attempt to establish a Bulticast %ource &iscovery (rotocol -B%&( session between them. Therefore A is correct because RT1 -with an ip address of 1F.F.F.1 is not congured with a password. %imilarly, if the two routers have di5erent passwords congured, a message Qnvalid B&8 digest fromY will appear on the screen. /@. Refer to the e;hibit diagram and con(guration. R,' is summari$ing its networks from 3" E9011 with the aggregate*address command. However+ However+ the show ip route command on R,3 R,3 reveals the R,' individual networks as well as its summar& route. Which option would ensure that onl& the summar& route would appear in the routing table of R,3)
A N &elete the four network statements and leave only the aggregate0address statement in the 6O( conguration 6 N Add the keyword summary0only to the aggregate0address command 2 N Add a static route with a pre= of 1C/.1>@./.F /88./88./8/.F pointing to the null interface & N 2reate a route map permitting only the summary address Answer9 6 =planation 'hen the aggregate0address command is used within 6O( routing, the aggregated address is advertised, along with the more specic routes. The e=ception to this rule is through the use of the summary0only command. The Qsummary0only keyword suppresses the more specic routes and announces only the summari7ed route. /@8. Refer to the e;hibit ,he neighbor 01.0.0.0 weight -11 '2P con(guration command has been con(gured on router 3. What will be the result of this con(guration)
A N Router A will prefer the path through router 6 for network 1?/./F.F.F 6 N Router A will prefer the path through router 2 for network 1?/./F.F.F 2 N (ackets from router & will prefer the path through router 6 for networks advertised by router A & N (ackets from router & will prefer the path through router 2 for networks advertised by router A Answer9 A =planation The weight weight attribute is is a special special 2isco attribute attribute that is used in the path selection selection process process when there is more than than one route route to the same destination. The higher the weight value, the better the path. The default weight is F. Therefore, by conguring weight /FF to the neighbor 1F.1.1.1, router A will prefer the path through router 6 for network 1?/./F.F.F then the path through router 2. The weight weight attribute is is local to the router router and not not propagated propagated to other routers. routers. n this case case the weight weight is local to router A so it has no e5ect on the decision of transferring packets from router &. /@>. What techni%ue should be used on '2P edge routers to prevent a multi*homed autonomous s&stem from becoming a transit s&stem) A. Advertise with a high B& value all networks that are discovered via e=ternal 6O(. 6. Remove the A%0(ath information on all routes in the 6O( table prior to advertising e=ternally. 2. $nly advertise networks e=ternally if they have been discovered via internal 6O(. &. Hse an outgoing distribution list to lter all networks not originating from inside the autonomous system. . %et the no0e=port community attribute on all networks that are advertised e=ternally. ). %et the origin code to incomplete for all networks that are discovered via e=ternal 6O(. Answer9 & =planation A transit A% is an A% that routes traKc from one e=ternal A% to another e=ternal A%. *et’s see an e=ample below9
%uppose your company has / internet links to / di5erent %(s. f one connection to the %( goes down, your traKc can be sent through the other %(. t is a good way to make sure your company can access the internet any time. 6ut if your routers are not congured carefully, your company A% may become a transit A%. )or e=ample, A% >8FF/ learned the route 1F.1F.1F.F:/ from %(1. f R/ advertises that route to %(/ then %(/ may use it to send traKc to that network 0U your company becomes a transit A%. There are two popular ways to prevent prevent a multi0homed multi0homed autonomous autonomous system system from becoming a transit system9 system9 Z Hse a distribute0list or lter0list to lter all networks not originating from inside the autonomous system. Z Hse the no0e=port community attribute on all networks not originating from inside the autonomous system. Answer seems to be correct but in fact it is not because Qall networks that are advertised e=ternally include networks originating from inside and outside our A%. 'e should only lter networks originating from outside our A%. n some cases, the routers in our company may advertise some internal networks -for remote access, for e=ample. R,3 about network /@?. Refer to the e;hibit. '& d efault+ when R,' passes '2P advertisements from R,3 0-.0E.-.1 to R,#+ what address will be listed as the ne;t*hop address)
A. 1F.1.1.1 6. 1F.1.1./ 2. 1C/.1>@.1.C &. 1C/.1>@.1.8F Answer9 & =planation This is a rule for 6O( 6O( advertisement9 advertisement9 Q)or 6O(, the ne=t hop is always the ( address of the neighbor specied in the neighbor command. )or 6O(, the protocol states that the ne=t hop advertised by 6O( should be carried into 6O(Q. n this case, when RTA -in A% >8FFF, which is an 6O( for RT6 advertises a route to RT6, it species its interface -1C/.1>@.1.8F as the ne=t0hop. 6ut when RT6 passes this advertisement to RT2, it species RTA interface -also 1C/.1>@.1.8F as the ne=t0hop -6O(. This can cause some routing failures because if RT2 does not know a way to reach RTA interface via O( -$%(), OR(Y, it will drop that packet. To = this problem, add the Qneighbor 1F.1.1./ ne=t0hop0self command under 6O( mode in RT6. /@@. Refer to the e;hibit. It is desired to set up a '2P neighbor relationship between routers R0 and R9. '2P packets between them could travel through R- or R!. What is the simplest con(guration that will allow for failover)
A. 2ongure 6O( neighbor relationships between all interfaces on R1 and R. 6. nstall a direct connection between R1 and R. 2. 2ongure loopback interfaces on R1 and R to provide the update source address for 6O( packets. &. 2ongure only one neighbor relationship between R1s 1C/.1>@.1./ interface and Rs 1?/.1>.1F./ interface. Answer9 2 =planation Assume R only uses this conguration9 R-congrouter bgp >8FFF R-cong0routerneighbor 1C/.1>@.1./ remote0as >8FFF Then if R1 R1 sends 6O( 6O( packets packets to R via R+, the source source ( address address of the packets packets is 1C/.1>@././. 1C/.1>@././. 6ut R does does not recogni7e recogni7e this ( address because 1C/.1>@././ is not congured in the Qneighbor command of R. Therefore the 6O( session between R1 X R is not established 0U these packets will be dropped. The simplest simplest conguration conguration to allow allow R1 and R communicate communicate via via both R/ X R+ is to use a loopback loopback interface interface address address rather rather than a physical interface address as the source ( address for all 6O( packets. To do this, use the command9 R-cong0routerneighbor 1.1.1.1 update0source loopbackF -n which 1.1.1.1 is the loopback interface of R1. n practical, we should establish neighborship with the loopback interface rather than the physical interface because if the physical interface goes down, the neighborship would be lost while a loopback interface never goes down. Also, when conguring Q1.1.1.1 as the neighbor, you must congure on R1 the Qneighbor ... update0source loopbackF command so that the source ( address of packets sent from R1 -loopbackF N 1.1.1.1 will be matched with the neighbor command congured on R.
/@C. Refer to the e;hibit. =etwork 01.1.1.16 is being advertised to autonomous s&stem E:::1 via both e;ternal links. Which statement about the preferred path to the 01.1.1.16 network is true)
A. Router R1 will be preferred because its neighbor has the higher autonomous system number. 6. Router R1 will be preferred because it has the lower neighbor ( address. 2. Router R1 will be preferred because it has a lower local preference. &. Router R/ will be preferred because its neighbor has a lower autonomous system number. . Router R/ will be preferred because it has the higher neighbor ( address. ). Router R/ will be preferred because it has a higher local preference. Answer9 ) =planation *ocal preference is an indication to the A% about which path has preference to e=it the A% in order to reach a certain network. A path with a higher local preference is preferred more. The default value for local preference is 1FF. Hnlike the weight attribute, which is only relevant to the local router, local preference is an attribute that routers e=change in the same A%. The local preference is set with the Qbgp default local0preference value command. n this case, both R1 X R/ learn about the network 1F.F.F.F:@ but R/ has higher local0preference so R/ will be chosen as the preferred e=it point from A% >888F. /CF. Refer to the e;hibit. Router R,*0 and router R,*R,*- both advertise network 0!0.-:.1.160E to router R,*! R,*! via internal '2P. '2P. What is the reason that router R,*! R,*! chose router R,*0 as its best path t o network 0!0.-:.1.160E.
A. t advertises the best A%0path. 6. t advertises the best origin code.
2. t advertises the best B&. &. t advertises the best local preference. . t has a better router &. ). t advertises a lower autonomous system. Answer9 =planation Recall the route selection decision process in 6O(9 2onsider only -synchroni7ed routes with no A% loops and a valid ne=t hop, and then9 Route oute selec selectio tion n decis decisio ion n proce process ss -fro -from m top to bott bottom om n this this /.1F8.11.1 1>/.1F8.11.1 is lower lower than 1>8.1F8.+./ (refer the path with the lowest neighbor ( address. /C1. Refer to the e=hibit. Router RT01 chooses one path to network [email protected]++./1C.F:/. ndicate the reason Router RT01 chooses this Qbest path.
A. n making its decision about the best path, RT01 gives precedence to the origin code. 6. n making its decision about the best path, RT01 gives precedence to the 6O( B& values. 2. ( address 1/@.1F?././ is lower than 1/@.1F?./88./. &. n making its decision about the best path, RT01 prefers the O( metrics. . RT01 prefers internal 6O( routes. ). ( address 1/@.1F?./8./ is lower than 1/@.1F?./88./. Answer9 A =planation As e=plained above, the O( is preferred over incomplete. /C/. ,he 'order 2atewa& Protocol <'2P> is the core routing protocol of the Internet. Refer to the e;hibit. Routers 3 and ' are running '2P but the session is active. What command needs to be added to establish the '2P session)
hostname A interface loopback F ip address 1F.1F.1F./ /88./88./88./88
interface serial F:F ip address 1?/.1>.1F./ /88./88./88./8/ interface serial F:1 ip address 1?/.1>.1F.8 /88./88./88./8/ router bgp >8 neighbor 1F.1F.1F.1 remote0as >8111 neighbor 1F.1F.1F.1 update0source loopback F neighbor 1F.1F.1F.1 ebgp0multihop A. ip route 1F.1F.1F.1 /88./88./88./88 sF:F ip route 1F.1F.1F.1 /88./88./88./88 sF: 1 6. no synchroni7ation 2. network 1F.1F.1F.F &. neighbor 1F.1F.1F.1 ne=t0hop0self Answer9 A =planation n this case we want to achieve load balancing so the loopback interface must be used to establish neighborship. f we check the routing table of router A, we will see that there is no entry for the remote network 1.1.1.1:+/ 0U router A does not know how to reach the loopback interface on router 6 0U a T2( session can’t be established to router 6. Therefore we need to tell router A a way to reach router 6. /C+. Refer to the e;hibit. 3utonomous s&stems -11 and !11 have 7'2P sessions established with their directl& connected routers in autonomous s&stem 011. I2P has been con(gured on all routers in autonomous s&stem 011 and the& successfull& e;change routing updates. ,raAc originated in autonomous s&stem -11 cannot reach the destination autonomous s&stem !11. What con(guration should be done on the routers in autonomous s&stem 011 in order for the traAc coming from autonomous s&stem -11 to be forwarded to autonomous s&stem !11)
A. 6O( session must be established between routers R1 and R+, and the synchroni7ation must be turned on. 6. 6O( session must be established between routers R1 and R+, and the synchroni7ation must be turned o5. 2. 6O( session must be established between routers R1 R/ and R/ R+. and the synchroni7ation must be turned on. &. 6O( session must be established between routers R1 R/ and R/ R+, and the synchroni7ation must be turned o5. . 6O( speakers within autonomous 1FF must be fully meshed, and the synchroni7ation must be turned on. ). 6O( speakers within autonomous 1FF must be fully meshed, and the synchroni7ation must be turned o5. Answer9 ) =planation The synchroni7ation synchroni7ation rule rule states that that if an A% provides provides transit service service to another another A%, 6O( 6O( should not advertise advertise a route route until all of the routers within the A% have learned about the route via an O(. To understand why this rule e=ists, let’s take an e=ample if this rule is not there.
%uppose Rt0A wants RT06 to access its local *A4 1.1.1.F, so it advertises this network through R1. R1 and R+ are running 6O( so R1 sends this update to R+ through R/ -using the ne=t0hop0self to use its own interface’s ( address. n turn, R+ announces to RT06 that it can reach 1.1.1.F via R+. 4ow Rt06 really wants to send traKc to 1.1.1.F so it will send to R+. R+ does a look up and sees that the network can be reachable via R1. t then does a lookup for R1s ( address and sees that it is reachable via R/ 0U so it forwards packets to R/. 6ut R/, running O( -like $%(), does not nd an entry for 1.1.1.F so R/ drops all the packets for that network N a black0hole is created That is why why the 6O( synchroni synchroni7ation 7ation rule rule is born. born. 'ith this rule, when when R+ receives receives an advertisement advertisement for 1.1.1.F 1.1.1.F from R1, R1, it adds that route to its 6O( table and before sending advertisement to RT06, it rst checks its O( routing table to see whether an entry e=ists for that route. n this e=ample, R+s O( routing table does not know how to reach 1.1.1.F so R+ will not advertise this network to RT06. This route is only advertised to RT06 when O( makes an entry in the routing table for 1.1.1.F. 'ell, now you understand the importance of 6O( %ynchroni7ation rule but now wish to e=plain why this rule causes trouble in fully0meshed 6O(
%ynchroni7ation prevents fully0meshed 6O( from working properly. 6ecause no O( is running so R+ cannot advertise any route to RT06 even if no black0hole e=ists in this topology. 4ote9 A Qfully0meshed can be a physical fully0meshed topology or a topology where all routers in the same A% established 6O( connections with each other -although they do not need to be directly connected. %o in the topology above, the connection between R1 X R+ is represented by a dashed line, which means it can be physically connected or not -but an 6O( connection must be established on both routers. Therefore Therefore if all all routers routers in A% 1FF is fully0meshed, fully0meshed, the synchroni7ation synchroni7ation rule rule must be turned turned o5 0U 0U ) is correct. correct. /C. Which '2P option is re%uired when load sharing over multiple e%ual*bandwidth parallel links from a single #7 router to a single I"P router over e'2P) A. e6O( Bultipath 6. e6O( Bultihop 2. 6O( %ynchroni7ation &. (ublic A% numbers Answer9 6 =planation The e6O( e6O( multihop allows a neighbor connection connection between two two e=ternal e=ternal peers peers that do not not have direct direct connection. connection. The multihop is only for e6O( and not for i6O(. )or e=ample, in the topology below router A wants to establish neighbor
relationship with the loopbackF of router 6 -to allow load balancing, which does not have direct connection so it must use Qebgp0multihop
)or your reference, the full congurations of both router A X 6 are shown below9 A int loopback F ip address 1F.1F.1F./ /88./88./88./88 router bgp 1 neighbor 1F.1F.1F.1 remote0as / neighbor 1F.1F.1F.1 ebgp0multihop neighbor 1F.1F.1F.1 update0source loopback F network 1F.1F.1F./ mask /88./88./88./88 ip route 1F.1F.1F.1 /88./88./88./88 /88./88./88./88 1?/.1>.1F.1 ip route 1F.1F.1F.1 /88./88./88./88 /88./88./88./88 1?/.1>.1F.> 6 int loopback F ip address 1F.1F.1F.1 /88./88./88./88 router bgp / neighbor 1F.1F.1F./ remote0as 1 neighbor 1F.1F.1F./ ebgp0multihop neighbor 1F.1F.1F./ update0source loopback F network 1F.1F.1F.1 mask /88./88./88./88 ip route 1F.1F.1F./ /88./88./88./88 /88./88./88./88 1?/.1>.1F./ ip route 1F.1F.1F./ /88./88./88./88 /88./88./88./88 1?/.1>.1F.8 4ote9 f router 6 wants to establish neighbor relationship with the directly connected interface of router A, it only needs these commands9 6 router bgp / neighbor 1?/.1>.1F./ remote0as 1 6ut notice the traKc from router 6 would be sent to 1?/.1>.1F./ interface only and load balancing would not take place. /C8. Refer to the e;hibit. 5n the basis of the con(guration that is provided+ how would the '2P updates that come from router R0 be replicated inside autonomous s&stem E:-11)
A. All 6O( updates that are received on router R/ will be sent to routers R+ and R. Routers R+ and R will then forward those 6O( updates to router R8. 6. All 6O( updates that are received on router R/ will not be sent to routers R+ and R.
2. All 6O( updates that are received on router R/ will be sent directly to router R8. &. 4one of the 6O( updates that are received on router R/ will ever be received by router R8. Answer9 & =planation All 6O( updates that are received on router R/ will be sent to routers R+ and R but R+ X R will not forward those 6O( updates to R8. This is called the 6O( split0hori7on rule -which states that a route learned from one 6O( neighbor will not be advertised to another 6O( neighbor 0U A is not correct. The 6O( updates received received on router R/ will be sent to R+ and R without without violating violating the 6O( split0hori7on split0hori7on rule because because R/ R/ receives updates from an 6O( -R1, not 6O( 0U 6 is not correct. )rom the conguration of R/, we learn that R/ did not establish neighbor relationship with R8 so they are not neighbors 0U no 6O( updates will be sent from R/ to R8 0U 2 is not correct. The 6O( split0hori7on split0hori7on rule prevents prevents updates updates received received on R/ from from being sent sent to R8 0U & is correct. correct. /C>. Wh& should i'2P sessions be full& meshed within a ,ransit 3") A. 6O( re
/C?. 5bserve the diagram. R,# is the hub router and R,3 R,3 and R,' are the spokes. ,here are no virtual circuits between the spoke locations. What is needed to successfull& route traAc to the 00.00.00.16-9 network from R,3)
A. The neighbor 1F.1F.1F.1 ne=t0hop0self command on RTA. 6. The neighbor 1F.1F.1F.1 ne=t0hop0self command on RT6. 2. The neighbor 1F.1F.1F.1 ne=t0hop0self command on RT2. &. 4othing is re
/C@. Refer to the e;hibit. #urrentl& the two e'2P links between 3"011 and 3"-11 have an average inbound load of E:M and -1M respe ctivel&. ctivel&. 3fter further investigation+ traAc to 01.01.0.0E6- accounts for 9:M+ and traAc to 01.01.0.!-6- and to 01.01.0.96- each account for -1M of the inbound load. ,he '2P attributes are currentl& set at their de fault values in both autonomous s&stems. If &ou want to inBuence how 3"-11 sends traAc to 3"011+ which e'2P con(gurations would &ou con(gure i n 3"011 to inBuence 3"-11 to use the e'2P links more evenl&) <#hoose two.>
A. neighbor 1C/.1>@.+F./ route0map as;8F out 6. neighbor 1C/.1>@./F./ route0map as;8F out 2. route0map as;8F permit 1F match ip address 8F set metric 18F access0list access0list 8F permit 1F.1F.1.1> F.F.F./F &. route0map as;8F permit 1F match ip address 8F set metric 18F access0list access0list 8F permit 1F.1F.1.+/ F.F.F./F Answer9 6 & =planation 4ote9 The wildcard masks in the access0list are not correct, they should be F.F.F.18 instead of F.F.F./F. )irst let’s recall about B&. f you want to in"uence e=ternal neighbors about the path it sends traKc then B&, also called the metric, should be used. A lower B& value is preferred over a higher value. The default B& value is F. Also, an important point wish to notice in this :/@ through router A is set to 18F. This would make traKc for this route -8` go through router 6 -because the B& default value is F, which is lower than 18F. %ince the access0list will also 4$T match pre=es9 1F.1F.1.+/:/@ X 1F.1F.1.@:/@ N traKc for these two pre=es will be forwarded Eust normally -via the routing table 0U TraKc TraKc for pre=9 1F.1F.1.+/:/@ 1F.1F.1.+/:/@ will will continue continue to go via the upper 0A 0A link -now Eust /F` /F` total load, load, while traKc for pre=es pre=es 1F.1F.1.1>:/@ and 1F.1F.1.@:/@ will be going through the lower )06 link -now >8` total load 0U $riginal unbalanced ->8:/F load is maintained, although it has been reversed between the upper -A0 and lower -60) link 0U 2 is not correct. )or more information about (olicy0based routing matches you can read this article9 http9::www.ciscopress.com:articles:article.aspWpS/>>+?Xse<4umS/ f answer & is applied for router A, the B& for 1F.1F.1.+/ set to 18F would make traKc for this route go through router 6 -because the B& default value is F, which is lower than 18F. %o router A will be responsible for 8` traKc and router 6 will receive F` traKc 0U & is correct. /CC. Refer to the e;hibit. 3 client has asked &ou to consult on an e'2P loading %uestion. #urrentl& the 3" 011 e'2P links have an average outbound load of E:M and -1M respectivel&. 5n further investigation+ traAc from 01.01.-9.1 accounts for 9:M+ and 01.01.-:.1 and 01.01.!-.1 accounts for -1M each of the outbound load. ,he customer wants to spread the load between the two e'2P links more evenl&. evenl&. ,he '2P attributes are currentl& set at their default values. f you are located at A% 1FF and want to in"uence how A% 1FF sends traKc to A% /FF, what 6O( attribute could you congure to cause A% 1FF outbound traKc to load the e6O( links more evenlyW
A. $n router A, set the default local0preference to 8F. 6. $n router 6, set the default metric to 18F. 2. $n router 6, congure a route map for 1F.1F./8.F:/ with a local preference of 18F linked to neighbor 1C/.1>@.+F./. &. $n router 6, set the default local0preference to 18F. Answer9 2 =planation To To make make the e6O( e6O( links more more evenly we should use use the link 60) for network network 1F.1F./8.F:/ 1F.1F./8.F:/ so that that the total traKc traKc going going through 60) link is about F`. n this case we should apply a route map on 6 to set the local preference of 1F.1F./8.F:/ to a higher value than 1FF. 6ut notice that we must use a second clause to permit other traKc if not they will be ltered out. 4ote9 The default value for local preference is 1FF. A path with higher local preference is preferred. +FF. Refer to the e;hibit. What will R,' do with a packet sourced from within 3" E9-11 with a destination address of 0-.0E.-:.0)
A. t will be dropped because network 1C/.1>@./8.F is not in the RTA routing table. 6. t will be dropped because network 1C/.1>@./8.F is not in the RT6 routing table. 2. t will be forwarded to the null F interface of RT6 and dropped. &. t will be forwarded to the RT6 1C/.1>@./8.F network. Answer9 & =planation )irst want to make it clear that the above conguration belongs to RT6 -with A% >1FF. The Qnetwork Qnetwork statement statement in other routing routing protocols protocols -OR(, -OR(, $%(), R(Y R(Y is used to enable enable routing routing protocol protocol on the interfaces interfaces within that Qnetwork statement. 6ut in 6O(, the function of a network statement is to tell the router to search the ( routing table for a particular network, and if that network is found, originate it into the 6O( database. 6ut notice that you must have an e=act match in the ( routing table to appear the network in the 6O( routing table -in this case we don’t see the auto0 summary command so we suppose it is disabled in this case. )or e=ample9 Z network 1F.1F.1F.F:@ will appear in 6O( if network 1F.1F.1F:@ appears in the ( routing table. Z network 1F.1F.1F.F:/ will appear in 6O( if network 1F.1F.1F.F:/ appears in the ( routing table. Therefore, Therefore, in this @./.F 1C/.1>@./.F /88./88./8/.F /88./88./8/.F nullF nullF was used to put a route route to 1C/.1>@./.F:// into the routing table -although it points to 4ullF but this command really makes that route appears in the routing table. 4otice this network 1C/.1>@./.F:// also coverts network 1C/.1>@./8.F 0U RT6 will forward that packet to 1C/.1>@./8.F network. +F1. Refer to the e;hibit. 3ll routers are con(gured for '2P. '2P. 7'2P routes received on router R- show up in the '2P table on routers R0 and R! but not in their IP routing table. What would cause this) <#hoose two>
A. %ynchroni7ation in autonomous system 1FF is turned is on. 6. %ynchroni7ation in autonomous system 1FF is turned is o5. 2. 6O( multihop is not congured on routers R1 and R+. &. Routers R1 and R+ do not receive the same routes via an O(. . The 6O( routers in autonomous system 1FF are not logically fully0meshed. Answer9 A & =planation The synchroni7ation synchroni7ation rule rule states 6O( 6O( should not not advertise advertise a route route until all of the routers routers within within the A% have have learned learned about the the route via an O( so in this case if R1 and R+ have not learned that route via O(, they cannot appear in their routing tables. +F/. Refer to e;hibit. R3 failed+ and after 01 minutes it came back. Which two statements are true) <#hoose two>
A. RA is a &R 6. RA is a 6&R 2. RA is a &R$TGR &. R6 is a &R . R6 is a 6&R ). R2 is a &R$TGR Answer9 2 &-W =planation This
A. *ower the port priority for I*A4 1 on port F:1 for %witch A. 6. *ower the port priority for I*A4 1 on port F:/ for %witch A. 2. Bake the bridge & of %witch 6 lower than the & of %witch A. &. nable G%R( on the access ports. Answer9 6 =planation (lease read the e=planation of 3uestion + in http9::www.certprepare.com:vlan0
A. 2ongure the same number of I*A4s on both switches. 6. 2reate switch virtual interfaces -%I on both switches to route the traKc. 2. &ene I*A4 8 in the allowed list for the trunk port on %';A. &. &isable pruning for all I*A4s in both switches. . &ene I*A4 8 in the allowed list for the trunk port on %';6. Answer9 2 =planation %';A is missing I*A4 8 in the QTrunking I*A4s nabled, that means the trunk link currently does not accept traKc from I*A4 8 to be sent on the link. +F8. ,wo switches "3 and "' are connected as shown below. 2iven the below partial con(guration+ which two statements are true about 3= traAc) <#hoose two>
A N I*A4s 108 will be blocked if faF:1F goes down. 6 N I*A4s >01F have a port priority of 1/@ on faF:1F. 2 N I*A4s >01F will use faF:1F as a backup only. & N I*A4s 101F are congured to load share between faF:1F and faF:1/. Answer9 2 & =planation9 *et’s assume that %A is the root bridge for all I*A4s, it will make the e=planation a bit clearerY )irst we should understand what will happen if nothing is congured -use default values. 6ecause we assumed that %A is the root bridge so all of its ports will forward. %6 will need to block one of its ports to avoid a bridging loop between the two switches. 6ut how does %6 select its blocked portW 'ell, the answer is based on the 6(&Hs it receives from %A. A 6(&H is superior than another if it has9
1. A lower Root 6ridge & /. A lower path cost to the Root +. A lower %ending 6ridge & . A lower %ending (ort & These four four parameters parameters are e=amined e=amined in order order.. n this specic specic case, case, all the 6(&Hs 6(&Hs sent by %A have the same same Root Root 6ridge &, the same path cost to the Root and the same %ending 6ridge &. The only parameter left to select the best one is the %ending (ort & -(ort & S port priority Z port inde=. f using default values, the default port priority’s value is +/ or 1/@ -1/@ is much more popular today but +/ is also a default port priority’s value, so %6 will compare port inde= values, which are uni
To To change the default default decision of selecting selecting root port, port, we can can change the the port priority priority of each each interface. interface. The above above picture picture is true for I*A4 108 because port )aF:1F has a lower port0priority so the peer port will be chosen as the root port. )or I*A4 >0 1F, port )aF:1/ has higher priority & -lower port priority value so %6 will block its upper port. )or answer A N QI*A4s 108 will be blocked if faF:1F goes down N is not correct because if )aF:1F goes down, %6 will unblock its lower port therefore I*A4s 108 will still operate. )or answer 6 N QI*A4s >01F have a port priority of 1/@ on faF:1F N is not always correct because I*A4 >01F can have a di5erent port priority -of +/ according to the 2isco’s link below. Answer 2 is correct because I*A4 >01F uses )aF:1/ link as it main path. )aF:1F is the backup path and is only opened when port )aF:1/ fails. Answer & is correct because this conguration provide load0balance traKc based on I*A4 basis. I*A4s 108 use )aF:1F and I*A4s >01F use )aF:1/ as their main paths. 4ote9 'e can not assure the answer 6 is always correct so we should choose 2 and & if the . Lou receive the following outputC
'hich of the following statements is true regarding I*A4 +/W A. I*A4 +/ is not allowed on the trunk port. 6. I*A4 +/ is not active on the switch. 2. TraKc from I*A4 +/ is not being sent over the trunk port. &. TraKc from I*A4 +/ is not restricted to only the trunk ports that re
The link between switch switch %'1 and and switch %'/ %'/ is congured congured as as a trunk, but but the trunk failed to establish establish connectivity connectivity between between the switches. 6ased on the congurations and the error messages received on the console of %'1, what is the cause of the problemW A. The two ends of the trunk have di5erent duple= settings. 6. The two ends of the trunk have di5erent ther2hannel congurations. 2. The two ends of the trunk have di5erent native I*A4 congurations. &. The two ends of the trunk allow di5erent I*A4s on the trunk. Answer9 2 =planation As you can see in the conguration of two switches, the native I*A4 on %'1 is set to 1 while the native I*A4 on %'/ is set to /. This will cause a Qnative I*A4 mismatch error and it looks like this9 2&(004ATI I*A4;B%BAT2G9 4ative I*A4 mismatch discovered on )aF:1 Y Remember the native I*A4 must match on both sides of the trunk link for @F/.13J otherwise the link will not work. Also, %panning Tree (rotocol -%T( will place the port in a port I*A4 & -(I& inconsistent state and will not forward on the link. +F@. 2iven the con(gurations on "witch3 and "witch'+ which two statements are true) <#hoose two>
A. The trunk is currently using the %* trunking protocol 6. The trunk is currently using the @F/.1< trunking protocol 2. 6y default, the trunk can only support one I*A4, and only that single I*A4 is transmitted across the trunk &. 6y default all I*A4s will be transmitted across this trunk . 6y default, %witchA and %witch6’s )astthernet F:1 port will not generate &T( messages Answer9 6 & =planation The command command Qswitchport Qswitchport trunk encapsulation encapsulation dot1< sets sets the trunking trunking encapsulation encapsulation format format to @F/.130U 6 is correct. correct. 6y default all I*A4s are allowed to transmitted across the trunk 0U & is correct. 4ote9 The Qswitchport mode trunk command enables trunking on the interface. +FC. 2iven the con(gurations on "witch3 and "witch'+ which statement is true)
A. The link is set to auto0negotiate trunking, and it will automatically become a trunk link unless congured otherwise 6. The link is a trunking link and by default all I*A4s will be transmitted across this link 2. The link is prevented from generating &T( frames, turning the 4egotiation of Trunking o5 &. The link is not a trunk link so both interfaces must be on the same I*A4 and only that single I*A4 is transmitted across the link
Answer9 & +1F. "tud& the diagram below carefull&+ which three statements are true) <#hoose t hree>
A N &T( packets are sent from %witch %6. 6 N &T( is not running on %witch %A. 2 N A trunk link will be formed. & N The native I*A4 for %witch %6 is I*A4 1. Answer9 A 2 & =planation9 &ynamic Trunking (rotocol -&T( is the #isco*proprietar& that actively attempts to negotiate a trunk link between two switches. f an interface is set to switchport mode dynamic desirable, it will actively attempt to convert the link into trunking mode. f the peer port is congured as switchport mode trunk, dynamic desirable, or dynamic auto mode, trunking is negotiated successfully 0U 2 is correct. %6 is in Qdynamic desirable mode so it will send &T( packets to %A to negotiate a trunk link 0U A is correct. $n an @F/.13 trunk, &T( packets are sent on the native I*A4. 6y default, it is I*A4 1 -notice that %A’s native I*A4 is 8 0U & is correct. -4ote9 an @F/.13 trunk’s native I*A4 is the only I*A4 that has untagged frames 6elow is the switchport modes for easy reference9 Bode Bode )unctio unction n &ynami &ynamic c Auto Auto 2reat 2reates es the the trunk trunk based based on on the &T( &T( re< re neighbor discovery. Trying Trying to classify classify protocols protocols based based on where where they’re they’re run is also also misleading. misleading. t’s true true that the networking networking device device 2(H almost always generates 2B( re
+1+. "tud& the e;hibit carefull&. 'oth host stations are part of t he same subnet but are in dierent 3=s. 5n the basis of the information presented in the e;hibit+ which statement is true about an attempt to ping from host to host)
A N *ayer + device is needed for the ping command to be successful. 6 N A trunk port will need to be congured on the link between %A and %6 for the ping command to be successful. 2 N The two di5erent hosts will need to be in the same I*A4 in order for the ping command to be successful. & N The ping command will be successful without any further conguration changes. Answer9 & =planation9 )or two hosts in di5erent I*A4s, we must use a layer + device to transport packages between them. Gowever, in this case both switches are set in Qaccess mode therefore the I*A4 information sent between them will be set as untagged. Boreover, they are in the same subnet so they can ping each other without a layer + device. +1. 'ased on the following e;hibit+ which problem is preventing users on 3= 011 from pinging addresses on 3= -11)
A N 4ative I*A4 mismatch. 6 N %ubinterfaces should be created on )aF:? and )aF:@ on &*%1. 2 N Trunking needs to be enabled. & N The ip routing command is missing on &*%1. Answer9 & =planation9
To To allow communication communication between between two I*A4s, we need to enables *ayer + routing routing on the switch with the Qip routing routing command. %ome "atforms are enabled by default but some are not. +18. 'ased on the network diagram and routing table output in the e;hibit+ which one of these statements is true)
A N nterI*A4 routing has been congured properly, and the workstations have connectivity to each other. 6 N nterI*A4 routing will not occur since no routing protocol has been congured. 2 N Although interI*A4 routing is not enabled, both workstations will have connectivity to each other. & N Although interI*A4 routing is enabled, the workstations will not have connectivity to each other. N 4one of the above. Answer9 A =planation9 n the output we can see both I*A41F and I*A4/F are shown up -as networks 1F.1.1.F and 1F././.F so the routing has been congured properly. 4otice that the Q2 letter indicates that these networks are directly connected with the router. +1>. "tud& the following e;hibit carefull&+ what is the reason that users from 3= 011 can8t ping users on 3= -11)
A N ( routing needs to be enabled on the switch 6 N Trunking needs to be enabled on )aF:1
2 N I*A4 1 needs the no shutdown command & N The native I*A4 is wrong Answer9 6 =planation9 The )aF:1 )aF:1 interface interface on the switch is not not congured congured with trunking trunking mode. mode. t needs to be congured congured as as shown below below99 %A-conginterface )aF:1 %A-cong0ifswitchport mode trunk %A-cong0ifswitchport trunk encapsulation dot1< +1?. Refer to the e;hibit.
Gost A and Gost 6 are connected to the 2isco 2atalyst +88F switch and have been assigned to their respective I*A4s. The rest of the +88F conguration is the default conguration. Gost A is able to ping its default gateway, 1F.1F.1F.1, but is unable to ping Gost 6. Oiven the output in the e=hibit, which statement is trueW A. G%R( must be congured on %'1. 6. A separate router is needed to support inter0I*A4 routing. 2. nterface I*A4 1F must be congured on the %'1 switch. &. The global conguration command ip routing must be congured on the %'1 switch. . I*A4s 1F and 18 must be created in the I*A4 database mode. ). IT( must be congured to support inter0I*A4 routing. Answer9 & =planation To To enable routing on a *ayer *ayer + switch rst rst we have to use the ip ip routing routing command. command. )rom )rom the output output of Qshow vlan brief command above, we learn that ports connected to hosts have been congured as access ports and assigned to I*A4 1F X 18. The missing thing here is only the Qip routing command. 6elow lists the full conguration so that these two hosts can communicate. ip routing interface )astthernetF:1F switchport access vlan 1F switchport mode access interface )astthernetF:18 switchport access vlan 18 switchport mode access interface Ilan1F ip address 1F.1F.1F.1 /88./88./88.F interface Ilan18 ip address 1F.18.18.1 /88./88./88.F multila&er switches) <#hoose two> +1@. Which two steps are necessar& to con(gure inter*3= routing between multila&er A. 2ongure a dynamic routing protocol. 6. 2ongure %I interfaces with ( addresses and subnet masks. 2. 2ongure access ports with network addresses. & 2ongure switch ports with the autostate e=clude command. . &ocument the BA2 addresses of the switch ports.
Answer9 A 6
=planation A multilayer switch can use a switched virtual interface -%I to provide inter0I*A4 routing rather than use an e=ternal router. 6elow is a simple e=ample of using %Is to congure inter0I*A4 routing on a *ayer + switch.
ip routing interface )astthernetF:1 switchport access vlan 1F switchport mode access interface )astthernetF:/ switchport access vlan /F switchport mode access interface Ilan1F ip address 1C/.1>@.1F.1 /88./88./88.F interface Ilan/F ip address 1C/.1>@./F.1 /88./88./88.F -n fact we need to congure two more interfaces so that all hosts can communicate Also, the above conguration is only for a single multilayer switch. f we enable interI*A40routing between two multilayer switches, a routing protocol needs to be used. +1C. Refer to the e;hibit
)or the conguration shown, which is the recommended method of providing inter I*A4 routingW A. &etermine which switch is the root bridge then connect a router on a stick to it 6. 2ongure %Is on the core switches 2. 2ongure %Is on the distribution switches &. 2ongure %Is on the access layer switches Answer9 2 =planation 'e can congure %Is on Bultilayer switches to use as the default gateways or *ayer + routing for the devices connected to %A1 X %A/. +/F. Refer to the e;hibit. Initiall&+ ink3 is connected and forwarding traAc. 3 new ink' is then attached between "witch3 and Hub3. Which two statements are true about the possible result of attaching the second link) <#hoose two>
A. The switch port attached to *ink6 will not transition to up.
6. $ne of the two switch ports attached to the hub will go into blocking mode when a 6(&H is received. 2. 6oth switch ports attached to the hub will transition to the blocking state. &. A heavy traKc load could cause 6(&H transmissions to be blocked and leave a switching loop. . The switch port attached to *inkA will immediately transition to the blocking state. Answer9 6 & =planation we know that there will have only one &esignated port for each segment -notice that the two ports of %witchA are on the same segment as they are connected to a hub. The other port will be in 6locking state. 6ut how does %witchA select its &esignated and 6locking portW The decision process involves the following parameters inside the 6(&H9 V *owest path cost to the Root V *owest %ender 6ridge & -6& V *owest (ort & n this case, both interfaces of %witchA have the same Qpath cost to the root and Qsender bridge & so the third parameter Qlowest port & will be used. %uppose two interfaces of %witchA are faF:1 X faF:/ then %witchA will select faF:1 as its &esignated port -because faF:1 is inferior to faF:/ 0U 6 is correct. %uppose the port on *inkA -named portA is in forwarding state and the port on *ink6 -named port6 is in blocking state. n blocking state, port 6 still listens to the 6(&Hs. f the traKc passing through *inkA is too heavy and the 6(&Hs can not reach port6, port6 will move to listening state -after /F seconds for %T( then learning state -after 18 seconds and forwarding state -after 18 seconds. At this time, both portA X port6 are in forwarding state so a switching loop will occur 0U & is correct. +/1. Refer to the e;hibit. "witch "0 is running mst I777 1-.0s. "witch "- contains the default con(guration running I777 1-.0D. "witch "! has had the command spanning*tree mode rapid*pvst running I777 1-.0w. What will be the result)
A. @F/.1& and @F/.1w are incompatible. All three switches must use the same standard or no traKc will pass between any of the switches. 6. %witches %1, %/, and %+ will be able to pass traKc between themselves. 2. %witches %1, %/, and %+ will be able to pass traKc between themselves. Gowever, if there is a topology change, %witch %/ will not receive notication of the change. &. %witches %1 and %+ will be able to e=change traKc but neither will be able to e=change traKc with %witch %/ Answer9 6 =planation A switch running both B%T( and R%T( supports a built0in protocol migration mechanism that enables it to interoperate with legacy @F/.1& switches. f this switch receives a legacy @F/.1& conguration 6(&H -a 6(&H with the protocol version set to F, it sends only @F/.1& 6(&Hs on that port. An B%T switch can also detect that a port is at the boundary of a region when it receives a legacy 6(&H, an B%T 6(&H -version + associated with a di5erent region, or an R%T 6(&H -version /. Gowever, the switch does not automatically revert to the B%T( mode if it no longer receives @F/.1& 6(&Hs because it cannot determine whether the legacy switch has been removed from the link unless the legacy switch is the designated switch +//. Refer to the e;hibit. "witch 0: is con(gured as the root switch for 3= 01 but not for 3= -1. If the ",P con(guration is correct+ what will be true about "witch 0:)
A. All ports will be in forwarding mode. 6. All ports in I*A4 1F will be in forwarding mode. 2. All ports in I*A4 1F will be in forwarding mode and all ports in I*A4 /F will be in blocking mode.
&. All ports in I*A4 1F will be in forwarding mode and all ports in I*A4 /F will be in standby mode. Answer9 6 =planation All ports on root bridge are designated ports, which are in forwarding state but notice in this case %witch 18 is the root switch for I*A4 1F 0U all ports in I*A4 1F will be in forwarding state. 'e can not say anything about the modes of ports of %witch 18 in other I*A4s. +/+. Refer to the e;hibit. ",P has been implemented in the network. "witch "WN3 is the root switch for the default 3=. ,o ,o reduce the broadcast domain+ t he network administrator decides to split users on the network into 3= - and 3= 01. ,he administrator issues the command spanning*tree vlan - root primar& on switch "WN3. What will happen as a result of this change)
A. All ports of the root switch %';A will remain in forwarding mode throughout the reconvergence of the spanning tree domain. 6. %witch %';A will change its spanning tree priority to become root for I*A4 / only. 2. %witch %';A will remain root for the default I*A4 and will become root for I*A4 /. &. 4o other switch in the network will be able to become root as long as switch %';A is up and running. Answer9 2 =planation This command command sets the switch to become become root root for a given given I*A4. t works works by lowering lowering the priority priority of the switch until until it becomes root. $nce the switch is root, it will not prevent any other switch from becoming root. n particular, if the current root bridge is greater than /8?> then our switch will drop to /8?>. f the current root bridge is less than /8?>, our new bridge priority will be -(riority value of the current root bridge N FC>. This command command does not a5ect other other I*A4 so %';A %';A will remain remain root root for the default I*A4 0U 0U 2 is correct. correct. 4ote9 This command is not shown in a 2atalyst switch conguration because the command is actually a macro e=ecuting other switch commands. +/. Refer to the e;hibit. ,he command spanning*tree guard root is con(gured on interface 2i161 on both switch "- and ":. ,he global con(guration command spanning*tree uplinkfast has been con(gured on both switch "- and ":. ,he link between switch "9 and ": fails. Will Host 3 be able to reach Host ')
A. )ifty percent of the traKc will successfully reach Gost 6, and fty percent will dead0end at switch %+ because of a partial spanning0tree loop. 6. 4o. TraKc will pass from switch %> to %/ and dead0end at %/. 2. 4o. TraKc will loop back and forth between switch %> and Gost A. &. 4o. TraKc will loop back and forth between switches %/ and %+. . Les. TraKc will pass from switch %> to %/ to %1. Answer9 =planation )irst we should understand about Hp*ink)ast.
%uppose %1 is the root bridge in the topology above. %+ is connected to %1 via two paths9 one direct path and another goes through %/. %uppose the port directly connected to %1 is root port 0U port connected to %/ will be in 6locking state. f the primary link goes down, the blocked port will need about 8F seconds to move from 6locking 0U *istening 0U *earning 0U )orwarding to be used. To To shorten the downtime, downtime, a feature feature called Hplink Hplink )ast )ast can be used. used. 'hen the primary primary -root link link fails, another blocked blocked link can be brought up immediately for use. 'hen Hplink)ast is enabled, it is enabled for the entire switch and all I*A4s. t cannot be enabled for individual I*A4s. n this must be used. 4ote9 The idea of Hplink )ast is based on blocked ports which are possible to become a root port. Therefore the Hplink )ast feature is not allowed on the root bridge 0U %/ X %8 cannot be root bridges in this case. +/8. Refer to the e;hibit. ,he command spanning*tree guard root is con(gured on interface 2i161 on both switch "- and ":. ,he global con(guration command spanning*tree uplinkfast has been con(gured on both switch "- and ":. ,he link between switch "9 and ": fails. Will Host 3 be able to reach Host ')
A. Les. TraKc can pass either from switch %> to %+ to %/ to %1, or, from switch %> to %8 to %/ to %1. 6. 4o. TraKc will pass from switch %> to %8 and dead0end at interface OiF:F. 2. 4o. TraKc will loop back and forth between switch %8 and %/. &. Les. TraKc will pass from switch %> to %+ to %/ to %1. . 4o. TraKc will either pass from switch %> to %8 and dead0end, or traKc will pass from switch %> to %+ to %/ and dead0end. Answer9 & =planation %ame e=planation as 3uestion >. 'hen the link between % N %8 goes down, OiF:F on %8 cannot become root port because of Root Ouard feature on it. 6ut maybe Gost A can’t reach host 6 in the rst 18 seconds after the link between % X %8 fails by default. t is the time for %8 to clear the BA2 address table -please read the e=planation of 3uestion 8 for more detail. +/>. 2iven the diagram and assuming that ",P is enabled on all switch devices+ which two statements are true) <#hoose two>
A. &%'11 will be elected the root bridge. 6. &%'1/ will be elected the root bridge.
2. A%'1+ will be elected the root bridge. &. (+:1 will be elected the nondesignated port. . (/:/ will be elected the nondesignated port. ). (+:/ will be elected the nondesignated port. Answer9 A & =planation f all the switches are turned on at the same time, &%'11 will win the election and become Root 6ridge because it has lowest 6ridge & -including 6ridge (riority and BA2 address so all of its ports are &esignated (ort -forwarding state. Also (/:1, (+:/ and (:1 become Root (orts because they are closest to the Root 6ridge -in terms of path cost for each switch. (+:1 will be 4ondesignated -6locked (ort because (1:/ must be a &esignated (ort -of course (1:/ advertises better 6(&H, in other words better 6ridge &, than (+:1.
+/?. Refer to the e;hibit. ,he service provider wants to ensure that switch "0 is the root switch for its own network and the network of the customer. customer. 5n which interfaces should root guard be con(gured to ensure that this happens)
A. interfaces 1 and / 6. interfaces 1,/,+, and 2. interfaces 1, +, 8, and > &. interfaces 8 and > . interfaces 8, >, ?, and @ ). interfaces 11 and 1/ Answer9 & =planation *et’s see what will happen if we set port 8 X > as Qroot guard ports9 )irst, notice that the Qroot guard command cannot be used on root switch -because this command is based on blocked port N while a root switch can’t have a blocked port 0U two middle switches cannot become root bridges. Boreover, the neighbor switch which has its port connected with this Qroot guard port can’t be the root bridge. )or e=ample if we congure port > as Qroot guard port, the left0bottom switch -the switch with ports +, can’t be root bridge because that will make port > root port. Therefore by conguring port 8 X > as Qroot guard ports, two switches in the Q2ustomer network cannot become root bridge. +/@. 3 port in a redundant topolog& is currentl& in the blocking state and is not receiving 'PD/s. ,o ensure that this port does not erroneousl& transition to the forwarding state+ which command should be con(gured to satisf& the re%uirement) A. %witch-congspanning0tree loopguard default 6. %witch-cong0ifspanning0tree bpdulter 2. %witch-congudld aggressive &. %witch-cong0ifspanning0tree bpduguard Answer9 A =planation *oop guard prevents alternate or root ports from becoming the designated port due to a failure that could lead to a unidirectional link. An e=ample is shown below9
%uppose %1 is the root bridge. %+s port connected with %/ is currently blocked. 6ecause of unidirectional link failure on the link between %/ and %+, %+ is not receiving 6(&Hs from %/. 'ithout loop guard, the blocking port on %+ will transition to listening -upon ma= age timer e=piration 0U learning 0U forwarding state which create a loop.n 'ith loop guard enabled, the blocking port on %+ will transition into the %T( loop0inconsistent state upon e=piration of the ma= age timer. 6ecause a port in the %T( loop0inconsistent state will not pass user traKc, no loop is created. The loop0 inconsistent state is e5ectively e
3ll links in this network are la&er -+ fast 7thernet 011 4b6s and operating as trunks. 3fter a failure+ the link between 3"W*0 and D"W*0 has incorrectl& come back up at 01 4b6s although it is connected. Which one of the following will occur as a result of this failure)
A. There will be no change to the forwarding path to traKc from A%'01 6. A%'1 will block )aF:/ in order to maintain the shortest path to the root bridge &%'01 2. A%'01 will block )aF:/+ in order to maintain the shortest path to the root bridge &%'01 &. A%'01 will elect &%'0/ as the root primary since it is close than &%'01 Answer9 2 =planation The picture picture below shows shows the port port roles of all ports ports when the topology is is converged converged after the failure. failure.
R(9 Root (ort 6(9 6locked (ort &(9 &esignated (ort ++F. Regarding the e;hibit and the partial con(guration of switch "3 and "'. ",P is con(gured on all switches in the network. "' receives this error message on the console portC FF9F>9+9 `2&(00&H(*;B%BAT2G9 duple= mismatch discovered on )astthernetF:8 -not half duple=, with %A )astthernetF: -half duple=, with T6AF8F?11?-2at>P06 F: -half duple=. 'hat would be the possible outcome of the problemW
A N The root port on switch %6 will fall back to full0duple= mode. 6 N The interfaces between switches %A and %6 will transition to a blocking state. 2 N The root port on switch %A will automatically transition to full0duple= mode. & N nterface )aF:> on switch %6 will transit to a forwarding state and create a bridging loop. Answer9 & =planation9 )rom the output, we learned that the interfaces on two switches are operating in di5erent duple= modes9 )aF: of %A in half0 duple= mode X )aF:8 of %6 in full0duple= mode. n this case, because %6 is operating in full duple= mode, it does not check the carrier sense before sending frames -2%BA:2& is not used in full0duple= mode. Therefore, %6 can start to send frames even if %A is using the link and a collision will occur. The result of this is %A will wait a random time before attempting to transmit another frame. f 6 sends enough frames to A to make every frame sent from A -which includes the 6(&Hs get dropped then %6 can think it has lost root bridge -6 does not receive 6(&Hs from A anymore. Therefore %6 will unblock its )aF:> interface for transmitting and cause a bridging loop. ++/. Refer to the e;hibit. 3#P has been con(gured on "witch0 as shown. Which is the correct command set to con(gure 3#P on "witch-)
A. %witch/ congure terminal %witch/-cong interface range gigabitethernet+:1 0/ %witch/-cong0if channel0group 8 mode auto 6. %witch/ congure terminal %witch/-cong interface range gigabitethemet+:1 0/ %witch/-cong0if channel0group 8 mode passive 2. %witch/ congure terminal %witch/-cong interface range gigabitethernet+:1 0/ %witch/-cong0if channel0group 8 mode desirable &. %witch/ congure terminal %witch/-cong interface range gigabitethernet+:1 0/ %witch/-cong0if channel0group 8 mode on Answer9 6 =planation *A2( trunking supports four modes of operation, as follows9 V $n9 The link aggregation is forced to be formed without any *A2( negotiation. n other words, the switch will neither send the *A2( packet nor process any incoming *A2( packet. This is similar to the on state for (Ag(.
V $59 The link aggregation will not be formed. 'e do not send or understand the *A2( packet. This is similar to the o5 state for (Ag(. V (assive9 The switch does not initiate the channel, but does understand incoming *A2( packets. The peer -in active state initiates negotiation -by sending out an *A2( packet which we receive and reply to, eventually forming the aggregation channel with the peer. This is similar to the auto mode in (Ag(. V Active9 'e are willing to form an aggregate link, and initiate the negotiation. The link aggregate will be formed if the other end is running in *A2( active or passive mode. This is similar to the desirable mode of (Ag(. *A2( does not have Qauto X Qdesirable modes so A X 2 are not correct. Also there are only three valid combinations to run the *A2( link aggregate, as follows9 %witch %witch &escription active active active active Recomm Recommende ended d activ active e passi passive ve *ink *ink aggr aggrega egatio tion n occur occurs s if if neg negoti otiati ation on is succes successfu sful. l. on on *ink *ink agg aggrregat egatio ion n occu occurs rs wit witho hout ut *A2( *A2(. Alth Althou ough gh thi this s work works, s, it it is not not rec recom omme mend nded ed.. Therefore Therefore if %witch1 %witch1 is set set Qactive mode, mode, we cannot cannot set Qon Qon mode mode on %witch/ %witch/ 0U & is is not correct. correct. $nly answer 6 is suitable in this case. -Reference9 http9::www.cisco.com:en:H%:tech:tk+@C:tk/1+:technologies;conguration;e=ampleFC1@>aFF@FFC?F.shtml An e=ample of conguring *ayer / ther2hannel using *A2( -applied these commands to both switches9 %'-conginterface range fF:1 N / %'-cong0if0rangechannel0group 1 mode active +++. Refer to the e;hibit. ,he command switchport mode access is issued on interface Fast7thernet160! on switch #3,0. What will be the result)
A. The command will be reEected by the switch. 6. nterfaces )astthernetF:1+ and )astthemetF:1 will no longer be bundled. 2. &ynamic Trunking (rotocol will be turned o5 on interfaces )astthernetF:1+ and )astthemetF:1. &. nterfaces )astthernetF:1+ and )astthernetF:1 will only allow traKc from the native I*A4. . nterfaces )astthernetF:1+ and )astthernetF:1 will continue to pass traKc for I*A4s @@,1FF,+>F. Answer9 6 =planation The default default channel channel protocol protocol in 2isco 2isco switches is (ort (ort Aggregation Aggregation (rotocol (rotocol -(Ag(. -(Ag(. (Ag( (Ag( groups groups the interfaces interfaces with the same speed, duple= mode, native I*A4, I*A4 range, and trunking status and type. After grouping the links into an ther2hannel, (Ag( adds the group to the spanning tree as a single switch port. An interface in the on mode that is added to a port channel is forced to have the same characteristics as the already e=isting on mode interfaces in the channel -applied for both (Ag( X *A2(. %o if we congure Qswitchport mode access on )aF:1+, this interface will no longer be bundled with )aF:1. ++. What is the result of entering the command Oport*channel load*balance src*dst*ip on an 7 ther#hannel link) A. (ackets are distributed across the ports in the channel based on both the source and destination BA2 addresses. 6. (ackets are distributed across the ports in the channel based on both the source and destination ( addresses. 2. (ackets are balanced across the ports in the channel based rst on the source BA2 address, then on the destination BA2 address, then on the ( address. &. (ackets are distributed across the access ports in the channel based rst on the source ( address and then the destination ( addresses. Answer9 6
=planation The synta= of of conguring conguring load balancing balancing on a 2isco 2isco switch is9 is9 %witch-cong port0channel load0balance method Bany methods can be used here. 6y default, the Qsrc0dst0ip -source and destination ( address method is used for *ayer + switching. *et’s take an e=ample to understand more about this method.
n the topology above, %witch1 uses the Qsrc0dst0ip method to load balancing traKc to %witch/. 'ith this method, only one link is used for a specic pair of source X destination ( address and the switch uses the $R function to generate the hash that is used to determine which interface to use. %uppose the packets have the source ( of 1.1.1.1 X destination ( of 1.1.1./. 'rite them in binary we get9 1.1.1.1 S FFFF FFF1.FFFF FFF1.FFFF FFF1.FFFF FFF1 1.1.1./ S FFFF FFF1.FFFF FFF1.FFFF FFF1.FFFF FF1F n this case we have only / interfaces in this channel group so the $R function only gets the last bit, which means 1 $R F S 1. ach interface is assigned an inde= that starts from F so )aF:/ will be inde=ed 1 0U traKc will be sent over )aF:/. f we have interfaces in a channel group then $R function gets last / bits. f we have @ interfaces, it gets + bits and so on. )or e=ample, with @ interfaces the result will be + -because FF1 $R F1F S F11 0U )aF: will be used. 4ote9 f the two address values have the same bit value, the $R result is always F. f the two address bits di5er, the $R result is always 1. )or e=ample, F $R F S FJ F $R 1 S 1J 1 $R F S 1J 1 $R 1 S F. n conclusion, the Qport0channel load0balance src0dst0ip command uses a pair of source X destination ( address to select the port to send traKc to 0U 6 is correct. ++8. Which statement is true regarding the Port 3ggregation Protocol) A. 2onguration changes made on the port0channel interface apply to all physical ports assigned to the portchannel interface. 6. 2onguration changes made on a physical port that is a member of a port0channel interface apply to the port0channel interface. 2. 2onguration changes are not permitted with (ort Aggregation (rotocolJ instead, the standardi7ed *ink Aggregation 2ontrol (rotocol should be used if conguration changes are re
%witch1-cong interface port0channel 1 %witch1-cong0if no switchport %witch1-cong0if ip address 1C/.1>@.1.1 /88./88./88.F %witch1-cong0if e=it %witch1-cong interface range fastethernetF:1 0/ %witch1-cong0if0range no switchport %witch1-cong0if0range no ip address %witch1-cong0if0range channel0group 1 mode desirable %witch/-cong interface port0channel 1 %witch/-cong0if no switchport %witch/-cong0if ip address 1C/.1>@.1./ /88./88./88.F %witch/-cong0if e=it %witch/-cong interface range fastethernetF:1 0/ %witch/-cong0if0range no switchport %witch/-cong0if0range no ip address %witch/-cong0if0range channel0group 1 mode auto 4ote9 The Qno switchport command is re. What is a native 3=)
A9 A native I*A4 is an untagged I*A4 on an @F/.1< trunked switch port. f a switch receives untagged frames on a trunk port, they are assumed to be part of the I*A4 that are designated on the same switch port as the native I*A4. )rames that pass through a switch port on the native I*A4 are not tagged. ++?. What is 7ther#hannel and is it possible to achieve load balancing using 7ther#hannels) A9 ther2hannel is a *A4 port aggregation technology which allows grouping of several physical thernet links to create one logical thernet link for the purpose of providing fault0tolerance and high0speed links between switches, routers and servers. Les, Les, ther2hannel ther2hannel supports supports load load balancing balancing on the basis basis of predened predened hash hash algorithms algorithms but you cannot control control the port that a particular "ow uses. The hash algorithm cannot be congured congured or changed changed to load load balance balance the traKc traKc among the ports in an an ther2hannel. ther2hannel. Bain hash algorithms are src;ip;addr dest;ip;addr src;mac;addr dest;mac;addr src;port dest;port ]dest;ip;addr dest;mac;addr dest;port. ++@. What does non transitive attribute in '2P means) 'eight is not a transitive attribute which means that it can’t in"uence the routing decision of the other routers. %ame is the case for *ocal preference. ++C. /se of access*list and route*map in '2P) The access0list access0list will classify what pre= pre= we want want to manipulate manipulate and the route0map route0map will tell tell what actions actions we want want to do with that pre=. +F. /se of 47D B& -multi0e=it &iscriminator is a 6O( attribute that is used to in"uence the other A% on how to reach the pre=es inside your own A%. The lower the B&, the higher the preference +1. 7;plain '2P attributes. A 0Atomic aggregate, ?0aggregator, @0community, C0originator0&, and 1F0cluster list. +/. What is the command to compare start*up and running con(g in router. There is a easy way way though to compare compare the congs congs and the command command is Mshow Mshow archive archive cong cong di5erencesM di5erencesM for the the router router to compare the start0up and the running0cong. ++. How man& '2P processes can &ou run in a #isco router) Lou Lou can run run multiple bgp processes processes in single single router router based based on router router performance. performance. +. Into which of the '2P neighbor states must a neighbor stabili$e before '2P /pdate messages ma& be sent) 7stablished state +8. what is best wa& to remember '2P best path selection.
W 5
3" 5 4 P R
OWe ove 5ranges 3" 5ranges 4ean Pure Refreshment Weight -Gighest 5#3NPR7F -Gighest 5riginate -local routes that are advertise through the "network" command or redistributed from an IGP. 3"NP3,H -shortest 5RI2I= #ode -O( U O( U ncomplete 47D -lowest Paths -=ternal U nternal RID -lowest
+>. Refer the e;hibit
All switches have default bridge priorities, and originate 6(&Hs with BA2 addresses as indicated. The numbers shown are %T( link metrics. 'hich two ports are in blocking state after %T( convergesW -2hoose two A. the port on switch %'& that connects to switch %' 6. the port on switch %') that connects to switch %'O 2. the port on switch %'& that connects to switch %'2 &. the port on switch %'6 that connects to switch %'& Answer9 2 & +?. Refer the e=hibit
3ll switches have default bridge priorities+ and originate 'PD/s with 43# addresses as indicated. ,he numbers shown are ",P link metrics. Which two ports are forwarding traAc after ",P converges) <#hoose two>
A. The port connecting switch %'& with switch %' 6. The port connecting switch %'O with switch %') 2. The port connecting switch %'2 with switch %' &. The port connecting switch %'6 with switch %'2 Answer9 2 & +@. Refer to the e;hibit. router ospf 1FF router0id ... area 11F nssa summary0address 1C/.1>@.F.F /88./88.F.F nssa0only redistribute static metric0type 1 subnets tag ?F
network 11F.11F.F.F F.F./88./88 area 11F This is the conguration conguration of the A%6R of area area 11F. 11F. 'hich option option e=plains e=plains why the remote A6R A6R should should not translate translate the type ? *%A for the pre= 1C/.1>@.F.F:1> into a type 8 *%AW A. The remote A6R translates all type ? *%A into type 8 *%A, regardless of any option congured in the A%6R. 6. The A%6R sets the forwarding address to F.F.F.F which instructs the A6R not to translate the *%A into a type 8 *%A. 2. The A%6R originates a type ? *%A with age eFF. &. The A6R clears the ( bit in the header of the type ? *%A for 1C/.1>@.F.F:1>. Answer9 & =planation 'hen e=ternal routing information is imported into an 4%%A, *%A Type ? is generated by the A%6R and it is "ooded within that area only. To further distribute the e=ternal information, type ? *%A is translated into type 8 *%A at the 4%%A border. The (0bit in *%A Type ? eld indicates whether the type ? *%A should be translated. This (0bit is automatically set by the 4%%A A6R -also the )orwarding Address -)A is copied from Type ? *%A. The (0bit is not set only when the 4%%A A%6R and 4%%A A6R are the same router for the area . f bit ( S F, then the 4%%A A6R must not translate this *%A into Type 8.
The nssa0only nssa0only keyword keyword instructs instructs the device device to instigate instigate Type0? *%A with cleared cleared (0bit, thereby, preventing preventing *%A translation translation to Type Type 8 on 4%%A 4%%A A6R device. device. 4ote9 f a router is attached to another A% and is also an 4%%A A6R, it may originate a both a type08 and a type0? *%A for the same network. The type08 *%A will be "ooded to the backbone and the type0? will be "ooded into the 4%%A. f this is the case, the (0bit must be reset -(SF in the type0? *%A so the type0? *%A isn’t again translated into a type08 *%A by another 4%%A A6R. +C. Which statement about a t&pe 9 "3 in 5"PF is true) A. t is an *%A that is originated by an A6R, that is "ooded throughout the A%, and that describes a route to the A%6R. 6. t is an *%A that is originated by an A%6R, that is "ooded throughout the A%, and that describes a route to the A%6R. 2. t is an *%A that is originated by an A%6R, that is "ooded throughout the area, and that describes a route to the A%6R. &. t is an *%A that is originated by an A6R, that is "ooded throughout the A%, and that describes a route to the A6R. . t is an *%A that is originated by an A6R, that is "ooded throughout the area, and that describes a route to the A%6R. Answer9 =planation *%A Type -called %ummary A%6R *%A is generated by the A6R to describe an A%6R to routers in other areas so that routers in other areas know how to get to e=ternal routes through that A%6R.
+8F. Refer to the e;hibit.
'hy is R/ unable to ping the loopback interface of RW A. The local preference is too high. 6. The weight is too low. 2. The ne=t hop is not reachable from R/. &. The route originated from within the same A%. Answer9 2 +81. Refer to the e;hibit.
R/ is mutually redistributing between OR( and 6O(. 'hich conguration is necessary to enable R1 to see routes from R+W A. The R+ conguration must include ebgp0multihop to the neighbor statement for R/. 6. The R/ 6O( conguration must include bgp redistribute0intemal. 2. R1 must be congured with ne=t0hop0self for the neighbor going to R/. &. The A% numbers congured on R1 and R/ must match. Answer9 6 +8/. Refer to the e;hibit.
A%1 and A%/ have multiple 6O( connections with each other. A%1 wants all return traKc that is destined to the pre= 1F.1F.1F.1:+/ to enter through the router R1 from A%/. n order to achieve this routing policy, the A% 1 advertises a lower B& from R1, compared to a higher B& from R+, to their respective 6O( neighbor for the pre= 1F.1F.1F.F:/. 'ill this measure guarantee that the routing policy is always in e5ectW A% 1 and A% / have multiple 6O( connections with each other. A% 1 wants all return traKc that is destined to the pre= 1F.1F.1F.1:+/ to enter through the router R1 from A% /. n order to achieve this routing policy, the A%1 advertises a lower B& from R1, compared to a higher B& from R+, to their respective 6O( neighbor for the pre= 1F.1F.1F.F:/. 'ill this measure guarantee that the routing policy is always in e5ectW A. Les, because B& plays a deterministic role in return traKc engineering in 6O(. 6. Les, because a lower B& forces 6O( best0path route selection in A% / to choose R1 as the best path for 1F.1F.1F.F:/. 2. Les, because a lower B& in A% / is the highest 6O( attribute in 6O( best0path route selection. &. 4o, A% / can choose to alter the weight attribute in R/ for 6O( neighbor R1, and this weight value is cascaded across A% / for 6O( best0path route selection.
. 4o, A% / can choose to alter the local preference attribute to overwrite the best0path route selection over the lower B& advertisement from A% 1. This local preference attribute is cascaded across A% / for the 6O( best0path route selection. Answer9 +8+. Refer to the e=hibit. All i6O( routes should have the i6O( peer as the ne=t hop address. 'hy is this not the case for 6O( routes learned between R1 and R/W
A. R/ is missing the ne=t0hop0self option under the neighbor command for R1 6. %(0A is missing the ne=t0hop0self option under the neighbor command for R1 2. %(06 is missing the ne=t0hop0self option under the neighbor command for R1 &. R/, %(0A, and %(06 are missing the ne=t0hop0self option under the neighbor command for R1 Answer9 A =planation n this case networks 1F.F.F.F, 1?/.1?.F.F, 1?/[email protected], 1C/.1>@.>F.F, 1C/.1>@.?F.F are networks learned and advertised from R/. 'e see that the ne=t0hop of these networks are /FC.1>8./F/.18@ while they should be /FC.1>8./F/.1+F. 'ith the ne=t0 hop of /FC.1>8./F/.18@, R1 may not know how to send traKc to above networks and the traKc is dropped. To avoid this failure we should congure the ne=t0hop0self’ under the neighbor command for R1 like this9 R/-cong0routerneighbor /FC.1>8./F/.1/C ne=t0hop0self +8 . What is a router) 5r de(ne the basic re%uirements of a router) Answer9 A router is a layer + network device used to establish communication between di5erent networks. 6asic roles performed by a router are9 V nter0network communication V 6est path selection V (acket forwarding V (acket ltering +88. What is the use of routing) or Wh& we use routing) Answer9 6y default, a router provides inter0network communication only for directly connected networks. To establish communication between indirectly connected networks, we re. De(ne the criteria for best path selection of a router) Answer9 A router’s routing table contains only best route. To select a route as best, a router considers the following parametersJ V *ongest pre= match V Binimum A& -administrative distance V *owest metric value f all listed parameters are the same, then it would perform e
+8?. De(ne Ostuck in active. Answer9 f a successor route -best route fails, then the router sends a F. What is the dierence between an 5PPF neighbor and an ad?acent neighbor) Answer9 4eighbors are the routers that are in the same area and e=change hello packets, but not *%A information. AdEacent routers are routers that have fully e=changed their *%A information and are stable. f $%() state is in /'AL:&R$TGR, it means a neighbor relationship and, if the state is )H**:&R or )H**:6&R, it means that the adEacency is formed. +>1. '2P neighborship is not coming up. Please de(ne the various steps to troubleshoot it. Answer9 To troubleshoot 6O(, rst we need to check neighbor state using Qshow ip bgp summary. f the state is dle, it means that the peer address or A% is not dened properlyJ if the state is Active, it means that T2( port 1?C is not open, the peer is not reachable, network congestion, or 6O( misconguration. 2ommon neighbor stability problems of 6O( V Biscongured neighbor’s ( address and A% number V Reachability issues when interfaces other than directly connected interfaces are used while peering -update0source issue. V Authentication must be properly implemented -if congured V Router0& must be uni/. What is route reBector and wh& it is re%uired) Answer9 Route re"ector is a solution for 6O( split hori7on. The rule says Qpre= learned from an i6O( neighbor will not be advertised to another i6O( neighbor. To To overcome overcome this situation, situation, we have multiple multiple options9 options9 Bake your network a full mesh Route confederation 2onfederation Route re"ector is something like a central point acting as a route re"ector server9 Rather than peering with every i6O( router in a full mesh, it makes 6O( neighbors as route re"ector clients to overcome the split hori7on issue. +>+. What is the dierence between standard and e;tended 3#) Answer9 %tandard A2*s are source0based, whereas e=tended A2*s are source0 and destination0based. %tandard A2*s can only lter layer + network traKc, while e=tended A2*s can be used to lter layer + and layer , as well. +>. What is the use of distribute*list) Answer9 To lter a routing database, we use distribute0list, which can be applied over most routing protocols. This means that, f you don’t want any specic network in your routing table, then you can use distribute0list. +>8. 4P" works on which la&er) Answer9 B(*% operates between layer / and layer +, so it is sometimes called layer /.8. +>>. What is penultimate hop popping and what is its use) Answer9 (G( is the techni?. What is the dierence between la&er - and la&er ! Ko") Answer9 */03o% is at the BA2 layer and can be applied by using 2o% -class of service led in the I*A4 header. This will be used to prioriti7e traKc. *ater, a 3$% scheduler can use the 2$% led to 0bit, which can be set in the T$% eld of the ( header. This T$% will later be used by scheduling process to achieve 3$%. */ @. What is traAc black hole) A traKc black hole is having a ne=t0hop neighbor that doesn’t have any routes for a specic pre= but the routing table points to that device as the ne=t0hop of the route. n distance vector protocols like R( and OR(, this rarely happens because, in those protocols, anything that is not in the routing table will not be announced to the neighbor. *ink0state protocols like $%() make use of *%As, which will still enable the routes to be propagated regardless whether the route is in the routing table or not. +>C. '2P session is not established 6O( uses T2(, so to discover the cause of the problem, you can start with testing T2( connectivity. $ne way to do that is as simple as :system telnet jremote0ipU 1?C and check if the T2( connection can be established, and 6O( port 1?C is open and reachable. f this is e6O(, make sure you have congured multihopSyes and TT* settings as needed. Hse routing bgp peer print status to see the current state of 6O( connection.
Also note that if the remote peer is not supporting 6O( 2apabilities Advertisement -R)2 /@/, some e=tra time will be needed for session establishment. The establishment will fail at the rst time in this case, because of unknown options in 6O( $(4 message. t should succeed at second attempt -i.e. after about a minute and in any further attempts, because Router$% will remember the o5ending options for that peer and not include them in 6O( $(4 messages anymore. +?F. Dierence in '55,P and R3RP . RAR( and 6$$T( re?@CF1/+8>?@CF1/+8>?@CF1 Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z Iersion / (acket length Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z Router & Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z Area & Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z 2hecksum AuType AuType Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z Authentication Authenticati on Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z Authentication Authenticati on Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z F F $ptions FFFFFBB% FFFFFBB% Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z && se. What is "I) nter0I*A4 2ommunication on a Bultilayer %witch Through a %witch Iirtual nterface +??. Is it possible to h ave DR6'DR election in case of 3=) 5r point to point connection) [email protected] 3"'R knows it has to transfer packet to backbone area) The 4%%A =ternal =ternal *%A has a "ag "ag in its header header known known as the (0bit. (0bit. The 4%%A 4%%A A%6R has has the option option of setting or clearing clearing the (0 (0 bit. f the 4%%AVs A6R receives a type ? *%A with the (0bit set to one, it will translate the type ? *%A into a type 8 *%A and "ood it throughout the backbone area, t the (0bit is set to 7ero, no translation will take place and the destination in the type ? *%A will not be advertised outside of the 4%%A. This option allows you to design an 4%%A in which the e=ternal destinations learned in that area are known onlyin that area. +?C. How to set P bit)
)or e=ample, you have a R( learned route 1.1.1.F:/ that is inEected into the $%() 4%%A Area. Lou do not want this route to be leaked into the rest rest of the $%() areas. Hse the below conguration on the 4%%A A%6R in order to accomplish this9 router ospf 1 summary0address 1.1.1.F /88./88./88.F not0advertise This conguration generates a type ? *%A that is not translated into type 8 by the 4%%A A6R. +@F. Wh& do we use route reBector) A route re"ector -RR is a network routing component. t o5ers an alternative to the logical full0mesh re
http9::computernetworkingnotes.com:cisco0devices0administration0and0conguration:router0booting0process.html Router is powered on. (ower on self test -($%T is performed to check hardware components including memory and interfaces. 6ootstrap program is loaded and e=ecuted. 6ootstrap reads conguration register value to determine how the router will boot up. &epending on the value of conguration register, bootstrap program nds and loads the $% image. f bootstrap fails to load $% from all possible locations it will drop boot se
4ote9 The redistribution of internal 6order Oateway (rotocol -i6O( routes into an nterior Oateway (rotocol can cause routing loops within the Autonomous %ystem -A%. This is not recommended. Route lters need to be set in order to control the information, which is imported into the O(. http9::routingnullF.com:/F1:1F:F>:hour08>F0solving0redistribution0loops: +@. Wh& hello of ospf cannot travel more than one hop) 2ertain $%() packets take the form of ( multicast datagrams. %upport for receiving and sending ( multicast datagrams, along with the appropriate lower0level lower0level protocol support, is re -all %():link state routers, also known as All%()Routers and //.F.F.> for (v or ))F/99> for (v> -all &esignated Routers, All&Routers, as specied in R)2 /+/@ and R)2 8+F. +@8. Which la&er protocol is '2P) Q it i s application la&er protocol t rides over our e=isting T2(:( structure, Gence 6O( is a Application layer (rotocol. And both 6O( and R( are application layer protocols using T2( 1?C and H&( 8/F respectively for communication. $%() and OR( are network layer protocols using protocol number @C and @@ respectively for communication. +@>. #isco I5" image format) c?/FF0EkCo+s0m7.1//01>.bin +@?. What is PI4 + I24P. +@@. What is +2 and s+2) +@C. In 4P" what is penultimate hop) +CF. 3fter the initial e;change of D'D packets after neighbourship formation+ how often does the D'D e;change happens) if an& new network i s sa& added to the DR5,H7R router for e ;ample+ how does it initiate the further advertisements) &6&s are used between the master and slave devices to start building the topology table. ach &6& packet has a se
+C. #an we use port fast on trunk ports) yes +C8. #an we use bpdu*guard on trunk ports) +C>. #an we use bpdu*(lter on trunk ports) +C?. In which address the neighbours repl& for the hello packet sent b& the source router to form ad?acenc&) Ans9 //.F.F.> +C@. "3ckC *%Ack packet will be send as an Ack only for the following packet packet types 0U &atabase &escription 0U *ink0%tate Re@.1.1 %ecurity gateway!s internal ( address is 1F.1.1.1 The desired desired %tatic 4AT 4AT ( address address is 1C/.1>@.1./F 1C/.1>@.1./F The internal internal host to be translated translated is 1F.1.1./F 1F.1.1./F Hse the following command9 route add 0host 1C/.1>@.1./F gw 1F.1.1./F or route add 1C/.1>@.1./F gw 1F.1.1./F
Alternately, the static routes can be entered in the :etc:syscong: static0routes le in this format9 eth1 net 1C/.1>@.1./F netmask /88./88./88./88 gw 1F.1.1./F where eth1 is the gateway!s internal interface. The :etc:syscong:static :etc:syscong:static0routes 0routes le will be parsed by *inu= kernel kernel at at startup. To To verify that route was added added successfully, successfully, check the routing routing table by running running netstat netstat Nrn F. What is the ma;imum ,, value) /88 F8. How traceroute works) F>. How routing works) (re= Ad metric F?. packet format in case of wireshark) Arp re QQQQQQ host- <0.0.!.-6-9> 'ill communication happens 2ommunication will not happen since both host are in di5erent network ie di5erent broadcast domains. Apr re and H&( 1? 1F. What is ",P ) e;plain b& scenario 2reate triangle topology and e=plain 11. What is etherchannel and usecases. *ink aggregation technology 1/. host ***switch vlan access vlan010 ***************switch***************switch- ***host'ill communication happens W 4o both ports should be assigned as trunk. 1+. What is ,P and how it works. 1/. What should be &our trouble shooting approach when two routers are not forming neighborship in case of ospf. %tart from */ and go up in $% model 1+. How dhcp works. What are the steps involved in case of dhcp) =plain the process 1/. what is =3, and how it works) 1+. what happens if one of the link goes down incase of etherchannel) 1. What are 3D for all routing protocols) 18. What is 2R7 and wh& is it re%uired) Oeneric Routing ncapsulation -OR is a protocol that encapsulates packets in order to route other protocols over ( networks. OR enables a wrapper to be placed around a packet during transmission of the data. A receiving OR removes the wrapper, enabling the original packet to be processed by the receiving stack. Advantages of OR tunnels include the following9 V OR tunnels connect discontinuous sub0networks. V OR tunnels allow I(4s across wide area networks -'A4s. V OR tunnels encase multiple protocols over a single0protocol backbone. V OR tunnels provide workarounds for networks with limited hops.
1>. use of tail f 4AB tail 0 output the last part of les %L4$(%% tail ]$(T$4^... ])*^... &%2R(T$4 (rint the last 1F lines of each )* to standard output. 'ith more than one )*, precede each with a header giving the le name. 'ith no )*, or when )* is 0, read standard input. Bandatory arguments to long options are mandatory for short options too.
00retry keep trying to open a le even if it is inaccessible when tail starts or if it becomes inaccessible laterJ useful when following by name, i.e., with 00followSname 0c, 00bytesS4 output the last 4 bytes 0f, 00follow]Snamedescriptor^ 00follow]Sname descriptor^ output appended data as the le growsJ 0f, 00follow, and 00followSdescriptor 00followSdescript or are e
same as 00followSname 00retry
0n, 00linesS4 output the last 4 lines, instead of the last 1F
00ma=0unchanged0statsS4 with 00followSname, reopen a )* which has not changed si7e after 4 -default 8 iterations to see if it has been unlinked or renamed -this is the usual case of rotated log les
00pidS(& with 0f, terminate after process &, (& dies 0<, 00
00version output version information and e=it
f the rst character of 4 -the number of bytes or lines is a Z, print beginning with the 4th item from the start of each le, otherwise, print the last 4 items in the le. 4 may have a multiplier suK=9 b 81/, k 1F/, m 1F/V1F/. 'ith 00follow -0f, tail defaults to following the le descriptor, which means that even if a tailed le is renamed, renamed, tail will continue to track its end. This default behavior is not desir0 able when you really want to track the actual name of the le, not the le descriptor -e.g., log rotation. Hse 00followSname in that case. That causes tail to track the named le by reopen0 ing it periodically to see if it has been removed and recreated by some other program. 1?. what are dierent ls command. 7;plain 4AB ls 0 list directory contents %L4$(%% ls ]$(T$4^... ])*^... &%2R(T$4 *ist information about the )*s -the current directory by default. %ort entries alphabetically if none of 0cftuv%H nor 00sort. Bandatory arguments to long options are mandatory for short options too. 0a, 00all do not ignore entries starting with . 0A, 00almost0all do not list implied . and ..
00author with 0l, print the author of each le 0b, 00escape print octal escapes for nongraphic characters
00block0si7eS%q use %q0byte blocks 06, 00ignore0backups do not list implied entries ending with
0c with 0lt9 sort by, and show, ctime -time of last modication of le status information with 0l9 show ctime and sort by name otherwise9 sort by ctime 02
list entries by columns
00color]S'G4^ control whether color is used to distinguish le types. 'G4 may be never, always, or auto 0d, 00directory list directory entries instead of contents, and do not dereference symbolic links 0&, 00dired generate output designed for macs dired mode
1@. check for scale topolog& 1C. How &ou verif& customer scenario in "pirent . /F. How to anal&$e captured network data in wireshark . http9::www.uni=arena.com:/F1+:F>:wireshark0how0to0analyse0captured.html http9::tcpipguru.com:wireshark0interview0
/>. How to create sub interfaces in inu; or host) 2reate sub interfaces on 2ent$% and Redhat %ub interfaces or virtual interfaces are used for a number of reasons. 4ormally for I*A4s, but also if you want your machine to have multiple ( addresses. This is relatively relatively straight straight forward forward to do. do. t can be done from the command line like this9 ifcong ethF91 1C/.1>@.111.1 The above above command has Eust created created a virtual virtual : sub interface interface on ethF called called ethF91 and assigned it the ( 1C/.1>@.111.1 1C/.1>@.111.1 This however however is not a permanent permanent solution solution because because when you reboot, reboot, this interface interface will be be lost. To make make it permanent permanent we need need to create a le in :etc:syscong:network0scripts: called ifcfg0ethF91 &I2SethF91 6$$T(R$T$Snone G'A&&RSFF91>91?9CF9a8918 $4(AR4TSyes (A&&RS1C/.1>@.111.1 4TBA%PS/88./88./88.F TL(Sthernet TL(Sthernet Iery similar to ifcfg0ethF but note there is no default gateway set. Always remove the gateway line from the cfg le you will inevitably copy to create this. The BA2 BA2 or Gardware Gardware address address must must also match match the parent parent interface. interface. f you need more than one virtual : sub interface, simply create more cong les. To To bring an an interface up after creating the cong le use9 ifup ethF91 /?. '2P is unicast or multicast. t is possible to congure 6O( peers that e=change both unicast and multicast network layer reachability information -4*R, but you cannot connect multiprotocol 6O( clouds with a 6O( cloud. That is, you cannot redistribute multiprotocol 6O( routes into 6O(.
/@. Is one to one mapping happens between D=s name and ip address. A name server is used to keep track of information associated with domain names. A name server can maintain a database of hostname0to0address mappings. ach name can map to one or more ( addresses. n order to use this service to map domain names to ( addresses, you must specify a name server. The name lookup lookup system can can be statically statically congured congured using the the commands commands described described in this task. task. %ome other other functions functions in 2isco $% software, such as &G2(, can dynamically modify the state of the name lookup system. Hse the show hosts command to display the cached hostnames and the &4% conguration. /C. #an we assign ipv9 and ipvE address to same client. Les we can. f we see our windows we can see link local ipv> address as well as ipv address. &ual stack it is possible. 6ut dhcpv> server and dhcpv server will be di5erent. +F. R0 <0:11>******************* <0:11>***************************** ***************<0111>r*****<0111>rGow R1 will know it has to do fragmentationW Btu si7e e=change will happen between the neighbors in *1 +1. pc ***switch ******R0 *******R-*****switch***P#*******R-*****switch***P#=palin Arp, ping and traceroute +/. pc0 *****R0*********R-**** *****R0*********R-*******pc***pc%tatic route is congured on R1 to reach pc/. 'ill ping happensW (ing will not be successful since pc1 knows to reach the pc1 and pc/ doesn’t know how to reach pc1. ++. What are dierent Bags in Ip header other than 4F and DF. DF. Reserved , &) and B) +. 3rea concept in ospf) 'e can have area 1 and area / without area F. 2heck what all route will be there in this scenario.
2heck what all lsa’s will be present on each router. +8. where e;actl& vlan tag is placed in 7thernet header)
+>. what is dierence in 1-.0% and 1-.0p The @F/.1p is a signalling signalling techni
(riority + bits led is know as @F/.1p and total byte is @F/.1< Kualit& of "ervice
3o% is a mechanism that allows for better handling of data that passes over a network. There are two maEor types of 3uality of %ervice -3o% techni
The @F/.1p sets a +0bit +0bit value in the the BA2 header header to indicate prioriti7atio prioriti7ation. n. This +0bit +0bit value provides provides priority priority levels levels ranging from from F to ? -i.e., a total of @ levels, with level ? representing the highest priority. This permits packets to cluster and form di5erent traKc classes. Thus, when network congestion occurs, those packets that have higher priorities will receive preferential treatment while low priority packets will be kept on hold. @F/.1p is not backward compatible and can lead to instability on networks with non0@F/.1p switches. This is because older switches will misinterpret the header used by the @F/.1p protocol. t is important that the switches, thernet cards, and device drivers are all @F/.1p compatible. +?. Will destination and source mac address will change for ospf and bgp) Les Les there will be change change in source and and destination destination mac address address as as mac addresses addresses are are di5erent di5erent for 6Op and ospf. ospf. +@. O%R architectureW +C. How ingress to egress communication happens in 2"R) *ine cards perform packet forwarding. ach *2 uses &2) tables to look up destination addresses. 0:11********************0111R-0:11******* *0111R-0:11***************0111R! ********0111R! F. R0 0:11******************* Gow packet will "ow hereW R1 will fragement data into 1FFF and 8FF and both will pass through R/ and reassembly happens at R+.
1. Dierence in routing RI' and FI' table. R6s maintain the network topologies and routing tables for each protocol. This would include many routes going to the same destination pre=. )6s are the best route from the possibly many protocols in the R6s pushed down to fast forwarding lookup memory for the best path-s.
/. What is =on stop forwarding ) Already covered. +. How about vpn and (rewall concepts) . What is tcp s&nc attack) A sender transmits a volume of connections that cannot be completed. This causes the connection .How I#4P Redirect 4essages Work) 2B( redirect messages are used by routers to notify the hosts on the data link that a better route is available for a particular destination. )or e=ample, the two routers R1 and R/ are connected to the same thernet segment as Gost G. The default gateway for Gost G is congured to use router R1. Gost G sends a packet to router R1 to reach the destination on Remote 6ranch oKce Gost 1F.1.1.1. Router R1, after it consults its routing table, nds that the ne=t0hop to reach Gost 1F.1.1.1 is router R/. 4ow router R1 must forward the packet out the same thernet interface on which it was received. Router R1 forwards the packet to router R/ and also sends an 2B( redirect message to Gost G. This informs the host that the best route to reach Gost 1F.1.1.1 is by way of router R/. Gost G then forwards all the subse
This debug debug message shows router router R1, as as in the network network diagram, diagram, sending sending an 2B( 2B( redirect redirect message to Gost G -1?/.1>.1.1. -1?/.1>.1.1. R1 debug ip icmp 2B( packet debugging is on VBar 1@ F>9/@989 2B(9redirect sent to 1?/.1>.1.1 for dest 1F.1.1.1, use gw 1?/.1>.1./FF R1 Router R1 -1?/.1>.1.1FF sends a redirect to Gost G -1?/.1>.1.1 to use router R/ -1?/.1>.1./FF as the gateway to reach the destination destination 1F.1.1.1. 'hen Are 2B( Redirects %entW 2isco routers send 2B( redirects when all of these conditions are met9 The interface interface on which which the packet packet comes comes into the router is the same interface on which the packet packet gets routed routed out. The subnet subnet or network network of the source source ( ( address address is on the same subnet subnet or network network of the ne=t0hop ne=t0hop ( address address of of the routed routed packet. The datagram datagram is not not source0routed. source0routed. The kernel kernel is is congured congured to send redirects. redirects. -6y -6y default, 2isco 2isco routers routers send 2B( 2B( redirects. redirects. The The interface interface subcommand subcommand no ip redirects can be used to disable 2B( redirects.
4ote9 2B( redirects are disabled by default if Got %tandby Router (rotocol -G%R( is congured on the interface. n 2isco $% %oftware Release 1/.1-+T and later, 2B( Redirect is allowed to be enabled on interfaces congured with G%R(. )or more information, refer to G%R( %upport for 2B( Redirects section of Got %tandby Router (rotocol )eatures and )unctionality. )or e=ample, if a router has two ( addresses on one of its interfaces9 interface ethernet F ip address 1?1.>@.1?C.1 1?1.>@.1?C .1 /88./88./88.F /88./88./8 8.F ip address address 1?1.>@./8.1 /88./88./88.F secondary f the router receives a packet that is sourced from a host in the subnet 1?1.>@.1?C.F and destined to a host in the subnet 1?1.>@./8.F, the router does not send an 2B( redirect because only the rst condition is met, not the second. The original original packet packet for which which the router router sends a redirect redirect still gets routed to the correct correct destination. destination. ?. looping in dierent la&er) @. what is inter frame gap and which la&er it belongs to) Wh& frame pa&load si$e is in range of 9E*0:11. nterpacket gap is idle time between packets. After a packet has been sent, transmitters are re bits -1/ octets of idle line state before transmitting the ne=t packet. There is an obvious obvious reason reason why the frame payload payload si7e was was chosen to be 18FF bytes. bytes. A frame frame si7e of 18FF 18FF bytes, o5ers, o5ers, ma=imum eKciency or throughput. As you know, ethernet frame has @ byte preamble, > byte source and > byte destination mac address, mac type of / bytes, and bytes 2R2. Assuming the BTH payload to be 18FF the total number of bytes comes to 18FF Z @ Z > Z > Z / Z S 18/> bytes. 4ow between each frame there is a inter frame gap of 1/ bytes which constitues C.>micro seconds gap between each frame. This is essential so that frames dont mi= up. %o the total si7e of each frame going out of a host is 18+@ bytes. %o at 1F Bbps rate, the frame rate is 1F Bbps : 18+@ bytes S @1/.? frames : second. 4ow we can nd the throughput or eKciency of link, to transmit 18FF bytes of payload. by multiplying the frame rate with the number of bytes of the payload. %o eKciency S @1/.? V 18FF V @ S C?8/C/8.===== bps which is C?.8 percent eKcient - comparing with 1F B6ps guess have gone too much with mathematics of thernet, but the interesting thing to notice is that, as the number of bytes in the payload increases, the frame rate is decreasing. %ee that for an BTH of 18FF bytes on payload, the frame rate has reduced to @1/ frames per second. f you increase it above 18FF, frame rate would become less than @1/. Also there is a minimum limit for the BTH which is actually > bytes. f you calculate the si7e of the frame for a > byte payload it would come to 1/Z@Z>Z>Z/Z>Z S @ bytes. 4ow calculating the frame rate we get it as S 1Fmbps: -@ V @ bytes S 1@@F frames per second. 'e could have gone to a frame si7e even lesser than this, which could increase the frame rate even more, but guess during those times, when made the standards, the routers didnt have that much frame forwarding capability. %o think due to above reasons, and considering ma=imum eKciency, would have =ed the min and ma= si7e of payload as > bytes and 18FF bytes. C. Dierence in performance and scalabilit& testing) (erformance testing is the process of determining the speed or e5ectiveness of a computer, network, software program or device. This process can involve
1. what is throughput and latenc& ) 6andwidth commonly measured in bits:second is the ma=imum rate that information can be transferred Throughput Throughput is the actual rate that information information is transferre transferred d
*atency the delay between the sender and the receiver decoding it, this is mainly a function of the signals travel time, and processing time at any nodes the information traverses #itter variation variation in the the time of arrival arrival at the the receiver receiver of the informatio information n rror rate the number of corrupted bits e=pressed as a percentage or fraction of the total sent /. =ame -.: la&er protocol. B(*% +. defect logged b& &ou in 2"R. 2%2t1?// %ymptom9 A 2isco switch may reload when congured for %4B(. 2onditions9 This symptom is observed when %4B( is congured. 'orkaround9 There is no workaround. . blackhole in networking) n networking, black holes refer to places in the network where incoming or outgoing traKc is silently discarded -or MdroppedM, without informing the source that the data did not reach its intended recipient. 'hen e=amining the topology of the network, the black holes themselves are invisible, and can only be detected by monitoring the lost traKcJ hence the name. &ead addresses]edit^ The most common common form form of black hole is simply simply an ( address address that species species a host machine machine that that is not running running or an address address to which no host has been assigned. ven though T2(:( provides means of communicating the delivery failure back to the sender via 2B(, traKc destined for such addresses is often Eust dropped. 4ote that a dead address will be undetectable only to protocols that are both connectionless and unreliable -e.g., H&(. 2onnection0oriented or reliable protocols -T2(, RH&( will either fail to connect to a dead address or will fail to receive e=pected acknowledgements. )irewalls and MstealthM ports]edit^ Bost rewalls can be congured to silently discard packets addressed to forbidden hosts or ports, resulting in small or large Mblack holesM in the network. (ersonal rewalls that do not respond to 2B( echo re. what are all '2P mandator& attributes) As path and ne=t hop ?. what is pro;& arp) @. How priorit& is set in la&er ! ) 'ith dscp C. check dierent mtu si$e scenario in ",#) 8F. H and , calculation in IP) 81. 3RP table entries) p to mac address mapping. $nly directly connected interfaces information will be present in arp cache. 8/. What &ou want to be ) want to see myself as a network specialist. 8+. What is socket) A network socket is an endpoint of an inter0process communication "ow across a computer network. Today, most communication between computers is based on the nternet (rotocolJ therefore most network sockets are nternet sockets. A socket address is the combination of an ( address and a port number, much like one end of a telephone connection is the combination of a phone number and a particular e=tension. 6ased on this address, internet sockets deliver incoming data packets to the appropriate application process or thread. 8. do &ou have an& e;perience in customer actual deplo&ment network) 4o 88. Dierence in local pref and 47D) *ocal pref is used within A% between 6O( and B& is used between peers in di5erent A%. 8>. How confederation works in '2P)
8?. How blackhole is avoided in I2P) n networking, black holes refer to places in the network where incoming or outgoing traKc is silently discarded -or MdroppedM, without informing the source that the data did not reach its intended recipient. 'hen e=amining the topology of the network, the black holes themselves are invisible, and can only be detected by monitoring the lost traKcJ hence the name. &ead addresses]edit^ The most common common form form of black hole is simply simply an ( address address that species species a host machine machine that that is not running running or an address address to which no host has been assigned. ven though T2(:( provides means of communicating the delivery failure back to the sender via 2B(, traKc destined for such addresses is often Eust dropped. 4ote that a dead address will be undetectable only to protocols that are both connectionless and unreliable -e.g., H&(. 2onnection0oriented or reliable protocols -T2(, RH&( will either fail to connect to a dead address or will fail to receive e=pected acknowledgements. )irewalls and MstealthM ports]edit^ Bost rewalls can be congured to silently discard packets addressed to forbidden hosts or ports, resulting in small or large Mblack holesM in the network. (ersonal rewalls that do not respond to 2B( echo re
8@. ping is which la&er protocol) (ing is *+ protocol. 8C. what is performance testing) Gow much time the application is taking to perform a task. Types Types of performance performance testing. 0*oad testing 0%tress testing 0Iolume 0Iolume testing tes ting 0%ecurity testing-authentication, access control. encryption >F. (nd e;pression nd . Nname QV.tcl Nprint nd . Nsi7e 1FFFc nd . Nsi7e Z 1FFFc nd . Nsi7e 01FFFc >1. what are dierent t&pes of software testing methodologies) Hnit test )unctional test ntegration test %moke test Acceptance test %ystem test Regression test
>/. 7;plain tcp s&nc Booding. T2( ntercept ntercept is designed designed to prevent prevent a %L4 %L4 "ooding &enial of of %ervice attack attack by tracking, tracking, optionally optionally intercepting intercepting and and validating validating T2( connection connection re
Gowever, since these messages have invalid return addresses, the connections can never be established. The resulting volume of unresolved open connections eventually overwhelms the server and can cause it to deny service to valid re+. What is a (rewall) Wh& do I want one) )irewalls are used to build trusted perimeters around information and services. Lour Lour nternet nternet security solution must must be able to allow employees employees to access nternet nternet resource resources, s, while keeping keeping out out unauthori7ed unauthori7ed traKc. The most common way of protecting the internal network is by using a rewall between the intranet and the nternet. >. What is Ipsec) (%ec provides ( network0layer encryption. (%ec is a standards0based technology that governs security management in ( environments. $riginally conceived to solve scalable security issues in the nternet, (%ec establishes a standard that lets hardware and software products from many vendors interoperate more smoothly to create end0to0end security. (%ec provides a standard way to e=change public cryptography keys, specify an encryption method -e.g., data encryption standard -&% or R2, and specify which parts of packet headers are encrypted. >8. In 7thernet network in ospf . Does DR and 'DR election happens) f two routers are connected by thernet and point to point network is not dened , &R election will happen. >>. 'hat happens in all ? layers of $% model if type www.google.com www.google.com or or any other linkW 'hat do these layers doW >?. &ata ncryption %tandard -&% weakness and strength. The &ata ncryption %tandard %tandard -&% is a symmetric key key block cipher cipher which which takes takes >0bit plainte=t plainte=t and 8>0bit key key as an input input and produces >0bit cipher te=t as output. The &% function is made up of ( and %0bo=es. (0bo=es transpose bits and %0bo=es substitute bits to generate a cipher. %trength0 The strength of &% lies on two facts9 The use of of 8>0bit keys9 keys9 8>0bit key key is used in encryption, encryption, there there are /8> /8> possible keys. A brute force force attack on on such number number of keys is impractical. The nature nature of algorithm9 algorithm9 2ryptanalyst 2ryptanalyst can perform perform cryptanalys cryptanalysis is by e=ploiting e=ploiting the characteris characteristic tic of &% algorithm algorithm but but no one has succeeded in nding out the weakness. 'eakness0 'eakness has been found in the design of the cipher9 Two Two chosen chosen input to an an %0bo= %0bo= can create create the same same output. The purpose purpose of initial initial and nal nal permutation permutation is not not clear. clear. >@. f you are a victim of &enial of %ervice -&os then what you doW The function function of a denial denial of service service attack attack is to "ood "ood its target machine with with too much much traKc and and prevents prevents it from being accessible to any other reC. 'hat are the main hops is consider as unreachable. Gence if a router receives a routing update that contains a higher0cost path but have lower hops than the packet will be transferred through that path
?+. Gow do you use R%A for both authentication and secrecyW R%A is a public key encryption algorithm. The R%A algorithms are based on the mathematical part that it is easy to nd and multiply large prime numbers together, but it is e=tremely diKcult to factor their product. )or authentication9 $ne can encrypt the hash -B&:%GA of the data with a private key. This is known as digital signature. )or %ecrecy9 %ecrecy:condentiality is achieved by encrypting the data with public key and decrypting with private key. ?. 2an you di5erentiate among encoding, encryption and hashingW ncoding9 6asically encoding is used to protect the integrity of data as it crosses through communication network to keep its original message upon arriving. t is primarily an insecure function because it is easily reversible. ncryption9 ncryption is basically designed for condentiality and data integrity and reversible only if you have the appropriate key. key. Gashing9 'ith hashing the operation is one0way i.e. non0reversible. t takes an input -or message’ and returns a =ed0si7e string, which is called the hash value. ?8. 'hat is Authentication Geader and how it provides the protection to ( headerW 6asically Authentication Geader protects ( header and provides the complete authenticity to the ( packets. AG may work in two ways9 transport mode and tunnel mode. n tunnel modeJ AG protects the ( header using two ( header layers inner and outer. nner ( header is used to contain the source and destination addresses, and the outer ( header is used to contain the security gateway information ?>. 'hat is I(4W A I(4 is a service that o5ers secure, reliable connectivity over a shared public network infrastructure such as the nternet. I(4s maintain the same security and management policies as a private network. They are the most cost e5ective method of establishing a virtual point0to0point connection between remote users and an enterprise customer!s network. ??. 'hat is Trusted and Hntrusted 4etworksW Trusted Trusted networks9 networks9 %uch 4etworks allow data data to be transferr transferred ed transparently transparently.. The machines machines using using a trusted network network are are usually administered by an Administrator to ensure that private and secured data is not leaked. Access to this network is limited. 2omputers using trusted networks are more secured and condential because of strong rewalls. Hntrusted networks9 %uch networks are usually administered by the owners. They can allow improper access to sensitive or personal data. These machines are usually separate. %uch machines could me more prone to attacks. ?@. n computer networking and telecommunications, a pseudowire -or pseudo0wire is an emulation of a point0to0point connection over a packet0switching network -(%4. The pseudowire pseudowire emulates the the operation operation of a Mtransparent Mtransparent wireM wireM carrying carrying the service, service, but it it is reali7ed reali7ed that this emulation emulation will rarely be perfect. The service being carried over the MwireM may be Asynchronous Transfer Bode -ATB, )rame Relay, thernet or time0division multiple=ing -T&B while the packet network may be Bulti0protocol *abel %witching -B(*%, nternet (rotocol -(v or (v>, or *ayer / Tunneling (rotocol Iersion + -*/T(v+. ?C. ,# 0. What What is the use use of upva upvar) r)
Hpvar 9 2reate link to variable in a di5erent stack frame. upvar simplies the implementation of call0by0name procedure calling and also makes it easier to implement Tcl procedures that are new control constructs -. How to to pass an arra& arra& to a proc proc )
Lou Lou will need need to use passing by referenc reference e to pass array array information information to a procedure procedure.. Array values values cannot cannot be passed passed as procedure arguments. Peyed lists should also be passed by reference t is not possible directly we need to use upvar . http9::stackover"ow.com:>:passing0arrays0to0functions0in0tcl0only0upvar http9::www.cab.u0s7eged.hu:local:doc:tcl.old:tcl)A3:part/:fa<0doc0/F.html http9::obEectmi=.com:tcl:??81F0passing0arrays0arguments0procedures.html proc show;array array4ame upvar array4ame myArray foreach element ]array names myArray^ puts stdout Marray4ame-elem Marray4ame-element ent S myArray-elementM myArray-element M set arval-F 7ero
set arval-1 one show;array arval or proc arr arr1 upvar arr1 arr/ set namelst ]array names arr/^ foreach val namelst puts Marr1-val S arr/-valM array set arr+ F hello 1 hi arr arr+ !. Write a program which verif& two two strings are anagram of each other . ie ball and lbal
http9::www.invece.org:tclwise:lists;and;strings.html set str1 ball set str/ labl set lst1 ]split str1 MM^ puts lst1 set lst/ ]split str/ MM^ puts lst/ set newstr1 ]lsort lst1^ puts newstr1 set newstr/ ]lsort lst/^ puts newstr/ set newstr1 ]Eoin newstr1 MM^ puts newstr1 set newstr/ ]Eoin newstr/ MM^ puts newstr/ set res ]string e
. Write a proc which will reverse a arra& ie value as inde; and inde; as value . g a-1 1F should be a-1F 1 http9::pleac.sourceforge.net:pleac;tcl:arrays.html http9::stackover"ow.com::how0to0reverse0an0array0in0tcl array set A 1 1F / /F + +F F 8 8F set lst ]array get A^ puts lst set newlst ]lreverse lst^ puts newlst array set 6 newlst puts ]array get 6^ puts ]parray 6^
number long . Write a rege;p which will take block of 8. Input is O91111111111111111111. It can be an& number nos from given number and print the values in separate variables . set num M1/8+/+8@+/M regsub 0all -.. num 1 var puts var
or set str MFawdFCCCCM set i 1 while ]string length str^ U 1 rege=p 0nocase ]F0Ca07^]F0Ca07^ ]F0Ca07^] F0Ca07^ str match set stri match regsub match str MM str incr i if ]string length str^ SS 1 set stri str puts Mstr1 str/ str+ str str8 str>M
or ` set data MasdhlakEfsdh"1/+1/M asdhlakEfsdh"1/+1/ ` set vers ]rege=p 0all 0inline .1,/ data^ as dh la kE fs dh " 1/ +1 / set i F foreach num lst set var-i num puts var-i incr i http9::wiki.tcl.tk:1CC http9::ingu7a.com:document:e=pect0and0tcl0mini0reference0manual
E. 2iven is O =awra? ekhak kumar kumar ?agdish . If given input is two values print 0st and -nd names. If input st values is ! or 9 print 0 + -nd and !rd name.
set lst ]list nawraE kumar lekhak dutt^ set len ]llength lst^ puts len if len SS len SS + puts ]lrange lst F /^ elseif len SS / puts ]lrange lst F 1^ else puts Minvalid lengthM http9::7etcode.com:lang:tcl:lists:
@. Write a rege;p which will match all valid ip addresses in a (le.
set ip M1.F.F.FM rege=p rege=p -]10C^]10C^]F0C^1]F0C^]F0C^/ -]10C^]10C^]F0C^1]F0C^]F0C^/]F0^]F0C^/8]F ]F0^]F0C^/8]F08^.-]F0C^]10C 08^.-]F0C^]10C^]F0C^1]F0C^]F0 ^]F0C^1]F0C^]F0C^/]F0^]F0C^/8 C^/]F0^]F0C^/8]F08^.-]F0C^]10 ]F08^.-]F0C^]10C^]F0 C^]F0 C^1]F0C^]F0C^/]F0^]F0C^/8 C^1]F0C^]F0C^/]F0^]F0C^/8]F08^.-]F0C^]10C ]F08^.-]F0C^]10C^]F0C^1]F0C^]F0 ^]F0C^1]F0C^]F0C^/]F0^]F0C^/ C^/]F0^]F0C^/8]F0^ 8]F0^ ip var puts var if ]string e
catch puts b err puts err or (uts Q hello 2atch puts a m (uts Qname $uput will be 9 Gello 1 and variable is not dened. 4ame. $r catch is used to change the actions produced by errors =ample9 if ]catch set foobar errmsg^ puts Qthe message output9 errmsg
Bay take up to two arguments9 A command block to e=ecute. An optional variable to store error messages within. Returns9 1 if an error has been caught. F otherwise. . Rege; ege;p p
http9::docs.activestate.com:activetcl:@.8:e=pectwin:rege=.html 01. 01.
How How can can I cre creat ate6 e6us use e asso associ ciat atio ion n list lists s or prop proper ert& t& lis lists ts) ) Hse arrays or =tended Tcl keyed lists. )or e=ample, if you did a9
keylset tty)ields tty4ame tty1a keylset tty)ields baudRate 8?>FF keylset tty)ields parity strip And then an echo tty)ields, you!d get9 tty4ame tty1a baudRate 8?>FF parity strip $r using arrays9 set tty)ields-tty4ame tty)ields-tty4 ame tty1a set tty)ields-baudRate 8?>FF set tty)ields-parity strip 00. Write Write a proc proc to increm increment ent the ip b& b& the the given given no. of time times. s. ,he ,he incr increme emented nted IPs should should be a valid valid one.
proc generate;ips start;ip number;of;ips rege=p -]F0C^Z.-]F0C^Z.-]F0C^Z.-]F0 -]F0C^Z.-]F0C^Z.-]F0C^Z.-]F0C^Z C^Z start;ip start;ip 0 oct1 oct/ oct/ oct+ oct set ip;list MM while ]llength ip;list^ j number;of;ips for oct jS /8 incr oct lappend ip;list Moct1.oct/.oct+.oct Moct1.oct/ .oct+.octM M
if ]llength ip;list^ SS number;of;ips break if oct SS /88 set oct F incr oct+ if oct+ SS /8> set oct+ F incr oct/ if oct/ SS /8> set oct/ F incr oct1 if oct1 SS /8> break
return ip;list 0-. What What are are the dieren dierentt wa&s wa&s to to initia initiali$e li$e a varia variable ble.. How How to diere dierenti ntiate ate glob global al and and local local variab variables les++ e;plain it through a simple tcl program. 0!.
#reate #reate a list of week week da&s da&s and and prin printt the the (rst (rst and last last chara characte cterr of of each each da& da& usin using g foreac foreach h comm command and set lst sunday monday tuesday wednesday thursday friday saturday foreach day lst set out M]string inde= day F^]string inde= day end^ M append newlst MoutM puts newlst
09. #an &ou &ou writ write e a smal smalll progra program m to verif& verif& the given given input input is is (le (le or direc director tor& &. 'efore 'efore checki checking+ ng+ ?ust ?ust ensure that the (le6dir e;ists or not in the given path. If the given input is a (le+ (ndout the si$e and verif& that the (le has all read +write and e;ecute permission.
0:. 0:.
How How to incr increm emen entt eac each h elem elemen entt in in a lis listt ) set lst F + / 1F foreach num lst
incr num append newlst Mnum M puts newlst
0E. 0E.
Find Find ma;i ma;imu mum m num numbe berr in in the the give given n ! numb number ers s usi using ng tcl) tcl) set a 0+ set b / set c >
if a U b XX a U c puts Ma is the ma= numberM elseif b U a XX b U c puts Mb is ma=M else puts Mc is the ma= numberM 0@.
Write a script to di spla& how man& times each words appearing in a given string set str Mhello nawraE how are you. Gope you are neM set out ]lsearch 0all 0inline str MareM^ puts out set len ]llength out^ puts len
1@. Write a script to remove duplicates word in string set lst MThis issues the have is can be the most theM regsub 0all MtheM lst MM out puts out
0.
How can I p as as s an arra& into a p ro roc) Hse upvar rather than try to use global variables when possible. f the function is event driven, you are forced to use global variables.
print elements of an array proc show;array array4ame upvar array4ame myArray foreach element ]array names myArray^ puts stdout Marray4ame-eleme Marray4ame-element nt S myArray-elementM myArray-element M set arval-F 7ero set arval-1 one show;array arval To To return return an array array from a procedures, procedures, Eust take take the array array name in as an argument, argument, as above. above. Any changes changes you make in the array will be made in the parent!s array as well. =tended Tcl introduces a concept called keyed lists which are arrays made out of lists of key0value pairs and can be passed by value to routines, over networks, etc. -1. -1.
How How can can I del delet ete e a proc proced edur ure e fro from m wit withi hin n a scri script pt) ) Rename the procedure to have no name, for e=ample9 rename procedure4ame MM
-0. -0.
How How can can I us use var varia iabl bles es to hold old ar arra& ra& na names) es) ` set foo Mbar ba7M bar ba7 ` foreach aap foo set aap-1 MsomethingM can!t read Maap-1M9 variable isn!t array This means means Tcl Tcl tries to substitute the array array element element aap-1 which doesn!t doesn!t e=ist. To = this use9 use9
` foreach aap foo set ]set aap^-1 MsomethingM n this case two arrays bar and ba7 are created. An alternative format is9 ` foreach aap foo set aap-1 MsomethingM --. --.
scri script pt that that can can crea create te loop loopba back ck inte interf rfac aces es for for &ou. &ou.
The %cript %cript proc int;cong = for set n 1 njS= incr n 1 puts ] ios;cong Minterface *oopbacknM Mip address 1C/.1>@.n.1 /88./88./88.FM ^ int;cong + -!. -!.
9 wa wa&s to to pa pass an arg argum umen ents ts to pro procedu cedure re..
Pass b& value (roc sum a b %et num ]e=pr a Z b^ (uts QThe sum is9 num %um / + Pass b& name
Array set months 1 #an / )eb (array months $r (roc increase initial;apy change Hpvar initial;pay = )oreach item ]array names =^ %et =-item ]e=pr =-item Z change^ Array set (ay Ray %teve 8F )red /FF ncrease (ay /8 (array (ay Defaults
(roc myprocdefault (uts Qa b c Byprocdefault ariable arguments
(roc show a args (uts a foreach val args puts val %how 1 / + -9.
What is the use of upvar) The upvar upvar command links a local local variable variable with another variable variable -usually -usually global. global. Any change made to local variable will also change the global variable. The upvar upvar command allows you you to easily pass arrays arrays and arguments arguments into into procedures. procedures. %ynta= 9 upvar level target;variable link;variable
-:.
What is is th the us use of ret ur urn co command) The return return command command will return return a value from from procedure. procedure. (roc sum a b return ]e=pr a Z b^ %et num ]sum / +^ (uts QThe sum is9 num
-E. -E.
Die Diere rent nt wa&s wa&s of glob global al vari variab able le iden identi ti(c (cat atio ion n set var + proc glob global var puts Mthe value of variable is varM glob
or &eclaring global variable using double colon -99 (roc procF1 (uts QThe value of var1 is9 99var1 /?. 7;ample for call a procedure b& name and value . proc Gours weekly daily upvar weekly = foreach item ]array names =^ set =-item ]e=pr =-item Z daily^
array set Timecard Tom /F %ue / Bike 1@ puts MThis is the array before the procedure9M parray Timecard set res SHours ,imecard T puts Ures
-. -.
#reat #reate e a pro proce cedur dure e that that wil willl acce accept pt one one arg argum umen entt and and vari variab able le arg argum umen ents ts proc variable a args puts a foreach val args puts val variable 1 / + 8
$utput9 1 / + 8 -.
What is is e; e;ec co command us used for ) =ec command is used to e=ecute programs e=ternal to T2*. ` cd M29:(rogram )iles -=@>:'indows Bedia (layerM ` e=ec wmplayer.e=e test.wmv
!1.
What are special vari ab ab le les in ,# Argc 9 number of command line arguments ArgvF9 name of the script Argv9 list of command line arguments nv 9 env array is an array of environmental variables.
!0.
/se of source command) %ource command loads in a Tcl le and will e=ecute the commands contained within the le.
!-.
/se of package command) (ackage is similar to libraries e=cept that they re
!!.
/se of p ac ackage re%uire command) (ackage re
!9. !9.
What What are are the the poss possib ible le pack packag age e re%u re%uir ire e prob proble lem) m) %ay package A and package 6 both dene procedure name sum. f these two packages are loaded and each contains same proc name, then the last package loaded will dene the procedure, even it is di5erent from the rst procedure. %olution9 namespaces will help alleviate this problem
!:.
What is namespace) A namespace is a encapsulated collection of commands and variables to ensure that they won’t interfere with the commands and variables of other namespaces. A namespace is similar to a local variable within a proc. Tcl Tcl has always always had one one such collection, collection, which we refer as as the global global namespace. namespace.
Tcl Tcl supports supports many obEect0oriented obEect0oriented programming programming constructs, constructs, including including namespaces. namespaces. A namespace namespace is a collection of commands and variables. 4amespaces are very useful for avoiding name collisions. n addition, most Tcl packages create their own namespace to store their procedures and variables. !E.
=ame space e;ample. namespace eval test proc sum a b set num ]e=pr a Z b^ puts QThe sum is9 num Lou Lou can easily easily call a procedure procedure within within a namespace namespace from from another another namespace namespace by using the double colons -99 test99sum / +
namespace eval sample proc sum m n set res ]e=pr m Z n^ return res puts ]sample99sum / 8^
!@.
/se of catch command. 2atch command is use to handle e=ceptions within a script. 2atch command will gather an error condition and return the results rather than aborting the script. ` catch unset var result 1 ` puts result can!t unset MvarM9 no such variable `
!.
Pass an arra& to proc proc a1 a/ upvar a/ = foreach inde= ]array names =^ puts M=-inde= S =-inde=M
array set a F 1F 1 /F / +F a1 a !.
Rege;p to to ma match em email*id Rege=9 ]a07F0C;0^Z-.]a07F0C;0^ZV]a07F0C;0^Z-.]a07F0C;0^ZZ Batches9 E;smithfoo.com E.smithbc.canada.ca smithCCfoo.co.uk 1/+mydomain.net
&oesn!t Batch9 foo.com .smithfoo.net smith.foo.org www.myemail.com 91. 91.
4atc 4atch h the the prec prece eding ding VeV VeV e;ac e;actl tl& & twic twice. e. Rege=9 be/t Batches9 beet &oesn!t Batch9 bet beat eee
90. 90.
#onv #onver erti ting ng 'etw 'etwee een n 'ina inar& and Decim ecimal al proc dec/bin string binary scan ]binary format string^ 6+/ str return ]string trimleft str F^ dec/bin 8 SU 11F11F
proc bin/dec string set string ]format `F+/s string^ binary scan ]binary format 6+/ string^ str return str bin/dec 11F11F SU 8 9-.
"ort the arra&s ` set numsorted ]lsort 0real ]list +@ +@@.C 1.?@ /FF 1e?^^ 1.?@ +@ /FF +@@.C 1e? ` set descending ]lsort 0decreasing 0real ]list +@ +@@.? 1.8> /?C 1e>^^ 1e> +@@.? /?C +@ 1.8>
9!. 9!.
)ad >)addr dres ess s mat match ches es eith either er Oha Ohard rdwa ware re add addre ress ss or or Oad Oaddr dres ess s set add Mhardware addressM rege=p 00 -hardwareWaddress add print puts print This Eust print print address address
99. 99.
Write Write a scr script ipt tha thatt search searches es the the cont conten ents ts of a dir direc ecto tor& r& rec recurs ursiv ivel el& & for for a patt pattern ern )ind all the Tcl les in the current directory9 glob V.tcl )ind all the Tcl les in the user!s home directory, irrespective of what the current directory is9 glob 0directory V.tcl )ind all subdirectories of the current directory9 glob 0type d V )ind all les whose name contains an MaM, a MbM or the se
glob 0type f Va,b,cdeV 8. How unset command works . Hnset a variable, array element or entire array. unset a unset array-elf unset array 9E. 9E.
How How glo globa bal+ l+ upva upvarr and and uple uplev vel beha behave ves s in in ,# ,#) ) Iariables are local to the procedure unless MglobalM or MupvarM command is used, see below. f the last argument is named args all the remaining arguments are stored in this list. This way a procedure can have variable number of arguments. global global variablename variablename/ ... ndicate that the variable with name variablename is in the global scope. upvar upvar name1 a name/ b ... ndicate the that procedure can change data in the callers scope for argument name1 using the name a and name/ using name b, etc. Hse with care upvar name a set a 1 uplevel uplevel %imilar %imilar to to the upvar upvar comman command d but used to evalua evaluate te comman commands ds in the scope scope of the the callin calling g proced procedure ure.. Hse with care uplevel incr = ncrements the variable = in the calling procedure.
Hplevel 9 =ecute a script in a di5er ent stack frame. uple vel uplevel ]level ^ arg... 2oncatenate arguments and evaluate them in the stack frame conte=t indicated by level, wher e level is either a number indicating the number of levels up the stack relative to the current level or a number preceded by Q, indicating an absolute level. The default level is 1. 9@. 9@.
What What will will be the the for forma matt of of out outpu putt of of spl split it comm comman and d in ,#) ,#)
*ist 9. 9.
How How to to par parse se a lis listt and and retu return rn the the ind inde; e; of the the mat match ch) ) lsearch
9. 9.
tcl tcl scr scrip iptt to to e;t e;tra ract ct the the nos nos of warn warnin ing g and and erro errors rs) ) input9 == 9 %everity9 'arning $ccurrence9 / yy 9%everity9 rror $ccurrence9 / qq9%everity9 rror $ccurrence9 at the end want to have 'arnings S/ rror S>
program9 input le set fname Mtcluser1>.t=tM set input;le ]open fname MrM^ dene variables set nr;warns F set nr;errs F while ]gets input;le line^ S 01 try to e=tract 'arning $ccurrence set result ]rege=p ]'w^arningsZ.V9sV-]F0C^ ]'w^arningsZ.V9 sV-]F0C^Z Z line match num^ if result set nr;warns ]e=pr nr;warns Z num^ try to e=tract e=tract rror $ccurrence set result ]rege=p ]e^rrorsZ.V9s V-]F0C^Z V-]F0C^Z line match num^ if result set nr;errs ]e=pr nr;errs Z num^ print results puts M4umber of 'arnings9 nr;warnsM puts M4umber of rrors 9 nr;errsM close input le close input;le
:1. :1.
Find Find dupl duplic icat ate e (le (les s from from die diere rent nt dire direct ctor orie ies) s) set searcrhResults dir1:dir/:dir+:le1.tcl dir1:dir/:dir+ :le1.tcl dir1:dir+:le1.t cl dir1:dir/:le1.tcl dir1:dir/:dir+:le/.tcl dir1:dir/:dir+:l e/.tcl dir1:dir/:dir+:le+.tcl dir1:dir/:dir+:le+ .tcl dir1:dir+:le/.tcl dir1:dir+:le/. tcl dir1:le+.tcl dir1:le.tcl foreach le searcrhResults if ]catch incr lenames-]le tail le^,cnt^ set lenames-]le tail le^,cnt 1 lappend lenames-]le tail le^,paths ]le dirname le^
:0.
rege;p to to ma match be below pa pattern) set mystring M000000 some string 000000000M set result ]rege=p -0ZsV-]\0^VsV-0Z mystring match rst middle rest^ or rege=p 00 -\]0^Z-]a07^Zs]a07^Z-]0^Z pattern newstring rst middle end puts newstring puts rst puts middle puts en
:-.
how to return an arra& )
proc
get;mroute;acti ve Xmulticast upvar Xmulticast BH* BH*T2A%T T2A%T J set group 01 J set src 01 J set mcast;group;source;id 01 J set BH*T2A%T-mcast; BH* T2A%T-mcast;group;source;id,id group;source;id,id mcast;group;source;id J set BH*T2A%T-mcast; BH* T2A%T-mcast;group;source;id,mcast; group;source;id,mcast;group group group J set BH*T2A%T-mcast; BH* T2A%T-mcast;group;source;id,mcast; group;source;id,mcast;source source src J
puts ]array si7e BH* BH*T2A%T^ T2A%T^ J parray BH*T2A%T BH*T2A%T J array set
multicast J
get;mroute;active multicast puts ]array si7e multicast^ J parray multicast J :!. :!.
repl replac ace e a numb number er at the the end end of the the lin line e b& b& emp empt& t& stri string ng) ) set line Mnumber 1F@, then something other and at end number 1F@M puts MlineS!line!nM MlineS!line!nM
set result ]rege=p dZ line match^ puts MBatching ResultSresultM if result puts MThis was was matched9 matched9 !match!M regsub dZ line MM line puts Mresult after substitution9nlineS! substituti on9nlineS!line!nM line!nM or set me ]string range me F ]string last M M me^^ or set line Mnumber 1F@, then something other and at end number 1F@M regsub ]F0C^Z line newline puts newline :9.
how to split st string b& b& blank li li ne ne s) s) set a dfsfhdslkE set a ]split a MM^ puts a foreach val a puts Mval nM
::. ::.
pro program gram to coun countt th the rep repea eatt nu number mbers s in in the the (le nput9 #anuary FFF +FF /FF )ebruary /FFF 1FF F Barch FFF 8F 1F April FFF 1/F +FF Bay 1FFF 1FF F #une /FFF F F #uly FF 1 1
August FFF /FF 1FF %eptember /FFF 1FF /FF $ctober F F F Then the program program will write write to an output output le with with content #anuary FFF +FF /FF 1 )ebruary /FFF 1FF F 1 Barch FFF 8F 1F / April FFF 1/F +FF + Bay 1FFF 1FF F F #une /FFF F F / #uly FF 1 1 F August FFF /FF 1FF %eptember /FFF 1FF /FF + $ctober F F F F (rogram9 set l ]open Mtpham1FF/FF/.t=tM^ while ]eof l^ set line ]gets l^ set col/ ]linde= line 1^ if col/SMM if ]array get count col/^SSMM set count-col/ F incr count-col/ lappend line count-col/ puts line close l :E.
5 bt bt ai ai ni ni ng ng co computer na name us using ,# ,#) list all evironment variables foreach key ]lsort ]array names env^^ puts Mkey S env-keyM
puts MVVVVVVVVVVVVVVVVVVVVVVVM on 'indows there is variable 2$B(HTR4AB set computer;name env-2$B(HTR4AB puts Mcomputername S !computer;name!M check if variable e=ists then print it set var;name 2$B(HTR4AB if ]info e=ists env-var;name^ set var;value env-var;name puts Mvariable var;name found9 !var;value!M !var;value !M else puts Mvariable var;name was not found M :@.
, # # nu numeric tw two li list co comparision) set a ]list / 1 +^ set b ]list + 1 /^ set a1 ]lsort a^ puts a1 set b1 ]lsort b^ puts b1 if ]string e
:. :.
Find Find the the bigg bigges estt elem elemen entt from from the the list list) ) ` set numberlist 18 +F // ?8 8F F=+FA 18F 11F 18 +F // ?8 8F F=+FA 18F 11F ` set numberlist ]lsort 0integer numberlist^ 18 // +F 8F ?8 11F 18F F=+FA ` puts ]linde= numberlist end^ F=+FA `
:.
Dierent le levels of of pr procs in in tc tcl %et = 8J set y 8
J A second level proc 0 This will be called by one proc two y upvar 1 y 7 J tie the calling value to variable 7 upvar / = a J Tie variable = two levels up to to a puts Mtwo9 Mtwo9 q9 7 A9 A9 aM aM J $utpu $utputt the values, values, Eust to conr conrm m set 7 1J J %et 7, the passed variable to 1J set a /J J %et =, two layers up to /J J A rst level proc 0 This will be called by the global space code. proc one y upvar y 7 J This ties the calling value to variable 7 puts uts Mo Mone9 ne9 q9 q9 7M 7M J $utp utput tha thatt va value, ue, to to chec heck it it is is 8 two 7J J call proc two, which will change the value one yJ puts Mn9 = L9 yM
J 2all one, and output and L after the call.
$ut9 one9 q9 8 two9 q9 8 A9 8 9 / L9 1 E1. E1.
How How to to che check ck whet whethe herr a path path is rela relati tive ve or abso absolu lute te set fullpath M:usr:home:clif:T2*;%TH)):TclTutor:*sn.1?M set relativepath M2I%:ntriesM set directorypath M:usr:bin:M
set paths ]list fullpath relativepath directorypath^ foreach path paths set rst ]string ]string rst rst M:M path^J set last ]string ]string last last M:M path^J J Report whether path is absolute or relative if rst S F puts Mpath is a relative relative pathM else puts Mpath is an absolute pathM E0.
"ome rege;p and regsub sce na narios set str/ Mabc\defM rege=p M]\a0f^VdefM str/ match puts Musing ]\a0f^ the match is9 matchM
rege=p M]a0f\^VdefM str/ match puts Musing ]a0f\^ the match is9 matchM regsub \ str/ M is followed by9 M str+ puts Mstr/ with the \ substituted is9 Mstr+MM regsub M-]a0f^Z\-]a0f^ZM M-]a0f^Z\-]a0f^ZM str/ M/ follows 1M str+ puts Mstr/ is converted to Mstr+MM E-.
What What are are the the two two comma commadns dns that that provid provide e infor informat mation ion about about the the cont contents ents of dire directo ctories ries and (les) (les) There are two commands that provide provide information information about about the contents contents of directories directories and and the les les within those those directories. These two commands are glob and le. Olob provides the access to the names of les in a directory. t is similar to the ls shell command. )ile provides three sets of functionality in a platform independant manner9 1.access to le status. /.access to the le system. +.tools for manipulating lenames.
E!.
What ar are er errorInfo an and er error#ode ) errornfo errornfo is a global variable that contains the error information from commands that have failed. error2ode error2ode is a global variable that contains the error code from command that failed.
E9.
Regsub e;ample regsub 0all , Ma,b,c,d,eM M9M res puts res J prints Ma9b9c9d9eM Ma9b9c9d9e M
E:.
7 ;a ;ample for arra&s as p ar arameter proc print1/ array upvar array a puts Ma-1, a-/M
set array-1 MAM set array-/ M6M print1/ array EE.
File reading e;ample all problems found by !open! throw e=ceptions9 if ]catch set read;fh ]open Minput.t=tM MrM^ errmsg^ error MRR$R9 errmsgM errmsgM
read the le line0by0line9 while ]gets read;fh this;line^ S 01 ... or read the entire le into one string9 set le;contents ]read read;fh^ or read the ne=t 4 bytes into a string9 set ne=t;block ]read read;fh 1F/^ close read;fh E@.
File writing e;ample all problems found by !open! throw e=ceptions9 if ]catch set write;fh ]open Moutput.t=tM MwM^ errmsg^ error MRR$R9 errmsgM errmsgM
puts write;fh Mblah blah blahM need a catch on close, because that!s where most errors happen9 if ]catch close write;fh errmsg^ error MRR$R9 errmsgM errmsgM E.
,o ch check whether (l (l e is d ir ir or (l (le le isdirectory le isdirectory jpathU Returns whether or not the given path is a directory.
if ]le isdirectory MindirM^ ... le isle le isle jpathU Returns whether or not the given path is a regular le. if ]le isle Mmaybe;a;link.t=tM^ ... E. E.
What What will will this this scri script pt outp output ut when when it is eval evalua uate ted d set = 1 while = j 1F puts M9 =M =M set y ]e=pr ]e=pr = Z 1^ A an innite number of M9 1M lines. S 6 lines from from M9 1M to M9 CM 2 lines from M9 1M to M9 1FM
@1.
,he upvar command will A Bap a variable from the calling scope into the local procedure scope.S 6 Bap a variable from the local scope into the calling scope. 2 2opy the value of a variable from the calling scope to the local scope.
upvar ]level ^ otherIar myIar... Bake local variable myIar become an alias for variable otherIar in the stack frame indicated by level, where level is either a number indicating the number of levels up the stack relative to the current level or a number preceded by Q, indicating an absolute level. The default level is 1. Tcl’s Tcl’s upvar command is is another answer to coding indirect indirect variable variable refer refer ences. ences. Hpvar allows one to refer ence a variable or array by some other name. Hsing a rst argument of F allows variables in the current scope to be accessed. Hpvar is also used when passing arrays to procedures, in which the default procedure scope frame -1 is used9 proc calc;pop;density state;array;name
@0.
,he VglobalV command A maps a variable from the global scope into the procedure scope and gives it a uni
@-. @-.
What What will will be the the val value ue of i aft after er this this code code is eval evalua uate tedC dC proc inc nm upvar nm = incr = set i / inc i A 6 +S 2 /
?+. What will be the value of i after this code is evaluated 9 proc inc nm incr nm set i / inc i A + 6 /S 2 @9.
Rege;p and gl glob di dierence To To match any any number of of characters characters glob V rege=p .V
To To match single single character character glob W rege=p . )ind all the Tcl les in the current directory9 glob V.tcl @:. @:.
Whic Which h test test wou would ld ass assig ign n Vcho Vchoos ose e corr correc ectl tl&V &V to to var varia iabl ble e c) set str Mbetter tests choose correctlyM rege=p test str a b c set test -b]\c^V-c.V
@E. If &ou &ou use use a %uoted %uoted string string++ inste instead ad of of a curl&* curl&*bra braced ced string string as as a test test with with rege; rege;p. p. What What care care &ou &ou should take)
you must backslash escape s
What What wil willl be the the cont conten ents ts of of Vpa Vpath thV V aft after er thi this s lin line e of of cod code e is eval evalua uate ted. d. ` set path ]le split M29:(rogram )iles:Tcl:bin:tclshM^ 29: (rogram )iles Tcl bin tclsh
@. @.
What What wil willl the the con conte tent nts s of of Vfo Vfolde lderV rV be aft after er thi this s scr scrip iptt is eval evalua uated ted ` set folder ]le normali7e M:tmp:..:etc:passwdM^ O9:etc:passwd
@.
Wh& packages are created 'henever an application needs a library of related functions.
1. 1.
How How man& man& proc proced edur ure e a pack packa age can can incl includ ude. e. A package can include only one procedure.
@1./se of subst . t is used to perform multiple passes of substitution before evaluating a command. =ample is shown below. array set french #e speak parle7 )rench )rancais set language french foreach word speak )rench if ]info e=ists language-word^ puts 0nonewline M]subst language-word^ language- word^ M else puts 0nonewline Mword M $utput9 #e parle7 )rancais or subst 0 (erform backslash, command, and variable substitutions 'hen it performs its substitutions, subst does not give any special treatment to double
$utput9 =y7 @/.Program for Ping. foreach address 1.1.1.1 /./././ +.+.+.+ ... 8.8.8.8 >.>.>.> puts ] e=ec Mping addressM ^ @+. What is dierence between lappend and concat) ,he dierence is in the output . set list1 1 / + puts list1 set list/ a b c puts list/ set new ]lappend list1 list/^ puts new set lengthlist ]llength new^ puts lengthlist output 1/+ abc 1 / + a b c set list1 1 / + puts list1 set list/ a b c puts list/ set b ]concat list1 list/^ puts b set concatlength ]llength b^ puts concatlength output 1/+ abc 1/+abc > 9. 9.
Rege Rege;p ;p to (nd (nd and and prin printt a dupl duplic icat ate e wor word d in in a stri string ng set line Mhello sir how r u. Oood to see u sirM rege=p 0all %Z line new puts new
'ithin the R, %Z means a non0empty se
:.
7val e;ample set a b set c a eval puts c
E. E.
Writ Write e a scr scrip iptt to to dis displ pla a& the the vers versio ion n of of ,cl ,cl &ou &ou are are usin using g
puts ]info tclversion^ puts ]info patchlevel^
@. Write Write code code frag fragmen ments ts to to store+ store+ retr retriev ieve+ e+ and and displa displa& & &our &our (rst (rst++ middle middle++ and last last name name using using a single single string variable+ a single list variable+ a single arra& variable+ and a single ke&ed list variable
set name MnawraE lekhakM puts name set name ]list nawraE lekhak^ puts name puts ]linde= name F^
puts ]linde= name 1^ array set arrname nawraE lekhak puts MSS]array get arrname^M puts M]array names arrname^00M puts arrname-nawraE
. .
Write Write (ve (ve int intege egers rs into into a (le (le call called ed Om&( Om&(le le+ + then then clos close e the the (le. (le.
set fd ]open Mmyle.t=tM wZ^ set data M1 / + 8M puts fd data close fd
.
Read Read the the conte contents nts of Om&(le Om&(le from from e;erci e;ercise se 0. 0. #alcu #alculat late e and and displa displa& & the the sum sum of of the the integ integers. ers.
set fd1 ]open myle.t=t r^ set sum F foreach num ]read fd1^ set sum ]e=pr ]e=pr sum Z num^ puts sum
7;ercise 0
open a le for writing if ]catch set fd ]open myle w^ errmsg^ error MHnable to open le !myle! for writingnerrmsgM write 8 integers into the le puts fd M8 1F 18 /F /8M close the le close fd 7;ercise -
open the le myle’ for reading if ]catch set fd ]open myle^ errmsg^ error MHnable to open le !myle! for readingnerrmsgM read the contents of the le myle’ into a variable called nums’ then calculate and display the total of the integers while ]gets fd nums^ S 01 set sum F foreach num nums set sum ]e=pr num Z sum^ puts MThe sum is sum close the le close fd 7;ercise !
open the le for reading if ]catch set fd ]open myle^ errmsg^ error MHnable to open le !myle! for readingnerrmsgM read the contents of the le into a variable called !nums! while ]gets fd nums^ S 01 set sum F foreach num nums puts ]format M`/FdM num^ set sum ]e=pr num Z sum^ puts ]format MnTotal9 `1+dM sum^
1.
How to return st st at at us us from script)
package re
else keylset keylset ret*ist status F puts fail keylset ret*ist log res return ret*ist set out ]sum 1 /^ puts out
0. 0.
2et 2et tw two nu number mbers s fro from m us user inpu inputt and and do the the su sum.
29Hsers4*ekhakUtclsh puts Qnter the number "ush stdout ` set n1 ]gets stdin^ ` set n/ ]gets stdin^ ` set n+ ]e=pr n1 Z n/^ ` "ush stdout C/. Print below format V VV VVV VVVV set out MM set i 1 set pattern V while i j 8 append out Mpattern M puts out incr i $r set lst V V V V V V V set i F foreach val lst puts M]lrepeat ]incr i^ val^M C+. Write a Program to print half p&ramid as using numbers as shown in (gure below. 1 1/ 1/+ 1/+ 1/+8 set out MM set i 1 set pattern F while i j > append out M]incr pattern^ M puts out incr i 9. 9.
Writ Write e a # Pro Progr gram am to pri print nt tri trian angl gle e of of cha chara ract cter ers s as as belo below w
A 66 222 &&&& set lst A 6 2 & set i F foreach val lst set out ]lrepeat ]incr i^ val^ puts Mout M
C8. Write a # Program to print inverted half p&ramid using as shown below VVVVV VVVV VVV VV V set a V set i 8 for set i 8 i U F incr i 01 puts ]lrepeat i a^ :. :.
Write Write a # Prog Progra ram m to pri print nt inv inver erte ted d half half p&r p&ram amid id as as usin using g numb number ers s as sho shown wn bel below ow.. 1/+ 1/+ 1/ 1
set lst 1 / + 8 set len ]llength lst^ set i F while len U F set out ]lrange lst i ]e=pr len 0 1^^ puts out incr len 01 @. @.
Writ Write e a # prog progra ram m to to pri print nt p&ra p&rami mid d usi using ng fro from m mid middl dle. e.
. .
Write Write a # pro progr gram am to pri print nt the the p&ra p&rami mid d of of digi digits ts in in patt pattern ern as belo below w.
http9::www.programi7.com:c0programming:e=amples:pyramid0pattern
. .
3 prog progra ram m that that compu ompute tes s sum sum from rom 0 to n
proc sumto n set sum F for set i F i jS n incr i set sum ]e=pr i Z sum^ return sum set out ]sumto 8^ puts out 1FF . #heck whether input char is vowel or notputs V7nter a characternV set ch ]gets stdin^ if ch SS MaM ch SS MAM ch SS MeM ch SS MM ch SS MiM ch SS MM ch SS MoM ch SS M$M ch SS MuM ch SS MHM puts Mcharacter is vowelM else puts Mnput charcater is not vowelM
011. ,# program to check a leap &ear
puts Mnter a yearnM set yr ]gets stdin^ if yr`FF SS F puts Mnput year is leap yearnM elseif yr`1FF SS F puts Mnput year is leap yearnM elseif yr` SS F
puts Mnput year is leap yearnM else puts Mnput year is not leap yearnM 1F1.,# program to (nd #4 and H#F 1F/.,# program to print diamond pattern
1F+.,# program to (nd 3rmstrong number A number is armstrong if the sum of cubes of individual digits of a number is e ? @ C 1F t!s clear that in )loyd!s triangle nth row contains n numbers. 1F8.Print pascal triangle 4umber of rows of (ascal triangle to print is entered by the user. )irst four rows of (ascal triangle are shown below 90 1 11 1 / 1 1++1 1F>.,# program to (nd ma;imum and minimum element in arra& array set arr1 1/ +//++ F 01 C 1F set lst ]array get arr1^ set lst ]lsort 0integer lst^ puts lst set len ]llength lst^ set ma= ]linde= lst ]e=pr len 01^^ puts ma= set min ]linde= lst F^ puts min 1F?.,# program to add two matri; This c program program add add two matrices matrices i.e. compute compute the sum sum of two matrices matrices and then print it. )irstly )irstly user will will be asked asked to enter the order of matri= - number of rows and columns and then two matrices. )or e=ample if the user entered order as /, / i.e. two rows and two columns and matrices as )irst Batri= 90 1/ + %econd matri= 90 8 01 8 then output of the program - sum of )irst and %econd matri= will be
8? /C
[email protected] 1 1 puts F 1FC. Write a loop that will calculate sum of ever& third digit beginning with set sum F set i / while i jS 1F set sum ]e=pr sum Z i^ incr i + puts sum 11F. How can in invoke another program from within a ,# program ) e=ec 111. Program to check whether input number is odd or even) puts 0nonewline Mnter a number9M "ush stdout set str ]gets stdin^ puts ]e=pr str`/W-M$&& 4HB6RM9-MI4 4HB6RM^ 11/. Dierence of local and global variable. set = 1FF proc fun global = puts Minside fun =M proc fun1 set = 8FF puts Minside fun1 =M fun fun1 11+. ,o read entire (le. set fd ]open Mmyle.t=tM r^ while ]eof fd^ gets fd data puts data close fd 11. rege;p for date puts 0nonewline Mnter your date -dd:mm:yyyy9M "ush stdout set date ]gets stdin^ rege=p rege=p --\]F0/^]F0C^]F0+^]F01^:-F]F0C --\]F0/^]F0C^]F0+^]F01^:-F]F0C^1]F0/^:-/F]F0C ^1]F0/^:-/F]F0C^]F0C^ ^]F0C^ date match puts match 118. uplevel e;ample proc do varname rst last body upvar varname v for set v rst v jS last incr v uplevel body set lst do i 1 8 lappend lst ]e=pr iVi^ puts lst 11>. Write a command to create two directories pp0 and pp- under the current dir Bkdir Np :pp1:pp/ 11?. Who performs the ?ob of command interpretor) %hell
11@. What is core of 5") Pernel 11C. What is command to link two directories dir0 and dirln Ns dir1 dir+ 1/F. 2ive the command to append the contents of a (le named this(le 2at UU thisle 1/1. 2ive the command to remove a (le named (le- interactivel& rm Ni 1//. 2ive the command to (nd all (les having .t;t e;tension from the root director& )ind : 0name Q.t=t Nprint 1/+. Print below pattern. F F1 F1/ F1/+ F1/+ F1/+8 set i F set out MM while i jS 8 append out Mi M puts out incr i
1/+. Print below pattern F1/+ F1/+ F1/ F1 F set lst F 1 / + 8 set len ]llength lst^ set i F while len U F set out ]lrange lst i ]e=pr len 01^^ puts out incr len 01 1/. Print below pattern 8+/1F 8+/1 8+/ 8+ 8 8 set lst 8 + / 1 F set len ]llength lst^ set i F while len U F set out ]lrange lst i ]e=pr len 01^^ puts out incr len 01 1/8. print below pattern F F1 F1/ F1/+ F1/+ F1/+8 F1/+ F1/+ F1/ F1 F
set i F set out MM while i jS 8 append out Mi M puts out incr i set len ]llength out^ while len US F set out ]lrange out F ]e=pr len 0/^^ incr len 01 puts out 1/>. best rege=p to match ip address set ip M1C/.1>@././8M rege=p -\]F0C^Z.-]F0C^Z.-]F0C^Z.-]F0C^Z ip match a b c d puts matchJ puts aJ puts bJ puts cJ puts d if a jS /88 XX b jS /88 XX c jS /88 XX d jS /88 puts Mnput ip is validM else puts Mnput ip is not valid addressM