Skip to content

Commit

Permalink
DHCP VRF-aware relay: better diagram, device configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
ipspace committed Mar 11, 2023
1 parent 2bb52ce commit c10194a
Show file tree
Hide file tree
Showing 9 changed files with 578 additions and 25 deletions.
2 changes: 1 addition & 1 deletion DHCP/vrf-relay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains *netlab* topology file for a simple VRF-aware DHCP relaying scenario.

![DHCP relaying topology](dhcp-relay.png)
![DHCP relaying topology](vrf-dhcp-relay.png)

After starting the lab, the *user* device should get DHCP-assigned IP address on its lab-facing interface.

Expand Down
160 changes: 160 additions & 0 deletions DHCP/vrf-relay/config/relay.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
!
! Last configuration change at 11:15:29 UTC Sat Mar 11 2023 by vagrant
!
version 15.6
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname relay
!
boot-start-marker
boot-end-marker
!
!
vrf definition MGMT
description Management interface
!
address-family ipv4
exit-address-family
!
vrf definition client
rd 65000:1
route-target export 65000:1
route-target import 65000:1
!
address-family ipv4
exit-address-family
!
!
aaa new-model
!
!
aaa authentication login default local
aaa authorization exec default local
!
!
!
!
!
aaa session-id common
ethernet lmi ce
!
!
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
ip dhcp relay information option vpn
!
!
!
no ip domain lookup
ip domain name lab.local
ip host srv 10.0.0.1 10.1.0.2
ip host user 10.0.0.3 172.16.0.3
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
username vagrant privilege 15 secret 5 $1$2Z2t$pXLik1OzWFWpn6CGRMkhS0
!
redundancy
!
lldp run
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 10.0.0.2 255.255.255.255
ip ospf 1 area 0.0.0.0
!
interface GigabitEthernet0/0
description vagrant-management
vrf forwarding MGMT
ip address dhcp
duplex auto
speed auto
media-type rj45
no lldp transmit
no lldp receive
!
interface GigabitEthernet0/1
description relay -> srv
ip address 10.1.0.1 255.255.255.252
ip ospf network point-to-point
ip ospf 1 area 0.0.0.0
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
description relay -> user
vrf forwarding client
ip address 172.16.0.2 255.255.255.0
ip helper-address global 10.0.0.1
duplex auto
speed auto
media-type rj45
!
router ospf 1
router-id 10.0.0.2
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip ssh version 2
ip ssh pubkey-chain
username vagrant
key-hash ssh-rsa DD3BB82E850406E9ABFFA80AC0046ED6
!
!
!
!
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
transport input ssh
!
no scheduler allocate
event manager applet ENABLE-MGMT
event syslog pattern "SYS-5-RESTART"
action 0 cli command "enable"
action 1 cli command "conf t"
action 2 cli command "crypto key generate rsa modulus 2048"
action 3 cli command "interface GigabitEthernet0/0"
action 4 cli command "no shutdown"
action 5 cli command "exit"
!
end
Loading

0 comments on commit c10194a

Please sign in to comment.