The dhcp settings shouldn't contain a gateway address in '/etc/network/interfaces'. To configure dhcp on eth0, for example, you only need the following lines at a bare minimum:
auto eth0
    iface eth0 inet dhcp
Once that's configured properly 'ifup' & 'ifdown' should work correctly, then you can put any scripts you want to run when changing an interface's state in '/etc/network/if-up.d' & '/etc/network/if-down.d'. However, if your dhcp server is setup correctly it should provide a DNS configuration to it's clients, so configuring it by hand shouldn't be necessary