Network attribute configuration of Linux Foundation (i)

Source: Internet
Author: User


Network:

TCP/IP: protocol stack (use)

Iso,osi: protocol stack (learning)

Mac:media Access Control

48bits:

Icann:24bits, 2^24

Address Block: 2^24

Bridge (Bridge): MAC Address Table

Statically specified:

Dynamic Learning: Learning according to the original address;

Switch: Multi-port bridge;

IP (Internet Protocol) Address: network number + host number

A<-->b

Internet?

Host?

Ipv4:32bits

8bits.8bits.8bits.8bits

0-255

0.0.0.0-255.255.255.255

IP Address Classification:

Class A:

The first paragraph is the network number, the latter three are the host number

Network number:

0 000 0000-0 111 1111:1-127

Number of networks: 126,127

Number of hosts per network: 2^24-2

Default Subnet Mask: 255.0.0.0,/8

Used for "and" operations with IP address bitwise to remove its network address;

1.3.2.1/255.0.0.0 = 1.0.0.0

1.3.2.1/255.255.0.0= 1.3.0.0

Private network Address: 10.0.0.0/255.0.0.0

Class B:

The first two paragraphs are the network number, the latter two are the host number

Network number:

10 00 0000-10 11 1111:128-191

Network number: 2^14

Number of hosts per network: 2^16-2

Default Subnet Mask: 255.255.0.0,/16

Private network Address: 172.16.0.0-172.31.0.0

Class C:

The first three paragraphs are the network number, the last segment is the host number

Network number:

110 0 0000-110 1 1111:192-223

Network number: 2^21

Number of hosts per network: 2^8-2

Default subnet Mask: 255.255.255.0,/24

Class D: Multicast

1110 0000-1110 1111:224-239

Category e: Scientific research

240-255

Ipv6:128bits

Router: router

Routing table:

Statically specified

Dynamic Learning: RIP2, OSPF

Route entry:

Destination Address Next hop (nexthop)

Category of Destination address:

Host: Host Routing

Network: Network routing

0.0.0.0/0.0.0.0: Default route

OS: Multi-user, multi-tasking

Multitasking: Multi-process

Chrome:

Qq:

QQ Music:

When communicating, the digital ID of the process:

16bits:

0-65535:1-65535

1-1023: Fixed allocation, and only administrators have permission to enable;

1024-4W: Semi-fixed,

4w+: temporary;

Process Address:

Ip:port, Socket

Summarize:

MAC: Local communication; scope: local area network;

IP: Define communication host, source and target; scope: Internet;

Port: Define the process; scope: host;

Connect a Linux host to the network:

Ip/netmask: Local Communication

Routing (Gateway): cross-network communication

DNS server address: Host-name-based communication

Primary DNS server address

Alternate DNS server address

Third Backup DNS server address

How to configure:

Statically specified:

Command:

Ifcfg Family:

Ifconfig: Configuring Ip,netmask

Route: Routing

Netstat: status and Statistics view

Iproute2 Family:

IP OBJECT:

Addr: Address and mask;

Link: interface

Route: Routing

SS: Status and Statistics view

CentOS 7:nm (Network Manager) family

NMCLI: command-line tools

Nmtui:text Window Tool

Attention:

(1) The DNS server specifies

Configuration file:/etc/resolv.conf

(2) Local host name configuration

Hostname

Configuration file:/etc/sysconfig/network

CentOS 7:hostnamectl

Configuration file:

Redhat and related releases

/etc/sysconfig/network-scripts/ifcfg-netcard_name

Dynamic allocation: Relies on a DHCP service in the local network

Dhcp:dynamic Host Configure Procotol

Network interface naming method:

Traditional naming:

Ethernet: EthX, [0,oo], e.g. eth0, eth1, ...

PPP Network: PPPX, [0,...], for example, Ppp0, PPP1, ...

Predictable naming scheme (CentOS):

Many different naming mechanisms are supported:

Fireware, topological structure

(1) If the index information provided by the firmware or BIOS-integrated device on the main board is available, then it is named according to this index, such as Eno1, Eno2, ...

(2) If the index information provided by the firmware or BIOS for the PCI-E expansion slot is available and predictable, it is named according to this index, such as ENS1, Ens2, ...

(3) If the physical location information of the hardware interface is available, it is named according to this information, such as ENP2S0, ...

(4) If the user is explicitly defined, can also be named according to the MAC address, such as Enx122161ab2e10, ...

None of the above is available, the traditional way of naming is still used;

The composition of the naming format:

En:ethernet

Wl:wlan

Ww:wwan

Name Type:

O<INDEX>: Device index number of the integrated device;

S<slot>: index number of the expansion slot;

X<mac>: Name based on MAC address;

P<bus>s<slot>: Named based on the topology of bus and slot;


Network attribute configuration of Linux Foundation (i)

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.