Upload
azucarsin
View
217
Download
0
Embed Size (px)
Citation preview
8/9/2019 ccna.rtf
1/9
1 = Determine the best path to send packetsForward packets toward their destination
OSI model
data link layer, Layer 2
Router
A router connects one network to another network. The router is responsiblefor the deli ery of packets across di!erent networks. "hen a packet arri eson a router interface, the router uses its routin# table to determine how toreach the destination network. $t is the responsibility of the routers to deli erthose packets e%ciently.
"hen the router recei es a packet, it e&amines the destination address of the
8/9/2019 ccna.rtf
2/9
packet and uses the routin# table to search for the best path to that network. The routin# table also includes the interface to be used to forward packets foreach known network. "hen a match is found, the router encapsulates thepacket into the data link frame of the out#oin# or e&it interface, and thepacket is forwarded toward its destination.
"hen a host sends a packet to a de ice on a di!erent $' network, the packetis forwarded to the default #ateway. The default #ateway is the destinationthat routes tra%c from the local network to de ices on remote networks. $t isoften used to connect a local network to the $nternet.
$t is possible for a router to recei e a packet that is encapsulated in one typeof data link frame, and to forward the packet out of an interface that uses adi!erent type of data link frame. For e&le, a router may recei e a packeton an (thernet interface, but must forward the packet out of an interfacecon)#ured with the 'oint*to*'oint 'rotocol +''' . The data link encapsulation
depends on the type of interface on the router and the type of medium towhich it connects. The di!erent data link technolo#ies that a router canconnect to include (thernet, ''', Frame -elay, D L, cable, and wireless+/02.11, luetooth .
-outers support three packet*forwardin# mechanisms
1. 2. 3.
1. 'rocess switchin#An older packet forwardin# mechanism still a ailable for 4isco
routers. process*switchin# is ery slow and rarely implemented inmodern networks. "hen a packet arri es on an interface, it is
forwarded to the control plane where the 4'5 matches the destinationaddress with an entry in its routin# table, and then determines thee&it interface and forwards the packet
8/9/2019 ccna.rtf
3/9
'rocess switchin# sol es a problem by doin# math lon# hand,e en if it is the identical problem.
2. Fast switchin# This is a common packet forwardin# mechanism which uses a
fast*switchin# cache to store ne&t* hop information. "hen a packetarri es on an interface, it is forwarded to the control planewhere the 4'5 searches for a match in the fast*switchin# cache. $f it is
not there, it is process* switched and forwarded to the e&itinterface. The 6ow information for the packet is also stored in thefast*switchin# cache. $f another packet #oin# to the same destination arri eson an interface, the ne&t*hop information in the cache is re*usedwithout 4'5 inter ention
Fast switchin# sol es a problem by doin# math lon# hand onetime and rememberin# the answer for subse7uent identicalproblems.
3. 4isco (&press Forwardin# +4(F4(F is the most recent and preferred 4isco $8 packet*
forwardin# mechanism. Like fast switchin#, 4(F builds a Forwardin#$nformation ase +F$ , and an ad9acency table. :owe er, the table
entries are not packet*tri##ered like fast switchin# but chan#e*tri##ered such as when somethin# chan#es in the networktopolo#y. Therefore, when a network has con er#ed, the F$ and
ad9acency tables contain all the information a router would ha e toconsider when forwardin# a packet. The F$ contains pre*computed re erse lookups, ne&t hop information for routes
includin# the interface and Layer 2 information. 4isco (&pressForwardin# is the fastest forwardin# mechanism and the preferredchoice on 4isco routers
4(F sol es e ery possible problem ahead of time in aspreadsheet.
Ethernet switches
A network switch is considered more ad anced than a hub because a switchwill only forward a messa#e to one or multiple de ices that need to recei e it,rather than broadcastin# the same messa#e out of each of its ports.
A network switch is a multi*port network brid#e that processes and forwardsdata at the data link layer +layer 2 of the 8 $ model.
(thernet switches are used to forward (thernet frames between de iceswithin the same network. :owe er, when the source $' and destination $'
8/9/2019 ccna.rtf
4/9
addresses are on di!erent networks, the (thernet frame must be sent to arouter.
;odern wired networks use a network switch to eliminate collisions. yconnectin# each de ice directly to a port on the switch, either each port on a
switch becomes its own collision domain +in the case of half duple& links orthe possibility of collisions is eliminated entirely in the case of full duple&links.
At any layer, a modern switch may implement power o er (thernet +'o( ,which a oids the need for attached de ices, such as a
8/9/2019 ccna.rtf
5/9
Full-duplex
A full*duple& +FD> system, or sometimes called double*duple&, allowscommunication in both directions, and, unlike half*duple&, allows this tohappen simultaneously.
Land*line telephone networks are full*duple&, since they allow both callers tospeak and be heard at the same time
$n full*duple& mode, transmitted data does not appear to be sent until it hasbeen actually recei ed and an acknowled#ment was sent back by the otherparty.
Full*duple& (thernet connections work by makin# simultaneous use of twophysical pairs of twisted cable +which are inside the 9acket , where one pair isused for recei in# packets and one pair is used for sendin# packets to adirectly connected de ice. This e!ecti ely makes the cable itself a collision*free en ironment and doubles the ma&imum data capacity that can besupported by the connection.
There are se eral bene)ts to usin# full*duple& o er half*duple&. Firstly, time isnot wasted, since no frames need to be retransmitted, as there are nocollisions. econdly, the full data capacity is a ailable in both directionsbecause the send and recei e functions are separated. Thirdly, stations +ornodes do not ha e to wait until others complete their transmission, sincethere is only one transmitter for each twisted pair.
Ethernet frame
A data packet on an (thernet link is called an (thernet packet, whichtransports an (thernet frame as payload.
An (thernet frame is preceded by a preamble and start frame delimiter + FD ,which are both part of the layer 1 (thernet packet. (ach (thernet framestarts with an (thernet header, which contains destination and source ;A4addresses as its )rst two )elds. The middle section of the frame is payloaddata includin# any headers for other protocols +for e&le $nternet 'rotocolcarried in the frame. The frame ends with a frame check se7uence +F4 ,
8/9/2019 ccna.rtf
6/9
which is a 32*bit cyclic redundancy check used to detect any in*transitcorruption of data
Document Network Adressin
"hen desi#nin# a new network or mappin# an e&istin# network, documentthe network. At a minimum, the documentation should identify
De ice names$nterfaces used in the desi#n$' addresses and subnet masksDefault #ateway addresses
As the )#ures show, this information is captured by creatin# two usefulnetwork documents
Topolo#y dia#ram * 'ro ides a isual reference that indicates the physical
connecti ity and lo#ical Layer 3 addressin#. 8ften created usin# software,such as ;icrosoft
8/9/2019 ccna.rtf
7/9
4on)#ures a static link*local address on the interface that is used instead ofthe link*local address that is automatically con)#ured when the #lobal unicast$' address is assi#ned to the interface or enabled usin# the ip enableinterface command.
ip enable
The ip enable interface command is used to automatically create an $'link*local address whether or not an $' #lobal unicast address has beenassi#ned.
A link*local address is automatically added to an interface whene er a #lobalunicast address is assi#ned. An $' network interface is re7uired to ha e alink*local address, but not necessarily a #lobal unicast address.
"hen the router interface is con)#ured with a #lobal unicast address and is inthe upBupG state, the $' pre)& and pre)& len#th is added to the $'routin# table as a connected route
The $' #lobal unicast address con)#ured on the interface is also installed inthe routin# table as a local route. The local route has a B12/ pre)&. Localroutes are used by the routin# table to e%ciently process packets with theinterface address of the router as the destination.
&'I &ommands
(ultiple screens of output
4ommands that #enerate multiple screens of output are, by default, pausedafter 2@ lines. At the end of the paused output, the **;ore** te&t displays.'ressin# (nter displays the ne&t line and pressin# the spacebar displays the
ne&t set of lines. 5se the terminal len#th number command to specify thenumber of lines to be displayed. A alue of 0 +Hero pre ents the router frompausin# between screens of output.
Filterin command with pipe )*+ character
Another ery useful feature that impro es the user e&perience in thecommand*line interface +4L$ is the )lterin# of show output. Filterin#commands can be used to display speci)c sections of output. To enable the)lterin# command, enter a pipe + character after the show command andthen enter a )lterin# parameter and a )lterin# e&pression.
sectionhows entire section that starts with the )lterin# e&pression
include$ncludes all output lines that match the )lterin# e&pression
e&clude(&cludes all output lines that match the )lterin# e&pression
8/9/2019 ccna.rtf
8/9
be#inhows all the output lines from a certain point, startin# with the line
that matches the )lterin# e&pression
tracert = determine the path to the locationcon)#ure terminal = con)#uration commandsip default*#ateway = router ip address
Show &ommandsshow ip interface $rief , show ip"# interface $rief Displays a summary for all interfaces includin# the $' @ address of the
interface and current operational status.
show ip route , show ip"# routeDisplays the contents of the $' @ or $' routin# table stored in -A;. $n
4isco $8 1I, acti e interfaces should appear in the routin# table withtwo related entries identi)ed by the code J4K +4onnected or JLK +Local . $npre ious $8 ersions, only a sin#le entry with the code J4K will appear.
show runnin -con interface interface-idDisplays the commands con)#ured on the speci)ed interface.
show interfaces , show interfaceDisplays interface information and packet 6ow count for all interfaces
on the de ice.
show ip interface , show ip"# interfaceDisplays the $' @ or $' related information for all interfaces on a
router.
show ip"# routers
&on ure Hostnamecon)#ure terminal
hostname -1 = desired hostname is -1
Secure mana ement accesscon)#ure terminal
enable secret classline console 0
password cisco = desired password is ciscolo#ine&it
line ty 0 @password cisco = desired password is ciscolo#ine&it
ser ice password*encryption
&on ure $annercon)#ure terminal
banner motd AuthoriHed Access 8nlyM
8/9/2019 ccna.rtf
9/9
Sa"e con urationcopy runnin#*con)# startup*con)#
&on ure .'ANcon)#ure terminal
interface lan1 = switched irtual interface