Configuring the Switch
The many configuration modes included the interface configuration, the global configuration mode, the privileged executive mode, the user executive mode, and several more specific configuration modes. Here, we will set up some of a switch’s fundamental settings, such as:
- Hostnames
- passwords and banners
- IP address management
- settings for duplex mode
- Vty lines and console lines.
The configuration topology that we’ll be employing is displayed below.
We have 1 switch and 2 hosts in this topology. We’ll use the console wire to set up the switch. Follow the procedures below to create this topology in a packet tracer or a physical lab:
Hostnames, Console & Vty lines, Banners, and Passwords
Contrary to older switches like the catalyst switches, the CISCO IOS is utilized on more contemporary switches like the CISCO 2960 switch, which is the one we are utilizing. In order to specify the majority of the parameters on the SWITCH 1 command line interface, we must switch to global configuration mode. Enter the following commands to access this.
Switch>enable Switch#configure terminal
Explanation:
While the second command, “configure terminal,” will provide us access to the global configuration mode, the first command grants access to the privileged access mode.
We must first update the switch’s hostname from “switch” to “SWITCH_1” in the global configuration mode. Entering the command hostname <SWITCH_HOSTNAME> accomplishes this.
The command in our scenario is displayed below.
Switch(config)#hostnameSWITCH_1
The prompt will change from “switch(config)#” to “SWITCH_1(config)#” when this command is run.
The five telnet line settings, including the password, executive timeouts, and logging synchronous, must then be configured. The passwords on both lines are set to “cisco” using the commands below, and the timeouts are set to 15 minutes.
SWITCH_1(config)#line console 0 SWITCH_1(config-line)#password cisco SWITCH_1(config-line)#login SWITCH_1(config-line)#logging synchronous SWITCH_1(config-line)#exec-timeout 15 0 SWITCH_1(config-line)#exit SWITCH_1(config)#line vty 0 4 SWITCH_1(config-line)#password cisco SWITCH_1(config-line)#login SWITCH_1(config-line)#logging synchronous SWITCH_1(config-line)#exec-timeout 15 0 SWITCH_1(config-line)#exit
Explanation:
The command logging synchronously will stop extraneous messages from popping up on the screen as you type and interfering with the command.
When someone tries to access the switch, a banner with a notice is displayed. We talked about a few of the factors that could influence an administrator’s decision to utilize a banner. In this instance, we’ll use a banner MOTD that has been set up with the command:
Banner motd#<MESSAGE>#
The beginning and conclusion of the message are denoted by the pound sign. In this instance, the message “WARNING. AUTHORIZED ACCESS ONLY!!!” will be used, and it is configured on SWITCH_1 using the command indicated below.
SWITCH_1(config)#Banner motd# WARNING. AUTHORIZED ACCESS ONLY!!!#
When setting routers, we discovered that an IP address was required to contact the router remotely using vty lines. Similar to a PC, switches require the configuration of an IP address, subnet mask, and default gateway. The IP address is used to control the switch.
- CISCO switches use VLAN 1 by default as the management VLAN, although it is recommended to modify this as it may present a security risk.
- We must build a management VLAN and give it a management IP address in order to enable management of the switch via a management interface. In our situation, we’ll utilize VLAN 99 and assign it the IP address 192.168.99.1, enabling remote telnet management of the switch.
- In order for the switch to be able to access traffic from distant networks, we also need to configure the default gateway.
- The default gateway in our scenario will be 192.168.1.1
We carry out the procedures listed below to configure the management interface.
NOTE: An SVI (Switched Virtual Interface) is configured using the “interface VLAN command”.
Step 1: Construct VLAN 99 as the management VLAN interface. We’ll use the following command:
SWITCH_1(config)#interface vlan 99
Step 2: Use the no shutdown command to activate and make the interface active after giving it an IP address and subnet mask.
SWITCH_1(config-if)#ip address 192.168.99.1 255.255.255.0 SWITCH_1(config-if)#no shutdown SWITCH_1(config-if)#exit
Step 3: We must attach one of the switch interfaces to the VLAN 99 management VLAN, as demonstrated below.
SWITCH_1(config)#interface fa0/5 SWITCH_1(config-if)#switchport mode access SWITCH_1(config-if)#switchport access vlan 99 SWITCH_1(config-if)#end SWITCH_1#copy runing-config startup-config
The command “IP default-gateway IP address>” is used to set up the IP default gateway so that traffic headed for distant networks can be redirected. This command is executed as illustrated below using the IP address 192.168.1.1 as the default gateway in this situation.
SWITCH_1(config)#ip default-gateway 192.168.1.1
Following this arrangement, all networked devices ought to be able to communicate with one another without further configuration.
Duplex Settings
The duplex mode controls whether communication will be unidirectional or bidirectional. On CISCO switches, the duplex is typically set to auto by default. Accordingly, if one side is using a half-duplex, the port will also be using a half-duplex.
The switch’s ports can be hard-coded to exclusively use a full duplex because that is the recommended option. The required commands are implemented on a switch in the interface configuration mode as shown below.
Switch(config)#interface fastEthernet 0/1 Switch(config-if)#duplex<full>
Switch Concepts and Configuration
A switch is a discrete piece of hardware that connects various computers to a single local area network (LAN). In the OSI model, network switches function at layer 2 (Data link layer).
- On the basis of MAC addresses, switches are utilized to forward the packets.
- The switch makes it possible for the device that has been addressed to receive the data.
- It checks the destination address before properly routing the packet.
- Full duplex operation is used.
- Since the source and destination are communicating directly, packet collision is minimal.
- It does not broadcast the message since its bandwidth is constrained.
Contact Us