How to give a layer 3 switch an ip address with packet tracer

Student12345

New Member
Im in my first year of uni and doing a networking project but we haven't been taught how to do most of the things for the project. I have to create a network for multiple buildings from scratch and on packet tracer I am giving the layer 3 switch the same commands as you would to a router but when I give it the ip and mask command for a certain port 'ip address x.x.x.x x.x.x.x' it says that it is an invalid entry. Is this Just packet tracer or is there a different command for a L3 switch?
 
Can you give us the exact command you are entering? What mode are you in? This is what you should be using:

Router(config-if)# ip address ip-address mask
 
Usually you have to enable ip routing first. Some switches like the 2960 also need you to do 'sdm prefer lanbase-routing' and reboot the device before it will allow you to enable ip routing.

Example:
Closet-ASW#show ver | i Model number
Model number : WS-C2960G-8TC-L
Closet-ASW#show sdm prefer
Closet-ASW#show sdm prefer | i lanbase
The current template is "lanbase-routing" template.
Closet-ASW#show run | i routing
system mtu routing 1500
ip routing

And then you can assign such as:
Closet-ASW#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Closet-ASW(config)#int vlan 255
Closet-ASW(config-if)#ip address 10.231.231.231 255.255.255.0
Closet-ASW(config-if)#
 
Last edited:
Back
Top