Peer Default IP Addressing

This topic is pretty straightforward, but I still had a little uncertainty with the DHCP option, so I labbed everything up.

We’ll go through all 4 options with the following target address assignments:

static – 1.1.1.10
local – 1.1.1.11
dhcp pool – 1.1.1.12
dhcp – 1.1.1.13

Our network diagram:

R1————————————————-R2———————————R3
ip add negotiated                       1.1.1.2                 2.2.2.x /24

R1 will be negotiating the addresses, R2 will be providing the addresses, and R3 will be our DHCP server.

Our configuration on R1 which won’t change throughout the task:

R1#sh run int s0/0
Building configuration...

Current configuration : 89 bytes
!
interface Serial0/0
ip address negotiated
encapsulation ppp
clock rate 2000000
end

Option 1 – STATIC

Static is pretty simple. Here’s our set up on R2:

R2(config-if)#peer default ip add 1.1.1.10

Bouncing the port on R1 brings us the correct address:

Oct 6 19:50:06.585: Se0/0 IPCP: O CONFREQ [ACKsent] id 2 len 10
Oct 6 19:50:06.585: Se0/0 IPCP: Address 1.1.1.10 (0x03060101010A)
Oct 6 19:50:06.597: Se0/0 IPCP: I CONFACK [ACKsent] id 2 len 10
Oct 6 19:50:06.601: Se0/0 IPCP: Address 1.1.1.10 (0x03060101010A)
Oct 6 19:50:06.601: Se0/0 IPCP: State is Open
Oct 6 19:50:06.609: Se0/0 IPCP: Install negotiated IP interface address 1.1.1.10

Option 2 – LOCAL POOL

First we create our pool on R2:

R2(config)#ip local pool R2_LOCAL 1.1.1.11

Now we set the correct mode on the interface and point to the named local pool:

R2(config-if)#peer default ip add pool R2_LOCAL

Bouncing the interface gives us what we’d expect:

Oct 6 19:52:34.305: Se0/0 IPCP: I CONFACK [ACKsent] id 2 len 10
Oct 6 19:52:34.309: Se0/0 IPCP: Address 1.1.1.11 (0x03060101010B)
Oct 6 19:52:34.309: Se0/0 IPCP: State is Open
Oct 6 19:52:34.309: Se0/0 IPCP: Install negotiated IP interface address 1.1.1.11

Option 3 – DHCP POOL

This one is similar to the local pool, except R2 will act as a DHCP server and provide the address that way.

Here’s our DHCP pool and excluded addresses to make sure the correct address is assigned:

R2(config)#ip dhcp excluded-address 1.1.1.0 1.1.1.11
R2(config)#ip dhcp excluded-address 1.1.1.13 1.1.1.255

R2(config)#ip dhcp pool R2_DHCP
R2(dhcp-config)#network 1.1.1.0 /24

The peer address configuration on R2:

R2(config-if)#peer default ip add dhcp-pool R2_DHCP

We see the goods on R1:

Oct 6 19:55:08.745: Se0/0 IPCP: I CONFACK [ACKsent] id 4 len 10
Oct 6 19:55:08.745: Se0/0 IPCP: Address 1.1.1.12 (0x03060101010C)
Oct 6 19:55:08.745: Se0/0 IPCP: State is Open
Oct 6 19:55:08.745: Se0/0 IPCP: Install negotiated IP interface address 1.1.1.12

Option 4 – DHCP

This one is a little tricky because we have to use R3 as the DHCP server.

If you put R3 onto the same subnet as R1 or even provide IP reachability, it’s quite possible that R3 will assign the address directly to R1.

The key here is to make sure R3 is using R2 to pass the address off.

The DHCP settings on R3:

R3(config)#ip dhcp excluded-address 1.1.1.0 1.1.1.12
R3(config)#ip dhcp excluded-address 1.1.1.14 1.1.1.255

R3(config)#ip dhcp pool R3_POOL
R3(dhcp-config)#network 1.1.1.0 /24

R2’s interface configurations, make a note of the helper address.

R2(config-if)#peer default ip add dhcp
R2(config-if)#ip helper-address 2.2.2.3

We see the following debug on R3:

*Mar 10 02:04:54.321: DHCPD: Sending DHCPACK to client 0063.6973.636f.2d31.2e31.2e31.2e32.2d53.6572.6961.6c30.2f30 (1.1.1.13).
*Mar 10 02:04:54.321: DHCPD: unicasting BOOTREPLY for client c201.6d65.0000 to relay 1.1.1.2.

Success on R1:

Oct 6 20:13:23.321: Se0/0 IPCP: I CONFACK [ACKsent] id 2 len 10
Oct 6 20:13:23.325: Se0/0 IPCP: Address 1.1.1.13 (0x03060101010D)
Oct 6 20:13:23.325: Se0/0 IPCP: State is Open
Oct 6 20:13:23.329: Se0/0 IPCP: Install negotiated IP interface address 1.1.1.13

R3 does need a route to 1.1.1.2 for this to work. (I used a static route).

As usual, everything becomes nice and clear once you lab it up.

Advertisements

About this entry