of the Switch MAC Address learning Situation:
1. Receive the data frame from an interface, look up the MAC Address table of the switch according to the original MAC address of the data frame, if not found, will add the original MAC address of the data frame and receive the corresponding entry of the data frame interface, put into the MAC address table of the switch (in case the MAC has space, if no space will be put, Also does not replace the original entry).
2. Receive the data frame from an interface, look up the MAC Address table of the switch according to the original MAC address of the data frame, if there is, check whether the interface in the original entry is consistent with the interface of the currently received data frame, if it is inconsistent, the original interface will be replaced, if it is consistent, no modification will be made.
Switch forwarding conditions:
1. Receive the data frame from an interface, look up the MAC Address table of the switch based on the destination MAC address of the data frame, if not found, copy this data frame to all the interfaces except the incoming interface flooding.
2. Receive a data frame from an interface, find the MAC Address table of the switch based on the destination MAC address of the data frame, and if found, forward this data frame only from the interface corresponding to the MAC address table.
Password cracking of the router:
Ahead: Legacy routers need to remain configured
Press CTRL + C during device restart
Enter the ROM system:
Rommon 2 > Confreg 0x2142//Modify register encoded as 0x2142, purpose skip to load Startup-config in NVRAM into ROM to runing-config
Rommon 3 > Reset//restart
The router enters the empty configuration:
router#
Router#copy startup-config running-config//Manually put the original configuration, loaded into the current configuration, the original configuration will be restored
Destination filename [running-config]?
%sys-5-config_i:configured from console by console
495 bytes copied in 0.416 secs (1189 bytes/sec)
Router#conf T
Enter configuration commands, one per line. End with cntl/z.
Router (config) #enable password 123//change to new password
Router (config) #config-register 0x2102//Change the Register code back to 0x2102 to restart loading the startup-config in NVRAM
Router (config) #end
router#
%sys-5-config_i:configured from console by console
ROUTER#WR//Maintain a modified configuration
Building configuration ...
[OK]
Password recovery for the switch:
- Power down and Add.
- Press mode inside the 15s to keep the 15s system light from green to orange and release mode
- Enter ROM system tip: Flash_init
Load_helper
Boot
- Switch:flash_init
- Switch:load_helper
- Switch:rename Flash:config.text Flash:config.text.old
- Switch:boot//restart
- Switch> Enable
- switch# Rename Flash:config.text.old Flash:config.text
- switch# Copy Flash:config.text System:running-config
- switch# Configure terminal
- Switch (config) # enable secret xxxx
- Switch (config) # exit
- Switch#write
turn on the switch VTY Remote Management line:
switch>en
Switch#conf T
Switch (config) #
Switch (config) #int vlan 1//Enter the interface that the two layer switch uses to manage the device
Switch (config-if) #ip Add 1.1.1.1 255.255.255.0
Switch (config-if) #no sh
Switch (config-if) #exit
Switch (config) #line vty 0 4
Switch (config-line) #password 111
Switch (Config-line) #login
Switch (Config-line) #end
Vty The remote management line is logged on with a local user name and password:
router>en
Router#conf T
Router (config) #username aa password AA//define local user database
Router (config) #line vty 0 4
Router (config-line) #login Local//Set vty login mode to log in to the native user, password mode
Router (Config-line) #end
Switch port security
switch>en
Switch#conf T
Switch (config) #int F0/1
Switch (config-if) #switchport mode access//interface set to access mode
Switch (config-if) #switchport port-security//Open port security function
Switch (config-if) #switchport port-security mac-address 00E0. A394. C22E//Bind a fixed MAC address
Switch (config-if) #switchport port-security maximum 3//maximum allowed number of Macs, default 1
Switch (config-if) #switchport port-security violation? If the illegal data frame arrives at the behavior that will be taken, the default behavior shutdown
Protect Security violation protect mode silently discards the data frame
Restrict Security violation restrict mode discards the data frame and logs
Shutdown Security violation shutdown mode off interface
DHCP configuration of the service
router>en
Router#conf T
Router (config) #service DHCP//Turn on DHCP service
Router (config) #ip dhcp excluded-address 1.1.1.1 1.1.1.10/exclude certain addresses
Router (config) #ip DHCP pool A//define the address pool assigned to the client
Router (dhcp-config) #network 1.1.1.0 255.255.255.0//Address pool IP address range, and mask
Router (dhcp-config) #default-router 1.1.1.10//client received the default gateway
Router (dhcp-config) #dns-server 12.23.34.45//client received DNS server address
Router (Dhcp-config) #end
CCNA Course III