Библиотека сайта rus-linux.net
Next: Routing Through a PPP Up: IP Configuration Options Previous: IP Configuration Options
In the example above, we had pppd dial up c3po and establish an IP link. No provisions were taken to choose a particular IP-address on either end of the link. Instead, we picked vlager's address as the local IP-address, and let c3po provide its own. Sometimes, however, it is useful to have control over what address is used on one or the other end of the link. pppd supports several variations of this.
To ask for particular addresses, you generally provide pppd with the following option:
local addr:remote addrwhere local_addr and remote_addr may be specified either in dotted quad notation, or as hostnames. This makes pppd attempt to use the first address as its own IP-address, and the second as the peer's. If the peer rejects either of them during IPCP negotiation, no IP-link will be established.
If you want to set only the local address, but accept any address the peer uses, you simply leave out the remote_addr part. For instance, to make vlager use the IP-address 184.108.40.206 instead of its own, you would give it 220.127.116.11: on the command line. Similarly, to set the remote address only, you would leave the local_addr field blank. By default, pppd will then use the address associated with your hostname.
Some PPP servers that handle a lot of client sites assign addresses dynamically: addresses are assigned to systems only when calling in, and are claimed after they have logged off again. When dialing up such a server, you must make sure that pppd doesn't request any particular IP-address from the server, but rather accept the address the server asks you to use. This means that you mustn't specify a local_addr argument. In addition, you have to use the noipdefault option, which makes pppd wait for the peer to provide the IP-address instead of using the local host's address.
Next: Routing Through a PPP Up: IP Configuration Options Previous: IP Configuration Options Andrew Anderson
Thu Mar 7 23:22:06 EST 1996