Search The Web

Saturday, March 23, 2013

How to Set The IP Address on a Cisco Router Interface

How to Set The IP Address on a Cisco Router Interface

This article will discuss how to choose which interface needs to be configured on a Cisco Router, as well as how to go about configuring that interface


Setting the IP address on a Cisco Router interface is necessary for the router to be able to communicate with other networks, as well as its own network.

Prior to setting the IP address, the administrator needs to be aware of the address that will be allocated to the router. In many cases this will be dictated by a subnet mask that is already in use, or may be pre defined by either the network manager or service provider.

Secondly, the administrator needs to be aware of which interface needs to be configured. Most Routers only have a couple of interfaces and this is easy to determine, however some larger enterprise routers, such as those found in an ISP may have many interfaces. Configuring the wrong interface with the wrong IP address is a sure fire way to bring down your network and cause an outage.

Interfaces on modern modular routers are divided into slots, and these in turn are separated into interfaces. These are numbered on the back of a router to be physically inspected, and can also be listed from the command line with a show ip interface brief command





We can see that Interface FastEthernet 0/1 already has an IP address and that interface FastEthernet 0/0 is currently un-configured

Likewise, you would expect to have access to an up to date network diagram which should show you the ports and their connection partners. A show cdp neighbors command can also be used to determine who the routers existing neighbors are:






We can see from the above that we already have a connection to router R3 going out interface Fast Ethernet 0/1 . This confirms the information learned above with the show ip interface brief. 

It can also be a good idea to ping the IP address to be configured to ensure that its not in use.

Thus, It can now be determined with some certainty that interface FA0/0 is the interface to be configured

Once you have determined your interface to be configured, the actual configuration process is very easy. the syntax is as follows:
  1. enable to enter into privileged mode. (enter any passwords required)
  2. config terminal to enter into global configuration mode
  3. interface (interface) to enter the configuration mode for the desired interface
  4. no shutdown to bring the interface online
  5. ip address (ip address) (Subnet Mask)  to assign the desired IP to the interface.





For a serial interface, especially in a lab environment you will need to set the clock rate for the port. this is done using the clock rate (clock rate)  command on the interface.

And that's all there is to it! for an inside facing interface, this is all that is required to bring the interface online and you should now have connection to the network. this can be tested with a ping command.



For an outside (external) interface, assuming that all is set up on the other end OK then connectivity will also have been established

Please note that this article can also be located at our sister site www.dizzyit.com at:

http://dizzyit.com/2013/03/24/set-ip-address-cisco-router-interface/

Thank you for reading and please check back in again soon for more articles.








Sunday, March 17, 2013

Un install / Reset TCPIP stack in Windows Server, 8, 7, Vista, XP

Un install / Reset TCPIP stack in Windows Server, 8, 7, Vista, XP


by Graham Regan
In earlier versions of Windows (2000 and before) it was possible to remove and re install TCP/IP in Windows if there was a corruption / issue. this was done from add remove programs.
From Windows XP onwards, TCP/IP became a core component of Windows and cannot be removed. Instead, net shell is used to reset the stack.
The command to do this is (from the command prompt)
netsh int reset
e.g. netsh int reset c:\resetlog.txt
A reboot is then needed to complete the process.
the log file path is for logging the reset process  and can be used to troubleshoot / confirm that the reset has been performed correctly.
This command resets two registry keys, which has the same effect of removing and re installing the TCP/IP stack.
The registry key effected are:
system\currentcontrolset\services\tcpip\parameters and system\currentcontrolset\services\dhcp\parameters .



Set Basic Security and Passwords for Cisco Switches and Routers

Set Basic Security and Passwords for Cisco Switches and Routers

This article will cover setting passwords on a router / Switch at a CCNA level. TACACS and RADIUS will be covered in a future article.

The Enable password:

the Enable password protects privileged mode of the Router / Switch. This is where configuration changes can be made. This password can be cnfigured as an encrypted password or as plain text.

To configure in plain text use:
enable password  





To configure in encrypted mode use:
enable secret





The Enable Password is un-encrypted and can be seen in the running config in plain text as shown.





The Enable Secret looks like this in the running Config:






The enable secret password is encrypted with an MD5 hash and is very secure. In production, this is the password to use. There is no reason to have a plain text enable password in your config, as this will be over ruled by any enable secret that is in place. In a running config it looks like this:

You can encrypt plain text passwords with the service password-encryption command, however this is not as secure as the Enable Secret. The Service password-encryption command is a simple Vigenere cipher and is intended for line of sight protection. several websites are available that will break one of these passwords with no effort at all.






Console Password.

The Console Password protects the console port located (in most cases) at the rear of the router / switch. the syntax to set this password is:

line console 0
login
password




this password is stored in plain text in the running config and can be protected with the service password-encryption command






Telnet Password

 The Telnet password protects the router from remote access across a network.
Before setting this password i like to see how many telnet lines i have to play with. To do so, I use the line vty 0 ? command to verify how many lines are available.





Normally, passwords are set on the 1st 4 lines however you can do more if you wish. by not setting the password on the other lines you are not presenting a security vulnerability, you are just not presenting some of the available lines for telnet access

to set the telnet password the syntax is:
line vty 0 4
login
password









This command is stored in plain text in the running config and can be protected with the service password-encryption command:





There are two further security notes with this command.  Firstly, its not advisable under any circumstances to use the no login command here. this will allow access into the telnet ports without challenge. Secondly  telnet passes information in plain text which is an obvious security concern. For the uninitiated, this mean that the data can be intercepted by tools such as wireshark and easily exploited. instead SSH should be used as a transport protocol here. This will be covered on a further article.

The Auxiliary Password 





The Auxiliary port is only present on Routers, not switches. It is used traditionally as a port for remote access via a modem. it is more often used these days as a backup to the console port.

To protect the Aux port:

line aux 0
login
password

As above, this password can be encrypted with the service password-encryption command.:







This concludes the article on setting basic Cisco router and switch security. the information here was presented at a CCNA level. Further articles will go deeper into security hardening a Cisco device.

Thanks for reading!







Monday, March 4, 2013

PowerShell - Set Execution Policy - Files Could not be Loaded because the running of scripts is disabled on this system.

PowerShell - Set Execution Policy -  Files Could not be Loaded because the running of scripts is disabled on this system.


when using PowerShell you may get an error stating that " Files Could not be Loaded because the running of scripts is disabled on this system. Please provide a valid certificate with which to sign the files" as shown below:



This at a basic level means that your security settings in PowerShell are preventing you from running the script ( the execution policy.

To fix this, you need to set the execution policy to a more relaxed setting. these are as follows:

  • Restricted - No Scripts can be run. Windows PowerShell can only be used in interactive mode.
  • All Signed - Only Scripts signed by a trusted publisher can be run
  • RemoteSigned - Downloaded scripts must be signed by a trusted publisher before they can be run
  • Unrestricted - No Restrictions, any PowerShell script can be run
At the time of writing, PowerShell comes out of the box in restricted mode.

To check which execution policy your system is running type Get-ExecutionPolicy




To change to policy you type Set-Execution Policy . When you run and go to a less secure setting, you will get a large warning asking if you want to do so
e.g. Set-ExecutionPolicy RemoteSigned.




It's not recommended to use unsigned as this would allow anyone who accesses the system to run malicious or damaging code on your system. Most individuals will settle on Remote Signed, however before doing so in an organisation please ensure that this complies with your organisations security settings.

for a video walk through of this, please check this youtube video from our sister site www.dizzyit.com . The article can also be located there.




Monday, February 18, 2013

AFP Virus Removal


For anyone dealing with an AFP virus which is going around – try this:
Download and burn this to a CD and/or onto a USB: http://www.malwarebytes.org/
If using a usb, ensure that the legacy USB mode is turned on in the BIOS to allow the system to read a USB –NOTE : USB 3 ports may not work with this.
Boot the machine into safe mode and then put the usb / cd in the drive and run the program
See if this fixes the issue
Apparently this is a pretty easy virus to get rid of, but one that’s causing headaches for a lot of AV companies.
Make sure you FORMAT ANY USB DRIVES after using in an infected machine 

Sunday, February 17, 2013

Windows 2008 Sever Core / Dos Networking Netsh Commands

Windows 2008 Sever Core / Dos Networking Netsh Commands

Some Common command line tools for Networking in Server 2008 and Dos:
  • to set IP in Dos / 2008 server core: netsh interface ipv4 set address name=2 source=static address= mask= gateway=
  • use netshell to verify the "name" of the interface: netsh interface ipv4 show interfaces
  • to set DNS server IP in server core: netsh interface ipv4 add dnsserver name=2 address= index=1
  • to name a server in server core: netsh renamecomputer %computername% /newname: /userd: /passwordd: /reboot:0  .  Note: the dd in passwordd is not a mistype, its the spelling that is used the reboot:0 will force the machine to reboot
  • to join a domain:
    netdom join %computername% /domain: /username: /passwordd /reboot:0

  • to disable firewall: netsh advfirewall set allprofiles state off

  • use ocsetup command to add / remove roles
  • to uninstall DNS: ocsetup DNS-Server-Core-Role /uninstall
  • to uninstall DHCP: ocsetup DHCPServercore /uninstall
  • to enable remote management so it can be be administered from remote computer:  
    1. WinRM quickconfig (on the remote comp)

Tuesday, February 12, 2013

Adding Network Printers via DOS and Batch File


Adding Network Printers via DOS and Batch File


pretty easy this one.

if the network printer is shared, the command you need is:

start \\servername\printershare

this can be used in batch files as well.

note: if you use the unc path, dos will probably complain in a batch file that the UNC was used and not a mapped dive letter. If you are having troubles with this then just use a net use command to map the drive first.