{"id":5864,"date":"2017-01-09T17:45:05","date_gmt":"2017-01-09T17:45:05","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=5864"},"modified":"2023-10-28T23:22:31","modified_gmt":"2023-10-28T22:22:31","slug":"cisco-setup-via-linux","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/cisco-setup-via-linux\/","title":{"rendered":"Cisco Setup via Linux &#8211; Serial Port Connection"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_5864\" class=\"pvc_stats all  \" data-element-id=\"5864\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>When Cisco kit becomes superseded - so officially unsupported - it usually means the kit becomes available to home\/SOHO users much cheaper on Ebay, so bargains can be had if you like your network kit to have better than average capabilities, you like learning a new tech challenge and know what pitfalls to look out for. Missing PSUs are the main problem with 2nd hand Cisco kit, as these are usually model specific and expensive as separate items - BEWARE!<\/p>\n<p>An important lead to consider included in a purchase is the blue 8 pin \"rollover cable\" that you will need to initially access and setup the kit via the serial port, especially if it has had it's configuration wiped - which all kit should have been to remove things like usernames and passwords. It can be purchased separately though.<\/p>\n<p>If you have newer PCs\/laptops without a 9 pin serial connector then you need a USB to serial adaptor that is linux compatible - plenty on Ebay\/Amazon etc. also.<\/p>\n<p>For an ADSL\/VDSL router as my 877W WiFi router in this Post example, then an RJ11 cable to phone socket filter is required, and RJ45s for the network hub\/switch connectors. An ideal package contains mains lead, PSU, RJ45, RJ11 and rollover cables e.g:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/ciscoleads.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-5865\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/ciscoleads.jpg\" alt=\"\" width=\"757\" height=\"538\" \/><\/a><\/p>\n<p>You can purchase the cables separately if you need, but you MUST get the PSU for the price - I wouldn't pay more than \u00a330 for a 877W router - with the whole kit personally - and definitely NOT without the PSU as the unit may not have been tested as working either...<\/p>\n<p>To connect to any serial device with linux, you can use minicom or putty, as both are in the repos (Hyperterminal in Win XP):<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt install minicom putty<\/span><\/p>\n<p>Check if your USB adaptor lead has a compatible driver in linux by viewing the output when inserted into a USB port:<\/p>\n<p><span style=\"color: #0000ff;\">tail -f \/var\/log\/syslog<\/span><br \/>\n<span style=\"color: #ff0000;\">Jan 9 17:54:02 Dell490 kernel: [23000.757762] usbcore: registered new interface driver ch341<\/span><br \/>\n<span style=\"color: #ff0000;\">Jan 9 17:54:02 Dell490 kernel: [23000.757786] usbserial: USB Serial support registered for ch341-uart<\/span><br \/>\n<span style=\"color: #ff0000;\">Jan 9 17:54:02 Dell490 kernel: [23000.757813] ch341 5-2:1.0: ch341-uart converter detected<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">Jan 9 17:54:02 Dell490 kernel: [23000.770827] usb 5-2: ch341-uart converter now attached to ttyUSB0<\/span><\/strong><br \/>\nJan 9 17:54:18 Dell490 ModemManager[844]: &lt;info&gt; Creating modem with plugin 'Generic' and '1' ports<br \/>\nJan 9 17:54:18 Dell490 ModemManager[844]: &lt;warn&gt; Could not grab port (tty\/ttyUSB0): 'Cannot add port 'tty\/ttyUSB0', unhandled serial type'<br \/>\n<span style=\"color: #ff0000;\">Jan 9 17:54:18 Dell490 ModemManager[844]: &lt;warn&gt; Couldn't create modem for device at '\/sys\/devices\/pci0000:00\/0000:00:1d.3\/usb5\/5-2': Failed to find primary AT port<\/span><\/p>\n<p>Check if it works by opening minicom and setting the serial port to the USB ID shown above:<\/p>\n<p><span style=\"color: #0000ff;\">sudo minicom -s<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/ser.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-5871\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/ser.png\" alt=\"\" width=\"679\" height=\"506\" \/><\/a><\/p>\n<p>Use the menus to select the fields to change to the USB ID \/dev\/ttyUSB0<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/tty.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5872\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/tty-1024x473.png\" alt=\"\" width=\"590\" height=\"273\" \/><\/a><\/p>\n<p>The port speed needs to be set to a default minimum of 9600bps:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/bps.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5873\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/bps-1024x505.png\" alt=\"\" width=\"590\" height=\"291\" \/><\/a><\/p>\n<p>Save the changes:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/savecfg.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-5875\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/savecfg.png\" alt=\"\" width=\"672\" height=\"534\" \/><\/a><\/p>\n<p>Now check if it can connect:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/exit.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-5877\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/exit.png\" alt=\"\" width=\"821\" height=\"655\" \/><\/a><\/p>\n<p>You should get into a Cisco cmd line (mine is already setup as named):<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/cnx.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5878\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/cnx-1024x652.png\" alt=\"\" width=\"590\" height=\"376\" \/><\/a><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/enable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5886\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/enable-1024x496.png\" alt=\"\" width=\"590\" height=\"286\" \/><\/a><\/p>\n<p>To exit minicom use CtrlA then Z then X:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/miniixit.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5880\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/miniixit-1024x652.png\" alt=\"\" width=\"590\" height=\"376\" \/><\/a><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/leave.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5881\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/leave-1024x652.png\" alt=\"\" width=\"590\" height=\"376\" \/><\/a><\/p>\n<p>For Putty the situation is similar but a GUI - as the USB port is set already, just set it up for that:<\/p>\n<p><span style=\"color: #0000ff;\">\u00ef\u00bf\u00bc\u00ef\u00bf\u00bcsudo putty<\/span><\/p>\n<p>Change to the serial port button and add the USB port ID as above, and name the saved session for future:<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/putty1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-5884\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/putty1-1.png\" alt=\"\" width=\"761\" height=\"798\" \/><\/a><\/p>\n<p>Click Open and hit Rtn:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/putty2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-5885\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2017\/01\/putty2.png\" alt=\"\" width=\"749\" height=\"513\" \/><\/a><\/p>\n<p>The window size may need enlarging etc. and colour\/other settings are available.<\/p>\n<p>Close the window to quit.<\/p>\n<p>The quickest way to get a unit working if you have no Cisco knowledge is to find and amend a config file for your router\/switch model on the Web, then copy and paste the text into the command line, and SAVE it for next reboot using the command:<\/p>\n<p><span style=\"color: #0000ff;\">copy running-config startup-config<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Destination filename [startup-config]? <\/span><br \/>\n<span style=\"color: #ff0000;\">Building configuration... <\/span><br \/>\n<span style=\"color: #ff0000;\">[OK]<\/span><\/p>\n<p>As my router is already set up, I will text file save it, then wipe the 877config and show you how to start to build up a conf file from scratch in stages in the next Posts so you understand how complex they can be and some functions that makes them work. The Cisco OS was based on Unix originally, but copyrighted, so linux related\/similar.<\/p>\n<p><strong>connect to the inside interfaces (LAN and WIFI Vlans)<\/strong><\/p>\n<p><strong>connect to the outside (dialer) interface<\/strong><\/p>\n<p><strong>set a basic firewall with an ACL and NAT<\/strong><\/p>\n<p><strong>test connectivity and basic security<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_5864\" class=\"pvc_stats all  \" data-element-id=\"5864\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>When Cisco kit becomes superseded - so officially unsupported - it usually means the kit becomes available to home\/SOHO users much cheaper on Ebay, so bargains can be had if you like your network kit to have better than average capabilities, you like learning a new tech challenge and know what pitfalls to look out <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/cisco-setup-via-linux\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Cisco Setup via Linux &#8211; Serial Port Connection<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-5864","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"a3_pvc":{"activated":true,"total_views":2,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/5864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=5864"}],"version-history":[{"count":1,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/5864\/revisions"}],"predecessor-version":[{"id":10067,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/5864\/revisions\/10067"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=5864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=5864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=5864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}