| Maven | Gradle | Comment |
|---|---|---|
| compile | api if the dependency should be exposed to consumers. implementation if the dependency should not be exposed to consumers. |
|
| provided | compileOnly | Maven provided is also available at runtime. Gradle compileOnly is limited to compile only. |
| runtime | runtimeOnly | |
| test | testImplementation |
Page 16 of 34
Global Unicast Address
This address has a global scope with the same purpose as IPv4 public address.
Link Local Address
This address has a local scope and cannot be used outside the link (i.e. network segment or broadcast address) and non routable. Normally has the following prefix:
FE80::/10
Loopback Address
This address corresponds to the software loopback interface of the network card and doesn't necessarily requires hardware associated with it. Normally has the following address:
::1/128
Unspecified Address
This address indicates an absence of address. This is represented by the following:
::/128
Unique Local Address
This is analogous to IPv4 private networking and has the following range:
FC00::/7
FD00::/8
Pre-requisite
- Putty application
Displaying the Interfaces
Use the following command to display the available interfaces and their states:
show ip interface brief
Assigning an IP
-
Connect to cisco console using putty.
-
Press the enter key to enter into user mode.
-
Execute the following command to enter into privilege mode:
enable -
Load the startup-config into the running-config using the following command:
copy startup-config running-config -
Execute the following command to enter into the configuration mode:
config terminal -
Configure an interface using the following syntax:
interface <INTERFACE_NAME>Example
interface GigabitEthernet0/0 -
Assign an IP address using the following syntax:
ip address <IP_ADDRESS> <SUBNET_MASK>Example
ip address 10.0.0.210 255.255.255.0 -
Turn on the interface using the following command:
no shutdown -
Exit the interface configuration using the following command:
exit -
Exit the configuration mode:
exitAfter this you can display the interfaces and see the state of the interface just configured
-
Save the update on the running-config to the startup-config file using the following command:
copy running-config startup-config
To always have a readable command line on cisco console, aux and/or virtual terminals it is recommended to synchronize the logging.
Pre-requisite
- Putty application
Synchronizing the Logging
-
Connect to cisco console using putty.
-
Press the enter key to enter into user mode.
-
Execute the following command to enter into privilege mode:
enable -
Load the startup-config into the running-config using the following command:
copy startup-config running-config -
Execute the following command to enter into the configuration mode:
config terminal -
Synchronize the logging on console using the following commands:
line con 0 logging sync -
Synchronize the logging on AUX using the following command:
line aux 0 logging sync -
(Optional) Synchronize the logging on 5 virtual terminals using the following command:
line vty 0 4 logging syncOnly do this if you are using virtual terminals, specially with SSH connections.
-
Exit the virtual terminal configuration using the following command:
exit -
Exit the configuration mode:
exit -
Save the update on the running-config to the startup-config file using the following command:
copy running-config startup-config
Pre-requisite
- Putty application
Enabling SSH
-
Connect to cisco console using putty.
-
Press the enter key to enter into user mode.
-
Execute the following command to enter into privilege mode:
enable -
Load the startup-config into the running-config using the following command:
copy startup-config running-config -
Execute the following command to enter into the configuration mode:
config terminal -
Change the hostname using the following syntax:
hostname -
Change the domain name using the following syntax:
ip domain-name -
Generate the SSH keys using the following command:
crypto key generate rsa general-keys -
On How many bits in the modules [512]:, type in 2048 and press the enter key.
-
Enable SSH version 2 using the following command:
ip ssh version 2 -
Create an SSH credential using the following syntax:
usernamesecret -
Create 5 (i.e. vty 0 to 4) virtual terminals for SSH connections, using the following command.
line vty 0 4 -
Allow only SSH to the newly created virtual connection using the following command:
transport input ssh -
Use only the local database for credentials using the following command:
login local -
Exit the virtual terminal configuration:
exit -
Exit the configuration mode:
exit -
Save the update on the running-config to the startup-config file using the following command:
copy running-config startup-config -
Using putty, connect on any known IP of the router via SSH using the credentials you made from step 11.
Importing a certificate to a keystore
keytool -importcert -alias <ALIAS> -v -keystore <KEYSTORE_FILE> -file <INPUT_FILE> -storepass <KEYSTORE_PASSWORD>
Listing the certificates from a keystore
keytool -list -v -keystore <KEYSTORE_FILE> -storepass <KEYSTORE_PASSWORD>
Include the -a <ALIAS> parameter to just display a single certificate
Delete a certificate from a keystore
keytool -delete -v -alias <ALIAS> -keystore <KEYSTORE_FILE> -storepass <KEYSTORE_PASSWORD>
Use the following command to delete an entry of a Java keystore:
The keytool is normally found in $JAVA_HOME/jre/bin (i.e. the $JAVA_HOME variable is where you’ve installed JDK).
keytool -delete -v -alias <ALIAS> -keystore <KEYSTORE_FILE> -storepass <KEYSTORE_PASSWORD>
| Token | Description |
| ALIAS | The alias used upon importing the certificate. |
| KEYSTORE_FILE | The target key store file (e.g. cacerts found in $JAVA_HOME/jre/lib/security) |
| KEYSTORE_PASSWORD | The password for accessing the keystore (i.e. the default is changeit) |
Pre-requisite
- Putty application
Overriding the Forgotten Password
-
Connect to cisco console using putty.
-
Press the enter key to enter into user mode.
-
Once in the user mode (i.e. the prompt with greater than sign >), reboot the cisco router (i.e. using the physical switch of the router).
-
Going back to your putty terminal, once you see any text on it, issue the break command.
-
Execute the following command to disable the startup-config:
confreg 0x2142 -
Reset cisco router using the following command:
reset -
Expect to see the following question:
Would you like to enter the initialization configuration dialog? [yes/no] -
Type in no for the answer and press the enter key.
-
Press the enter key one more time to enter into user mode.
-
Execute the following command to enter into privilege mode:
enable -
Load the startup-config into the running-config using the following command:
copy startup-config running-config -
On Destination filename [running-config]?, press the enter key.
-
Execute the following command to enter into the configuration mode:
config terminal -
Change the password using the following syntax:
enable secret <PASSWORD>Example of setting cisco as the password:
enable secret cisco -
Execute the following command to enable the startup-config:
config-register 0x2102 -
Exit from the configuration mode using the following command:
exit -
Save the update on the running-config to the startup-config file using the following command:
copy running-config startup-config -
On Destination filename [startup-config]?, press enter key.
-
Reboot the cisco router (i.e. using the physical switch of the router).
After this you have the new password in effect.
Pre-requisite
- Windows 64-bit
- Putty application
Connecting to Cisco Console
-
Access https://software.cisco.com/download/home.
This requires you to be logged in to download anything.
-
Search for the following:
Software on Chassis : 3945 Integrated Services Router -
On the Select a software type, choose the following:
USB Console Software -
Download the latest release (i.e. 3.1 is the latest at the time of this writing).
This is in the form of the zip file.
-
Extract the zip file and select which appropriate installer (i.e. based on OS type) you need.
We will choose Windows 64-bit for this procedure.
-
Once the installer is identified, install it.
-
Insert the mini USB-B to the console port at the back of the cisco router.
-
Power on your cisco router.
-
Insert the USB-A to one of your computer's USB where you installed the USB Console Software.
-
Open your windows device manager and check the node, Ports (COM & LPT).
-
Identify the COM port for Cisco Serial, as follows:
-
Once the COM port is identified, open your putty application.
-
Select Serial as the Connection type.
-
In the Serial line, type in the identified COM port from step 11.
-
Click the Open button.
This will open a cisco console, if everything is good.
Sometimes we wrote a script intended for linux but we are using windows. However, when we deploy the script to linux it doesn't work.
For example you've created the file helloworld.sh in windows with the following content:
#!/bin/sh
echo "Hello World"
Transport helloworld.sh to linux and make it executable (i.e. using the command chmod 755 helloworld.sh). Execute it using the following command:
./helloworld.sh
Expect to see something similar to the following error:
-bash: ./helloworld.sh: /bin/sh^M: bad interpreter: No such file or directory
To remedy this, run dos2unix command with helloworld.sh as follows:
dos2unix helloworld.sh
Expect an output similar to the following:
dos2unix: converting file helloworld.sh to Unix format...
After this, execute the helloworld.sh again and expect no error.



Recent Comments