Linux Network Management-Basics

Source: Internet
Author: User

MAC: Media Access Control

CSMA/CD: Carrier Sense Multi access/collision Detection, carrier-listening multi-access conflict detection

Hub: hub

Repeater:

Network Bridge:

Switch:

Mac table:

Conflict domain:

Router:

Routing table:

Routing Table Convergence:

Routing protocol:

Default route:

Route Merge:

Subnets:

Hyper-Net:

Gateway:

Subnet Mask:

ARP: Address Resolution Protocol, addresses resolution Protocol, IP->MAC

RARP: Revise address Resolution Protocol, reverse URL Resolution Protocol, MAC->IP

Port:

Socket: IP and Port bindings.

MTU: Max Transfer Unit, Maximum transmission unit.

ICANN: Internet Name and digital address distribution agency.

Osi:

    • Physical layer: Message preamble.
    • Data link layer: MAC.
    • Network layer: IP.
    • Transport layer: TCP, UDP.
    • Session Layer:
    • Presentation layer: Compress, encrypt.
    • Application layer: HTTP.

Tcp / ip:

    • Physical Layer:
    • Data Link Layer:
    • Network layer:
    • Transport Layer:
    • Application layer:

IP message:

    • IP VERSION:IP version, 4b.
    • HDR Les: Packet head length, 4b.
    • Type of Service (TOS): type of services, whether expedited, 8b.
    • Total length: Message overall, 16b.

    • Identification (Fragment ID): Slice id,16b.
    • R:
    • Df:don ' t Fragment, no sectioning mark, 1b.
    • Mf:more Fragment, slice identification, 1b.
    • Fragment offset: Slice offset, 13b.

    • Time-to-live (TTL): Time to live, 8b.
    • Protocol: Upper layer Protocol (TCP, UDP), 8b.
    • Header Checksum: Header checksum, 16b.

    • Source IP Address: 32b.

    • Destination IP Address: Destination IP addresses, 32b.

    • Options: Option up to 40b.

    • Data:.

IP Address:

The host bits are all 0 for the network address, and the host bit is 1 for the broadcast address.

    • Class A: Starting with 0, 1-126, (2^7-1), 255.0.0.0
    • Class B: Starting with 10, 128-191, (2^14), 255.255.0.0
    • Class C: Starting with 110, 193-223, (2^21), 255.255.255.0
    • Class D: Starting with 1110, 224-239
    • Class E:

Private Address:

Class A: 10.0.0.0/8

Class B: 172.16.0.0-172.31.0.0/16

Class C: 192.168.0.0-192.168.255.0/24

TCP: Transmission Control Protocol, transmission protocol.

UDP: User Datagram Protocol, Subscriber Datagram Protocol.

TCP message:

    • Source port number: 16b.
    • Destination Port number: Destination port, 16b.

    • Sequence number: Serial, 32b.

    • Acknowledgement number: Confirm, 32b.

    • Header Length: First ministerial degree, 4b.
    • Reserved: Reserved bit, 6b.
    • URG: Emergency bit, 1b.
    • ACK: Confirm bit, 1b.
    • PSH: Push bit, not stay in buffer, 1b.
    • RST: Reset bit, connection reset, 1b.
    • Syn:1b.
    • Fin:1b.
    • Window Size: 16b.

    • TCP Checksum: Checksum, 16b.
    • Urgent Pointer: Emergency pointer, 16b.
    • Options: Optional.
    • Data:.

Three-time handshake:

    • syn=1,sn=100-syn_sent
    • syn=1,ack=1,sn=100,an=101-syn_recv
    • Ack=1,sn=101,an=101-established

Four-time disconnection:

    • Fin=1,ack=1,sn=x,an=z
    • Ack=1,sn=z,an=x+1
    • Fin=1,ack=1,sn=y,an=x
    • Ack=1,sn=x

DHCP: Dynamic Host configuration Protocol. config protocol

Lo: local loopback

Ethernet network card:EthX

Point-to-point connection:pppx

Rhel5:/etc/modprobe.conf

Alias

Rhel6:/etc/udev/rules.d/70-persistent-net.rules

Ifconfig

    • Role

View network card information.

Ifconfig EthX Ip/mask [Up|down], the configured address takes effect immediately, but restarting the network service or host fails.

Network services:

rhel5:/etc/init.d/network {Start|stop|status|restart}

Rhel6:/etc/init.d/networkmanager {Start|stop|status|restart}

    • Options

-A: Displays all interface configuration information.

Route

    • Role

Manage routing. The changes made fail after restarting the network service or host.

Add: Adding

-host: Host Routing

-net: Network Routing

Route add-net|-host DEST GW Nexthop

Route add default GW nexthop

Del: Delete

-host:

-net:

Route Del-net Nexthop

    • Options

-n:numeric, displays information about each organization or port in a digital manner.

Network configuration file:

/etc/sysconfig/network

Network Interface configuration file:

/etc/sysconfig/network-scripts/ifcfg-interface_name

Device=: The associated device, to be consistent with the second half of the file name.

BOOTPROTO={STATIC|NONE|DHCP|BOOTP}: The bootstrap protocol, to use static addresses, use the statics or NONE;DHCP to represent the use of the DHCP server to obtain addresses.

Ipaddr=:ip address.

netmask=: Subnet mask.

Gateway=: Sets the default gateway.

Onboot=: Whether this network interface is activated automatically when powered on.

Hwaddr=: Hardware address, to be consistent with the address in the hardware, can be saved.

Userctl={yes|no}: Indicates whether an ordinary user is allowed to control this interface.

PEERDNS={YES|NO}: The DNS address specified by the DHCP server is accepted when Bootproto is DHCP.

Restart Network Service:

/etc/init.d/network restart

Routing:

/etc/sysconfig/network-scripts/route-ethx

Add format one:

DEST via Nexthop

Add format two:

address0=

netmask0=

gateway0=

DNS server Specifies the method:

/etc/resolv.conf

NameServer dns_ip_1

NameServer dns_ip_2

NameServer Dns_ip_3

Specify local resolution:

/etc/hosts

Destination host IP host name host Alias

Dns-->/etc/hosts-->dns Cache-->dns Server

Configure host Name:

/etc/sysconfig/network

Hostname=

Networking={yes|no}

Networking_ipv6={yes|no}

RHEL5:

  Setup:system-config-network-tui

System-config-network-gui

Iproute2:

  Ip:

Link: Configure network interface properties.

Show:ip-s Link Show

Set:ip Link set DEV {up|down}

Addr: Protocol address.

Add: Adds an address.

IP addr Add ADDRESS dev Dev

Del: delete address.

IP addr del ADDRESS dev Dev

Show: Displays address information.

IP addr Show Dev dev to PREFIX

Flush: Clears the address.

IP addr Flush Dev dev to PREFIX

Route: Routing.

A network card can use multiple addresses:

Network devices can use aliases.

Ethx:x

Configuration method:

Ifconfig ethx:x Ip/netmask

/etc/sysconfig/network-scripts/ifcfg-ethx:x

Device=ethx:x

Non-primary addresses cannot be dynamically obtained using DHCP.

Linux Network Management-Basics

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.