2

How can i configure ip address to cisco switch without configuring vlan. I have configured ip with vlan.

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 14 '17 at 14:23
7

A layer-2 switch can have only one management address assigned to it (on a single VLAN.) You can have as many VLANs as you like, but only one interface vlan# can be no shutdown at a time.

A layer-3 switch can have secondary addresses on any routed interfaces. Routed interfaces are usually limited to VLANs, however, some switches do allow switched interface to be converted to non-switch mode (no switchport)

Additionally, if the switch has a dedicated, out-of-band management interface, it can have an address as well. That's the only non-routed interface that supports layer-3 functions.

1

You can turn a layer 2 switchport into a layer 3 port and assign an IP address if you do no wish to use a vlan interface.

Note, you must have ip routing enabled and the switch must support it.

Use the following commands to do so.

Switch(config)# ip routing
Switch(config)# interface gi 0/1
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.0.0.1 255.255.255.0
Switch(config-if)# no shutdown

For some further reading and study please refer to the cisco doc : Chapter: Configuring Layer 3 Interfaces

Hope this helps you on your quest.

SleepyMan.

0

The VLAN is configured already on all ports by default - VLAN1. Simply assign an IP address and subnet mask to interface VLAN1. Configure the ip default gateway so that you can remotely manage the switch via telnet, for example. Telnet must be configured finally for the remote access to work.

4
  • 1
    Cisco recommends changing from VLAN 1, but I digress. However, one should never use Telnet to communicate with infrastructure (or anything really)... use SSH, especially from an external source. – stevieb Jun 8 '16 at 20:49
  • Where does Cisco recommend that VLAN 1 should be changed? Telnet continues to be used to connect to networking infrastructure, especially private network infrastructure, or no? – Ronnie Royston Jun 13 '16 at 16:22
  • Google "why shouldn't I use vlan 1 cisco", and read through some of the results. There are only two reasons why Telnet is still used... 1) the system you're connecting to doesn't support SSH, or 2) the person responsible for maintaining the system is either lazy or too incompetent to configure SSH. In the latter case, they should do some serious studying before managing a network. Telnet is an unencrypted protocol, meaning that I can sniff the wire and easily grab your user credentials, or perform man in the middle attacks. – stevieb Jun 13 '16 at 16:35
  • People still use telnet, especially on the inside of their networks. It's not as obsolete as you say. SSH adds a layer of complexity that is unrelated to the question. I think the primary question is how to configure an ip address on a Cisco switch. My answer is the only one that addresses all the main tasks required to achieve the practical working solution. – Ronnie Royston Jun 13 '16 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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