Jared Heinrichs

  • Technology Blog
  • Winnipeg Computer Repair
  • Winnipeg Photographer
  • Cooking With Jared
You are here: Home / Networking / Cisco Packet Tracer – How to connect to a switch using telnet

Jan 21, 2013 By Jared Heinrichs 4 Comments

Cisco Packet Tracer – How to connect to a switch using telnet

I am just starting my CCNA training and I am using Cisco Packet tracer for building my labs. One thing I had a bit of a tough time setting up was connecting to a switch via telnet from a computer on the network. This post will go over setting up a very basic lab. It will also include some of the best practices I’ve read about. If there is something you would like to add to my setup please feel free to comment.

Here’s what we are going to build:

  1. Computer (used to telnet into the Cisco switch)
  2. Server (Will setup DHCP, tftp and dns)
  3. Switch – (Will setup IP Address, Create a password for “enable”, create telnet user)

Place items into Packet Tracer

You should be able to place any switch, server or computer but I am using these in my example:

  1. Cisco 2950T-24 Switch
  2. Generic Desktop Computer
  3. Generic Server

Here’s what Cisco Packet Tracer will look like:

image

Before you do anything it’s always a good idea to come up with an IP address scheme before you do anything. I’ve chosen the:

  • 192.168.1.x /24 network
  • PC-PT will get an IP from the DHCP server
  • Server-PT will be 192.168.1.1
  • Switch 2950T-24 will be 192.168.1.254

Let’s rename the devices right now so that we won’t forget the setup:

image

Now that we have setup the physical devices it’s time to connect them up with cables. All devices will be connected with a copper straight through cable.

  • PC-PT will be plugged into FastEthernet 0/1 on switch “s0”
  • Server-PT will be plugged into FastEthernet 0/2 on switch “s0”
  • Wait about 30-60 seconds all ports should have a green light.

First thing you want to do is setup Server-PT

All the setup will be done in the server config. To get there you need to:

  • Double click Server in Packet Tracer

Setting Up IP address for Server-PT

  1. Click Desktop (top)
  2. Click IP address
  3. Click Static
  4. IP Address – Enter 192.168.1.1
  5. Subnet Mask – Enter 255.255.255.0
  6. Gateway – Leave Blank
  7. DNS Server – Enter 192.1.68.1.1

It should look like this when you are done:

image

Setting Up DHCP on Server-PT

  1. Click Config Tab (top)
  2. Under Services (left) – click DHCP
  3. Leave “Pool Name alone”
  4. Default Gateway you can leave alone for now
  5. DNS Server – Set to 192.168.1.1
  6. START IP – Set to 192.168.1.10
  7. Subnet Mask – Set to 255.255.255.0
  8. TFTP Server – Set to 192.168.1.1
  9. Click “Add”. This will update the default DHCP config.

When done it should look like this:

image

Setting Up DNS

  1. Under Services (left) – click DNS
  2. Name – Enter “s0” for “switch zero”
  3. Address – Enter IP for switch 192.168.1.254
  4. Click “Add” and then save. This will update the DNS server.

When done it should look something like this:

image

You will need to either restart Computer-PT or do an ipconfig /renew from the command prompt to get an IP address.

Go to Computer-PT and ping 192.168.1.1 – You should get 4 responses.

You now should have a functioning basic network.

How to setup an IP address on a Switch

You might wonder how to setup an IP on a switch since you can’t assign an IP to one of the ports like a router. To do this you will need to give an IP address to the VLAN1. Giving an IP address to a VLAN is almost identical to giving any other item in IOS an IP address. Here’s how to setup an IP on a switch:

Get into Configure Terminal Mode:

  • Turn the switch on
  • Enter the console
  • Type “Enable” to get into Privilage Exec (#) mode
  • Type “config t” to enter “configure terminal”
  • Notice the terminal window changes from “switch” to  “switch(config)”.

Here’s the what it should look like in the terminal after you type “enable”.

image

Give VLAN1 an IP address:

  • Select VLAN interface – Type: “interface vlan1”
  • Give VLAN1 an IP address – Type: “ip address 192.168.1.254 255.255.255.0”
  • Make sure the state is set to “up” – Type “no shutdown”.
  • Type “end”

Here’s what your console should look like:

image

Setup Name and Passwords for Switch

  • To setup name of switch type – “hostname s0”. The name will be effected immediately.
  • enable password “Cisco”
  • enable Secret CCNA

image

Setup Terminal Server (Virtual Terminal Lines)

  • line vty 0 4
  • login
  • password “CCENT”
  • privilege level 15
  • end [enter] <- This line is missing in the screenshot.

image

Setup Password encryption in the Config

  • To enable type: “service Password-Encryption”
  • Ctrl+Z

image

Hit “Ctrl+C”. Save Running config to startup config. There are 3 ways of doing the exact same thing:

  1. wr [enter] OR….
  2. copy running-config startup-config [enter] OR…
  3. copy run start [enter]

I used example #1

image

How to connect to a switch using Telnet

  • Open computer PC-PT
  • Open command prompt
  • type: “Terminal r0” – This will work because you have setup DNS Winking smile… Otherwise just type in the IP address.
  • Enter password. In this example I type “TelnetPassword” because that’s what I earlier in the post.

image

Filed Under: Networking

Comments

  1. suhail says

    Apr 14, 2013 at 1:05 pm

    its awesome……, its good to work with you.
    Thank you sir.

  2. IPv6 says

    Oct 1, 2013 at 11:21 pm

    Couple of mistakes, however this is the first time I set up a correct telent configuration. I am attempting to get into my lab equipment and this is a excellent first step.

    Thanks J!

  3. IPv6 says

    Oct 1, 2013 at 11:31 pm

    Excellent. Okay. So. Delete the Server, (as we all know, lol). Then, click on the switch, go into global config mode, and use the command, “ip default-gateway 192.168.1.1 255.255.255.0”, then hit enter.

    Next, exit out, go to the PC, double click it, and click on terminal. Last, enter, “telnet 192.168.1.254,” and you’re in! Enter you level 15, I’m looking over your sholder and I can’t figure out your password, and config away.

    Remember. You’re a ass if you dick around with other peoples equipment. An ass.

    Thank you Jared; you have solved my basic networking question. I will remember your name.

    Best regards,
    IPv6

  4. techtutsbd says

    Oct 14, 2013 at 2:28 am

    Really very nice . Excelent.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Board Game Rules
  • Camera
  • Computer Hardware
    • Blackberry
    • drivers
    • iPad
    • Magic Jack
    • USB
  • Damn Small Linux
  • Exam Notes
  • Facebook
  • FREE Flashcards
  • Games
    • PC
      • League of Legends
    • Wii
    • xbox 360
  • Music
  • Networking
    • Cisco Certification
    • Mitel
    • Palo Alto Firewall
  • News
    • Google
    • Microsoft
  • Operating System
    • Active Directory (2003)
    • Android
    • Command Prompt
    • Damn Small Linux
    • Group Policy
    • Hyper-V
    • IIS
    • ISA 2006
    • Mac OS X
    • Microsoft Exchange Server
    • Powershell
    • Security
    • SME Server
    • Terminal Server 2003
    • Ubuntu Linux
      • Adito Web SSL VPN
      • OpenVpn-als
      • Webmin
    • Virtual Machine Manager
    • Windows 2003 SBS
    • Windows 2003 Server
    • Windows 2008
    • Windows 2008 R2
    • Windows 2012R2
    • Windows 7
    • Windows 8
    • Windows Command Line
    • Windows Deployment Services
    • Windows Server Backup
    • Windows Vista
    • Windows XP
  • Phones
  • Photography
  • Photos
    • Animals
    • Misc
    • Nature
    • Portraits
  • Portfolio
  • Programming
    • CSS
    • HTML
    • jQuery
    • MySQL
    • PHP
    • Script
  • Programs
    • Acrobat
    • Acrobat Reader
    • Adobe Dreamweaver
    • Adobe Illustrator
    • Adobe Photoshop
    • Anti-virus Software
    • Antivirus
    • Backup Exec
    • Bittorent
    • Blackberry BESADMIN
    • Internet Explorer 9
    • Lightroom
    • Microsoft Office
    • Netbeans
    • Onenote
    • Outlook
    • Shelby
    • Sysprep
    • Trend
    • Video Editing
    • Visual Studio
    • Windows Live Writer
    • WireShark
    • XP Mode
    • Zarafa
  • Recipe
  • Review
  • Software Links
  • Troubleshooting
  • Uncategorized
  • Videos
  • Web Applications
    • Brage
    • Google
    • Spiceworks
    • Wordpress
  • Web Browsers
    • Internet Explorer
  • Web Server
    • XAMPP
  • Winnipeg
    • ISP

Try searching this site!

Copyright © 2021 Winnipeg Web Design