Software and Computer Tips for Everyone

Showing posts with label Config Router. Show all posts
Showing posts with label Config Router. Show all posts

Sep 11, 2009

ICND 2 - Nat Sim Question

By on 5:41 PM
Here you will find answers to SIMULATION Questions 
Question:
A network associate is configuring a router for the weaver company to provide internet access. The ISP has provided the company six public IP addresses of 198.18.184.105 198.18.184.110. The company has 14 hosts that need to access the internet simultaneously. The hosts in the company LAN have been assigned private space addresses in the range of 192.168.100.17 – 192.168.100.30.
The following have already been configured on the router:
- The basic router configuration
- The appropriate interfaces have been configured for NAT inside and NAT outside
- The appropriate static routes have also been configured (since the company will be a stub network, no routing protocol will be required.)
- All passwords have been temporarily set to "cisco"
ccna_nat_sim_lab1
Solution:

The company has 14 hosts that need to access the internet simultaneously but we just have 6 public IP addresses from 198.18.184.105 to 198.18.184.110/29. Therefore we have to use NAT overload (or PAT)
Double click on the Weaver router to open it
Router>enable
Router#configure terminal

First you should change the router's name to Weaver
Router(config)#hostname Weaver
Create a NAT pool of global addresses to be allocated with their netmask.

Weaver(config)#ip nat pool mypool 198.18.184.105 198.18.184.110 netmask 255.255.255.248
Create a standard access control list that permits the addresses that are to be translated
Weaver(config)#access-list 1 permit 192.168.100.16 0.0.0.15

Establish dynamic source translation, specifying the access list that was defined in the prior step
Weaver(config)#ip nat inside source list 1 pool mypool overload
This command translates all source addresses that pass access list 1, which means a source address from 192.168.100.17 to 192.168.100.30, into an address from the pool named mypool (the pool contains addresses from 198.18.184.105 to 198.18.184.110)
Overload keyword allows to map multiple IP addresses to a single registered IP address (many-to-one) by using different ports

The question said that appropriate interfaces have been configured for NAT inside and NAT outside statements.
This is how to configure the NAT inside and NAT outside, just for your understanding:
Weaver(config)#interface fa0/0
Weaver(config-if)#ip nat inside
Weaver(config-if)#exit
Weaver(config)#interface s0/0
Weaver(config-if)#ip nat outside
Weaver(config-if)#end
Finally, we should save all your work with the following command:
Weaver#copy running-config startup-config

Check your configuration by going to "Host for testing" and type:
C:\>ping 192.0.2.114
The ping should work well and you will be replied from 192.0.2.114

Aug 14, 2009

Backing Up and Restoring Cisco Configuration

By on 8:05 AM

Backing Up the Cisco Router Configuration
To copy the router’s configuration from a router to a TFTP server, you can use either the copy running-config tftp or the copy startup-config tftp command. Either one will back up the router configuration that’s currently running in DRAM, or that’s stored in NVRAM.
Verifying the Current Configuration
To verify the configuration in DRAM, use the show running-config command (sh run for short) like this:
Router#sh run
Building configuration…
Current configuration:
!
version 12.0
The current configuration information indicates that the router is now running version 12.0 of the IOS.
Verifying the Stored Configuration
Next, you should check the configuration stored in NVRAM. To see this, use the show startup-config command (sh start for short) like this:
Router#sh start
Using 366 out of 32762 bytes
!
version 11.2
The second line shows you how much room your backup configuration is using. Here, we can see that NVRAM is 32KB and that only 366 bytes of it are used.
Copying the Current Configuration to NVRAM
By copying running-config to NVRAM as a backup, as shown in the following output, you’re assured that your running-config will always be reloaded if the router gets rebooted. In the new IOS version 12.0, you’re prompted for the filename you want to use. And since the version of IOS was 11.2 the last time a copy run start was performed, the router will tell us that it’s going to replace that file with the new 12.0 version:


Router#copy run start
Destination filename [startup-config]?[Enter]
Warning: Attempting to overwrite an NVRAM configuration previously written by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm][Enter]
Building configuration… [OK]
Now when you run show startup-config, the version shows 12.0:

Router#sh start
Using 487 out of 32762 bytes
!
version 12.0
Copying the Configuration to a TFTP Server
Once the file is copied to NVRAM, you can make a second backup to a TFTP server by using the copy running-config tftp command (copy run tftp for short), like this:

Router#copy run tftp
Address or name of remote host []?192.168.0.120
Destination filename [router-confg]?backup-config
!!
487 bytes copied in 12.236 secs (40 bytes/sec)
Router#
Notice that this took only two exclamation points (!!)–which means that 20 packets have been transferred (10 for each exclamation point).
Restoring the Cisco Router Configuration
If you’ve changed your router’s running-config file and want to restore the configuration to the version in the startup-config file, the easiest way to do this is to use the copy startup-config running-config command (copy start run for short). You can also use the older Cisco command config mem to restore a configuration. Of course, this will work only if you first copied running-config into NVRAM before making any changes!
If you did copy the router’s configuration to a TFTP server as a second backup, you can restore the configuration using the copy tftp running-config command (copy tftp run for short) or the copy tftp startup-config command (copy tftp start for short), as shown below (remember that the old command that provides this function is config net):
Router#copy tftp run
Address or name of remote host []?192.168.0.120
Source filename []?backup-config
Destination filename [running-config]?[Enter]
Accessing tftp://192.168.0.120/backup-config…
Loading backup-config from 192.168.0.120 (via Ethernet0):
!!
[OK - 487/4096 bytes]
487 bytes copied in 5.400 secs (97 bytes/sec)
Router#
00:38:31: %SYS-5-CONFIG: Configured from
tftp://192.168.0.120/backup-config

Router#

The configuration file is an ASCII text file, meaning that before you copy the configuration stored on a TFTP server back to a router, you can make changes to the file with any text editor.
Erasing the Configuration
To delete the startup-config file on a Cisco router, use the command erase startup-config, like this:

Router#erase startup-config
Erasing the nvram filesystem will remove all files! Continue? [confirm][Enter]
[OK]
Erase of nvram: complete
Router#
This command deletes the contents of NVRAM on the router, so the next time the router boots, it’ll run the setup mode.

Cisco Router Interfaces

By on 7:52 AM
To make changes to an interface, you use the interface command from global configuration mode:
Router(config)#interface ?
Async Async interface
BVI Bridge-Group Virtual Interface
CTunnel CTunnel interface
Dialer Dialer interface
FastEthernet FastEthernet IEEE 802.3
Group-Async Async Group interface
Lex Lex interface
Loopback Loopback interface
MFR Multilink Frame Relay bundle interface
Multilink Multilink-group interface
Null Null interface
Serial Serial Interface
Tunnel Tunnel interface
Vif PGM Multicast Host interface
Virtual-Template Virtual Template interface
Virtual-TokenRing Virtual TokenRing Interface
range interface range command
Router(config)#interface fastethernet 0/0
Router(config-if)#
Did you notice that the prompt changed to Router(config-if)#? This tells you that you’re in interface configuration mode. And wouldn’t it be nice if the prompt also gave you an indication of what interface you were configuring? Well, at least for now we’ll have to live without the prompt information, because it doesn’t.