Linux dual-adsl dialing-Linux general technology-Linux technology and application information. The following is a detailed description. This document describes how to configure dual-ADSL and multi-ADSL lines ......
After a period of observation, it proves that the operation is good. Let's summarize the setting process and method. please correct me.
This document describes how to configure dual-adsl and multi-adsl lines.
Lab environment:
Operating System: RedHat7.3
Two adsl instances, long term observation of line stability, dynamic IP address, bandwidth 2 M,
Three NICs: eth0 tulip, connected to the Intranet
Eth1 3c59x, connected to the first adsl
Eth2 8139too, connected to the second adsl
Ethn xxxx, (if there is still ....)
Objective: To share the load by using two adsl networks to achieve simple load balancing and drive Intranet access.
1. Add a NIC
Insert the network card and start the machine. If you need to access the Internet through dual-line connection, you need three network cards. You can also refer to other information to configure the network card.
Configure to find the corresponding model module, for example, eth2 is 8139 Nic
[Root @ kindgeorge root] # vi/etc/modules. conf
Alias parport_lowlevel parport_pc
Alias eth0 tulip
Alias eth1 3c59x
Alias eth2 8139too
Add new lines to eth2
2. Configure adsl
Method 1:
(1) run the adsl-setup program and you will be prompted to complete the configuration process step by step.
Create a dial-up profile for ppp0 and ppp1 and save the configuration, typically stored in/etc/sysconfig/network-scripts/ifcfg-ppp1
(2) determine the/etc/sysconfig/network-scripts/ifcfg-ppp0 file, where the PIDFILE parameter is set:
PIDFILE =/var/run/ppp-adsl.pid
Modify the/etc/sysconfig/network-scripts/ifcfg-ppp1 file and set the PIDFILE parameter:
PIDFILE =/var/run/ppp-adsl1.pid
If you have more lines, you can continue to add 0, 1, 2, 3... and so on.
This is to enable different Dialers to use different PIDs. If this parameter is not modified, the second line interface cannot be started.
(3) the configuration file is generally:
USERCTL = no
BOOTPROTO = dialup
NAME = DSLppp1
DEVICE = ppp1
TYPE = xDSL
ONBOOT = yes
PIDFILE =/var/run/pppoe-adsl1.pid
FIREWALL = NONE
PING =.
PPPOE_TIMEOUT = 20
LCP_FAILURE = 3
LCP_INTERVAL = 20
Clampm Ss = 1412
CONNECT_POLL = 6
CONNECT_TIMEOUT = 60
DEFROUTE = yes
SYNCHRONOUS = no
ETH = eth2 (corresponding to the NIC of the new line)
Modify PIDFILE =/var/run/pppoe-adsl.pid to PIDFILE =/var/run/pppoe-adsl1.pid
Modify the NIC of the new connection path, for example, ETH = eth1 to ETH = eth2.
(3) Add the account and password for the new line. The account and password are generally stored in/etc/ppp/chap-secrets and pap-secrets.
We only need to add the new username 2 and password 2 at the end.
The/etc/ppp/chap-secrets file is generally like this:
# Secrets for authentication using CHAP
# Client server secret IP addresses
"Username 1" * "password 1"
"Username 2" * "password 2"
"Username n" * "password n"
3. Start the ppp Interface
Because the adsl-start command can only start the first ppp interface by default. Therefore, to start two interfaces, you must specify the configuration file.
Ip route replace default scope global nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 1
Ip route flush cache
Results: After several months of operation, the results were stable.
The Internet access is obviously accelerated. Why? Because the two lines share the load, for example, 80 people access the Internet at the same time on the Intranet,
If the network is a 2 m adsl, the entire line will be crowded and the network will be congested. The bandwidth allocated to each person may only be 30 K. Everyone will obviously feel that the Internet access is slow.
If one more line is added, two 2 m lines share the congestion level. In this way, the bandwidth allocated to each person may change to 60 K, which is the original double. In this way, the Internet access speed is accelerated, added the number of concurrent connections.
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.