
Udemy: دوره را با 10 دلار در اینجا دریافت کنید:
GNS3 Academy: دوره 10 دلار را در اینجا دریافت کنید:
ویدیوهای رایگان بیشتر پایتون در اینجا:
برنامه نویسی پایتون را با GNS3 بیاموزید. در این سری از فیلم ها به شما نشان خواهم داد که چگونه می توانید به راحتی و به راحتی شبکه های سیسکو را با استفاده از پایتون برنامه ریزی کنید. در این فیلم یک روتر IOSv Cisco را با استفاده از پایتون روی یک ظرف اوبونتو داکر برنامه ریزی می کنیم.
اسکریپت مورد استفاده در این فیلم در GitHub در اینجا موجود است:
رونوشت:
این یکی از چندین فیلم است که در مورد برنامه نویسی پایتون بحث می کند. اکنون اطلاعات زیادی در رابطه با برنامه نویسی پایتون در اینترنت وجود دارد ، اما در این سری از فیلم ها قصد دارم فقط روی استفاده از پایتون با دستگاه های شبکه و به طور خاص با gns3 تمرکز کنم.
من یک یادگیرنده بسیار قوی در یادگیری عملی هستم. به این فکر کنید ، وقتی کودک بودید ، به دانشگاه یا مدرسه رفتید تا یاد بگیرید که چگونه دوچرخه سوار شوید؟ به طور معمول یاد گرفته اید که چگونه با دوچرخه سوار شوید و چند بار با اتومبیل سوار شوید ، اشتباه کنید. اما همانطور که تمرین می کردید در دوچرخه سواری بهتر و بهتر خواهید شد.
من فکر می کنم برای هر مهارت دیگری که می خواهید به دست آورید و هر دانش دیگری که می خواهید به دست بیاورید ، همین مسئله صادق است. بهترین راه برای انجام این کار فقط انجام این کار ، اشتباه کردن ، انتخاب خودتان است و دوباره امتحان کنید. با این حساب می خواهم به شما نشان دهم که چقدر سریع می توانید با استفاده از پایتون برنامه نویسی یک شبکه سیسکو را دریافت کنید.
در Google من جستجوی پایتون telnet را انجام داده ام و اولین مشکل من کتابخانه telnet یا سرویس دهنده telnet است که در Python 2.7 موجود است. اکنون یک بحث بزرگ در انجمن پایتون وجود دارد که در مورد کدام نسخه پایتون باید یاد بگیرید. Python 2.7 جایگزین Python 3. می شود اما در وب سایت Python هنوز می توانید Python 2.7 را بارگیری کنید و بسیاری از سیستم عامل ها و دستگاه های شبکه به طور پیش فرض دارای نسخه 2.7 هستند. من قصد دارم پایتون 2.7 و پایتون 3 را به عنوان بخشی از این فیلم ها یا بخشی از دوره GNS3 Python به شما نشان دهم. شما ممکن است فقط Python 2.7 را در دسترس داشته باشید بنابراین خوب است بدانید که باید برای آینده نیز پایتون 3 را یاد بگیرید.
بنابراین متوجه اسکریپت ساده ای شوید که می توانیم از مستندات پایتون کپی کنیم. ما با یک اسکریپت شروع می کنیم و برنامه ریزی توپولوژی GNS3 را شروع می کنیم.
در GNS3 قصد دارم یک روتر iOS را به فضای کاری و همچنین سوئیچ iOSv بکشم. این دستگاه ها برای بوت شدن مدت زمانی طول می کشد ، بنابراین برای اینکه کانتینرهای docker من بتواند سریع به اینترنت وصل شود ، قصد دارم از یک سوئیچ لایه 2 استفاده کنم. یکی از کانتینرهای docker موجود در یک ظرف 2 آبی است و این چیزی است که من به جای اینکه سعی کنم Python را روی ویندوز کامپیوتر خود اجرا کنم یا سعی کنم Python را روی سایر سیستم عامل ها کار کند ، در این توپولوژی استفاده می کنم. این کار برای ما بسیار سریعتر خواهد بود که فقط از یک ظرف docker استفاده کنیم و آن را به توپولوژی GNS3 اضافه کنیم.
باز هم ، اعتقاد من این است که هرچه سریعتر شروع کنید یا یاد بگیرید ، اشتباه کنید و از آن درس بگیرید. با تلاش برای یادگیری بهترین روش برای انجام همه کارها فوراً آویزان نشوید. تازه شروع کنید
برخی افراد بر این باورند که برای تبدیل شدن به یک برنامه نویس یا استفاده از مهارت های برنامه نویسی در شبکه نیاز به داشتن مدرک دارند. من لزوماً با آن موافق نیستم. تازه شروع کنید
بنابراین در دستگاه اوبونتو قصد دارم به پیکربندی ویرایش کنم. من قصد دارم این دستگاه را تنظیم کنم تا از DHCP استفاده کند و روی Save کلیک کنید و شروع را کلیک کنید. برای راه اندازی شبکه می خواهم یک کنسول باز کنم
به هر دستگاه
در حال حاضر دوباره دستگاه های سیسکو برای راه اندازی شدن مدتی طول می کشد اما ظروف docker ما از قبل بوت شده است و ما می توانیم google.com را پینگ کنیم حتی اگر سوئیچ و روتر هنوز هم وجود داشته باشد
بوت شدن
بنابراین چگونه می توان به روزرسانی کرد؟ ما منابع خود را در اوبونتو به روز می کنیم ، این کار انجام شده است ، پایتون را نصب می کند.
در این مثال اول قصد دارم Python 2.7 را نصب کنم. بنابراین نسخه پایتون از Python که ما از آن استفاده می کنیم 2.7 است. 1. بنابراین در اینجا فیلمنامه ای که می خواهیم با آن شروع کنیم کامل نیست. آنچه ما اکنون انجام خواهیم داد لزوماً بهینه ترین روش اجرای اسکریپت مانند این نیست
ایده وجود دارد ، ما می خواهیم شروع کنیم ، آن را کار کنیم ، برای مثال با ایجاد یک حلقه برگشتی روی روتر و پیکربندی VLAN ها روی سوئیچ و سپس می توانیم بر روی اسکریپت خود بسازیم و آن را بهینه کنیم.
من قصد دارم از نانو برای ایجاد پرونده استفاده کنم ، بنابراین بیایید با این اسکریپت Python Router1 1 تماس بگیریم تا شروع شود. و بعد قصد دارم کد را از اینترنت در نانو بچسبانم. بنابراین ما در حال وارد کردن ماژول ها هستیم.
دستگاهی که می خواهیم به آن راه برویم روتر خواهد بود. بنابراین باید آدرس IP روتر ، نام کاربری و رمزعبور و سایر جزئیات را برای پیکربندی اسکریپت پیکربندی کنیم
به روتر بنابراین قبل از اینکه با اسکریپت خود ادامه دهیم بیایید دستگاه های شبکه را پیکربندی کنیم. اینجا روتر را که بوت شده است ببینید. اکنون گفتگوی پیکربندی اولیه را دور می زنم.
رونوشت محدود شده توسط YouTube.
Lovin this Python content and look forward to more.
When will the Python specific course be available?. Hopefully not too expensive but whatever it is "shut up and take my money!!!"
Thank you once again.
i got recently CCNA certified and this is the first time i see programming and networking work together , this is so freakin magical !
i can only imagine the fun and euphoria i will feel having my router on GNS3 configured with loopback using a simple python script 😀
thanks for the motivation to move forward in network automation however i would love to see things that python can do that are not similar to just telneting and directly configuring the routers
amazing David! straight forward!
sir David i am following your ccna labs in order to pass my ccna exam ; i am close to complete the labs; would the next step be learning paython or what?? please help
Thank you so much sir, the mistake I made was using Eve-ng community edition. Switched back to GNS3 and I am using your videos. Now I have a lot of catching up too do. I really appreciate your efforts. A big thank you
Same Script does not work for Juniper or Junos after a password is entered, appreciate if someone share script for junos..
Hey David how to use ssh instead of telnet ?
Amazing tutorial. Thank you. I have a question how does Python really help speed up configuration? I think putting everything in a notepad and copying is much faster. Please prove me wrong if I am.
Sir,
Can we write a script which takes ping rtt value & wait for 2*rtt time and again ping?
Hi David….Thanks for shared video. Could you please share how to install VM and inside VM how to install GNS3 and required application associated with that for to learn python for network…Just I am asking how to add doctor container and other switch and router iOS.Pleade share the link you already uploaded……Note: if any one knows pls share the link.
Thank you for sharing this knowledge, been a fan of your video's for a while and wanted to thank you as your video's are awsome !! keep the good work
Beatifull! Thank you!
Hi, I cannot install paramiko or netmiko due to business restrictions. Is there an alternative to connect using SSH to network devices?
I'm more of an old school and prefer Net::Telnet::Cisco::IOS ..
Nice video. Will all cisco ios be able to be automated using python?
do you have to know python for this? or are you teaching that as well?
Not working with VMWare Player 15, only with VMWare Player 12
Request , How C++ work on network …
This is so beautiful. Thanks David!
awesome stuff to learn David…..thanks a ton for this….
Should I do Python or CCNA 1st ?
LOVE IT!!
Sorry I'm new to this so network automation only works on Linux or Ubuntu??
Simply the best introduction to Network programming with Python. Thanks a lot.
How about python with ssh instead of Telnet?
David, what comes in the courses? I've been working Cisco Networking for almost 20 years and want to get into the programming and the newer SDN technologies. Even though I've worked in the field this long I still haven't had a certification higher than CCNP because of issues with testing.
I worked in a server farm bigger than a football field but that was old Cisco when version 11 and 12 were king. Other than your courses, what are other good materials to combine with what I know and move forward?
I'm looking at this and I can't see how to make the ubuntu guest work if there is a proxy involved. Are there directions involved on that somewhere?
python showversion.py
enter telnet username:Cisco
Password:
^CTraceback (most recent call last):
File "showversion.py", line 9, in <module>
tn.read_until('username:')
File "/usr/lib/python2.7/telnetlib.py", line 294, in read_until
return self._read_until_with_poll(match, timeout)
File "/usr/lib/python2.7/telnetlib.py", line 318, in _read_until_with_poll
else 1000 * call_timeout)
KeyboardInterrupt
can anyone tell me how to resolve this?
How do I login to multiple devices (hosts with ips in my excel sheet) all the hosts have same password.
My task is to change the password on 200 hosts with the same password.
I just want change few config changes and exit the host and login to next ip in the list.
your very good, thanks
If anyone have CiscoOSv15.6(2)T-1 cisco router pls share to me using google drive.
Sir,
Your Videos are very good that motivate me to learn the python. Because I am Network Administrator and I love to learn the New Technologies specially Cisco, Linux, GNS3, Python. Keep motivate us. Thanks
Excellent video! You just earned a new subscriber, cheers!
Great Content David… Congrats
I brought this course on Udemy ?? WTF
how to make nat interface plz show me
Good video, can somebody help how to install ubantu pc on gns3 thanks in advamce
how add ubuntu in gns 3.
wowwwooww that's awesome
I'm a windows user and I'm losing soil under my feet 🙂
I am beginner in networking. I aim to pass CCENT, should I already learn how to programm with python ? thanks you.
Hi david, Can u tell me any free/open terminal emulator (alternative for Securecrt) where I can run a .py script for doing changes on my cisco devices from a Windows environment ?
David, I finally got around to trying this on a actual Cisco 3560 switch and IT WORKED Flawlessly!! Thank You for all of your informational video and especially the blogs with the DEV NET OPS, I hope it doesn't take me as long to try those out. Thanks again. You Rock!!
Get.pass is not stated in the variable… how does the router know the Password for getpass?
Excellent content. Two days ago, I didn't know how to use Python to configure devices. Yesterday I went through part 1. Today, I repeated part 1 without needing to look at the video again and then went through part 2. All about consistent progress. Enjoying going through these so far!