How to Configure IP Addresses on a Cisco Router
Configuring routers is a routine operation for network administrators. Enterprise-grade routers are very different from consumer-grade routers, though. Consumer-grade routers come mostly configured out of the box. Likewise, consumer-grade ISP services typically configure home ‘routers’ with a dynamic IP address.
In contrast, business-grade ISP services assign static IP addresses. Before an enterprise-grade router can be installed in a network, it needs to have an IP address assigned to it first. So, we will walk through how to configure an IP address on a Cisco router today.
Configuring a Cisco router with an IP address is not a complicated process. There are typically four steps involved:
Verify the current interface configuration of the router
Choose the interface that you want to assign an IP address to
Assign the IP address
Enable the interface on the Cisco router
We will walk through each of those steps, explain how to complete them, and why they are essential.
An Overview of How to Configure IP Addresses on Cisco Devices [VIDEO]
In this video, Jeremy Cioara covers assigning IP addresses and enabling interfaces on Cisco routers. Unlike switches, which are essentially plug and play, routers require a bit of configuration before they can do what they were designed to. You'll see a straightforward, four-step process to enabling interfaces that will equip you to do this yourself.
How to Display Interfaces on a Cisco Device
Before you assign an IP address to a Cisco router, you need to know the current configuration of that device. Typically, Cisco routers have all their interfaces shut down out of the box. Therefore, we need to verify the state of those interfaces before proceeding, especially if this router is being re-used.
The rest of the instructions through this article will assume that you are connected to the Cisco router.
To show the interfaces in a Cisco router, use the ‘show IP interface brief’ command in the console window. For example, this command will output the following information:
Each interface and interface name
The IP address for that interface
Whether each interface is up or down on the Layer 1 level (status column)
Whether each interface is up or down on the Layer 2 level (protocol column)
The Status and Protocol columns will have one of three messages:
Each message has a clear indication of the status of its associated interface. The ‘Up’ message is self-explanatory. That means that the associated interface is working correctly. The ‘Administratively Down’ message indicates that the interface is disabled by configuration. Otherwise, the network admin purposefully disabled that interface for some reason. Finally, the ‘Down’ message means the associated interface isn’t working for other reasons (like unplugging the network cable from the network port).
Out of the box, Cisco routers have the ‘Administratively Down’ configuration for each interface. This is different from Cisco Switches. Cisco Switches come pre-configured out of the box. They can be safe to implement into an existing network almost right away. On the other hand, an unconfigured router can make a network inoperable.
That’s because an improperly configured router can send data from the network into a black hole. Routers are the pieces of equipment that push data to and from networks or network segments. If a router isn’t correctly configured, it won’t know where to send that information to. Hence, that data is sent to purgatory. It is simply dropped from the network.
So, you need to verify the status of the interfaces on a Cisco router before you configure an IP address for it. We need to configure as much of the router as possible before connecting it to a network, so this is an excellent first step.
What is the Difference Between Status and Protocol on a Cisco Router?
When you use the ‘show IP interface brief’ command in the console when connected to a Cisco router, the router will dump information about each interface on the router to the console display. That information will include the link-state labeled as ‘Status’ and ‘Protocol.’
Many new network admins may not understand the difference between both states. After all, aren’t they both the same?
The ‘Status’ and ‘Protocol’ states represent different layers of the OSI networking model, though. The ‘Status’ column represents Layer one, or the physical connection layer. The ‘Protocol’ column represents Layer 2 of the OSI model. The physical layer explains whether a cable is physically connected or if the physical hardware for that interface is working correctly. The protocol layer explains whether that interface is receiving signals that it can understand and recognize.
Understanding the difference between Layer 1 and Layer 2 and their operational status is essential for configuring Cisco routers and diagnosing issues with them down the road.
How to Choose an Interface to Assign an IP Address on a Cisco Device
When we configure an IP address for a new Cisco router, we need to verify the current state of the interfaces of that router. After we confirm the state of those interfaces, we need to select an interface in the console before configuring an IP address. This process is easy.
Running the ‘show IP interface brief’ command in the console of a Cisco router will list each interface and the designation for those interfaces. Pay attention to those interfaces. Also, make sure to match the interface in the console with the physical interface on the Cisco router. That way, you don’t plug the ethernet cable into the wrong port.
To select an interface in the console, first enter the global configuration mode in the router. Then, use the ‘configure terminal’ command in the console to enter configuration mode.
After switching to the configuration mode in the router, use the ‘interface’ command followed by the interface itself to select that interface. You can also add a question mark after the ‘interface’ command instead of the interface designation for additional help.
In the example above, we used interface g0/0. That means we selected the first interface that is a gigabit ethernet port on our router. The interfaces in your Cisco router may be labeled differently depending on the device you are configuring.
How to Assign an IP Address to a Cisco Router
Before we can assign an IP address to a Cisco router, we need to complete a couple of steps. First, we need to run the ‘show IP interface brief’ command. This will list each interface in the router as well as their status. Then, we need to enter global configuration mode with the ‘configure terminal’ command and select an interface using the ‘interface’ command in the console of that router. The ‘interface’ command must be followed by the interface designation. Once we have our interface selected, we can assign an IP address to it.
Assigning an IP address to an interface in a Cisco router is as simple as using the ‘IP address’ command. That command must be followed by the IP address for that interface port as well as its subnet.
Ip address 192.168.1.1 255.255.255.0
Entering that command will not produce any confirmation messages unless there was an error. In this case, no news is good news.
After assigning the IP address to an interface in a Cisco router, run the ‘show IP interface brief’ command again. When that command displays information about each interface in the router, you should see the IP address assigned to your chosen interface under the IP address column. If you do not, try repeating the process.
That’s it! It’s that simple to assign an IP address to a Cisco router.
How to Find the IP Address to Assign to a Cisco Router
Many new network admins may not understand where to find the IP address to assign to a new Cisco router. Those admins may have received that information from a senior network administrator or through documentation, but if those resources aren’t available, where would you find the IP address to assign to a Cisco router?
Often, that information comes from the ISP (Internet Service Provider). Businesses will typically choose to have a static IP address assigned to them from their ISP.
This is done for stability reasons. In a dynamic environment, the external IP address of a network can be changed by the ISP. If your business hosts something like a VPN, though, that could be an issue. Static IP addresses keep network configurations static for things like VPNs or DNS entries.
This is in stark contrast to the typical consumer-grade ISP connection. In these cases, the ISP will always use DHCP to assign a network address to consumer customers. But, of course, a business can use DHCP addresses, too. This is more common with small and medium-sized companies that may not need to host services that depend on a static IP address.
Cisco routers can be configured to use DHCP instead of being assigned a static IP address, too. To do that, add ‘dhcp’ instead of the IP address and subnet mask to the ‘IP address’ command in the console in a Cisco router.
Ip address DHCP
How to Enable an Interface on a Cisco Router
After configuring an IP address for a Cisco router, you will most likely need to enable the interface to be active. Cisco routers come with all the interfaces on them shut down out of the box. This is for important network safety reasons. So, the interface you just configured needs to be enabled.
First, we can verify a Cisco router’s status and configuration using the ‘show run’ command from the configuration console for a Cisco device. That command will display all the current information for that device and its interfaces. More than likely, the information displayed from that command will be too much to fit on your screen. Use the space button to jump through the configuration information.
Look for the configuration information for the interface you need to enable. This should show that the interface is currently administratively down.
Once the status of that interface has been verified, we need to enable it. First, we need to select that interface. Use the ‘interface’ command in the console followed by the interface name.
E.g., interface GigabitEthernet0/0
In our example, the name of the interface we are working with is GigabitEthernet0/0. Of course, the name of the interface you are working with may be different.
Now that the interface is selected, use the ‘no shutdown’ command to enable that interface. If all goes well, you should see three messages. The first message shows that the interface is down. The next two messages should state that the ‘Status’ and ‘Protocol’ are now up. You should also see lights blinking next to the physical interface port that you just configured on the router.
Remember that the status and protocol states in a Cisco router represent different layers of the OSI network model. The status state represents layer 1, while the protocol state represents layer 2. This is why the console shows two different status prompts after running the ‘no shutdown’ command.
We covered a lot of information in this article! Consider this guide a rough tutorial on assigning an IP address to a Cisco router. Still, we did not cover other important topics like what a subnet is or how to secure a router. If you would like to learn more, consider our CCNA training.
Though assigning an IP address to a Cisco router is easy, it is also very routine. Furthermore, this is a function that you will perform a lot as a network admin. So, let’s go over how to assign an IP address to a Cisco router with a short and sweet tl;dr instruction set.
Verify the interface status with the ‘show IP interface brief’ command.
After verifying all interfaces are down, enter global configuration mode with the ‘configure terminal’ command.’
Select the interface you want to configure with the ‘interface’ command followed by the interface name.
Assign an IP address to that interface with the ‘ip address’ command followed by the IP address and the subnet mask for that interface.
Run the ‘show IP interface brief’ command again to verify the IP address has been assigned to the network interface.
Run the ‘no shutdown’ command to enable that interface.
That’s it! Keep these instructions handy until they become second nature. Businesses use static IP addresses for all sorts of things, but above all else, they use static IP addresses to keep networks from breaking or requiring additional maintenance. Understanding how to assign an IP address to a Cisco router is vital for any network admin.
delivered to your inbox.