Skip to content

Example: dhcp with interface server

Alt text


hostname r1
vrf def v1
 rd 1:1
int eth1
 vrf for v1
 ipv4 addr
 ipv6 addr 1234::1 ffff::
 ipv6 prefix-suppress
 dhcp4 enable
 dhcp4 pool
 dhcp4 gateway
 dhcp4 netmask
 dhcp6 enable
 dhcp6 netmask ffff:ffff:ffff:ffff::
 dhcp6 gateway 1234::1
int lo0
 vrf for v1
 ipv4 addr
 ipv6 addr 4444::4 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff


hostname r2
vrf def v1
 rd 1:1
prefix-list p4
prefix-list p6
 permit ::/0
int eth1
 vrf for v1
 ipv4 addr
 ipv4 dhcp-client enable
 ipv4 gateway-prefix p4
 ipv6 addr 3333::3 ffff::
 ipv6 dhcp-client enable
 ipv6 gateway-prefix p6
r2 tping 100 20 vrf v1
r2 tping 100 20 1234::1 vrf v1
r2 tping 100 5 vrf v1
r2 tping 100 5 4444::4 vrf v1
  1. Install ContainerLab as described here
  2. Fetch conn-dhcp06 file
  3. Launch ContainerLab conn-dhcp06.yml topology:

   containerlab deploy --topo conn-dhcp06.yml  
4. Destroy ContainerLab conn-dhcp06.yml topology:

   containerlab destroy --topo conn-dhcp06.yml  
5. Copy-paste configuration for each node in the lab topology

  1. Fetch or compile freeRtr rtr.jar file.
    You can grab it here
  2. Fetch conn-dhcp06.tst file here
  3. Launch conn-dhcp06.tst test:

   java -jar ../../rtr.jar test tester conn-dhcp06 path ./ temp ./ wait
4. Destroy freeRtr conn-dhcp06.tst test:

   Ctrl-C (In freeRtr test window)