Cisco Basic Router and Switch Configuration

Cisco Basic Router and Switch Configuration

Router and Switch Configuration

In this Cisco CCNA tutorial, you’ll learn about a basic initial Router and Switch Configuration configuration to put on your routers and switches.

Router IP Addresses ( Router and Switch Configuration)

One of the first things it will do is configure IP addresses. Your routers provide connectivity between your different IP subnets, and that’s their main job. The routers need to have interfaces in the different subnets, and they need to have IP addresses on those interfaces.

Those IP addresses will act as the default gateway address for any hosts that are in that subnet. The command to put an IP address on an interface goes to the interface.

For example, we’ve got a router down at the bottom. The interface FastEthernet0/0 on the right has an IP address 192.168.0.1/24, and the interface on the left, FastEthernet0/1, has an IP address 192.168.1.1 /24. The IP addresses need to be in different subnets that are on different interfaces.

Cisco Basic Router and Switch Configuration - Router IP Addresses

From the global configuration mode, we go to interface configuration mode using the command ‘interface FastEthernet0/0’. Then to put the IP address on there, add ‘ip address’, space, ‘192.168.0.1’, then another space, and then the ‘subnet mask 255.255.255.0’.

The IP address and the subnet mask are both entered with one command, and you must enter the subnet mask in full dotted decimal notation. You can’t enter /24 in IOS.

On our routers, interfaces are shut down by default. Use the ‘no shutdown’ command to bring the interface up. So we do that for interface FastEthernet0/0, and then we also need to configure interface FastEthenet0/1. It gets IP address 192.168.1.1, subnet mask 255.255.255.0, ‘no shutdown’.

After configuring this, the router can route traffic between those two networks. As well as being able to route traffic, it also gives IP connectivity to the router itself. So after we’ve done this, we could open up a Telnet or SSH client, like Putty, and connect to the router to manage it.

So obviously, this is more convenient than having a walk down there with a console cable and hook it up physically every time. Once you’ve got IP addresses on your router, you’ll be able to connect to those IP addresses to manage the router remotely from wherever you are.

Switch Management IP Address ( Router and Switch Configuration)

We’re also going to need an IP address on our switch to manage that as well. A Layer 2 switch is not IP routing aware and does, however, support a single IP address used for management. You can’t put multiple IP addresses on a Layer 2 switch, and it will only allow you to put one IP address. To manage it, we can again Telnet or Secure Shell (SSH) to the switch remotely.

Unlike on a router, where we configure the IP address on an interface, on a switch, a Layer 2 switch, the management IP address goes on a VLAN interface, a virtual interface. So when we configure our VLAN interface, that’s called an SVI, Switched Virtual Interface, which will be in VLAN 1.

Cisco Basic Router and Switch Configuration - Switch Management IP Address

Now, I know we haven’t covered VLANs yet. They’re going to be configured in another section, for all you need to know for now is that the default VLAN is VLAN 1, and all of our Layer 2 switch ports on a switch will be in VLAN 1 by default.

We configure our management IP address on the virtual VLAN 1 interface to get management connectivity to the switch. That will allow us to connect to the switch from the same IP subnet that the IP address is in.

However, our administrators will probably be located somewhere else, and they will be in a different IP subnet, so this switch also needs to be able to get out to that subnet. Like a normal host would need, it will also need a default gateway.

Cisco Basic Router and Switch Configuration - Switch Management IP Address 1

Router and Switch Configuration

Our configuration on our switch for our management IP address, ‘interface vlan 1’, then we configure the IP address the same way. So I’ve got IP address 192.168.0.10, subnet mask 255.255.255.0. Now, interfaces are shut down on a router by default, and on a switch, interfaces are enabled by default. So there wasn’t any need to do a ‘no shutdown’ here.

However, I’m just in the practice that whenever I configure an interface, I always do a ‘no shutdown’ on there. It doesn’t do any harm, and it saves me having to think, “Do I need to do a ‘no shutdown’ or not?” Just always do a ‘no shutdown’ whenever you configure an interface, which saves you from forgetting it.

We exit to global configuration mode, and to configure the default gateway, the command is ‘ip default-gateway 192.168.0.1’. That will give us IP connectivity on this switch, and we’ll be able to ping this switch and ping it out. Now, I said that this IP address is for management. We still need to do some additional commands to allow Telnet and/or SSH access to the switch.

Lab Example ( Router and Switch Configuration)

Let’s look at how to do this in the lab. For the lab example, we’ve got router R1, and we’ll configure IP address 192.168.0.1 on the physical interface FastEthernet0/0. That’s going to be the default gateway address for our switch, which is SW1. SW1 will be connected to the router through the physical interface FastEthernet0/1, which will be in VLAN 1 by default.

For the management IP address, we will configure that on the VLAN 1 Switched Virtual Interface. We’ll give that IP address 192.168.0.10. Once we’ve done that, the switch should have connectivity to 192.168.0.1 because it’s on the same subnet.

However, we want it to have connectivity to other subnets out through the router. So we’ll also configure the switch with an IP default gateway address of 192.168.0.1.

I better configure the router first because it also has a new configuration. So I’ll go ’enable’, ’configure terminal’, ’interface FastEthernet0/0’. I will give that IP address 192.168.0.1, ’ip address 192.168.0.1 255.255.255.0’. I have to remember to do a ‘no shutdown’ on here. Okay, so that’s the router configured.

Cisco Basic Router and Switch Configuration - Lab Example

Router and Switch Configuration

Then I go to the switch and enter ‘enable’ and ‘configure terminal’. This was on the VLAN interface, so ‘interface vlan 1’ and ‘ip address 192.168.0.10 255.255.255.0’. It is not shut down by default anyway, but it doesn’t do any harm by doing a ‘no shutdown’ on the interface. Now the switch should be able to communicate with the router. Let’s check that.

I’ll go back down to the enable prompt and go ‘ping 192.168.0.1’, and we’ve got connectivity. That’s all good, and I’ve got connectivity on my 192.168.0.0 subnet. But I want to be able to get out to other subnets as well, so I need to configure the default gateway. The command for that is ‘ip default-gateway 192.168.0.1’. That is the initial IP connectivity configured there.

Hostname ( Router and Switch Configuration)

The next thing we want to do for the basic configuration is to configure a hostname. A descriptive hostname makes it easier to identify the device. For example, I could maybe call it New York-F1-Switch1. So typically, you will specify where the Switch is and perhaps some other descriptive description there. In the lab, I’m just going to call it ‘hostname SW1’ for Switch 1.

The default hostname on a switch is just Switch. That’s what is showing up on the command prompt. When I enter ‘hostname SW1’ and hit enter, the command prompt immediately changes to show the hostname.

Cisco Basic Router and Switch Configuration - Hostname

Router and Switch Configuration

This is useful because a common mistake is configuring the wrong device by accident. Having the hostname showing up here makes it a little bit less likely that you’re going to do that. So it gives you a nice description, and you can see what device you’re on.

Also, if you’re troubleshooting from neighboring devices, it will show up as its hostname as well, so it just makes it easy to see what’s going on.

Interface Descriptions

Next, we’ll want to configure our interfaces’ descriptions. Interface FastEthernet 0/1 was connected to the router, so let’s put a description there. Back to the command line, I go to interface FastEthernet 0/1, and I’ll say ‘description Link to R1’.

Again, this is going to be useful for troubleshooting later. If I’m troubleshooting and looking at the configuration here, I can immediately see that FastEthernet 0/1 is the interface connected to router R1.

Cisco Basic Router and Switch Configuration - Interface Descriptions

Additional Resources

Router and Switch Configuration: https://www.cisco.com/c/en/us/td/docs/routers/access/800M/software/800MSCG/routconf.html

Cisco Networking Academy’s Introduction to Basic Switching Concepts and Configuration: https://www.ciscopress.com/articles/article.asp?p=2181836&seqNum=4

Cisco IOS Router Basic Configuration: https://networklessons.com/cisco/ccna-routing-switching-icnd1-100-105/cisco-ios-router-basic-configuration

Configure an IP Address on a Switch: https://study-ccna.com/configure-an-ip-address-on-a-switch/

Want to practice Cisco CCNA technologies on your laptop? Download my complete 350-page Cisco CCNA Lab Guide for free.

Click Here to get my Cisco CCNA Gold Bootcamp, the highest rated CCNA course online with a 4.8 star rating from over 20,000 public reviews.


Learn More…

Storage Design and Implementation in vSphere 6

Practical Splunk for Beginners LiveLessons (Video Training)

Modern Web Development with IBM WebSphere

The Pearson Complete Course for CISM Certification

What is the difference between leadership and management?

How to be Data Visualisation expert 

AWS Console: Deep Dive Into AWS Management Interface 


https://itexamtools.com/microsoft-azure-architect-practice-tests-az-301-az-303/
https://itexamtools.com/microsoft-az-303-latest-practice-questions-2020/
https://itexamtools.com/exam-mb-230-mb-240-microsoft-dynamics-365-practice-exams/
https://itexamtools.com/exam-mb-230-microsoft-dynamics-365-for-customer-service/
https://itexamtools.com/mb-200-mb-230-mb-210mb-900-ms-dynamics-365-practice-test/
https://itexamtools.com/introduction-to-git/
https://itexamtools.com/microservices-e-login-spring-boot-spring-security-e-oauth2/
https://itexamtools.com/ocp-z0-066-oracle-database-12c-data-guard-administration/
https://itexamtools.com/microsoft-azure-fundamentals-az-900-original-practice-tests/
https://itexamtools.com/microsoft-mb-320-and-mb-330-cert-exam-practice-test-2020/
https://itexamtools.com/microsoft-70-649-mcse-updates-windows-server-practice-exam/
https://itexamtools.com/microsoft-70-413-mcse-designing-and-implementing-a-server/
https://itexamtools.com/how-hadoop-is-useful-to-data-scientists/
https://itexamtools.com/hindi-learn-cisco-ccna-200-301-crash-course-in-14-days/
https://itexamtools.com/the-complete-networking-foundations-network-media-wans/
https://itexamtools.com/rockstar-network-foundations/
https://itexamtools.com/mta-98-366-network-fundamentals-class-practice-exam-bundle/
https://itexamtools.com/it-security-for-cisco-ccna-640-554-iins/
https://itexamtools.com/world-of-computer-networking/
https://itexamtools.com/scrum-from-a-to-z-the-complete-course-with-fixation-tests/
https://itexamtools.com/working-as-a-scrum-master-using-basic-jira-the-day2day-job/
https://itexamtools.com/scrum-for-systems-engineers-waterfall-x-agile/
https://itexamtools.com/safer-5-0-advanced-scrum-master-practice-exams-2021/
https://itexamtools.com/200-125-complete-course-for-ccna-r-s-certification/
https://itexamtools.com/ccnp-enterprise-encor-350-401-part4-5/
https://itexamtools.com/ccie-datacenter-400-151-test-prep/
https://itexamtools.com/ccie-security-asa-9-6-1-deep-dive-labs/
https://itexamtools.com/ccie-security-wsa-9-2-0-deep-dive-labs/
https://itexamtools.com/learning-informatica-cloud-services-iics-reloaded/
https://itexamtools.com/learn-autocad-2021-with-fully-practical-approach/
https://itexamtools.com/microsoft-ms-500-practice-test/
https://itexamtools.com/ms-500microsoft-365-security-administration-practice-tests/
https://itexamtools.com/google-earth-engine-y-machine-learning/
https://itexamtools.com/python-made-easy-for-absolute-beginners/

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.