Cisco switch network configuration: Gateway redundancy server load balancing
Virtual Router Redundancy protocol (vrouter Redundancy protocal, VRRP): Redundancy can be used on various devices.
Hot Backup Router Protocol HSRP): cisco proprietary Redundancy
Gateway Load Balancing protocol GLBP): The cisco dedicated redundancy gateway can also load balancing
Cisco switch network configuration: basic configuration
- > En // privileged mode from Normal Mode
-
- # Configureterminal // enter the configuration mode, which can be abbreviated as conft)
-
- (Config) # hostnameAAA // name the vswitch. This is useful when you log on remotely.
-
- (Config) # enablesecretBBB // set the password for the vswitch, in plaintext: enablepasswordBBB
-
-
-
- (Config) # interfacevlan1 (intvlan1) // enter vlan1, default vlan
-
- (Config-if) # ipaddress192.168.0.6255.255.255.0 // configure the management ip address of the vswitch
-
- (Config-if) # noshutdown // activate feature vlan1
-
-
-
- (Config-if) # ipdefault-gateway192.168.0.254 // configure the default route
-
- (Config-if) # exit // exit the Configuration Mode
-
-
-
- (Config) # interfacerangefastethernet0/1-10 // set the vswitch port to which the port belongs
-
- (Config-if-range) # switchportmodeaccess // The vswitch is in static access mode.
-
- (Config-if-range) # switchportaccessvlan20 // allow these ports to belong to vlan20
-
-
-
- (Config) # Set the interfacerangefastethernet0/11-22 // 11-22 ports of the switch
-
- (Config-if-range) # switchportmodeaccess // set the above 10 ports to be in static Access Mode
-
- (Config-if-range) # switchportaccessvlan30 // these ports belong to VLAN30 members
-
-
-
- (Config) # interfacerangefastethernet0/23-24 // enter the device port to be set
-
- (Config-if-range) # switchportmodetrunk // set this port to switch trunk mode. The two ports will run data from multiple VLANs, and these two ports will become the main port
-
- (Config-if-range) # switchporttrunkallowedvlan1.000030 // configure the vlan for running Relay (not all are specified, but it is best to specify one by one to minimize the number of broadcast packets in the network, this helps improve the stability of complex networks)
To configure the vlan, you can use: switchport trunk allowed vlan all
(Config-if-range) # switchport trunk encapsulation dot1q // encapsulate the 802.q Protocol
Cisco switch network configuration: vlan relay protocol VTP)
Vtp allows all VLANs to be created on a vswitch, and then transmits the vlan definitions created by the vswitch to all vswitches that need to be defined in the entire network using the mutual learning function of the vswitch. The deletion and modification of VLANs by colleagues will be transmitted to other switches. Vswitches that share the same vlan definition database form a vtp management domain. Each vtp management domain has a domain name. Vtp notification information is not exchanged between vswitches in different vtp management domains.
- AAAconfig) # vtpdomaintest // define the vtp domain name as the test configuration statement.
-
- AAAconfig) # vtpmodeserver // set the vswitch to a vtp SERVER
-
- AAAconfig) # vtppruning // activates the vtp cropping function. If all ports of a vswitch belong to the same vlan, it does not need to receive user data from other VLANs, in this case, the vtp cropping function is enabled.
The preceding three commands configure a vswitch as The vtp SERVER mode, so that vlan division can be performed on this switch, because he is a vtp server, other switches will learn his vlan information by themselves. The following configuration only needs to be configured on this switch;
- AAA # configureterminal // enter the Configuration Mode
-
- AAA (config) # vlan10 // define vlan10
-
- AAA (config-vlan) # namedianda // define a name for this vlan
-
- AAA (config-vlan) # exit // switch from vlan mode to Configuration Mode
-
- AAA # vlandatabase // enter vlan sub-mode in global Mode
-
- AAA (vlan) # vlan3nameBBB // create a vlan3 and name it BBB
Cisco switch network configuration: Configure routes and define ip addresses
- AAA (config) # iprouting // if this is an aggregation switch, it also provides the routing selection function between VLANs for the entire network. This is to enable the routing function of the layer-3 switch.
-
- AAA (config) # interfacevlan10
-
- AAA (config-if) # idaddress192.168.251.252.165.255.255.0 // define the IP address for vlan10
-
- AAA (config-if) # noshutdown // activate it
-
- AAA (config-if) # Set each vlan in the preceding three statements
-
- AAA (config-if) # exit
-
- AAA (config) # ifroute0.0.0.00.0.0.0gigabitethernet0/1 // The default route command indicates that the data is sent from the first port of the Gigabit Switch.
Enable and view the routing function of a layer-3 Switch
- #iprouting
-
- #showiproute
-
- 10.1.0.0/24issubnetted,2subnets
-
- 10.1.1.0isdirectlyconnected,vlan3
-
- 10.1.2.0isdirectlyconnected,vlan2
Cisco switch network configuration: Channel Design
To improve the throughput of main roads and achieve Redundancy Design, bind two Gigabit ports of core switch A to implement A Mbps Gigabit Ethernet channel, and then connect to another core switch, set A as follows:
- Aconfigure) # interfaceport-channel1 // create an Ethernet channel,
-
- Aconfigure-if) # switchportmodetrunk
-
- Aconfigure-if) # duplexfull
-
- Aconfigure-if) # speed1000
-
- Aconfigure-if) # interfacerangegigabitethernet2/1-2 // 2 ports 1-2
-
- Aconfigure-if) # channel-group1modedisirablenon-silent // Add the current interface to the corresponding Ethernet channel and specify the Ethernet channel mode
-
- Aconfigure-if) # noshutdown
Cisco switch network configuration: Spanning Tree STP
The priority of the production tree is 0-61440, and the increment is 4096. The smaller the priority, the higher the priority. The default value is 32768.
In global switch mode:
A # spanning-tree vlan 3 priority 4096 // change the vlan3 priority
Here 4096 can also be the following number: 28672x2 = 8192,4096*3 = 12288,4096*4 = 16384,4096*5 = 20480,4096*6 = 24576,4096*7 =
Backbonefast function of the vswitch
By default, when a vswitch is powered on, each port has to go through four stages of the Spanning Tree: blocking, listening, learning, and forwarding. Each port takes up to 50 s. Including 20 s blocking time, 15 s listening time, 15 s learning delay time)
The backbonefast function enables the blocked port to directly enter the forwarding state without waiting for the maximum survival time of a generated book for about 30 s. This improves the convergence speed of the switch.
A # spanning-tree backbonefase
Cisco switch network configuration: VRRP is configured on a layer-3 switch.
- VRRPVirtualRouterRedundancyprotocal) vrovirtualredundancy protocol is designed for LAN with multicast or broadcast capabilities.
-
- A # conft
-
- Aconfig) # track100interfaceGigabitethernet1/1/1line-protocal // define a tracking target number 100, and the tracked object is GE1/1/1.
-
- Aconfig) # interfacevlan3 // enter vlan3 virtual sub-Port
-
- Aconfig-if) # vrrp1ip10.1.1.253 // enable vrrp and set the virtual IP Address
-
- Aconfig-if) # vrrp1priority120 // set the VRRP priority of the layer-3 Switch
-
- Aconfig-if) # vrrp1preempt // configure Vrrp Preemption
-
- Aconfig-if) # vrrp1track100decrement30: track the target by 100. When the target fails, the priority is reduced by 30)
-
- Aconfig-if) # configure vrrp Authentication Mode for MD5 vrrp1authenticationMD5key-stringabc123, authentication password for abc123)
The cisco switch network configuration problems have been introduced to you. I hope you can understand them, especially for enterprise users, and pay more attention to network configuration and implementation issues.