Example: interop1: dhcp client¶
r1
hostname r1
vrf def v1
rd 1:1
exit
prefix-list p4
permit 0.0.0.0/0
exit
prefix-list p6
permit ::/0
exit
int eth1
vrf for v1
ipv4 addr 3.3.3.3 255.255.255.128
ipv4 dhcp-client enable
ipv4 dhcp-client early
ipv4 gateway-prefix p4
ipv6 addr 3333::3 ffff::
ipv6 dhcp-client enable
ipv6 dhcp-client prefix
ipv6 gateway-prefix p6
exit
r2
hostname r2
ip routing
ipv6 unicast-routing
ipv6 local pool dhcpv6 1234:1234:1234::/40 48
ipv6 dhcp pool dhcpv6
prefix-delegation pool dhcpv6 lifetime 1800 1800
exit
interface loop0
ipv6 address 4321::1/128
exit
interface gigabit1
ip address 1.1.1.1 255.255.255.0
ipv6 enable
ipv6 dhcp server dhcpv6
no shutdown
exit
ip dhcp pool p1
network 1.1.1.0 255.255.255.0
default-router 1.1.1.1
exit
r1 tping 100 30 1.1.1.1 vrf v1
r1 tping 100 30 4321::1 vrf v1
- Install ContainerLab as described here
- Fetch intop1-dhcp02 file
- Launch ContainerLab
intop1-dhcp02.yml
topology:
containerlab deploy --topo intop1-dhcp02.yml
intop1-dhcp02.yml
topology:
containerlab destroy --topo intop1-dhcp02.yml