Attribution d’adresses via PPP/IPCP avec un pool DHCP

Topologie

Attribution d’une adresse ip via PPP/IPCP et DHCP


Sur le routeur serveur :
Créez un pool dhcp :

R1(config)#ip dhcp pool test
R1(dhcp-config)#netw 192.168.100.0 255.255.255.0
R1(dhcp-config)#exit

Sur l’interface PPP, utilisez ces commandes:

R1(config)#int s1/0
R1(config-if)#encapsulation PPP
R1(config-if)#ip address 192.168.100.254
R1(config-if)#peer default ip address dhcp-pool test
R1(config-if)#exit

Sur le routeur distant:

R2(config)#int s1/0
R2(config-if)#ip address negotiated
R2(config-if)#encapsulation ppp

Sur R1, on aurait aussi pu faire de la sorte (avec un pool d’adresse = plage d’adresse):

R1(config)#ip local-pool test 192.168.100.2 192.168.100.200
R1(config)#int s1/0
R1(config-if)#encapsulation PPP
R1(config-if)#ip address 192.168.100.254
R1(config-if)#peer default ip address pool test

On Remarque la table de routage:

R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS,
 su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
 ia - IS-IS inter area, * - candidate default, U - per-user static route
 o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.1.0/30 is subnetted, 1 subnets
C       192.168.1.4 is directly connected, Serial1/1
 192.168.100.0/32 is subnetted, 2 subnets
C       192.168.100.1 is directly connected, Serial1/0
C       192.168.100.254 is directly connected, Serial1/0
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set
C    172.16.0.0/16 is directly connected, Loopback1
     192.168.100.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.100.0/24 is directly connected, Serial1/0
C       192.168.100.1/32 is directly connected, Serial1/0
R1#

Recent Entries

One Response to “Attribution d’adresses via PPP/IPCP avec un pool DHCP”

  1. fathi_amine Says:

    merci pour l’info c très intéressant

Leave a Reply

Le temps imparti est dépassé. Merci de recharger le CAPTCHA.