After learning about PPPoE, let's take a look at how to configure PPPOE servers in LINUX. Previously, we have systematically introduced the use of routeros software to build a PPPOE server. In general, I feel that the server is very powerful and it is easier for me to communicate with colleagues, generally, people with a computer network foundation can configure the PPPOE server independently after reading the successful configuration operations. However, there is an unavoidable reality: PPPOE servers are commercial software and are expensive. The next trial version of PPPOE servers can be used as practical servers, so we will focus our attention on the LINUX system. The LINUX system will certainly be able to be used as a PPPOE server. In fact, Xiangzi spent an afternoon successfully configuring the PPPOE server in LINUX, but there are a few points to talk about:
I. Many versions of LINUX have resulted in inconsistent configuration commands, while PPPOE software does not provide an authoritative official configuration tutorial, which leads to the widespread use of PPPOE tutorials on the Internet, it is difficult for beginners to master the essentials of PPPOE configuration based on a tutorial.
Ii. LINUX is a general operating system, not designed for PPPOE servers. Therefore, when configuring PPPOE servers, sometimes, the configuration of the PPPOE server may be affected due to a small setup of LINUX itself. For example, Xiangzi is disconnected from the network when the two NICs of LINUX are restarted, fortunately, it is solved by studying the configuration file ).
3. LINUX system's integrated network services should be a trend, that is, when a LINUX server is installed and various network services are installed, it is necessary to enable them at that time, which can simplify operations, increase users' interest and increase the usage of LINUX in the server operating system.
After talking about this, I will introduce how to configure the PPPOE server in the LINUX system. I chose the desktop version of Hongqi LINUX6.0 and installed it in the virtual machine, the two NICs are virtualized and adopt the PPPOE + IPTABLES (NAT) Internet access solution. The configuration process is described in three parts.
Network Topology 1
As shown in figure 1, there is no difference in the network topology between using LINUX as the PPPOE server and using routeros as the PPPOE server, we use the Eth1 Nic to connect to the Internet and set the IP address, subnet mask, and Gateway: 10.70.10.15/255.255.0.0 10.70.0.1). For the sake of security, the Eth0 Nic does not set the IP address or other information ).
LINUX network settings
Although you can also set an IP address for the network card in the graphic interface, but the real implementation of the network card IP address and other information is accurate and reliable, you still need to set in the corresponding file, we need to set two network cards this time, the edited file is as follows:
[Root @ localhost network-scripts] # pwd
/Etc/sysconfig/network-scripts
[Root @ localhost network-scripts] # ifcfg-eth0 more
TYPE = "Ethernet"
BOOTPROTO = "static"
IPADDR = "0.0.0.0"
DEVICE = "lan"
HWADDR = "00: 0C: 29: 33: 69: 86"
ONBOOT = "yes"
NETMASK = "0.0.0.0"
[Root @ localhost network-scripts] # ifcfg-eth1 more
TYPE = "Ethernet"
BOOTPROTO = "static"
IPADDR = "10.70.10.11"
DEVICE = "wan"
HWADDR = "00: 0C: 29: 33: 69: 90"
ONBOOT = "yes"
NETMASK = "255.255.0.0"
GATEWAY = "10.70.0.1"
Let's take a look at the ifcfg-eth1 configuration file, where ONBOOT = "yes" is required, can ensure that the system starts the NIC automatically connected to the network, the gateway information is we manually add out, make sure that there is a gateway to access the external network, as long as the ifcfg-eth0 file to ensure that ONBOOT = "yes" can be, of course, as in routeros, we define the Internet port name as wan and the Intranet port name as lan.
PPPOE service settings
1) check whether the PPPOE service is installed on the local machine.
[Root @ localhost network-scripts] # rpm-q rp-pppoe
Rp-pppoe-3.5-35
The preceding information indicates that