cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
578
Views
10
Helpful
3
Replies

Giving IP Addresses to ports on Switch.

ahmadqayyum7
Level 1
Level 1

I have a switch on which 4 PCs are attached. Now I want to give IP addresses to ports that are connected to that switch. How do I do that on Cisco when using Switch-PT-Empty. When I try to assign IP I get following message:

 

int fa 0/1

ip address 192.168.2.1 255.255.255.0
^
Invalid input detection at '^' marker

What am I doing wrong?  

1 Accepted Solution

Accepted Solutions

luis_cordova
VIP Alumni
VIP Alumni

Hi @ahmadqayyum7 ,

 

On an L2 switch, IPs can not be assigned to the physical interfaces (fa0/1, fa0/2, etc).
In those devices you can only assign an IP to the vlan interface that you will use to manage the switch (interface vlan1 by default).

To route the PCs you need an L3 device, such as a router or a multilayer switch.

 

Regards

View solution in original post

3 Replies 3

luis_cordova
VIP Alumni
VIP Alumni

Hi @ahmadqayyum7 ,

 

On an L2 switch, IPs can not be assigned to the physical interfaces (fa0/1, fa0/2, etc).
In those devices you can only assign an IP to the vlan interface that you will use to manage the switch (interface vlan1 by default).

To route the PCs you need an L3 device, such as a router or a multilayer switch.

 

Regards

balaji.bandi
Hall of Fame
Hall of Fame

can you post the configuration of the switch to have look, you need to have DHCP in the network to give IP lease, if not you neeed to setup static IP address to PC to enable network connectvity like internet.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Joseph W. Doherty
Hall of Fame
Hall of Fame
As Luis already noted, you cannot assign IP address to switch access port but if the switch is a L3 switch, you can change the mode of the port to non-access and then you can assign it an IP address.

BTW, if there's only one port per VLAN, and you assign an IP address to the SVI, effectively you have that port with an IP address.
Review Cisco Networking for a $25 gift card