{"id":2012,"date":"2026-05-06T10:38:45","date_gmt":"2026-05-06T10:38:45","guid":{"rendered":"https:\/\/www.exam-topics.com\/blog\/?p=2012"},"modified":"2026-11-04T18:00:28","modified_gmt":"2026-11-04T18:00:28","slug":"how-to-assign-and-configure-ip-addresses-on-a-cisco-router","status":"publish","type":"post","link":"https:\/\/www.exam-topics.com\/blog\/how-to-assign-and-configure-ip-addresses-on-a-cisco-router\/","title":{"rendered":"How to assign and configure IP addresses on a Cisco router"},"content":{"rendered":"<p>Assigning an IPv4 address to a Cisco router interface is straightforward when the addressing plan is correct, but the command alone does not guarantee connectivity. A working configuration depends on the interface&#8217;s operational state, subnet boundaries, routes, neighboring devices and any security policy on the traffic path. The example below uses the Cisco IOS\/IOS XE command style for a simple routed-interface lab; actual names and commands vary by platform and software version.<\/p>\n<h2>Prepare the address plan before changing the router<\/h2>\n<p>Identify each routed interface, its connected network and the expected next-hop relationship. In this lab, the router connects two distinct IPv4 networks using <code>GigabitEthernet0\/0<\/code> and <code>GigabitEthernet0\/1<\/code>. The addresses are from the documentation-only TEST-NET ranges, so substitute addresses from your own authorized plan in a real environment.<\/p>\n<table>\n<thead>\n<tr>\n<th scope=\"col\">Lab interface<\/th>\n<th scope=\"col\">IPv4 address<\/th>\n<th scope=\"col\">Subnet mask<\/th>\n<th scope=\"col\">Connected network<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>GigabitEthernet0\/0<\/td>\n<td>192.0.2.1<\/td>\n<td>255.255.255.0<\/td>\n<td>192.0.2.0\/24<\/td>\n<\/tr>\n<tr>\n<td>GigabitEthernet0\/1<\/td>\n<td>198.51.100.1<\/td>\n<td>255.255.255.0<\/td>\n<td>198.51.100.0\/24<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The two networks do not overlap in the same routing table. Each attached host must have a suitable address and mask, with the corresponding router interface set as its gateway when routing is needed. For a deeper explanation of network-prefix selection, see the site&#8217;s <a href=\"https:\/\/www.exam-topics.com\/blog\/introduction-to-proper-cidr-notation-in-ip-addressing\/\">CIDR notation guide<\/a>.<\/p>\n<h2>Configure IPv4 on the routed interfaces<\/h2>\n<p>From an authorized console or secure management session, enter privileged EXEC and global configuration modes. On many IOS\/IOS XE routers, the following sequence is a typical lab example:<\/p>\n<pre><code>enable\nconfigure terminal\ninterface GigabitEthernet0\/0\n description LAB-NET-A\n ip address 192.0.2.1 255.255.255.0\n no shutdown\nexit\ninterface GigabitEthernet0\/1\n description LAB-NET-B\n ip address 198.51.100.1 255.255.255.0\n no shutdown\nend<\/code><\/pre>\n<p><code>interface<\/code> selects the specific Layer 3 interface. The <code>ip address<\/code> command assigns the address and mask; <code>no shutdown<\/code> removes an administrative shutdown state. It does not fix a disconnected cable, disabled switch port or mismatched transceiver. The interface may remain down until the physical and data-link conditions are satisfied.<\/p>\n<p>Do not paste this example into a production device without confirming its interface naming, current configuration, maintenance window and rollback procedure. A switchport operating only at Layer 2 may need an appropriate routed-interface or SVI configuration instead. Cisco IOS XR uses a different configuration\/commit workflow from the IOS\/IOS XE example shown here.<\/p>\n<h2>Verify the result before saving<\/h2>\n<p>Verification should test both the configured value and the actual operating state:<\/p>\n<pre><code>show ip interface brief\nshow running-config interface GigabitEthernet0\/0\nshow running-config interface GigabitEthernet0\/1\nshow ip route connected<\/code><\/pre>\n<p><code>show ip interface brief<\/code> displays interface addresses and the Status\/Protocol fields. Look for the expected IP addresses and operationally up links. The running-config checks confirm the entered values, while <code>show ip route connected<\/code> checks whether connected routes have been installed for usable interfaces.<\/p>\n<p>If the interfaces are operational and hosts are attached to both networks, test reachability with an authorized <code>ping<\/code> from a host or router. A failed ping does not by itself prove the address is wrong; ICMP could be filtered, a host gateway may be incorrect, or an intermediate link may be down.<\/p>\n<h2>When does inter-network communication work?<\/h2>\n<p>The router can forward traffic between directly connected networks when interfaces and routes are active and policy allows it. For a host in 192.0.2.0\/24 to communicate with one in 198.51.100.0\/24, each needs a valid address, mask and appropriate return path. If either host points to a different gateway, return traffic may take a wrong route or be dropped.<\/p>\n<p>Traffic to a network beyond the two directly attached segments requires another route, such as a valid static default route or an appropriate dynamic routing protocol. Do not add a default route merely to make a lab command appear to work; choose the next hop only after verifying the upstream routing design.<\/p>\n<h2>Common causes of failure<\/h2>\n<table>\n<thead>\n<tr>\n<th scope=\"col\">Observed symptom<\/th>\n<th scope=\"col\">Likely check<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Interface shows administratively down<\/td>\n<td>Review the configuration and whether <code>no shutdown<\/code> is authorized<\/td>\n<\/tr>\n<tr>\n<td>Interface configured but line protocol down<\/td>\n<td>Check physical link, switch port, cabling, encapsulation and peer state<\/td>\n<\/tr>\n<tr>\n<td>Router reaches one subnet but not the other<\/td>\n<td>Check the correct interface, masks, routes, ACLs and return path<\/td>\n<\/tr>\n<tr>\n<td>Hosts on the same VLAN cannot reach their gateway<\/td>\n<td>Check VLAN membership, ARP, addressing and relevant Layer 2 controls<\/td>\n<\/tr>\n<tr>\n<td>Ping fails but an application works<\/td>\n<td>Determine whether ICMP is filtered before changing routing<\/td>\n<\/tr>\n<tr>\n<td>Unexpected duplicate IP warning<\/td>\n<td>Confirm address allocation and competing endpoints before reconnecting devices<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Keep IPv4 configuration maintainable<\/h2>\n<p>Document the purpose of each interface, its subnet, the associated switch\/VLAN, the routing table or VRF in use and the intended change owner. Verify access-control rules separately: a properly addressed interface does not enforce authorization on its own. Prefer an approved configuration-management process and avoid exposing passwords, management credentials or production addressing details in study notes.<\/p>\n<p>After validation, and only if the change should persist across reloads, save the intended configuration according to the platform&#8217;s process. On many IOS\/IOS XE systems, an operator can use <code>copy running-config startup-config<\/code>. Verify what that command will preserve before issuing it on a live device.<\/p>\n<h2>Use the correct Cisco documentation for the platform<\/h2>\n<p>Cisco&#8217;s IOS XE IPv4 addressing guide documents the core <code>interface<\/code>, <code>ip address<\/code> and <code>no shutdown<\/code> workflow. The syntax above is for a representative IOS\/IOS XE router, not a guarantee that the same command sequence applies to every Catalyst switch, virtual router or IOS XR device.<\/p>\n<p><strong>Takeaway:<\/strong> choose the correct subnet and interface first, configure the address, confirm operational and connected-route state, then verify the actual traffic path. Treat the IP command as the start of the troubleshooting process, not proof that networking is working.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Assigning an IPv4 address to a Cisco router interface is straightforward when the addressing plan is correct, but the command alone does not guarantee connectivity. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2020,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"et_vendor":[23],"et_program":[],"et_certification":[],"et_exam":[],"et_topic":[20],"class_list":["post-2012","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-post","et_vendor-cisco","et_topic-networking"],"_links":{"self":[{"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/posts\/2012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/comments?post=2012"}],"version-history":[{"count":3,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/posts\/2012\/revisions"}],"predecessor-version":[{"id":7152,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/posts\/2012\/revisions\/7152"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/media\/2020"}],"wp:attachment":[{"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/media?parent=2012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/categories?post=2012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/tags?post=2012"},{"taxonomy":"et_vendor","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_vendor?post=2012"},{"taxonomy":"et_program","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_program?post=2012"},{"taxonomy":"et_certification","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_certification?post=2012"},{"taxonomy":"et_exam","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_exam?post=2012"},{"taxonomy":"et_topic","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_topic?post=2012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}