How do we assign IP address to L2 switch?

Unanswered Question
Sep 17th, 2008
User Badges:

Dear All,

Please explai, how to assign IP address to L2 switch and L3 switch?

what is the difference in assigning ip addresses in both???



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (1 ratings)
satish_zanjurne Thu, 09/18/2008 - 00:25
User Badges:
  • Silver, 250 points or more

1.Most of the times "ip address x.x.x.x x.x.x.x" is the command to assign the IP Address to L2 switch , this IP address is just assigned for management purpose.

2.In L3 switch, IP address is assigned to SVI ( Switch Virtual Interface)interface.You always assign the IP address to SVI of management vlan , which you define.

e.g vlan 2

name mgmt-vlan

int vlan 2

ip address x.x.x.x x.x.x.x

HTH..rate if helpful...

steve_steele Thu, 09/18/2008 - 00:32
User Badges:
  • Bronze, 100 points or more

Layer 2 Switch


int vlan << management vlan id >>

ip address

The switch should be contactable over the management vlan

Layer 3 Switch


ip routing

int vlan 10

ip address

int vlan 20

ip address

With a layer 2 switch the vlan interface is used to contact the switch typically for management purposes.

With a layer 3 switch you can have may vlan interfaces and the switch will route traffic between vlans. ( A bit like having a router on a stick but with the router built inside the switch, and the interfaces being virtual insted of pysical ports that you plug a cable into)



rageurdreams Thu, 09/18/2008 - 00:45
User Badges:

dear steve,


what about "management vlan id".

how many management vlans can be created on L2

and L3 switches.



FNFSPeak10 Thu, 09/18/2008 - 04:56
User Badges:


Unless I misunderstood your question, all VLANs could technically be used for management (and how many people you want to manage your equipment). It all depends on your local policy. That said, the maximum number of VLANs you can have on a L2 and L3 switch is 4094.

Hope this helps,



This Discussion