Jump to content

Telnetting in php ( Cisco devices )


lynxus

Recommended Posts

Hi guys,

I have spent the passed year or so making massive php scripts that output cisco config based on a few simple bits of data.. Anyway.

 

Ive come across a problem where just echoing to a blank page for me to copy and paste to the device just isnt an option ( Need to configure 32 switches everytime i make i change )

 

So,

What id like to do is have the script telnet to my devices and do the code for me. Summat along the lines of below :

 

( My main issue is the telnet part, and how to confirm the command was sent correctly and the router is now ready for the next command )

 

 

1) Select the devices from a database ie:

10.0.0.1

10.0.0.2

10.0.0.3

 

2) Telnet to 10.0.0.1 and start doing my lines of code.. IE:

conf t

int blaa

description blaa

 

2.5) Do point 2 again, but for the next device ( 10.0.0.2 )

 

 

Does anyone have any idea how to achieve this?

 

 

 

Thanks

Graham

 

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.