Linux network settings (version 2)-Internet addressing Process

Source: Internet
Author: User

Linux network settings (version 2)-Internet addressing Process
Linux network settings-Internet addressing Process

 

1. Comparison of TCP/IP and OSI Reference Models

 

 

TCP/IP

OSI

Physical Layer

Nic

Data Link Layer

*

MAC address

Network Layer

IP, ICMP, ARP

Transport Layer

TCP, UDP

Session Layer

*

Client-server

Presentation Layer

*

Data Encryption and Compression

Application Layer

SSH, Apache, and other practical applications

 

 

2. Internet addressing Process

 

1) MAC address

Dc: 0e: a1: d5: 8a: b2 [hardware address: 48 bits, 6 bits, hexadecimal writing]

Vendor ID (first 24 bits): Nic ID (last 24 bits)

 

Appendix-Linux view: ifconfig eth0

View in Windows: ipconfig/all

2) IP Address

192.168.14.127 [IPv4: 32-bit, 4-segment, 10-digit writing]

[IPv6: 128-bit, Hex writing]

Extended-DOS "Denial of Service Attack" SYNFLOOD (request packets like floods, Yahoo is suspended, IPv6 improves the security of this issue)

3) TCP/UDP

TCP: reliable, three-way handshake (breakpoint re-transmission, timer) [two military problems] [point-to-point] Full Duplex

UDP: fast, such as QQ, audio/video sharing

4) FQHN-complete computer name [domain name]

Www.sdust.cn.

Host name [www]. Second-level domain [sdust]. top-level domain [. cn]. Root Domain 【.]

Domain name level service structure

[There are 13 groups of root domain servers worldwide]

4) ARP Address Resolution Protocol

ARP parsing process

 

Arp-a # view the ARP cache table

Arp-d [IP address] # Delete ARP records

Arp-s [IP address] [MAC address] # Add ARP Static Records [be added with caution and take effect permanently]

5) RARP Reverse Address Resolution Protocol # Know Your MAC address and ask your IP address

Appendix-If host A accesses the WebServer on port 80 of host B, the port on host A should be A high port randomly allocated over 1024.

6) Resolve the domain name to an IP address

A) Hosts resolution method [oldest]: Save the/etc/hosts file [saved in Windows]

Format: IP address host name/Domain Name alias

This file has been in use. For example, some anti-virus software will shield the IP address of an illegal website from 127.0.0.1.

B) NIS-Network Information System [developed by Sun]

# Centralized File Management

C) DNS-Domain Name System # domain Domain Name, domain

# The entire Internet is DNS-based domain name resolution, among which BIND is the most popular domain name resolution Software

Domain delegate management

 

 

 

Recursive query [not very fast]

 

Client ----> www.csdn.net

1. Local DNS server [cache (generalized cache )]

Therefore, if you access a website slowly, (1) the bandwidth of the optical cable may be insufficient. (2) If the DNS server does not cache the website, recursive resolution is required first. (3) The server performance is poor.

2. root domain.

→. Net

3. top-level domain. net

→ Csdn.net

→ Back to DNS Server

→ Return to the Client

Cache Mechanism

 

Generalized cache: If www.csdn.net has been located, the root domain will not be asked again during the next visit to www.263.net 【. ], but directly located.. net server. If this is the attempt to access java.263.net, the server of 263.net is located instead of accessing it again. net Server

Appendix: 1. a mac address can correspond to multiple IP addresses

Ifconfig eth0: 1 192.168.1.1 # Add a new virtual network card eth0: 1

2. One IP Address can correspond to multiple MAC addresses

For example, cluster technology performs round-robin load, and performs average load based on different MAC addresses.

On Linux, You can bind two NICs to one IP address for acceleration.

3. a domain name can correspond to multiple IP addresses

In Windows: nslookup domain name # You can view the IP address of the website

4. One IP Address can correspond to multiple domain names

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.