In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you the transport layer TCP/UDP example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!
OSI layer 7
1-physical layer 2-data Link layer 3-Network layer addressing and routing 4-the transport layer provides end-to-end data connectivity (end-to-end TCP UDP 5-session layer (internal implementation mechanism of the system) Cannot be reflected in the packet) 6-presentation layer (internal implementation mechanism of the system, which cannot be reflected in the packet) 7-application layer
=
Seq: sequence number, serial number; acknowledge: determination number; mask: mask Subnet mask: subnet mask inverse mask: reverse mask wildcard bits: wildcard Keep-alive: keep alive timer transport layer protocol: Port = > socket (socket) TCP:80-> HTTP Belong to an application So: a socket can represent an application IP socket = > IP + TCP/UDP:Port, which represents the application on the network device represented by the IP address FTP: tcp 21/20 Telnet: tcp 23 SMTP:tcp 25 POP3: DNS:tcp 53 HTTP: tcp 80 to view the port numbers of common services on native devices: C:\ windows\ system32\ drivers\ etc\ service this file contains some "well-known services-wellknown" The port number used is generally not changed. So, the port number used by these services, also known as "well-know port" Port: 2 bytes in the message (TCP/UDP) So the value space of the port number is 0-65535. Classification: well-known port number: random high port: a port greater than 1024 is called random high port
=
[huawei > system-view [huawei] sysname R1 [R1] interface gi0/0/0 [R1-gi0/0/0] undo shutdown [R1-gi0/0/0] ip address 192.168.1.1 255.255.255.0 system-view [huawei] sysname R2 [R2] interface gi0/0/0 [R2-gi0/0/0] undo shutdown [R2-gi0/0/0] ip address 192.168.1.2 255.255.255.0 [R2-gi0/0/0] quit [R2] user-interface vty 0 4 / / remote user login interface [R2-userinterface-vty] authentication-mode password 123 quit [R2] [R1] quit telnet 192.168.1.2 123 R1/R2: configure the following Udp messages can be crawled between R1-R2 (udp 520for RIP) [R1] rip [R1-rip-1] undo summary [R1m Ripp- 1] network 192.168.1.0 [R2] rip [R2-rip-1] undo summary [R2-rip-1] network 192.168.1.0 Personal Learning Notes experiment name: TCP/UDP message structure Analysis experiment Topology: (lack) experiment requirements: 1 、 Configure the R1-R2 interconnect link: 192.168.1.0 jump 24 2, configure the telnet password for R2 Remote access on R1 Grab TCP message and analyze 3. Run RIP protocol between R1 and R2; grab UDP message and analyze the experimental steps: 1. Configure the port IP address of R1Magol R2. (and enable packet capture function) interface gi0/0/0 undo shutdown ip address 192.168.1.1 255.255.255 . 0 interface gi0/0/0 undo shutdown ip address 192.168.1.2 255.255.255.0 2 、 Configure telnet of R2 to use password User-interface vty 0 4 authentication-mode password hehe 3 、 Configure the routing protocol-RIP (same configuration command for R1/R2) rip undo summary version 2 Network 192.168.1.0 4 、 Verify and test catch TCP: telnet 192.168.1.2 grab UDP: configure RIP You can grab it at any time. Because RIP is a periodic package. 5. Save the configuration save experiment summary: 1. Ethernet head mechanism 0, IP head structure 1, TCP structure 2, UDP structure 3. The port number of RIP is udp 520. And the packet is sent by broadcast (255.255.255.255) 4. The port of Telnet is tcp 23. 5. When an application is represented by a port, the port generally represents the target port.
At this point, the corresponding source ports are all "random high ports"
Lab name: configure HTTP and DNS function Lab Topology: lab requirements: 1. Configure the IP address of the network device as shown in the figure 2. Access the web server through the client See the relevant content of the experimental steps: 1. Configure network device Gateway:-client gateway interface gi0/0/0 Undo shutdown ip address 192.168.2.254 255.255.255.0 # NAME? Interface gi0/0/1 undo shutdown ip address 192.168.1.254 255.255.255.0 2 、 Configure client host-configure IP address: 192.168.2.1 / 24-configure gateway address: 192.168.2.254- Configure DNS server address: 192.168.1.1 # NAME? 3, Configure server host-basic IP address configuration ip:192.168.1.1 / 24 gateway:192.168. 1.254 # NAME?-add mapping entry www.tedu.cn 192.168.1.1 -start the DNS service "start" # NAME?-add the default web page file of the HTTP server -start the HTTP service "start" 4. Verify and test on the client device Through http client, enter www.tedu.cn, and then get We can see the summary of the "default web page" experiment we uploaded on the server before: 1. Through packet capture analysis, we learned the HTTP message. 2. Through packet analysis, we have learned the DNS message. 3. Port number of HTTP. 4. Port number of NDS. Remote access Settings number of visitors: {huawei} user-interface vty0 4 Authentication Mode: aaa {huawei-ui-vty0-4} authentication-mode aaa enters aaa mode: {huawei} aaa create remote user ar2 password encryption 123 {huawei-aaa} local-user ar2 password cipher 123 remote user ar2 access 15 {huawei-aaa} local-user privilege level 15 remote user ar2 access Mode telnet {huawei-aaa} local-user ar2 service-type telnet above is all the content of the article "sample Analysis of Transport layer TCP/UDP" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.