Consider creating one or more IP addresses for all incoming calls instead of assigning a unique IP address to each remote user. Dedicated IP addresses are particularly important if the number of potential callers exceeds the number of serial ports and modems on the dial-in server. You can implement a number of different scenarios, depending on your site's needs. Moreover, the scenarios are not mutually exclusive.
Dynamic addressing involves the assignment to each caller of the IP address that is defined in /etc/ppp/options.ttyname. Dynamic addressing occurs on a per-serial port basis. Each time a call arrives over a particular serial line, the caller is given the IP address that is defined in the /etc/ppp/options.ttyname file for the serial interface that is handling the call.
For example, suppose a dial-in server has four serial interfaces that provide dial-up service to incoming calls:
For serial port term/a, create the file /etc/ppp/options.term.a with the following entry:
:10.1.1.1 |
For serial port term/b, create the file /etc/ppp/options.term.b with the following entry:
:10.1.1.2 |
For serial port term/c, create the file /etc/ppp/options.term.c with the following entry:
:10.1.1.3 |
For serial port term/d, create the file /etc/ppp/options.term.d with the following entry:
:10.1.1.4 |
The advantages of dynamic addressing include the following:
You can track PPP network usage down to the serial port.
You can assign a minimum number of IP addresses for PPP use.
You can administer IP filtering in a more simplified fashion.
If your site implements PPP authentication, you can assign specific, static IP addresses to individual callers. In this scenario, every time a dial-out machine calls the dial-in server, the caller receives the same IP address.
You implement static addresses in either the pap-secrets or chap-secrets database. Here is a sample /etc/ppp/pap-secrets file with static IP addresses defined.
Caller |
Server |
Password |
IP Addresses |
---|---|---|---|
joe |
myserver |
joepasswd |
10.10.111.240 |
sally |
myserver |
sallypasswd |
10.10.111.241 |
sue |
myserver |
suepasswd |
10.10.111.242 |
Here is a sample /etc/ppp/chap-secrets file that defines static IP addresses.
Caller |
Server |
CHAP secret |
IP Addresses |
---|---|---|---|
account1 |
myserver |
secret5748 |
10.10.111.244 |
account2 |
myserver |
secret91011 |
10.10.111.245 |
If you are using either PAP or CHAP authentication, you can assign IP addresses to callers by the sppp unit number. The next table shows an example of this usage.
Caller |
Server |
Password |
IP Addresses |
---|---|---|---|
myclient |
ISP-server |
mypassword |
10.10.111.240/28+ |
The plus (+) indicates that the unit number is added to the IP address. Addresses 10.10.111.240 through 10.10.111.255 are assigned to remote users. sppp0 gets IP address 10.10.111.240. sppp1 gets IP address 10.10.111.241, and so on.