Tuesday 1 October 2013

Primary and Secondary DNS Server for Zone Transfer in Windows Server

Before attempting this configuration you  should have some understanding on how the following are done or configured in Microsoft window server 2008 or 2003.
To configure a Primary and Secondary DNS server for zone Transfer in window server 2008 or previous. Some basic understanding of Start of Authority (SOA) Resource record is essential.
We are using two window server 2008 computer for the zone transfer configuration, this server are name ascomput01 (primary DNS zone server) and comput10 (secondary DNS zone server) see diagram below for the two window server.
You can see from the diagram representing the two servers, that the resources record in the primary DNS zone server is not replicated to the secondary DNS zone server yet.  This because the transfer zone is not yet configured in the primary DNS server for the domain name that is configured in the zone, in this case the student.com zone
You can see from the two server DNS console that comput10 configured with the secondary dns zone has a X sign because the zone transfer has not be configured in the primary DNS zone that host the student.com domain namespace zone. See diagram below
zone transfer has not configured for primary dns server, which make the secondary DNS lack resource records in the zone configured for the server
To configured or resolve a zone transfer in the primary DNS server to replicate to secondary dns server follow the step by step guide
  • On the primary DNS server and secondary DNS server – Open a DNS console of both server and verify that the resource record has or has not been transfer to secondary DNS server. see diagram below.
  • Expand the forward lookup zones of both primary DNS server and secondary dns server
  • Click on the domain Name in the forward lookup zone of both primary DNS server and secondary dns server – verify the records if you have one created in the primary DNS server. see the diagram above for details
Only primary DNS server is required for the remain configuration steps, using the diagram below.
Configuring zone transfer in the Primary dns of a window server computer
  • Right click on the domain zone name in the forward lookup zone of the primary DNS server – click properties
  • On the dialog box that appear – click on zone transfers
  • Click or select allow zone transfers
Note – Under the following zone transfer options the following can be selected. However this depends on much control you as administrator need to have on how zone are transfer between primary and secondary DNS server and the number of DNS server available in the network.
  • Select the any server, for simplicity of this tutorial
  • Clicks apply and click Ok
Lastly, right click the domain zone name in the forward lookup zone in secondary server and click refresh. See diagram below
Zone transfer has been configured for primary dns server and the  resource record has been replicated to the secondary dns server
All the records in the zone of the primary DNS server are transferred to the secondary dns zone, see diagram above.

Step by Step mapping network drive automatically from server 2008


  
If you are working with large network you have no need to map network share drive PC to PC, you can use group policy management in server 2008. By this mathed when users will log on his computer the network drive will map automatically. First of all create VBS Script for mapping drive to create this script read my earlier post.
Then go to server 2008 and open Group Policy Management 

Select users group where you want to map drive and right click create a new group policy, in this tutorial I have production group. Then edit Mapping Drive policy (renamed new group policy)
  


Then new window of group policy management editor will open select user configuration -> windows settings -> script (Logon/Logoff) and double click logon.

Then click on show files (1) paste your VBS script file in open folder and close it then click on add (2)
Click on browse in add a script then OK and apply


then remove all authenticated users form security filtering and add user group which need that mapping.




Now run cmd and type "gpupdate /force" command on server and users machine then restart user computer and when user log on all drive mapped automatically. 

Installing Windows Server Backup in Windows Server 2008


By default windows server backup not installed in server 2008 before take windows server backup you must install windows server backup tools. To install Windows Server Backup features in Server Manager, you must be a member of the Backup Operators or Administrators group.

To install windows server backup tools follow these steps

1)      Click on start ->Administrator Tools -> Server Manager




2)      When server manager window will open, Select add features form features summary.


3)      Then select windows server backup features and click on next and then select the check boxes for Windows Server Backup and Command-line Tools. You will receive a message that Windows PowerShell is also required to be installed with these features.


4)      Then select install.


5)      Select close now windows server backup install successfully.

How to install Microsoft Loop Back Adapter in server 2008,windows 7 and windows xp

How to install Microsoft Loop Back Adopter in server 2008,windows 7 and windows xp

Some time we need network adapter for testing for virtual network environment where network access is not available. It’s very useful when you need to verify connectivity or test. I am going to tell you how to install step by step Microsoft Loop back Adapter in windows server 2008. These steps will be same in windows xp, windows 7 and server 2003.

Follow these steps to install Microsoft Loop back Adapter :-

1)    Click on start and select run and type “hdwwiz.cpl” command and click enter.


2)    To continue select next in “Welcome to the new hardware wizard”.


3)    Now select “install the hardware that I manually select from a list (Advanced)” and click on next.


4)    Then select network adapters from list and click on next.


5)    Select Microsoft form Manufacture and Microsoft loop back adapter from network adapter wizard and click on next.


 6)     Click on next.


 7)    Now you will be prompted to finish up the installation.



8)    To view and configure new installed Microsoft Loop back Adapter go to run and type “devmgmt.msc” and press enter.


9)    And your Microsoft loop back Adapter is installed. You can rename your network adapter to identify and you can check its ip address form command prompt by type “ipconfig /all”.

10)    By default it will pick default ip address you can change it manually. Default ip will be 169.254.*.* series.

How to uninstall internet explorer 9

If you have installed internet explore and want to uninstall and roll back follow this method and it will be same in windows 7 and server 2008.

1.       Click on start and open control panel and select program and features. You can direct type in start search program and features.

2.        Then click on view installed updates.




3.       Then scroll and find installed internet explorer 9 and now click on uninstall and select yes.


4.       It will uninstall in few second, now you can select restart now or restart later.

How to back up the registry in server

How to step by step back up of registry in server 2008, if you are editing in windows registry make sure you have backup of registry. If any problem occurs you can safely restore your registry. You can backup Windows 2000, Windows XP, Windows Server 2003, Windows Vista, and Windows Server 2008 by this method. Before create a backup you should login with administrator.

Follow these steps to backup registry:-

 1.      Click Start, and then click Run.

 2.      In the Open box, type "regedt32", and then click ok.


 3.      On the Registry menu, click Export.

 
4.      In the Save inbox, select a location in which to save the .reg file, type a file name in theFile name box, and then click Save.

How to change the listening port for Remote Desktop

Remote desktop listening port 3389 is working by default in server 2008. You can change and define custom listening port for remote desktop. You can define port number between 1025 and 65535.

How to change the Remote Desktop listening port on Windows Server 2008?

You can change remote desktop listening port on server 2003, windows xp and windows 7 by same method.


  1. Click on Start and type “regedit” or you can press windows key + R to lunch run and type “regedit”  and press enter  Registry Editor will open.
 
  1. Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
  1. Select PortNumber and double click on it then click Decimal.
  2. Find the "PortNumber" subkey and notice the value of 00000D3D, hex for (3389)
  3. Type the new port number, and then click OK.
  4. Quit Registry Editor.
  5. Restart the computer.
Now you can check form other computer start Remote Desktop Connection form start -> all programs -> accessories -> remote desktop connection.

Now type ip address with port of server (IP address:Custom port).


Troubleshooting 

Note When you try to connect to this computer by using the Remote Desktop connection, you must type the new port. Maybe you have to set the firewall to allow the new port number before you connect to this computer by using the Remote Desktop connection.


If you got this message “The remote computer requires Network Level Authentication, which your computer does not support. For assistance, contact your system administrator or technical support”

Friday 27 September 2013

Cisco Router Configuration Commands

RequirementCisco Command
Set a console password to ciscoRouter(config)#line con 0
Router(config-line)#login
Router(config-line)#password cisco
Set a telnet passwordRouter(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password cisco
Stop console timing outRouter(config)#line con 0
Router(config-line)#exec-timeout 0 0
Set the enable password to ciscoRouter(config)#enable password cisco
Set the enable secret password to peter.This password overrides the enable password
and is encypted within the config file
Router(config)#enable secret peter
Enable an interfaceRouter(config-if)#no shutdown
To disable an interfaceRouter(config-if)#shutdown
Set the clock rate for a router with a DCE cable to 64KRouter(config-if)clock rate 64000
Set a logical bandwidth assignment of 64K to the serial interfaceRouter(config-if)bandwidth 64
Note that the zeroes are not missing
To add an IP address to a interfaceRouter(config-if)#ip addr 10.1.1.1 255.255.255.0
To enable RIP on all 172.16.x.y interfacesRouter(config)#router rip
Router(config-router)#network 172.16.0.0
Disable RIPRouter(config)#no router rip
To enable IRGP with a AS of 200, to all interfacesRouter(config)#router igrp 200
Router(config-router)#network 172.16.0.0
Disable IGRPRouter(config)#no router igrp 200
Static route the remote network is 172.16.1.0, with a mask of 255.255.255.0, the next hop is 172.16.2.1, at a cost of 5 hopsRouter(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1 5
Disable CDP for the whole routerRouter(config)#no cdp run
Enable CDP for he whole routerRouter(config)#cdp run
Disable CDP on an interfaceRouter(config-if)#no cdp enable


Cisco Router Show Commands

RequirementCisco Command
View version informationshow version
View current configuration (DRAM)show running-config
View startup configuration (NVRAM)show startup-config
Show IOS file and flash spaceshow flash
Shows all logs that the router has in its memoryshow log
View the interface status of interface e0show interface e0
Overview all interfaces on the routershow ip interfaces brief
View type of serial cable on s0show controllers 0 (note the space between the 's' and the '0')
Display a summary of connected cdp devicesshow cdp neighbor
Display detailed information on all devicesshow cdp entry *
Display current routing protocolsshow ip protocols
Display IP routing tableshow ip route
Display access lists, this includes the number of displayed matchesshow access-lists
Check the router can see the ISDN switchshow isdn status
Check a Frame Relay PVC connectionsshow frame-relay pvc
show lmi traffic statsshow frame-relay lmi
Display the frame inverse ARP tableshow frame-relay map

Cisco Router Basic Operations

RequirementCisco Command
EnableEnter privileged mode
Return to user mode from privilegeddisable
Exit RouterLogout or exit or quit
Recall last commandup arrow or <Ctrl-P>
Recall next commanddown arrow or <Ctrl-N>
Suspend or abort<Shift> and  <Ctrl> and 6 then x
Refresh screen output<Ctrl-R>
Compleat CommandTAB

Cisco Router Copy Commands

RequirementCisco Command
Save the current configuration from DRAM to NVRAMcopy running-config startup-config
Merge NVRAM configuration to DRAMcopy startup-config running-config
Copy DRAM configuration to a TFTP servercopy runing-config tftp
Merge TFTP configuration with current router configuration held in DRAMcopy tftp runing-config
Backup the IOS onto a TFTP servercopy flash tftp
Upgrade the router IOS from a TFTP servercopy tftp flash

Cisco Router Debug Commands

RequirementCisco Command
Enable debug for RIPdebug ip rip
Enable summary IGRP debug informationdebug ip igrp events
Enable detailed IGRP debug informationdebug ip igrp transactions
Debug IPX RIPdebug ipx routing activity
Debug IPX SAPdebug IPX SAP
Enable debug for CHAP or PAPdebug ppp authentication
Switch all debugging offno debug all
undebug all

Back up and Restore Configuration Files for Cisco Devices

Introduction

Routers often get upgraded or swapped out for a number of reasons. This document provides the user with some basic steps to migrate the configuration from an existing router to a new router.

Prerequisites

Requirements

Before you use the information in this document, make sure that you meet these requirements:
  • Access to a Trivial File Transfer Protocol (TFTP) or File Transfer Protocol (FTP) server.
  • Connectivity - Routers must be able to access the FTP or TFTP server. Use theping command to verify connectivity.

Components Used

This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

Make a Backup of the Configuration

There are several methods to choose from in order to back up and restore a configuration:

Use a TFTP Server to Backup and Restore a Configuration

This is a step-by-step approach to copy a configuration from a router to a TFTP server, and back to another router. Before you proceed with this method, make sure you have a TFTP server on the network to which you have IP connectivity.
  1. At the Router> prompt, issue the enable command, and provide the required password when prompted.
    The prompt changes to Router#, which indicates that the router is now in privileged mode.
  2. Copy the running configuration file to the TFTP server:
    CE_2#copy running-config tftp:
    Address or name of remote host []? 64.104.207.171
    Destination filename [ce_2-confg]? backup_cfg_for_my_router
    !!
    1030 bytes copied in 2.489 secs (395 bytes/sec)
    CE_2#
  3. Open the configuration file with a text editor. Search for and remove any line that starts with "AAA".
    Note: This step is to remove any security commands that can lock you out of the router.
  4. Copy the configuration file from the TFTP server to a new router in privileged (enable) mode which has a basic configuration.
    Router#copy tftp: running-config
    Address or name of remote host []? 64.104.207.171
    Source filename []? backup_cfg_for_my_router
    Destination filename [running-config]?
    Accessing tftp://10.66.64.10/backup_cfg_for_my_router...
    Loading backup_cfg_for_router from 64.104.207.171 (via FastEthernet0/0): !
    [OK - 1030 bytes]
    
    1030 bytes copied in 9.612 secs (107 bytes/sec)
    CE_2#

Use an FTP Server to Backup and Restore a Configuration

In this procedure, an FTP server can be used in place of a TFTP server.
  1. At the Router> prompt, issue the enable command, and provide the required password when prompted.
    The prompt changes to Router#, which indicates that the router is now in privileged mode.
  2. Configure the FTP username and password.
    CE_2#config terminal
    CE_2(config)#ip ftp username cisco
    CE_2(config)#ip ftp password cisco123
    CE_2(config)#end
    CE_2#
  3. Copy the configuration to the FTP server.
    CE_2#copy running-config ftp:
    Address or name of remote host []? 10.66.64.10
    Destination filename [ce_2-confg]? backup_cfg_for_router
    Writing backup_cfg_for_router !
    1030 bytes copied in 3.341 secs (308 bytes/sec)
    CE_2#
  4. Open the configuration file with a text editor. Search for and remove any line that starts with "AAA".
    Note: This step is to remove any security commands that can lock you out of the router.
  5. Copy the configuration file from the FTP server to a router in privileged (enable) mode which has a basic configuration.
    Router#copy ftp: running-config
    Address or name of remote host [10.66.64.10]? 
    Source filename [backup_cfg_for_router]? 
    Destination filename [running-config]? 
    Accessing ftp://10.66.64.10/backup_cfg_for_router...
    Loading backup_cfg_for_router !
    [OK - 1030/4096 bytes]
    1030 bytes copied in 13.213 secs (78 bytes/sec)
    CE_2#

Use a Terminal Emulation Program to Backup and Restore a Configuration

A terminal emualation program can be used to back up and restore a configuration. This is a description of the procedure using Microsoft Hyperterminal Terminal Emulation software:
  1. If the configuration needs to be copied from another router, connect to that router through the console or Telnet.
  2. At the Router> prompt, issue the enable command, and provide the required password when prompted.
    The prompt changes to Router#, which indicates that the router is now in privileged mode.
  3. Issue the terminal length 0 command in order to force the router to return the entire response at once, rather than one screen at a time.
    This allows you to capture the configuration without extraneous --more-- prompts generated when the router responds one screen at a time.
  4. On the HyperTerminal menu, choose Transfer > Capture Text.
    The Capture Text window appears.
  5. Name this file "config.txt."
  6. Click Start in order to dismiss the Capture Text window and begin the capture.
  7. Issue the show running-config command, and allow time for the router to complete its response. You will see:
    Building configuration...
    followed by the configuration.
  8. On the HyperTerminal menu, choose Transfer > Capture Text > Stop in order to end the screen capture.
  9. Open the config.txt file you created in any text editor, such as Notepad or Wordpad.
  10. Search for and remove any line that starts with "AAA".
    Note: This step is to remove any security commands that could lock you out of the router.
  11. Save the file.
  12. Connect to the router that needs the configuration.
  13. Open the config.txt file.
  14. Highlight the entire contents of the config.txt file.
    You can do this by dragging the cursor from before the first character to after the last character in the file while holding down the left mouse button. Alternatively, if you use Notepad, you can choose Edit > Select All from the menu.
  15. Copy the selected text to the Windows clipboard.
    You can either choose Edit > Copy from the text editor menu, or hold down the CTRL key and simultaneously press the C key in order to perform the copy.
  16. Switch to the HyperTerminal window, and issue the configure terminal command at the Router# prompt. Then press Enter.
  17. Paste the configuration file into the router by selecting Edit > Paste to Host on the HyperTerminal menu.
  18. After the configuration has finished pasting and the router brings you back to the configuration prompt, issue the copy running-config startup-config command in order to write the configuration into memory.
  19. Issue the exit command in order to return to the Router# prompt.

Automatic Backup of Configuration using the Kron Method

In order to get a router to copy the running-config to startup-config, for example every Sunday at 23:00, complete these steps:
  1. Create a kron policy list—This is the script that lists what commands the router should run at the scheduled time.
    Router(config)#kron policy-list SaveConfig
    
            Router(config-kron-policy)#cli write
            Router(config-kron-policy)#exit
    
    • cli—Specifies EXEC CLI commands within a Command Scheduler policy list.
    • Policy-list—Specifies the policy list associated with a Command Scheduler occurrence.
    Note: The reason why write was used rather than copy running-config startup-config is because kron does not support interactive prompts and the copy running-config startup-config command requires interaction. It is important to remember this when you create commands. Also, note that kron does not support configuration commands.
  2. Create a kron occurrence—This informs the router when and how often the policy should run.
    Router(config)#kron occurrence SaveConfigSchedule
     at 23:00 Sun recurring
            Router(config-kron-occurrence)#policy-list SaveConfig
    
    
    • SaveConfigSchedule—This is the name of occurrence. Length of occurrence-name is from 1 to 31 characters. If the occurrence-name is new, an occurrence structure will be created. If the occurrence-name is not new, the existing occurrence will be edited.
    • at—Identifies that the occurrence is to run at a specified calendar date and time.
    • recurring—Identifies that the occurrence is to run on a recurring basis.
  3. Verify the kron configuration by using the show command.
    Router#sh kron schedule
             Kron Occurrence Schedule
             SaveConfigSchedule inactive, will run again in 1 days 12:37:47 at 23:00 on Sun
    • inactive—Means that kron is not running the command(s) at present.
    • Active—Means that kron is running the current command(s).
    Router#show running-configuration 
              kron occurrence SaveConfigSchedule at 23:00 Sun recurring
                policy-list SaveConfig 
                kron policy-list SaveConfig
                cli write

Backup Configuration to a TFTP Server

This example is to save the running config to a TFTP server (10.1.1.1) every Sunday at 23:00:
Router(config)#kron policy-list Backup

         Router(config-kron-policy)#cli show run | redirect 
  tftp://10.1.1.1/test.cfg
         Router(config-kron-policy)#exit
         !
         Router(config)#kron occurrence Backup at 23:00 Sun recurring
         Router(config-kron-occurrence)#policy-list Backup

Verify

Use the show running-config command to confirm that the configuration file has been copied to the destination router.