IP Address
- IP coding a two-tiered programming, an IP address identifies a host (or a NIC interface).
- An IP address is divided into two parts: the network portion (the owning area) and the host part (which host is identified in the area). IPv4 A total of 32 bits, usually in dotted decimal notation.
- The subnet mask is used to differentiate the network part from the host part, and the subnet mask 1 (binary) portion is the network part.
The MAC address is primarily used for communication with hosts in the network, and the MAC addresses of other hosts on the same network are obtained through the ARP protocol (used with the networks). The host of the network is generally directly connected or through the switch.
Connection between different network segments via router/gateway. Routers generally have multiple interfaces, each connected to a network, and data is forwarded through a routing table.
www.baidu.com in www is just a hostname in baidu.com. Baidu.com also has music, Tieba host. WWW is the host name of the Web server.
Each domain name represents an IP, and the DNS server is used to switch between IP and domain names.
To configure a computer for a LAN communication:
-IP Address
-Subnet mask
Configure a computer to communicate across a network segment:
-IP Address
-Subnet mask
-Gateway
Configure an Internet-accessible computer:
-IP Address
-Subnet mask
-Gateway
-DNS
Network Infrastructure configuration
- In Linux systems, Ethernet cards are called Ethenet
- LSPCI command to view network card hardware information, LSUSB view USB device
- ifconfig (interfaceconfig) ifconfig-a: View all interfaces
- Eth0: Physical NIC
- Lo: Swap Back interface
- Ifconfig eth0: Viewing specific interfaces
- Ifup eth0: Enable interface
- Ifdown eth0: Disable interface
- Setup: Configuring Network Information
- Hostname: Display and modify hostname (temporary)
Nic configuration file:/etc/sysconfig/network-scripts/ifcfg-eth0
DNS configuration file:/etc/resolv.conf
Hostname configuration file:/etc/sysconfig/network
static hostname configuration file:/etc/hosts
Test network connectivity:
- Ping 192.168.1.1
- Ping www.XXX.com
To test DNS resolution:
- Host Www.linuxcast.net
- Dig www.linuxcast.net
Show routing table: IP route
Trace the network path to the destination address: traceroute www.linuxcast.net
Network quality testing using MTR (combined with traceroute and ping): MTR www.linuxcast.net
troubleshooting, from bottom to top, from self to external
1. Check that the network configuration information is correct first
- IP Address
- Subnet mask
- Management
- Dns
2. Check if the arrival network is connected
3. See if DNS resolution is OK
- host Www.linuxcast.net
- host www.douban.com
- Top
- 0
"Su Yong's Linux starter Notes" network basics