cisco

Dividing a given network in 4 subnets

╄→尐↘猪︶ㄣ 提交于 2020-01-24 02:13:07
问题 Lets suppose I get given the network (57.70.32.0/21) and I need to divide it into 4 equally sized networks. I know the mask at the moment is (255.255.248.0) but would I need to change the prefix length of the network given to 26 so I can get the 4 equal size subnets? Basically that's my biggest question and also if I should then use the 4th octet for subnetting or stay with the 3rd to do it. Any help would be extremely appreciated. 回答1: you can divide your ips into 4 networks with 510 IPs

Updating IOS's via SCP in bash with expect

↘锁芯ラ 提交于 2020-01-07 03:41:26
问题 Good day. I am attempting to create/run a script that will allow me to send an updated IOS from a server to my network devices. The following code works when I put in a manual IP address right before the ":flash" command. #!/user/bin/expect set IOSroot "/xxxxx/xxx/c3750e-universalk9-mz.150-2.SE10a.bin" set pw xxxxxxxxxxxxxxxxxxx spawn scp $IOSroot 1.1.1.1:flash:/c3750e-universalk9-mz.150-2.SE10a.bin expect "TACACS Password:" send "$pw\r" interact The code there works great and as expected.

Ansible + Cisco idempotence

亡梦爱人 提交于 2020-01-06 03:15:35
问题 So I'm doing some testing with Ansible to manage Cisco devices (specifically a 3750 in this case). I'm able to add my VLAN's and Loopbacks with no issue. Just trying to get Ansible to stop registering a change in the task when the Loopback or VLAN exists. Right now my play looks like this: - name: Set the IP for Loop 0 ios_config: provider: "{{ connection }}" lines: - description AnsibleLoop0 - ip address 8.8.8.8 255.255.255.0 before: - interface Loopback0 match: exact Anytime this task is

Conditional statament inside expect command called from a bash script

邮差的信 提交于 2019-12-25 04:35:29
问题 I've been trying to automate some configuration backups on my cisco devices, i've already managed to do the script that accomplishes the task but I'm trying to improve it to handle errors too. I think that's necessary to catch the errors on two steps, first just after the 'send \"$pass\r\"' to get login errors (access denied messages) and at the 'expect \": end\"' line, to be sure that the commands issued were able to pull the configuration from the device. I've seen some ways to do it if you

How do I get the mac address or IPAddress from a cisco callmanager?

∥☆過路亽.° 提交于 2019-12-25 04:33:20
问题 Is there any way to retrieve either the mac address or the IP address of phones on a Cisco server using Callmanager version 6 via the axl with VB.net? The server can retrieve the IP address itself to use the phone and it's not in the database information retrieved from the server. 回答1: You can download the WSDL file from your CallManager server. Then with the included methods, you can make a call to getPhone and it's pretty simple from there. If you want to do it in a more manual way, you can

Linux Expect/TCL Comm Port Comunication Cisco Switch

天涯浪子 提交于 2019-12-25 03:26:46
问题 I have done much reading on TCL/Expect and wrote the following script to connect to the comm port on my RPi-Kali-Linux box. #!/usr/bin/expect -f set timeout -1 ;#set the portID and open it for reading and writing set portID [open /dev/ttyUSB0 r+] set baud 9600 ;#Configure the port with the baud rate ;#and dont block on read, dont buffer output fconfigure $portID -mode "9600,n,8,1" fconfigure $portID -blocking 0 -buffering none ;#Write to the comm port by sending a carrage return spawn -open

Unable to open shell: Ansible v2.3.1.0

非 Y 不嫁゛ 提交于 2019-12-24 10:03:24
问题 So I use Ansible day-to-day to manage our AWS instances and now I'm testing out managing our network infrastructure (I'm a Network guy, who can do some system admin stuff) but have run into a problem that I can't seem to get around. I have a Cisco 3750G here that I've enabled SSH on. I can ssh in with the specified user and run all the commands that are failing in my playbook. I'm able to use the ping module successfully from Ansible to this switch but whenever I try to use the ios_commands

Cisco visual message waiting indicator ( VMWI or MVI )

百般思念 提交于 2019-12-23 02:56:14
问题 How can I programatically illuminate Cisco IP Phones Visual message waiting indicator (VMWI or MWI) ? For sipwiz Answer: IP Adress 10.1.1.2 => is local IP in which I will send SIP Notify Message IP Address 10.1.1.9 => is IP Address of Cisco Phone that I will send SIP Message The Cisco Phone that I send SIP Message does "care" my messages, and I got exception while i try to get response messge from Cisco Phone :"An existing connection was forcibly closed by the remote host". Actully it does

Golang SSH to Cisco Wireless Controller and Run Commands

。_饼干妹妹 提交于 2019-12-22 11:29:05
问题 I am trying to SSH to a Cisco wireless controller through Go, using Go's golang.org/x/crypto/ssh library, to programmatically configure access points. The problem I'm running into is correctly parsing the controller CLI in Go. For example, this is the typical SSH login to the controller: $ ssh <controller_ip> (Cisco Controller) User: username Password:**************** (Cisco Controller) > I am trying to figure out how to send the username and then the password after the SSH session is

Import error when using netmiko with django : No module named '_cffi_backend'

╄→尐↘猪︶ㄣ 提交于 2019-12-20 07:46:30
问题 Netmiko works fine when I execute below script file (test.py) from the linux cli #!/var/www/html/devopsenv/bin/python from netmiko import ConnectHandler import getpass cisco_asr = { 'device_type': 'cisco_xr', 'ip': 'my ip', 'username': 'user', 'password': 'pass', 'verbose': True } net_connect = ConnectHandler(**cisco_asr) config_commands = [ 'int BE222.2481', 'vrf devops_test', 'ip add 10.1.1.1/30'] output = net_connect.send_config_set(config_commands) #net_connect.commit() print(output)