1. Network Configuration # Description of the display information of ifconfigeth0ifconfig command: Linkencap network interface type, such as Ethernet or PPP HWadrr
1. network configuration
# Ifconfig eth0
Description of ifconfig command display information:
Link encap network interface type, such as Ethernet or PPP
The Mac address of the HWadrr Nic. Each network card has its own ID, which is used to locate the network host under the Ethernet protocol.
Inet addr IP address corresponding to this interface
Network interface status flag UP-network interface enabled
RUNNING-the interface is RUNNING
BROADCAST-supports broadcast ip address addressing
MULTICAST-supports multicast ip address addressing
LOOPBACK-indicates the interface of the local LOOPBACK device.
MTU Message transfer unit, the maximum number of frames that can be transmitted by this interface
Metric Number of Metric for this interface, used to guide route decision-making
Bcast broadcast address, usually the last IP address of the network
Mask subnet Mask
Total number of packets received by RX packets, error count, loss count, and overflow count
Total number of packets sent by TX packets, error count, loss count, and overflow count
Collisions conflict count (conflicts occur when multiple NICs use a network cable to transmit data at the same time)
Txqueuelen indicates the number of packets that can be stored by network interfaces.
RX bytes is similar to RX packets, indicating the number of bytes received
Similar to TX packets, TX bytes indicates the number of bytes sent.
Interrupt Nic interruption (IRQ)
Base address memory address used by the NIC
2. configure the PPPOE client softwarePPPOE software is installed in Centos by default, and you can directly configure [root @ sample ~] # Adsl-setup timeout
Welcome to the ADSL client setup. First, I will run some checks on
Your system to make sure the PPPoE client is installed properly...
LOGIN NAME
Enter your Login Name (default root): Enter the username of the ADSL connection in "Login ".
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like/dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(Default eth0): indicates the network access device of the Eni. the default value is eth0.
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
After which the link shoshould be dropped. If you want the link
Stay up permanently, enter 'no' (two letters, lower-case .)
NOTE: Demand-activated links do not interact well with dynamic IP
Addresses. You may have some problems with demand-activated links.
Enter the demand value (default no): Press Enter directly to accept the default setting. after disconnection, no automatic dialing is enabled.
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS address ',
Enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
Doing and not modify your DNS setup.
Enter the DNS information here: Enter the information of the DNS server here. If you do not know, press enter to skip.
Modify the etc/resolve. conf file
Enter the server, which indicates the IP address of the DNS server automatically obtained by using ADSL dialing or the 202.106.0.20 backup DNS 202.106.148.1
PASSWORD
Please enter your Password: enter the ADSL connection Password
Please re-enter your Password: confirm again enter the ADSL connection Password
USERCTRL
Please enter 'yes' (two letters, lower-case.) if you want to allow
Normal user to start or stop DSL connection (default yes): no second is set to no. generally, PPPoE connections cannot be controlled.
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
Very basic. You are strongly encouraged to use a more sophisticated
Firewall setup; however, these will provide basic security. If you
Are running any servers on your machine, you must choose 'none' and
Set up firewalling yourself. Otherwise, the firewall rules will deny
Access to all standard servers like Web, e-mail, ftp, etc. If you
Are using SSH, the rules will block outgoing SSH connections which
Allocate a privileged source port.
The firewall choices are:
0-NONE: This script will not set any firewall rules. You are responsible
For ensuring the security of your machine. You are STRONGLY
Recommended to use some kind of firewall rules.
1-STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2-MASQUERADE: Appropriate for a machine acting as an Internet gateway
For a LAN
Choose a type of firewall (0-2): 0 worker input 0. firewall is not used here
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no): yes fill in yes, automatically connect to ADSL at system startup
** Summary of what you entered **
Ethernet Interface: eth0
User name: caun870293@ca.dti.ne.jp
Activate-on-demand: No
DNS: Do not adjust
Firewalling: NONE
User Control: no
Accept these settings and adjust configuration files (y/n )? After confirming that the configuration information of y branch is correct, enter y to agree to the settings. otherwise, enter n to enter again.
Adjusting/etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting/etc/ppp/chap-secrets and/etc/ppp/pap-secrets
(But first backing it up to/etc/ppp/chap-secrets.bak)
(But first backing it up to/etc/ppp/pap-secrets.bak)
?
Congratulations, it shocould be all set up!
Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
To bring it down.
Type '/sbin/adsl-status/etc/sysconfig/network-scripts/ts'
To see the link status.
# Configure the adsl-setup tool:
3. start the PPPOE client software# Adsl-start transaction start the ADSL connection
# Wait a moment. if a prompt appears after the startup is successful (if no prompt is displayed, the connection is successful). If the connection fails, check the network cable, adsl modem, and other physical devices, view the information in/var/log/messages # disconnect from the ISP through adsl-stop # check the status of the current connection through adsl-status
4. test# Ifconfig-
The output should contain a bunch of information about ppp0, and an IP address is bound to it, indicating that the IP address has been obtained from dialing. # Netstat-nr
View the route table information. the default route is the IP address obtained above. If there is no default route, we can manually add: # route add default gw the IP address obtained above
# Nslookup www.sina.com.cn
If the IP address of Sina is resolved, it indicates that the DNS server has been correctly obtained from the dial-up.
Finally, run the command to ping a domain name or IP address. if a response is returned, it means you have done it.