السلام عليكم
أنا وجدت هذة المقالة علي صفحة الأنترنت وان شاء اللة تفيدك
Why is an Ip address and default gateway needed in the switch?
After all switches are OSI Layer 2 devices that care only about MAC addresses.
The modern switches are manageable and support extra features than normal old fashion switches. This features include the support of TCP/IP applications like ping, telnet, trace route etc. For example, if you want to telnet or ping a switch, the switch must have an Ip configured. Also, if you want to execute ping or telnet to a device in another subnet the switch must have a default gateway configured.
Now let’s see the configuration for a 2950 series cisco switch.
Ip address
To configure the ip address first you have to enter from global configuration mode to interface vlan 1.
Switch#
Switch#conf t
Switch(config)#int vlan 1
Switch(config-if)#ip address {your ip address} {mask}
Switch(config-if)#no shutdown
Default Gateway
Be careful!!! The configuration of default gateway takes place in the configuration mode and the command does not include the mask for the ip.
Switch#
Switch#conf t
Switch(config)#ip default-gateway {ip address}
Now you can access your switch remotely, you can ping it from another network with different subnet and start “playing” with the settings. Have fun
المفضلات