1

I've configured a vlan 3 with ip address and then assigned FE port to vlan 3 , i read that this will assign the ip address to the FE interface. I know this is really simple configuration .But really would love some help on how to assign IP addresses to FE interfaces on switches in CPT .

   Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)
 !
interface FastEthernet0/1
switchport access vlan 3
switchport mode access
!
!
interface Vlan3
ip address 172.12.123.1 255.255.255.0
!
6
  • What version of IOS are you running on the switch?
    – HAL
    Commented May 2, 2016 at 17:06
  • ROM: C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4) @HAL hope thats the correct info
    – Yasha
    Commented May 2, 2016 at 17:15
  • This is the boot loader version and not the IOS version. You can get it with "show version" and you should obtain something like "Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)". You can edit the question to add this info, and also paste the switch configuration (result of "show run") using the "preformatted text" tool.
    – JFL
    Commented May 2, 2016 at 17:52
  • Yes, please post the switch configuration. The interface configuration of the FE port would also help.
    – HAL
    Commented May 2, 2016 at 20:36
  • 1
    You need to explain, in detail, what you are trying to accomplish. You don't/can't assign IP addresses to a switch (layer-2) port. IP is a layer-3 protocol, and you assign IP addresses to a router (layer-3) port. Normally, you will create a layer-3 SVI port for your VLAN, and you can assign an IP address to that, but that may still not be correct for a layer-2 switch.
    – Ron Maupin
    Commented May 3, 2016 at 16:14

3 Answers 3

2

IP is a layer-3 protocol, but you have a layer-2 switch. When a port is configured as a switch (layer-2) port, you can't assign an IP address to it. It doesn't make sense to assign a layer-3 address to a layer-2 port. IP is a layer-3 protocol, so you assign it to layer-3 ports.

The layer-2 switch can have a layer-3 SVI port to which you can assign an IP address, but your switch isn't a router or layer-3 switch, so an IP address on your SVI is only for switch management. If you want to have multiple VLANs and route between them, you need a router or a layer-3 switch.

If you had a layer-3 switch, you would need to make sure that you have IP routing enabled. You could then assign IP addresses to the ports, but you would first need to use the no switchport command.

0

This will give a interface on a switch an ip address but you will need to turn routing on the switch before this will work.

int fa0/3
no switchport
ip address 172.12.123.1 255.255.255.0
0

Base on my personal experience, I think that We do not assign the IP address to all the port on a switch because a switch is a layer 2 and we cannot sign IP address to all the switch ports like router or layer 3 switch. We can configure IP address to layer 2 switches in VLAN switch mode. We use the IP on switch for the purpose for remote connection such as telnet and ssh. As well as, network monitor and alert when the switch device up or down.

S1# configure terminal

S1(config)# interface vlan 99

S1(config-if)# ip address 172.17.99.11 255.255.0.0

S1(config-if)# no shutdown

S1(config-if)# end

S1# copy running-config startup-config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.