DNS CLI

From BE Usergroup Technotes
Jump to: navigation, search

Contents

Bypass Bebox DNS relay and set DNS address on Networked devices via DHCP

(Allows you to set external DNS servers on all PC's without changing individual pc settings)


Note: You can specifiy Primary/Secondary Dns by changing the values after primdns= and secdns=

dhcp server config state disabled
dhcp server pool config name=LAN_private state=enabled allocation=dynamic intf=LocalNetwork poolstart=192.168.1.64 poolend=192.168.1.253 netmask=24 gateway=192.168.1.254 server=192.168.1.254 primdns=87.194.255.154 secdns=87.194.255.155 dnsmetric=0 leasetime=86400 unnumbered=disabled localgw=disabled localdns=disabled
dhcp server config state=enabled
:saveall

NOTE: The below Commands are for firmware 8.2 of the 585v7, It should be possible to use them on other firmware/bebox modems however the Intf will probably change to either Static_IP , Dynamic_IP or Routhed_EthoA

Change DNS on a bebox configured for a static ip

Note: To Specify alternate DNS simply edit the IP's in the commands below



:dns server route flush
:dns server route add dns=87.194.255.154 metric=0 intf=Internet
:dns server route add dns=87.194.255.155 metric=1 intf=Internet
:saveall



Add Opendns to bebox and keep existing DNS server from DHCP, but lower metric of DHCP obtained DNS so it should only be used as fallback (Dyn ip)

Note: To Specify alternate DNS simply edit the IP's in the commands below

 :dhcp client ifdetach intf=Internet
:dhcp client ifconfig intf Internet dnsmetric 10 metric 1
:dhcp client ifattach intf Internet
:dns server route flush
:dns server route add dns=208.67.222.222 metric=0 intf=Internet
:dns server route add dns=208.67.220.220 metric=1 intf=Internet
:saveall
:system reboot



Add Opendns to bebox and remove DHCP assigned DNS server

Note: To Specify alternate DNS simply edit the IP's in the commands below

 :dhcp client ifdetach intf=Internet
:dhcp client rqoptions delete intf=Internet option=domain-name-servers
:dhcp client ifattach intf Internet
:dns server route flush
:dns server route add dns=208.67.222.222 metric=0 intf=Internet
:dns server route add dns=208.67.220.220 metric=1 intf=Internet
:saveall
:system reboot


To Undo the changes and re-enable DNS from DHCP


dhcp client ifdetach intf=Internet
:dhcp client rqoptions add intf=Internet option=domain-name-servers
:dhcp client ifattach intf Internet
:dns server route flush
:saveall
:system reboot



Personal tools