So I want to be able to get the node IP and use it in the below script where "XX.XX" would be replaced with the middle two octets. (Ex. Node IP 172.24.4.65 would somehow insert 24.4. in the script below where "XX.XX." for every iteration.
I started with this simple script which works:
config t
vlan 224
name WiFi
vlan 248
name VLAN0248
!
ip dhcp excluded-address 172.XX.XX.249
!
default interface TwoGigabitEthernet1/0/43
!
interface TwoGigabitEthernet1/0/43
description AP-01
switchport trunk native vlan 248
switchport mode trunk
no shut
!
default interface TwoGigabitEthernet1/0/44
!
interface TwoGigabitEthernet1/0/44
description AP-02
switchport trunk native vlan 248
switchport mode trunk
no shut
!
default interface GigabitEthernet1/0/29
!
interface GigabitEthernet1/0/29
description firewall-lan2
switchport trunk allowed vlan 76,224,248
switchport mode trunk
!
exit
!
ip dhcp pool WAPS
network 172.XX.XX.248 255.255.255.248
default-router 172.XX.XX.249
dns-server 10.100.12.23 10.100.12.21
lease 2
!
ip route 172.XX.XX.224 255.255.255.240 172.XX.XX.66
ip route 172.XX.XX.248 255.255.255.248 172.XX.XX.66
!
end
wr
But I need to manually change the middle two octets per device:
Is this even possible? I would appreciate any help, thanks.