Учебные материалы 📑

Задание 9.txt

===HQ-RTR===

apt-get install dnsmasq -y

--------смена DNS-----------

rm -f /etc/net/ifaces/enp7s1/resolv.conf

echo $'search au-team.irpo\nnameserver 192.168.100.2' > /etc/net/ifaces/vlan111/resolv.conf

--------DHCP------------

sed -i 's/AUTO_LOCAL_RESOLVER=yes/AUTO_LOCAL_RESOLVER=no/' /etc/sysconfig/dnsmasq ; grep AUTO_LOCAL_RESOLVER /etc/sysconfig/dnsmasq

nano /etc/dnsmasq.conf

port=0
interface=vlan211
listen-address=192.168.200.1
dhcp-authoritative
dhcp-range=interface:vlan211,192.168.200.2,192.168.200.2,255.255.255.240,6h
dhcp-option=3,192.168.200.1
dhcp-option=6,192.168.100.2
leasefile-ro





systemctl enable --now dnsmasq ; ss -lun | grep 67

systemctl restart network

cat /etc/resolv.conf