Wednesday 27 February 2013

How to create User Name in CISCO Devices

Create User Name and Unencrypted Password

Router>enable
Router#conf t
Router(config)#username admin password cisco
Router(config)#exit
Router#wr
Router#show running-config
Building configuration...

Current configuration : 508 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
username admin password 0 cisco
!
!
!
 --More-- 

Here your password is saved in clear text in your configuration file which is not a safer way to save password in your configuration file.


Create User Name and encrypted Password

Router>enable
Router#conf t
Router(config)#username admin secret cisco
Router(config)#exit
Router#wr
Router#show running-config
Building configuration...

Current configuration : 531 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
username admin secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
!
!
!
 --More--

Here your password is saved in encrypted form in your configuration file which is a safer way to save password in your configuration file.

Sunday 24 February 2013

How to configure DHCP server on CISCO Router

 Below are the commands to configure the DHCP server on your CISCO router.


Router>en
Router#conf t
Router(config)#interface fa 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#ip dhcp pool MSLAB
Router(hdcp-config)#network 192.168.1.0 255.255.255.0
Router(hdcp-config)#default-router 192.168.1.1
Router(hdcp-config)#dns-server 4.2.2.2
Router(hdcp-config)#exit
Router(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.5
Router(config)#

Note: In the above configuration we exclude the range of IP address 192.168.1.1 to 192.168.1.5 for the DHCP pool. And MSLAB is our DHCP pool name you can use the different name in your configuration. We use the 4.2.2.2 DNS server just for testing purpose you can configure your live DNS server in your real configuration.

Tuesday 19 February 2013

How to Create NAT Rule on Router for Access the Internet

Before we get started, take a look at Figure A, this offers an illustration of what our example network looks like.

Figure A

If you're wondering why using NAT is necessary, it's because we choose the IP address scheme for the LAN from the blocks of private IP addresses. Because these IP addresses aren't usable on the Internet, we must translate these IP addresses into a real Internet IP address, such as one provided by an ISP.

So, we'll use NAT to provide the IP address translation from our LAN to our WAN. While most consumer-based routers refer to NAT as a ubiquitous term, there are a few different kinds of NAT, including static NAT, pooled NAT, and NAT overload (also called port address translation, or PAT).

Consumer-based routers typically use NAT overload, which is what we'll use for this example. NAT overload involves using a single Internet IP address and multiple inside IP addresses.

Let's look at the step-by-step process for configuring NAT overload. The router needs to be in Global Configuration Mode, and the prompt should look like this: Router(config)#

Create a pool of Internet IP addresses

For this example, we're going to overload a single Internet IP address. Since this is the only IP address we have, we'll create a pool with only one IP address in it.


Router(config)# ip nat pool mypool 1.1.1.1 1.1.1.1 prefix 30

Create an access list

Next, we must determine who the router allows to use NAT to access the Internet using our NAT pool, which we can accomplish by creating an access list. For this example, we'll allow the entire internal network to use NAT to access the Internet.


Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
 
 

Create the NAT source list

Now, we must connect the pool and the list of users. We can accomplish this by telling the router that we want to use NAT from the inside (using the access list to define our possible source IP addresses) and go to the outside using the pool that contains our single Internet IP address. In addition, we want to overload this single Internet IP address using PAT.

Router(config)# ip nat inside source list 1 pool mypool overload
 
 

Define the inside and the outside NAT interfaces


Next, we need to tell the router which interface is the inside and which is the outside.
Router(config)# interface ethernet 0/0
Router(config-if)# ip nat inside
Router(config-if)# exit
Router(config)# interface serial 0/0
Router(config-if)# ip nat outside
Router(config-if)# exit 

That's it.