Linux network management (youtube video Tutorial)
Iso/osi Seven-layer Model
Iso:the International Organization for Standardization International Organization for Standardization
Osi:open Systems Interconnection Model open System interconnect models
MAC address is responsible for LAN communication, IP address is responsible for external network communication
File transfer port (ftp port) default 21
WWW page port default 80
Mail Mail default port is 25 and 110
Iso/osi Seven layer model is the theoretical basis, the TCP/IP four layer model is the optimization and the actual use model
Data transfer from high-level to low-rise, receiving from bottom to top
Data transmission:
Application layer (open browser)--presentation layer (decoding jpg or ASCII or MP3 into a bit stream, 0101, if there is compression and encryption, both in this layer processing representation), the session layer (to determine whether the data need network transmission, PPT does not need, PPT will be delivered directly to the hard disk save will not be passed to the next layer, but the message is Required)--the Transport layer (determine the message port number and protocol used, TCP and Port 110. Simultaneous error checking and flow control)--network layer (write to send and accept ip, also responsible for Routing)--data link layer (write to send and accept host Mac address, responsible for transmission in lan)--physical layer (actual data transfer)
TCP/IP Four Layer model
Network interface layer (from high to low), transport layer, application layer, Internet interconnect layer
Application layer, Presentation layer, Session Layer (iso/osi), Application layer (tcp/ip)
Transport Layer (iso/osi), Transport layer (tcp/ip)
Network layer (iso/osi), Internetwork Interconnect layer (tcp/ip)
Data Link layer, physical layer (iso/osi), network interface layer (tcp/ip)
Data Link Layer (iso/osi)/network interface layer (tcp/ip): ARP protocol (address resolution PROTOCOL) translating IP addresses into MAC addresses
Network layer (iso/osi), Internetwork Interconnect layer (tcp/ip): Internet Protocol (isp), ICMP (internet Control Message Protocol)
Transport Layer (iso/osi), Transport Layer (tcp/ip): TCP protocol (transmission control protocol), UDP protocol (user datagram Protocol)
Application layer, Presentation layer, Session Layer (iso/osi), Application layer (tcp/ip): FTP, Telnet, DNS, SMTP protocol
IP Address Detailed
Routers are required for different network segments, only switches are required for the same network segment
Port ports function
Common port Numbers
ftp:20, 21
Ssh:22
Telnet:23 (23 port number is disabled because Telnet is transmitted in Plaintext)
dns:53
Http:80
Smtp:25
pop3:110
Netstat-an
-a: View all links and listening ports
-n: Displays the IP address and port number without displaying the domain name and service name
Listening indicates that the local port number is being monitored, indicating that these are native-enabled services
Established represents a link that already exists
DNS role
DNS is used to translate digital IP addresses and alphabetic domain names to each other
Gateway Gateways function
Gateway in all intranet computing access is not the data of the network segment used, The gateway is responsible for the network IP into the public ip, the public IP to the network IP
The difference between network management and proxy server
Both a proxy server and a gateway route traffic from inside a network to the Internet. A gateway, however, is more like a door to get to the Internet, while a proxy server acts like a wall that bars the inside Of the network from being exposed to the Internet. A proxy server filters which connection is allowed and while a gateway doesn ' t does any filtering.
Gateways
For the networks to communicate, a gateway must is provided from each Network. The gateway defines what's internal to the network and what's External. If a computer needs to communicate with another computer outside the network, it must is configured with a gateway to gain Access outside the Network. Without a gateway, a computer would be unable-get out, like someone locked inside a house.
Proxy Servers
Functional difference
A Proxy Server that does does any filtering are like a gateway, simply passing on requests from the computer to the Inter Net. A proxy server, however, is a more powerful networking component that can act as a gateway while protecting the network fr Om outside Threats. A Gateway always risks exposing A internal network to the Internet because it does no filtering. It merely routes information from within the network to the Outside.
Configuring IP addresses with files
Vi/etc/sysconfig/network-scipts/ifcfg-eth0 to set IP address, subnet mask, gateway, power on, etc.
Vi/etc/sysconfig/network to modify host names
hostname command to view host name
Hostname name1 Setting the temporary host name
vi/etc/resolv.conf to set up DNS
Linux network Environment View command ifconfig
Ifup (enable) and Ifdown (disable Nic) + NIC device name
Ifup Lo---lo means loopback, 127.0.0.1
Ifdown eth0
Netstat
-a: List all network links
-l: list only in the Listening State Network Service
-n: do not use domain name and service name, but use IP address and port number
-u: List TCP protocol ports
-t: List TCP protocol ports
-r: lists the routing list, consistent with the route command
Route
-n: View the list of routes to see the gateway
Route add default GW 192.102.1.1 temporarily set Gateway
In a server, even the network card is not able to set the gateway
Nslookup
nslookup www.baidu.com for domain name and IP address resolution
nslookup >server viewing native DNS servers
Linux Network Test Command ping
Detecting network conditions for IP or domain name development
-c: Specifies the number of ping packets
Ping 192.168.0.252
Telnet
Remote management and port probing commands
Telnet 192.168.0.252 (telnet IP port)
Traceroute
Route Trace Command
-n: use IP without domain name, faster
Raceroute www.baidu.com Print out all gateway routes that go through the IP
Wget
Download command
Tcpdump
command to grab a bag
-i: make NIC interface
-nn: convert the domain name and service in the packet to IP and port
-x: Display the contents of the packet in 16 binary and ASCII code
Port to develop the listening ports
Tcpdump-i ETH0-NNX Port 21
Linux Network Management