Asynchronous Interfaces

Asynchronous interfaces are almost always used to provide dial-in PPP access. The hardware configuration of the asynchronous line (parity, baud rate, etc.) is determined by the corresponding TTY line; for more information about configuring TTY lines , see Chapter 4. When you configure an async interface, you specify logical aspects of the connection. Here is a configuration for an async port with dial-in access. Each command is preceded by a comment describing the command's function.

interface Async1 ! Assign IP address for the router's end of the link ! by assigning it the ethernet0 port ip unnumbered ethernet0 ! Set the serial encapsulation to PPP encapsulation ppp ! Set the interface mode to dedicated since this is a dial-up connection async mode dedicated ! Assign the IP address for the remote connection peer default ip address 10.10.1.20

Notice that the asynchronous interface doesn't need its own IP address; it can borrow the IP address of the ethernet0 interface using the unnumbered command. However, we do need to assign an address to the PPP peer that connects through this port. That address is assigned by the peer default ip address command; in this configuration, the peer is given the address 10.10.1.20. It is also worth mentioning that the IP address of the ethernet0 interface should be on the same network as the 10.10.1.20 address.

5.9.1. Using the group-async Command

Here's a basic fact of life: async lines usually occur in large numbers. If you're configuring async interfaces, you're often working with a terminal server that supports many dial-in ports. Therefore, you don't want to configure each interface individually, as we did in the previous example; you want to deal with them in batches.

The group-async command allows you to configure many async interfaces without a lot of repetition. You can apply a list of configuration items to all the interfaces that belong to the group. For example, let's give async ports 1 through 5 the same configuration we set up in the previous example:

interface group-async 1 ! Specify the async interfaces in this group group-range 1 5 ! The configuration items to include in all interfaces ip unnumbered ethernet0 encapsulation ppp async mode dedicated ! Each interface has a different IP address for the remote end member 1 peer default ip address 10.10.1.21 member 2 peer default ip address 10.10.1.22 member 3 peer default ip address 10.10.1.23 member 4 peer default ip address 10.10.1.24 member 5 peer default ip address 10.10.1.25

In this configuration, async ports 1 through 5 are configured identically. However, we need to assign IP addresses to the remote side of the interface, and these have to be unique. We use the member command to assign a different peer IP address to every interface: someone who dials in to async port 1 is assigned the IP address 10.10.1.21, and so on. We've reduced the amount of configuration work, but we still have some configuration left to do for the individual interfaces. We'll see how to go even further in the next example.

5.9.2. Specifying an IP Address Pool

There's an easy alternative to using the member command to assign an IP address to each async interface: we can create an address pool . A pool of IP addresses is a group of addresses that can be assigned dynamically to a group of interfaces, as needed. When an IP address is in use, another interface cannot use it.

To create a pool of IP addresses, use the ip local pool command. In this example, we create an address pool named ip-pool1 for the async group we defined earlier. Notice that the pool commands are not interface commands! We use a variation of the peer default ip address command to tell the router that it should assign addresses from the pool to PPP peers that connect to an interface in the async group.

! Create an address pool named ip-pool1 for ! addresses 10.10.1.21 through 10.10.1.25 ip address-pool local ip local pool ip-pool1 10.10.1.21 10.10.1.25 ! Now define our async group, this time using the pool ! instead of assigning a separate IP address for every interface interface group-async 1 ! Specify the async interfaces in this group group-range 1 5 ! The configuration items to include in all interfaces ip unnumbered ethernet0 encapsulation ppp async mode dedicated ! Assign the pool for this group to use peer default ip address pool ip-pool1

 

5.9.3. Using BOOTP Configuration Items for Dial-in Connections

Async interfaces can provide responses to BOOTP requests , making it much simpler for dial-in users to automate their configuration process. The async-bootp command is used to configure the responses the router will send in response to BOOTP requests. In this example, we define the BOOTP options for subnet-mask, default-gateway, dns-server, and lpr-server. They are defined even though some dial-in clients don't support them.

async-bootp subnet-mask 255.255.255.0 async-bootp gateway 10.10.18.196 async-bootp dns-server 10.10.18.204 async-bootp lpr-server 10.10.18.200

BOOTP can also provide many more aspects of the client's configuration; for more information, see the async-bootp command in Chapter 17. The show async bootp command displays the BOOTP attributes that are currently configured:

Router>show async bootp The following extended data will be sent in BOOTP responses: subnet-mask 255.255.255.0 gateway 10.10.18.196 dns-server 10.10.18.204 lpr-server 10.10.18.200

BOOTP does not accommodate IP pools or understand leases.

5.9.4. Using DHCP for IP Addresses and Dial-in Configuration Items

DHCP represents a significant advance over BOOTP in automating client configuration. It can also be used to assign addresses to PPP peers; when someone dials in, the router requests the peer address from the DHCP server. The client can then request additional configuration information from the router using DHCP, which acts as a proxy and relays the request to the actual DHCP server. The following configuration uses a DHCP server to provide the IP address and other configuration information.

! Configure our IP address pool to come from our DHCP server at 10.10.1.2 ip address-pool dhcp-proxy-client ip dhcp-server 10.10.1.2 ! Configure the required BOOTP information, nbns points to our WINS ! server, which in this case happens to be our DHCP and DNS server async-bootp dns-server 10.10.1.2 async-bootp nbns-server 10.10.1.2 ! ! Configure the async interface to use PPP and DHCP interface Async1 ip unnumbered ethernet0 encapsulation ppp async mode dedicated peer default ip address dhcp

You can also use routers as standalone DHCP servers , eliminating the need for a separate server. The proxy configuration shown here is probably more common, however.

Категории