Python – For Loops

I’m learning the basics of Python and these are my publically available notes for my reference. Hopefully they are useful for my readers as well.

The For loop in Python is used to iterate through different objects such as lists or dictionaries. The power of the For loop is that it can run as many times as needed and then stop without having to define the number of times it should run. It can also be used to run n number of times where we define n ourselves.

I’ll give some examples related to networking to make it more interesting. Let’s say that we want to create a lot of loopbacks so that we can advertise routes in BGP to play around with prefix-lists. We will create 10 loopbacks. This means that the For loop should run 10 times, we can use the range command for this. The iterator will start at 0 and have a stepping by 1 by default which means that our first loopback will be loopback0 and our first network will be 10.0.0.1/32.

for loopback in range(10):
    print "interface loopback{}".format(loopback)
    print "ip address 10.0.{}.1 255.255.255.255".format(loopback)

Continue reading

Internet of Things Messaging, Part 3: Testing Mosquitto

So, in the last installment of this series on the messaging protocol MQTT, we installed the Mosquitto MQTT broker. Now we'll test it which we’re going to do on the same machine that Mosquitto is running on. First, you’re going to need to install the Mosquitto client tools:sudo apt-get install mosquitto-clients Now, let’s run Mosquitto from the command line:root@deb-01:/home/mgibbs# mosquitto 1485602498: mosquitto version 1.3.4 (build date 2014-08-17 03:38:31+0000) starting 1485602498: Using default config. 1485602498: Opening ipv4 listen socket on port 1883. 1485602498: Opening ipv6 listen socket on port 1883. The Mosquitto broker is now listening on the standard MQTT port, 1883, for both IPv4 and IPv6 MQTT requests. Next, open a new terminal window and enter:To read this article in full or to leave a comment, please click here

APIC-EM Data Export

I was at a Cisco DNA customer event on Thursday. Someone in the audience asked a very good question. Basically they wanted to know if there was a way to extrapolate data from the APIC-EM network management tool. At first glance it didn’t seem to be something that was available in the UI. One of the Cisco representatives quickly and correctly stated that it APIC-EM to Excelis all available from the API.

My initial thought was that this was a product weakness. Why can’t we just manually extract this stuff to a CSV and import it wherever we want to? Whether due to intentional omission or strategic direction, an API first approach is better. It is better because it allows systems to be glued together and more of our mindless tasks to be automated. So the counter argument to that really revolves around use cases, initial effort and skills gaps. The examples I’m about to provide should help alleviate some of those concerns.

TL;DR — Looking to get APIC-EM data into an Excel spreadsheet? Python can easily grab Host and Device Data and provide it in a format that is easily consumable such as Text, Tab, CSV or other format of choice.

Continue reading

LSA issue @ January 28, 2017 at 02:35PM

A burden of many #NETCONF articles and tutorials is that they are often silent about the #YANG part. This is why we would like to highlight this post by Michael Kashin called ""Getting Started With NETCONF and YANG"" [1]. Not only this article covers the basics of network elements configuration via NETCONF (particularly via python

Skylake Xeon Ramp Cuts Into Intel’s Datacenter Profits

Every successive processor generation presents its own challenges to all chip makers, and the ramp of 14 nanometer processes that will be used in the future “Skylake” Xeon processors, due in the second half of this year, cut into the operating profits of its Data Center Group in the final quarter of 2016. Intel also apparently had an issue with one of its chip lines ­– it did not say if it was a Xeon or Xeon Phi, or detail what that issue was – that needed to be fixed and that hurt Data Center Group’s middle line, too.

Still,

Skylake Xeon Ramp Cuts Into Intel’s Datacenter Profits was written by Timothy Prickett Morgan at The Next Platform.

Samsung Galaxy S8: Leaks, rumors and fake news

Samsung will not be launch its new Galaxy flagship phone, the S8, next month at Mobile World Congress like it usually announces new Galaxy flagships. The launch is delayed until March 29.The delay did not slow the January leaks, rumors and fake news about the new device, though, including leaked images showing the Galaxy S8 will have a USB C port, an almost bezel-less display and, OMG, a 3.5-inch jack that we may hear about every day in the news during the post-launch week because of the attention the iPhone 7 received for not having one.To read this article in full or to leave a comment, please click here

Docker Online Meetup recap: Introducing Docker 1.13

Last week, we released Docker 1.13 to introduce several new enhancements in addition to building on and improving Docker swarm mode introduced in Docker 1.12. Docker 1.13 has many new features and fixes that we are excited about, so we asked core team member and release captain, Victor Vieux to introduce Docker 1.13 in an online meetup.

The meetup took place on Wednesday, Jan 25 and over 1000 people RSVPed to hear Victor’s presentation live. Victor gave an overview and demo of many of the new features:

  • Restructuration of CLI commands
  • Experimental build
  • CLI backward compatibility
  • Swarm default encryption at rest
  • Compose to Swarm
  • Data management commands
  • Brand new “init system”
  • Various orchestration enhancements

In case you missed it, you can watch the recording and access Victor’s slides below.

 

Below is a short list of the questions asked to Victor at the end of the Online meetup:

Q: What will happened if we call docker stack deploy multiple times to the same file?

A: All the services that were modified in the compose file will be updated according to their respective update policy. It won’t recreate a new stack, update the current one. Same Continue reading

12% off Fellowes Powershred Jam-Proof Cross-Cut Paper and Credit Card Shredder – Deal Alert

An ideal consideration for tax time, the Powershred from Fellowes shreds 12 sheets of paper per pass into 397 Security Level P-4 cross-cut particles. It effortlessly shreds staples, credit cards, paper clips, and CDs/DVDs, and is 100% jam-proof. Its waste bin is a generous 6-gallons, and features a simple pull-out design with LED bin-full indicator. The highly rated shredder typically lists for $158, but is currently discounted 12% to $139.99. See the discounted Powershred now on Amazon.To read this article in full or to leave a comment, please click here

LeakedSource’s shutdown is a blow to amateur hackers

Amateur hackers are alarmed with the apparent demise of LeakedSource, a controversial breach notification site that’s been accused of doing more harm than good.U.S. law enforcement has allegedly confiscated its servers, and now some hackers are wondering if customers of LeakedSource might be next.  “All the people who used PayPal, credit card, etc. to buy membership, the FBI now have your email, payment details and lookup history,” wrote one user on HackForums.net.To read this article in full or to leave a comment, please click here

LeakedSource’s shutdown is a blow to amateur hackers

Amateur hackers are alarmed with the apparent demise of LeakedSource, a controversial breach notification site that’s been accused of doing more harm than good.U.S. law enforcement has allegedly confiscated its servers, and now some hackers are wondering if customers of LeakedSource might be next.  “All the people who used PayPal, credit card, etc. to buy membership, the FBI now have your email, payment details and lookup history,” wrote one user on HackForums.net.To read this article in full or to leave a comment, please click here

Microsoft’s shell game: 2 new ways to deploy Windows 10

Microsoft is rumored to be working on two new “shells,” but they should not be confused with PowerShell, which is replacing CMD as the primary prompt in Windows 10. While the term “shell” is being used interchangeably, these shells are more like an interface than a command line. First is a single, unified, “adaptive shell” for Windows 10, while the second will actually be a lightweight version of Windows 10. The unified adaptive shell is called “Composable Shell,” or CSHELL. According to a report from Windows Central, which cites unnamed sources, Microsoft's new universal shell will be a single Windows 10 experience that can adapt and scale to the device it’s on, from a phone to a PC. To read this article in full or to leave a comment, please click here

33% off H&R Block Tax Software Deluxe Federal and State 2016 – Deal Alert

Step-by-step interviews guide you through a customized experience relevant to your tax situation. Everything you need to prepare your federal and state taxes in one complete program. Additionally, the H&R Block Refund Bonus program offers you the option of using some or all of your federal individual income tax refund to purchase electronic gift cards from Amazon.com, and as a special bonus they'll add up to 10% to your e-gift card. The PC download is available on Amazon now for 33% off its retail price. Mac version available for the sale price as well. See the popular tax software now on Amazon.To read this article in full or to leave a comment, please click here

Five arrested for hacking into ATMs and stealing $3.2 million

Law enforcement authorities from Europe and Asia have arrested five members of an international cybercriminal group that specialized in hacking into automated teller machine (ATMs).The investigation began in early 2016, according to Europol. Three suspects were arrested in Taiwan, one in Romania, and one in Belarus. Most of them had multiple citizenships and could travel easily between countries, the agency said Friday.Hacking into ATMs to steal money is nothing new, and there are malware programs built specifically for such machines that allow criminals to withdraw money using hidden commands.To infect ATMs with such malware most attackers either receive help from bank insiders or buy service keys that can be used to open the front panels of ATMs and access their communications ports.To read this article in full or to leave a comment, please click here

Five arrested for hacking into ATMs and stealing $3.2 million

Law enforcement authorities from Europe and Asia have arrested five members of an international cybercriminal group that specialized in hacking into automated teller machine (ATMs).The investigation began in early 2016, according to Europol. Three suspects were arrested in Taiwan, one in Romania, and one in Belarus. Most of them had multiple citizenships and could travel easily between countries, the agency said Friday.Hacking into ATMs to steal money is nothing new, and there are malware programs built specifically for such machines that allow criminals to withdraw money using hidden commands.To infect ATMs with such malware most attackers either receive help from bank insiders or buy service keys that can be used to open the front panels of ATMs and access their communications ports.To read this article in full or to leave a comment, please click here

Fragmentation nixed a Cisco-Android network partnership

Cisco Systems tried to give Android devices the same kinds of integration it later provided for iPhones and iPads but gave up because the Android ecosystem was too fragmented.A Cisco-Apple partnership announced in 2015 gives iOS devices capabilities that other wireless clients don’t have on Cisco-based enterprise networks. Among other things, enterprises can designate work-related applications like videoconferencing for priority on the wireless link between iOS devices and a Wi-Fi access point.To read this article in full or to leave a comment, please click here

Fragmentation nixed a Cisco-Android network partnership

Cisco Systems tried to give Android devices the same kinds of integration it later provided for iPhones and iPads but gave up because the Android ecosystem was too fragmented.A Cisco-Apple partnership announced in 2015 gives iOS devices capabilities that other wireless clients don’t have on Cisco-based enterprise networks. Among other things, enterprises can designate work-related applications like videoconferencing for priority on the wireless link between iOS devices and a Wi-Fi access point.To read this article in full or to leave a comment, please click here