The Wayback Machine - https://web.archive.org/web/20240717024537/https://www.geeksforgeeks.org/configure-ip-address-for-interface-in-cisco-switches/
Open In App

Configure IP Address for Interface in Cisco Switches

Last Updated : 16 May, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

To configure an IP Address on a switch interface, first, we must change the interface from a layer 2 interface to a layer 3 interface. A point to note is that to provide an IP Address to a switch interface, the switch first must be a Multilayer Switch and all ports of an MLS is layer 2 by default. There are two ways to configure an IP address to a switch interface that is given below:

Static Configuration:

Consider a Multilayer Switch:

Cisco Switch

 

First, we need to check whether an interface is a layer 2 port or a layer 3 port.

show interfaces f0/1 switchport
Cisco Switch CLI Configuration

 

Switch port: Enabled means that the port is currently a layer 2 port. To change the interface from a layer 2 switch to a layer 3 switch:

int f0/1
no switchport exit

Providing IP address to an interface:

int f0/1
ip add 192.168.1.1 255.255.255.1
Cisco Switch CLI Configuration

 

Checking if an IP address has been provided to the interface

show ip int br | ex unassigned
Cisco Switch CLI Configuration

 

Dynamic Configuration:

Consider this topology:

Multilayer Switch with Cisco Router

 

First, we again make the fa0/1 port of Switch0 a layer 3 port.

int f0/1
no switchport

Then we provide interface Fa0/0 and configure a DHCP pool for the network 192.168.1.0/24 on router0.

  int f0/0
ip add 192.168.1.1 255.255.255.0
no sh
exit
ip dhcp pool deadpool
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8
exit

Checking DHCP pool status:

show ip dhcp pool pool
Checking DHCP pool status

 

After that, we go to Switch’s interface fa0/1 and execute the command:

int f0/1
ip add dhcp
Checking DHCP pool status

 

Simulation of the DORA Process:


Previous Article
Next Article

Similar Reads

Configure IP Address For an Interface in Cisco
The interface is the port at which the router connects to a given network. It acts as an entry or exit point for data that is to be transmitted through the router. Every interface must be labeled or assigned an IP address, which should be unique among all the IP addresses in the network.  In Cisco Packet Tracer, to understand the process of assigni
3 min read
MAC Address Table On a Cisco Switches
The MAC (Media Access Control) address is a 48-bit physical identity of a device used to uniquely identify a device in layer 2 of the OSI model. It is represented in hexadecimal. The 3 bytes of the address represent the OUI, and the last 3 bytes are unique to the device itself. The switch keeps track of the other Ethernet interfaces on the network
3 min read
Steps to Configure and Verify VLANs (Normal Range) Spanning Multiple Switches
VLAN stands for a virtual local area network, additionally referred to as a Logical Network VLAN can logically create many virtual networks to split network broadcast traffic. VLANs are primarily based totally on logical connections, So it facilitates minimizing broadcasting traffic, and management work could be accomplished quickly. VLANs also can
2 min read
Memory Buffering in Cisco Switches
A memory buffer is a portion of the memory used by the switch to store data. Network switch interfaces buffer or drop traffic that exceeds their capacity. Traffic bursts, many-to-one traffic patterns, and interface speed mismatches are the main causes of buffering. That is the main concept of a memory buffer. Ethernet switches use memory buffering
3 min read
Layer 3 Switches in Cisco
A layer 3 Switch is a special type of networking device which is able to perform/execute functions of 2 layers of the OSI Model i.e., the Data Link Layer (Layer 2) and the Network Layer (Layer 3). In simple words, a Layer 3 Switch is a networking device that can perform switching (functions of layer 2) as well as routing (functions of Layer 3). It
3 min read
How To Delete Configuration of a Cisco Router and Switches?
In a Cisco network, it is important to periodically delete the configuration of routers and switches to ensure that the network is running smoothly and efficiently. In this article, we will explain how to delete the configuration of a Cisco router and switch using the command-line interface (CLI). Before you begin, make sure you have the following:
3 min read
How to Configure EIGRP Summarization in Cisco?
Pre-requisite: EIGRP Configuration, EIGRP Implementation in Cisco. With respect to EIGRP or any Interior Gateway Protocol (IGP), route summarization is a significant tool to create a boundary for query propagation and is needed to create a single route entry with a prefix & prefix length larger than one or smaller component routes. Route summar
4 min read
How to Configure a Firewall in Cisco Switch?
A firewall is a type of network security device component that is used to keep track of incoming and outgoing network traffic and then make decisions regarding the traffic i.e., which traffic to allow or deny in accordance with a set of security rules. Configure a Firewall on Cisco Switch:Access lists are supported for network traffic filtering by
5 min read
How to Configure IPv6 on CISCO Router?
An IPv6 is the sixth version of any IP address on the IP protocol. It consists of eight groups of four hexadecimal digits. IP v6 is a 128-bits address having an address space of 2^128.  For more details about IPv6 refer to the articles: What is IPv6? and Internet Protocol version 6 (IPv6). Steps to Configure IPv6 on Cisco Packets Tracer:Step 1: Fir
2 min read
How to Configure Default Routing on Cisco Routers?
The main concept of configuring default routes is that it has the ability to handle packets transferred to networks not located in the routing table. Default Routes are configured mostly in Stub Network. Stub Network: It is a network containing only one exit interface or only one way to reach the destination. When we configure default routes, it re
3 min read
Article Tags :
Practice Tags :