Sep 082009
 

This Expect script takes as it’s argument, the IP Address of an IOS device that is using AAA Authentication (Username/Password), and returns the OSPF Neighbors of the device.
Usage: ospf_neighbors_script ip address
The script also creates a file with the OSPF Neighbors in the directory it’s run from. The format is “ip address-ospf_neighbors”,
{quickdown:47}
kshort@LinuxStudent:~$ ospf_neighbors_script 10.255.0.26
Username? kshort
Password?
Trying 192.168.0.26…
Connected to 192.168.0.26.
Escape character is ‘^]’.

User Access Verification

Username: kshort
Password:

Test-Router#terminal length 0
Test-Router#sho ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.1       0   FULL/  -        00:00:38    192.168.0.85     Serial1/0.2
192.168.2.1       0   FULL/  -        00:00:38    192.168.0.25     Serial1/0.1
192.168.3.1       1   FULL/BDR        00:00:39    192.168.2.70     GigabitEthernet0/1
192.168.4.1       1   FULL/BDR        00:00:38    192.168.2.66     GigabitEthernet0/0
Test-Router#

kshort


Warning: fopen(/home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/lib/standard.txt) [function.fopen]: failed to open stream: No such file or directory in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 104

Warning: fread(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 105

Warning: fclose(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 106
.