In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Exchanger
1. What is a switch?
Switch (Switch) means "switch" is a network device used to forward electrical (optical) signals. It can provide an exclusive electrical signal path for any two network nodes of the access switch. The most common switch is the Ethernet switch.
To put it simply: the switch is used to share a network cable, and the router is used to share an IP. In other words, if you want to connect several computers to a network cable, you have to use a switch; if you only have one IP, if you want several computers to surf the Internet, you have to use a router to solve it. For example, a broadband router allows several computers at home to share the same account to surf the Internet; in the case of already sharing the Internet, there is only one network cable in a room, and multiple computers need to surf the Internet and use the switch.
two。 What are the functions of the switch?
Learning:
For each received data frame, the switch binds the source MAC address and the switch port number that received the data frame to its internal MAC address table.
1. If the source MAC address in the received data frame does not appear in the MAC address table, add the corresponding entry directly to the MAC address table
two。 If the source MAC address in the received data frame already appears in the MAC address table, update the timestamp of the entry'
3. Dynamically learned MAC address entries are cached in the MAC address table for 300 seconds
Note:
1. Multiple MAC addresses can be bound per port
two。 Only one port can be bound to each MAC address
Forwarding
Purposeful forwarding:
After receiving the data frame, the switch reads the MAC address in the data frame, looks up its own MAC address table, finds that the destination address is in the MAC address table, and sends the data frame out through the corresponding port in the MAC address table.
Aimless forwarding:
Flooding
After receiving the data frame, the switch reads the destination MAC address in the data frame. If the destination MAC address is a multicast address, a broadcast address, or a MAC address that does not exist in its own MAC address table, the switch forwards the data frame to all ports in active states except receiving the data frame.
Filter
If the switch receives a data frame and finds that the MAC address of the data frame corresponds to the same port as the port on which the data is received, such data filtering will not be accepted.
3. Security of the switch:
Password for user mode
Password that must be entered before entering user mode
Configure in the configuration mode of the console line
Switch (config) # line console 0
Switch (config-line) # login
Switch (config-line) # password INPUT_PASSWORD
Password for privileged mode
Password that must be entered before entering privileged mode
Configure the password required after executing the enable command in global mode
Switch (config) # enable password | secret INPUT_PASSWORD
Note:
1. The password subcommand sets the plaintext password, and the secretsubcommand sets the md5 encryption password.
two。 If the plaintext password and the encrypted password are set at the same time, the plaintext password is invalid and only the encrypted password takes effect.
3. You can add the no command before the configuration command to revoke the corresponding password
Password for remote connection
The password entered before connecting remotely to the switch through the telnet service and entering privileged mode
The password required to enter user mode after connecting remotely through telnet on the remote client
Switch (config) # line vty 0 [1-15]
Switch (config-line) # login
Switch (config-line) # password INPUT_PASSWORD
Switch (config) # service password-encryption
Command meaning: encrypt all current plaintext passwords, and encrypt all plaintext passwords set in the future
Switch (config) # no service password-encryption
Meaning of the command: if the clear text password is set later, it can be displayed in clear text, but no change will be made to the encrypted saved password.
Set the login banner information before the switch enters user mode:
Switch (config) # banner motd "BANNER_INFO"
Data Communication process-- switched Ethernet
1. The source host obtains the IP address of the destination host
two。 The application decides which protocol in the transport layer is selected for further encapsulation; here the application chooses the UDP protocol
The 3.UDP protocol encapsulates the application layer data directly, and gives it to the IP protocol for next encapsulation.
The 4.IP protocol encapsulates the data according to the source IP and destination IP address, and attempts to deliver the data to the network access layer.
5. The network access layer will turn to the ARP protocol for help, hoping to obtain the MAC address of the target host; if the ARP protocol caches the MAC of the target host, it will be encapsulated directly; otherwise, the UDP Datagram must be temporarily stored in memory to initiate an ARP request
The 6.ARP request is sent from the source host and is first received by the switch. The switch reads the source MAC address of the data frame to determine whether there is a corresponding MAC address entry in its MAC address table. After learning the address, flood forwarding or unicast forwarding is carried out according to the destination address.
7. After the target host receives the ARP request data, it caches the IP address and MAC address information of the source host, and responds its own IP address and MAC address to the source host in the form of data.
8. The switch receives the ARP response data and learns the MAC address of the target host to the MAC address table; according to the caching result in the MAC address table, the ARP response information is unicast forwarded to the source host
9. The source host obtains the MAC address of the target host and caches it in the ARP table
10. Encapsulate and send data according to the destination MAC address in the ARP cache
11. After receiving the data, the switch forwards the unicast according to the cache information in the MAC address table.
What is the subnet mask?
Subnet mask (subnet mask), also known as netmask, address mask, subnet mask, is a bitmask used to indicate which bits of an IP address identify the subnet in which the host resides and which bits identify the host. The subnet mask cannot exist alone and must be used in conjunction with the IP address. The subnet mask has only one function, which is to divide an IP address into two parts: the network address and the host address.
Why subnetting?
In a primary network, each network may contain a large number of IP addresses, but in the whole network, once a primary network address is used, other IP addresses in this network segment cannot be used in any other network definition. Therefore, by subnetting, a primary network segment can be divided into several smaller and more reasonable subnets.
The essence of subnetting:
Increase the number of networks in IP addresses and reduce the number of host bits
The basis for subnetting:
1. Number of subnets planned to be divided
2 ^ n > = number of subnets
two。 Plan the number of hosts in each subnet
2 ^ m-2 > = number of hosts
Routing Foundation
The router forwards data according to the routing table:
If there is a route entry in the routing table that corresponds to the destination IP address of the packet, it is forwarded according to the relevant route entry
If there is no routing entry in the routing table corresponding to the destination IP address of the packet, the packet is discarded
Routing table is the key to whether a router can forward data or not.
How does the routing table appear in the router?
1. A routing table is a set of data information with a certain standard format
two。 If the administrator receives the information added to the routing table, this kind of routing information is called static route
3. If it is the routing information advertised by routers through a specific protocol, it is called dynamic routing.
4. Generally speaking, static routes are permanent and dynamic routes are valid within a specific time range.
What is the route entry like?
Source and destination network address of the route entry [administrative distance / metric] via next-hop address
Source of route entries:
C: direct routing, the routing entry for the IP address configured on the physical interface of the router
S: static rout
D, R, O, O E1, O E2, D EX, B: dynamic routin
Routing: static default rout
D*, obliteration: dynamic default rout
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.