Mpd 3.6 User Manual : Configuring Mpd : Interface layer commands
Previous: Bundle layer commands
Next: IPCP layer commands

4.3. Interface layer commands

This chapter describes commands that configure the interface layer. All of these commands apply to the currently active bundle.

Note that while most of the time mpd is used for transmitting IP traffic, it is designed to support other (currently unimplemented) protocols such as AppleTalk, IPX, etc. This is why the Interface layer (which is protocol independent) is distinct from the IP Control Protocol (IPCP) layer which is specific to IP.

set iface addrs local-ip remote-ip

This command is only required when dial-on-demand is enabled. Normally, mpd configures the interface with the IP addresses that were negotiated when connecting the link. Since dial-on-demand configures the interface before actually connecting, mpd has to be told initial local and remote IP addresses to give the interface. These addresses don't have to correspond to the ``real'' ones; in fact, both addresses can be completely fictional. If and when different addresses are negotiated later, mpd will automatically renumber the interface and adjust the routes.

set iface route address[/width]

This command associates a route with the bundle. Whenever the interface is configured up, all associated routes are added. A route of default indicates the default route. Otherwise, the route is a network address with optional netmask width (e.g., 192.168.1.0/24). If the netmask width is omitted, a single host route is assumed (i.e., a width of 32).

Routes are automatically removed when the interface is brought down.

set iface idle seconds

Sets the idle timeout value for the bundle. If no qualifying outgoing packets are transmitted for seconds seconds, the connection is brought down. An idle timeout of zero disables this feature.

Mpd attempts to be intelligent about what a qualifying packet is. Idle time should only apply to packets that are generated locally and represent real local activity of some sort. For example, NTP traffic, ICMP echo replies, and TCP reset packets do not count as outgoing demand.

When the idle timeout occurs, if the dial-on-demand option is enabled, mpd goes back into dial-on-demand mode. Otherwise, the interface is brought down and all associated routes removed.

set iface up-script script
set iface down-script script

Mpd can optionally run a user program every time the interface is brought up or down. The up-script is called like this:

script interface inet local-ip remote-ip

The down-script is called like this:

script interface inet

set iface enable option ...
set iface disable option ...

Enable and disable the various interface layer options for the bundle.

The options available at the interface layer are:

on-demand

This option causes the interface to operate in dial-on-demand mode, allowing you to have a ``virtual full time'' connection. An OPEN event causes the interface to be configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected. Moreover, after an idle timeout, the interface is not brought down; further traffic will bring the link back up again.

proxy-arp

When this option is enabled, if after link negotiation the peer's IP address is determined to lie on a local subnet, then mpd will arrange for the local machine to install a proxy ARP entry for the remote machine's IP address.

For example, suppose the local machine lies on a LAN with address 192.168.1.10, and another machine will be connecting via mpd and using the LAN address 192.168.1.20. Then these commands would set up proxy ARP for the remote machine:

set iface enable proxy-arp
set ipcp 192.168.1.10/32 192.168.1.20/32


Mpd 3.6 User Manual : Configuring Mpd : Interface layer commands
Previous: Bundle layer commands
Next: IPCP layer commands