Network Fundamentals 1

----------《1. TCP/IP Protocol》----------

TCP/IP: The most widely supported set of communication protocols.
IP: identifies the network address of a node, 32 binary bits.
Three elements of host communication: IP address (IP address), subnet mask (subnet mask), IP routing (IP router).
A: 1~126 255.0.0.0 Private: 10.0.0.1~10.255.255.254
B: 128~191 255.255.0.0 Private: 172.16.0.1~172.31.255.254
C: 192~223 255.255.255.0~192.168.0 Private 255.254
D: 224~239 Multicast (Multicast)
E: 240~254 Research

Gateway: The "gateway" at which one network connects to another. (Router, firewall, access server)
ping 127.0.0.1
loopback test to verify whether the TCP/IP is normal.
ping IP1|IP1 ping IP2 connectivity test.
Influencing factors: same network, firewall, correct gateway, DNS configuration.

 

----------《"Second, Computer Networks"》----------

Computer network functions: data communication, resource sharing, increase reliability, improve system processing capacity.
Protocol: syntax, semantics, synchronization.
Standards: ISO, ANSI, ITU-I, IEEE.
Network topology types: point-to-point, bus, ring, star, mesh.
Star: Easy to implement, easy to scale, easy to troubleshoot. The central node has high pressure and high cost.
Mesh: redundancy, fault tolerance, high reliability. Networking costs are high.
Bandwidth: 1Gbit/s=10^3Mbit/s=10^6kbit/s=10^9bit/s. 1Bps=8bps=8bit/s. 1bit=8-bit
service type: connection-oriented service, connectionless service.

- OSI protocol model -
Application layer (computer): An interface between network services and end users. Protocols: HTTP, FTP, TFTP, SMTP, SNTP, DNS. <APDU>
presentation layer: data presentation, security, compression. <PPDU>
Session layer: establish, manage, and terminate sessions. <SPDU>
Transport Layer (Firewall): Defines the protocol port number for transmitting data, as well as control and error checking. Protocol: TCP, UDP. <TPDU>
network layer (router): perform logical address addressing to realize path selection between different networks. Protocols ICMP, IGMP, IP, ARP, RARP. <Message>
Data link layer (switch): establish logical connections, perform hardware address addressing, and perform error checking. <frame>
physical layer (network card): establish and disconnect physical connections. <bit>

In the TCP/IP model, application layer = presentation layer + session layer + application layer, network interface layer = data link layer + physical layer

 

----------《"Three, Physical Layer"》----------

Physical layer: signal, medium, interface
function: provide data transmission path and data transmission for data terminal equipment.
Signal: analog signal, digital signal.
Interface: RJ, optical fiber.
Media: Wired (twisted pair, fiber optics), wireless (radio, microwave, laser, infrared).
Twisted pair: UTP, STP.
cat5 100Mbps
cat5a 100Mbps
cat6 1000Mbps
cat7 10000Mbps
T568A: white-green, green, white-orange, blue, white-blue, orange, white-brown, brown.
T568B: white orange, orange, white green, blue, white blue, green, white brown, brown.
Cable connection:
straight line, cross line, full reverse line (console control line).
Straight cable (straight-through cable): Connect different devices
Crossover cable: Connect the same device. Special case: The host connects to the router with a direct connection.
All reverse lines: The COM port of the computer is connected to the console port of the switch/router.

——Switch command——
Mode:
Switch>User mode
Switch>enable
Switch# Privileged mode (check configuration information)
Switch# disable Privileged mode to user mode
Switch# configure terminal or conf t
Switch(config)# Global configuration mode
Switch(config )# interface fastEthernet 0/1
Switch(config-if)# interface mode
Switch(config)# interface vlan 1
Switch(config-if)# vlan interface mode
Switch(config)# line console 0 Enter console mode
Basic settings:
Switch( config)# hostname Name Change the name
Switch(config)# enable password 123 clear text password
Switch(config)# enable secret 456 cipher text password
Switch(config-line)# password 789
Switch(config-line)# login Set console password
exit --- go back to the previous level

Basic operation:
end(Ctrl-Z)----Switch# exit to privileged mode
Switch# copy running-config startup-config
or write save switch configuration
Switch# erase startup-config restore factory default value
Switch# reload reload
?- ---- Query operable commands

Switch(config-line)# exec-timeout 0 0 (minutes and seconds) Configure console session not to time out and console messages to not interrupt commands
Switch(config-line)# logging syschronous Configure output log synchronization, log messages do not pop up
Switch( config)# no ip domain-lookup configure to disable DNS query, and do not interrupt the command if you enter wrong

Other configuration
- switch interface working mode configuration -
Switch(config-if)# duplex { full | half | auto } set interface duplex mode
Switch(config-if)# speed { 10 | 100 | 1000 | auto} set interface Communication rate
Switch# show interface fastethernet 0/24 View interface duplex mode and communication rate

——Switch management IP configuration——
Switch(config)# int v 1
Switch(config-if)# ip address 192.168.1.1 255.255.255.0 Configure the remote management IP address
Switch(config-if)# no shutdown Activate the network
Switch(config -if)# ip default-gateway 192.168.1.100 configure remote management gateway
show running-config view switch configuration
show mac-address-table view mac address table
show cdp neighbors (detail) view neighbor Cisco device (detail) information
show version show system IOS name and version information

 


----------""Four, Data Link Layer""----------


Functions: establishment, maintenance and dismantling of data links, frame packaging, transmission and synchronization, frame error recovery, and flow control.
Switch: The main device connecting the local area network. The switch can forward data intelligently according to the destination address in the Ethernet frame. Divide the collision domain to realize full-duplex communication.
The working principle of the switch: learning, broadcasting, forwarding, and updating.
MAC address
24bit vendor identification + 24bit unique number, 6 bits, 48 ​​bits, binary bits.
The 8th bit: 0-physical address (unicast), 1-logical address (multicast)
802.3 Ethernet frame format
preamble 7bit, frame start delimiter 1bit, destination address 6bit, source address 6bit, type/length 2bit , Data 46 ~ 1500bit, frame check data.

 


----------《"Five, Network Layer"》----------


Function: Defines the logical address based on IP protocol, connects different media types, and selects the best path for data to pass through the network.
IP address = network bits + host bits.
The IP header format is 20bit.
Subnet mask (255.255.255.0): used to identify the host bit and network bit of the IP.
32 binary bits.
The network part corresponding to the IP address is represented by 1, and the host part is represented by 0.
Network ID (ABC0): The network address obtained by the logical AND operation of the network address and the subnet mask.
0 and any number = 0, 1 and any non-zero number = any number itself.
ARP Protocol (Address Resolution Protocol): arp -a resolves IP addresses to MAC addresses.
RARP protocol (Reverse Address Resolution Protocol): rarp -a resolves MAC addresses to IP addresses.
ICMP protocol (Internet Control Message Protocol): Transported by IP datagrams, it is used to send error and control information and to detect bidirectional path connectivity.
Ping [-t] [-a] [-l bytes] Destination IP or host name ------- Test connectivity
router function
to identify the destination IP address of the packet, identify the source IP address of the packet, and use it in the routing Find possible paths in the table, select the best path to reach the target in the table, maintain and check the routing information.

——Route configuration——
Configure static route
Route(config)# ip route target network ID subnet mask next hop IP------------- static route configuration, specify the destination network
Route to reach IP (config)# ip route target network ID subnet mask next hop IP number--floating route setting, number is the management distance
Route(config)# ip route 0.0.0.0 0.0.0.0 next hop IP ----- ------------ Default route (any IP, subnet mask, for end routers)
or Route(config)# ip route 0.0.0.0 0.0.0.0 f0/0 (outbound interface)
Router# show ip route View common configuration of routing table

 


----------《"Six, Transmission Layer"》----------


Function: The IP layer provides point-to-point connections, and the transport layer provides end-to-end connections.
TCP protocol: Transmission Control Protocol, reliable, connection-oriented, and inefficient.
UDP Protocol: User Datagram Protocol, unreliable, connectionless, and efficient.
The TCP encapsulation format is 20 bits, and the UDP encapsulation format is 8 bits.
FIN: Disconnect.
SYN: Request a connection.
RST: Reconnect.
PSH: Provides services to the application layer.
ACK: Acknowledgement.
URG: Controls the emergency clock.

timer:
retransmission timer
keepalive timer
persist timer: zero window deadlock, wait state.
time waiting timer

——TCP protocol application——
21 FTP file transfer protocol, used for uploading and downloading.
25 SMTP Simple Mail Transfer Protocol.
53 DNS Domain name resolution, resolves network addresses to IP addresses.
80 HTTP Hypertext Transfer Protocol.
23 Telnet remote management login target host.

-- UDP protocol application --
53 DNS Domain name resolution, resolve network address to IP address.
69 TFTP Trivial File Transfer Protocol.
111 RPC remote procedure call.
123 NTP Network Time Protocol.

 

----------""Seven, Application Layer""----------


Function: Work with applications to exchange application-specific data using the underlying network.

——Application layer protocol application——
21 FTP file transfer protocol, used for uploading and downloading.
69 TFTP Trivial File Transfer Protocol.
25 SMTP Simple Mail Transfer Protocol, send and receive mail.
110 POP3 Post Office Protocol version 3, the client receives mail.
53 DNS Domain Name Resolution Protocol.
80 HTTP Hypertext Transfer Protocol.
443 HTTPS Secure Hypertext Transfer Protocol.
23 Telnet remote management login target host.

——Telnet remote management——
Premise setting: Set management IP, console password.
Switch: (any VLAN interface)
Switch(config)# int v 1
Switch(config-if)# ip address 192.168.1.1 255.255.255.0
Configure remote management IP address
Router: (any network interface)
Route(config)# int f 0/1
Route(config-if)# ip address 192.168.1.1 255.255.255.0
Switch(config-line)# line vty 0 4 represents 01234, while allowing 5 remote management terminals
Route(config-line)# line vty 0 4 stands for 01234, allowing 5 remote management terminals at the same time

Configure the remote management IP address
Computer
Start-->Run-->cmd
to execute: telnet <target host IP address> [port number 23] Remote management host
ip routing The Layer 3 switch enables the routing function.
----telnet 192.168.1.1 192.168.1.254 routing

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324875963&siteId=291194637