Você está na página 1de 15

Use the following diagram for the following configurations.

I. Basic Router Configuration - 8 Steps to Success: IP Basics


Step 1: Physical Connections Connect all of the interfaces including: Console: Connect your PC/terminal to the console port via HyperTerminal (9600-8-N-1-no flow) Ethernet: Connect Ethernet ports to a hub or a switch using a straight-through cable. Use a crossover cable if going directly between Ethernet ports on two routers. Serial: If going directly between two routers, dont forget to connect one port via the DTE cable and the other via the DCE cable. Step 2: Boot up the router You may use the setup mode (setup dialogue) but this is to help you with configuring the router using the Cisco IOS commands. The setup mode will only allow you to configure the router with the basic features and not with any advanced features. Step 3: Host Name and Passwords It is a good idea to begin your configuration with the hostname and passwords. This will remind you what router you are configuring and it is also a good idea to add the security of passwords right away. Router(config)# hostname LabC LabC(config)# enable secret class LabC (config)# line vty 0 4 {If you are running EFS, you may increase the number of telnet sessions to more than 5.} LabC (config-line)# login LabC (config-line)# password cisco LabC (config)# line con 0 LabC (config-line)# login LabC (config-line)# password cisco Step 4: Adding IP Addresses Next lets add the IP addresses, as this is a basic function of configuring routers. Below is an example of configuring both an Ethernet and Serial interface. Dont forget to use the proper subnet mask! For Serial interface with the DCE cable you will need to also add the clocking with the clockrate command. LabC (config)# interface ethernet 0 LabC (config-if)# ip address 223.8.151.1 255.255.255.0 LabC (config-if)# description LAN Network LabC (config-if)# no shutdown LabC (config)# interface serial 0 LabC (config-if)# ip address 204.204.7.1 255.255.255.0 LabC (config-if)# clock rate 56000 {DCE interface only} LabC (config-if)# no shutdown LabC (config-if)# description Network to Lab D LabC (config)# interface serial 1 LabC (config-if)# ip address 199.6.13.2 255.255.255.0 LabC (config-if)# no shutdown LabC (config-if)# description Network to Lab B Step 5a: Adding Dynamic Routing: RIP If this router will be participating in a dynamic routing protocol like RIP or IGRP, you will need to enable the routing protocol along with those directly connected networks that will be participating. Only use the classful network address, not the subnet address of the network! LabC (config)# router rip LabC (config-router)# network 199.6.13.0 {NOT Subnet Address} LabC (config-router)# network 204.204.7.0 {NOT Subnet Address}

Step 5b: Adding Dynamic Routing: IGRP IGRP uses an autonomous system number or process id. This number must be the same on all routers sharing the same IGRP routing updates. LabC (config)# router igrp 10 {10 = autonomous-system a.k.a. process-id} LabC (config-router)# network 199.6.13.0 {NOT Subnet Address} LabC (config-router)# network 204.204.7.0 {NOT Subnet Address} Step 6: Adding Default Routes Good candidates for default routes are routers which are known as the boundary router. This is a router which is normally part of a stub network. Inside the stub network, the routers may be participating in a dynamic routing protocol like RIP, but only a static default route is needed to connect the stub network to the Internet. Static routes, including default routes, are propagated with dynamic routing updates. Here are two examples. Either one will work. LabA (config)# ip route 0.0.0.0 0.0.0.0 201.100.11.2 {Adding a default route using a static route.} LabA (config)# ip default-network 201.100.11.0 {Adding a default route using a the default-network command..} Step 7: Adding Static Routes A static route can be used for various reasons. One reason may be for a router to connect to a stub network. LabB (config)# ip route 205.7.5.0 255.255.255.0 201.100.11.1 LabB (config)# ip route 192.5.5.0 255.255.255.0 201.100.11.1 Step 8: Testing and Monitoring At this point it is a good idea to start testing your network using various commands. LabC# show ip route LabC # show ip interface brief LabC # show controller s 0 {Shows whether or not the serial cable is DCE or DTE.} LabC # ping ip-address LabC # trace ip-address LabC # debug ip rip {Remember to turn debug off when done, undebug all} LabC # terminal monitor {If using debug from a telnet session, otherwise debug output will

go to the console. Caution: This will cause the debug output to go to all telnet sessions on this router.}} LabC # terminal no monitor {To turn off monitoring during a telnet session.}
LabC # LabC # LabC # LabC # show show show show cdp neighbors ip protocols version flash

Step 9: Finishing up Once everything is working you may wish to add some commands to make your work easier. LabC (config)# ip host LabB 199.6.13.1 {Mapping names and IP addresses.) LabC (config)# ip name-server 223.8.151.10 {Adding a name server.} LabC (config)# no ip domain-lookup {When there is no domain server.} LabC (config)# banner motd # LabC Router, Authorized Access Only! # LabC (config-router)# passive-interface e 0 {When you do no want to advertise routing tables out of a specific interface.) And dont forget to LabC # show running-config LabC # copy running-config startup-config

Miscellaneous LabC # ? {This command can be used by itself or following at the end of any partial command line.} LabC > enable LabC # disable LabC # configure terminal LabC (config)# exit LabC (config-if)# control-z LabC # clock set 15:10:30 27 May 2000 Editing Commands Control-A: Moves to the beginning of the command line. Control-E: Moves to the end of the command line. Esc-B: Moves back one word. Control F: Moves forward one character. Control-B: Move back one character. Esc F: Moves forward one word. Command History Commands Control P or up arrow key: Recalls last (previous command. Control N or down arrow key: Recalls most recent command Tab key: completes the entry. LabC # show history LabC # terminal history LabC # terminal editing LabC # no terminal editing

II. Testing and other basic commands


The commands listed below are to assist you in setting up your router. The commands are only examples and do not reflect the configuration of any actual network. Your actual commands, ip addresses, network addresses, passwords, etc., will depend upon your network design.
More Testing Commands Here are some commands which may help you troubleshoot the router. Many of the commands might be used while you are speaking with a Tech Support Engineer. LabC # show memory LabC # show stacks LabC # show buffers LabC # show arp LabC # show processes LabC # show processes cpu LabC # show tech-support More Copy commands Backing-up and restoring the router configuration: LabC # copy running-config tftp LabC # copy tftp running-config Backing-up and restoring the IOS: LabC # copy flash tftp LabC # copy tftp flash

Other Commands LabC (config)# config-register 0x2102 LabC (config)# boot system flash igs-j-l.111-5 LabC (config)# boot system tftp igs-j-l.111-5

Configuring IPX Routing


Sample Network: Using the five router lab diagram, we will give the 210.93.105.0 network the IPX
105 network address, and give the 204.204.7.0 network the IPX 7 network address. Step 1: Enabling IPX Routing LabD (config)# ipx routing LabD # show protocols {enables IPX routing}

Reflection: What differences do you see in the results from the show protocols commands? LabE (config)# ipx routing {enables IPX routing}

Step 2: Enabling IPX on interfaces It may be a good idea to first review the information on different Novell IPX frame types at this time. RouterD LabD (config)# inter e 0 LabD (config-if)# ipx network 105 encapsulation novell-ether LabD (config)# inter s 1 LabD (config-if)# ipx network 7 {The default encapsulation is HDLC on serial interfaces, and is changed via the encapsulation command for that interface.} RouterE LabE (config)# inter e 0 LabE (config-if)# ipx network 105 LabE (config-if)# encapsulation novell-ether Step 3: Monitoring IPX routing LabD # LabD # LabD # LabD # show ipx route show ipx traffic show ipx interface e 0 show ipx servers {displays the IPX routing table} {show both IPX and SAP update packets} {shows IPX address of an interface, receiving SAP and RIP information} {shows ipx network servers and the contents of the SAP table}

Step 4: Debugging IPX routing LabD # debug ipx routing activity LabD # debug ipx routing events {displays IPX routing activity} {displays IPX routing events}

LabD # ping Protocol [ip]: ipx Target IPX address: 105.0000.0c8e.eafd {IPX interface of another device. You can get this information from show ipx interface command on that device. The IPX interface is a combination of the IPX network address plus the MAC address.}

Configuring Standard and Extended IP Access Lists


Sample Network: You may wish to configure the network below. You will first need to configure the network for dynamic or static routing. (Notice that the IP addresses may have changed from the previous example.)
Example: Permitting only a specific host from the 205.7.5.0 network onto the 192.5.5.0 network LabA (config)# access-list 10 permit host 205.7.5.11 LabA (config)# inter e 0 LabA (config-if)# ip access-group 10 out Example: Denying a specific host from the 205.7.5.0 network onto the 192.5.5.0 network LabA (config)# access-list 10 deny 205.7.5.11 LabA (config)# access-list 10 permit 0.0.0.0 255.255.255.255 {Or LabA(config)# access-list 10 permit any} LabA (config)# inter e 0 LabA (config-if)# ip access-group 10 out Example: Permitting only hosts from the 210.93.105.0 network onto the 192.5.5.0 network LabA (config)# access-list 10 permit 210.93.105.0 {Or LabA (config)# access-list 10 permit 210.93.105.0 0.0.0.255} LabA (config)# inter e 0 LabA (config-if)# ip access-group 10 out Example: An access list that will permit telnets destined for the host 223.8.151.10 from the 195.5.5.0, but will prohibit all other telnets from the 195.5.5.0 network into the 223.8.151.0 network. All other traffic is allowed to enter the 223.8.151.0 network. LabA (config)# access-list 101 permit tcp 192.5.5.0 0.0.0.255 223.8.151.10 0.0.0.0 eq 23 LabA (config)# access-list 101 deny tcp 192.5.5.0 0.0.0.255 223.8.151.0 0.0.0.255 eq 23 LabA (config)# access-list 101 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 LabA (config)# interface e 0 LabA (config-if)# ip access-group 101 in Using the host keyword same as the wildcard mask 0.0.0.0: LabA (config)# access-list 101 permit tcp 192.5.5.0 0.0.0.255 223.8.151.10 0.0.0.0 eq 23 replaced by LabA (config)# access-list 101 permit tcp 192.5.5.0 0.0.0.255 host 223.8.151.10 eq 23 Using the any keyword is the same as the using 0.0.0.0 255.255.255.255 LabA (config)# access-list 101 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 replaced by LabA (config)# access-list 101 permit ip any any Note: Remember there is an implicit deny any (everything) at the end of an access list.

III. PPP Encapsulation with PAP and CHAP


The commands listed below are to assist you in setting up your router. The commands are only examples and do not reflect the configuration of any actual network. Your actual commands, ip addresses, network addresses, passwords, etc., will depend upon your network design.

PPP Encapsulation between LabB and LabC routers


PPP encapsulation
Note: The default encapsulation on serial interfaces on Cisco Routers is HDLC. LabB (config)# interface Serial 0 LabB (config-if)# encapsulation ppp LabB # show inter s 0 LabC (config)# interface Serial 1 LabC (config-if)# encapsulation ppp LabC # show inter s 1

PPP with PAP authentication


LabB # username LabC password class LabB (config)# interface Serial 0 LabB (config-if)# encapsulation ppp LabB (config-if)# ppp authentication pap LabB (config-if)# ppp pap sent-username LabB password class LabC # username LabB password class LabC (config)# interface Serial 0 LabC (config-if)# encapsulation ppp LabC (config-if)# ppp authentication pap LabC (config-if)# ppp pap sent-username LabC password class

PPP with CHAP authentication


LabB # username LabC password class LabB (config)# interface Serial 0 LabB (config-if)# encapsulation ppp LabB (config-if)# ppp authentication chap LabC # username LabB password class LabC (config)# interface Serial 1 LabC (config-if)# encapsulation ppp LabC (config-if)# ppp authentication chap

IV. ISDN
192.168.15.0/24
BRI 0 1 0 .0 .0 .3 /8

172.30.0.0/16 IS D N C lo u d
BRI 0 1 0 .0 .0 .4 /8
A T& T 5ess

4085559988

G a te w a y

N T D M S -1 0 0

8315551234

IS P

Notes: Although not necessary, the routers below have been configured with the data link encapsulation of PPP using CHAP authentication. Also, note that the SPID is only required when connecting to certain ISDN switches, such as the Northern Telecom DMS 100. Gateway Gateway(config)# username ISP pass class Gateway(config)# isdn switch-type basic-dms100 Gateway(config)# dialer-list 1 protocol ip list 101 Gateway(config)# access-list 101 deny igrp any any Gateway(config)# access-list 101 permit ip any any Gateway(config)# ip route 172.30.0.0 255.255.0.0 bri0 Gateway(config)# interface bri 0 Gateway(config-if)# ip add 10.0.0.3 255.0.0.0 Gateway(config-if)# encapsulation ppp Gateway(config-if)# ppp authen chap Gateway(config-if)# dialer-group 1 Gateway(config-if)# dialer map ip 10.0.0.4 name ISP 8315551234 Gateway(config-if)# isdn spid1 08443 213 Gateway(config-if)# isdn spid2 08132 344 ISP ISP(config)# username Gateway pass class ISP (config)# isdn switch-type basic-5ess ISP (config)# dialer-list 1 protocol ip list 101 ISP (config)# access-list 101 deny igrp any any ISP (config)# access-list 101 permit ip any any ISP (config)# ip route 192.168.15.0 255.255.255.0 10.0.0.3 ISP (config)# interface bri 0 ISP (config-if)# ip add 10.0.0.4 255.0.0.0 ISP (config-if)# encapsulation ppp ISP (config-if)# ppp authen chap ISP (config-if)# dialer-group 1 ISP (config-if)# dialer map ip 10.0.0.3 name Gateway 4085559988

ISDN Optional Commands


ISP(config-if)# dial wait-for-carrier time seconds {Number of seconds that the interface waits for the carrier to come up when a call is placed. Default is 30 seconds.} ISP(config-if)# dialer idle-timeout seconds {Specifies the number of idle seconds to wait before a call is disconnected. Default is 120 seconds.} ISP(config-if)# dialer load threshold load [outbound | inbound | either] {Configures the bandwidth on demand by setting the maximum load before the dialer places another call to a destination. Load is interface load from 1 to 255, where 255 would be 100% of the available bandwidth.}

ISDN Monitoring and Testing


ISP# show dialer {Displays current status of the link} {Displays call status while call is in progress} {Displays status of ISDN connection}

ISP# show isdn active ISP# show isdn status ISP# show dialer map ISP# debug q921

{Displays dialer map ip statements} {Shows the call connection establishment and disconnection.}

ISP# debug isdn active {Displays the status of the ISDN connection while the call is in progress.} ISP# debug dialer {Displays the configuration and operation of the dialer}

V. A. Frame Relay - Simple Configuration

P1R1 P1R1(config)# interface s 1 P1R1(config-if)# ip add 10.16.0.1 255.255.255.0 P1R1(config-if)# encapsulation frame-relay P1R1(config-if)# bandwidth 56 P1R1(config-if)# frame-relay map ip 10.16.0.2 110 broadcast ietf P1R1(config-if)# frame-relay lmi-type ansi {Need for pre-11.2 IOS. 11.2 IOS supports automatic LMI sensing.} P1R1(config)# router rip P1R1(config-router)# network 10.0.0.0 P1R3 P1R3(config)# interface s 1 P1R3(config-if)# ip add 10.16.0.2 255.255.255.0 P1R3(config-if)# encapsulation frame-relay P1R3(config-if)# bandwidth 56 P1R3(config-if)# frame-relay map ip 10.16.0.2 100 broadcast ietf P1R3(config-if)# frame-relay lmi-type ansi P1R3(config)# router rip P1R3(config-router)# network 10.0.0.0

10

V. B. Frame Relay - Multipoint Subinterfaces Configuration


(Same network/subnet: Multi point-to-points with subinterfaces)

S2.2 DLCI = S2.2 DLCI = S2.2 DLCI =

200; 10.17.0.2/24 300; 10.17.0.3/24 400; 10.17.0.4/24

RTR1 RTR1(config)# interface s2 RTR1(config-if)# no ip address RTR1(config-if)# encapsulation frame-relay RTR1(config-if)# exit RTR1(config)# interface s2.2 multipoint RTR1(config-if)# ip add 10.17.0.1 255.255.255.0 RTR1(config-if)# bandwidth 64 RTR1(config-if)# frame-relay map ip 10.17.0.2 200 broadcast ietf RTR1(config-if)# frame-relay map ip 10.17.0.3 300 broadcast ietf RTR1(config-if)# frame-relay map ip 10.17.0.4 400 broadcast ietf RTR1(config)# router rip RTR1(config)# network 10.0.0.0

11

V. C. Frame Relay - Point-to-Point Subinterfaces Configuration


(Different Networks or Subnets: Point-to-point connections using subinterfaces, otherwise need multiple serial interfaces.)

S2.2 DLCI = S2.3 DLCI = S2.4 DLCI =

200 300 400

RTR1 RTR1(config)# interface s2 RTR1(config-if)# no ip address RTR1(config-if)# encapsulation frame-relay RTR1(config-if)# exit RTR1(config)# interface s2.2 point-to-point RTR1(config-if)# ip add 10.17.0.2 255.255.255.0 RTR1(config-if)# bandwidth 64 RTR1(config-if)# frame-relay interface-dlci 200 broadcast cisco RTR1(config-if)# exit RTR1(config)# interface s2.3 point-to-point RTR1(config-if)# ip add 10.18.0.3 255.255.255.0 RTR1(config-if)# bandwidth 64 RTR1(config-if)# frame-relay interface-dlci 300 broadcast cisco RTR1(config-if)# exit RTR1(config)# interface s2.4 point-to-point RTR1(config-if)# ip add 10.20.0.3 255.255.255.0 RTR1(config-if)# bandwidth 64 RTR1(config-if)# frame-relay interface-dlci 400 broadcast cisco RTR1(config)# router rip RTR1(config)# network 10.0.0.0

12

S2.2 DLCI = S2.2 DLCI = S2.2 DLCI =

200; 10.17.0.2/24 300; 10.17.0.3/24 400; 10.17.0.4/24

RTR1 RTR1(config)# interface s2 RTR1(config-if)# no ip address RTR1(config-if)# encapsulation frame-relay RTR1(config-if)# exit RTR1(config)# interface s2.2 multipoint RTR1(config-if)# ip add 10.17.0.1 255.255.255.0 RTR1(config-if)# bandwidth 64 RTR1(config-if)# frame-relay map ip 10.17.0.2 200 broadcast ietf RTR1(config-if)# frame-relay map ip 10.17.0.3 300 broadcast ietf RTR1(config-if)# frame-relay map ip 10.17.0.4 400 broadcast ietf RTR1(config)# router rip RTR1(config)# network 10.0.0.0

13

Monitoring Frame Relay


RTR1# show frame-relay pvc {Displays statistics about PVCs for Frame Relay interfaces} RTR1# show frame-relay map {Displays the current Frame Relay map entries and information about these connections} RTR1# show frame-relay lmi {Displays statistics about the Local Management Interface (LMI0} RTR1# debug frame-relay events {Displays Frame Relay packet events}

RTR1# debug frame-relay lmi {Displays Frame Relay LMI exchanges with service provider} RTR1# debug frame-relay packet RTR1# debug frame-relay nli {Displays Frame Relay packets}

{Displays Frame Replay Network Layer interface}

Summary: Booting up the Router


Cisco routers boot Cisco IOS software from: Flash TFTP server ROM (not full Cisco IOS) Multiple source options provide flexibility and fallback alternatives

Locating the Cisco IOS Software


Default source for Cisco IOS software: Flash (sequential) TFTP server (netboot) ROM (partial IOS) Note: boot system commands can be used to specify the primary IOS source and fallback sequences.

Booting up the router and locating the Cisco IOS.


ROM 1. POST 2. Bootstrap code executed 3. Check Configuration Register value (NVRAM) which can be modified using the configregister command 0 = ROM Monitor mode 1 = ROM IOS 14

2 - 15 = startup-config in NVRAM 4. Startup-config file: Check for boot system commands (NVRAM) If boot system commands in startup-config a. Run boot system commands in order they appear in startup-config to locate the IOS b. [If boot system commands fail, use default fallback sequence to locate the IOS (Flash, TFTP, ROM)?] If no boot system commands in startup-config use the default fallback sequence in locating the IOS: a. Flash (sequential) b. TFTP server (netboot) c. ROM (partial IOS) or keep retrying TFTP depending upon router model 5. a) If IOS is loaded, but there is no startup-config file, the router will use the default fallback sequence for locating the IOS and then it will enter setup mode or the setup dialogue. b) If no IOS can be loaded, the router will get the partial IOS version from ROM

15

Você também pode gostar