Generally with a 4100, you either need to use the device in (A) the default "bridge/routing mode" or (B) place the device into the "bridge" mode.
To setup your 4100 and WRT310N, you must first disconnect them from each other, change the settings as outlined below, then reconnect them and reboot the network.
In setup (A), the PPPoE User Name and Password (supplied by AT&T) is placed in the 4100. The 4100 will do your PPPoE login for you. The WRT310N should work at its factory default settings, which includes an "Internet Connection Type" of "DHCP - automatic".
In setup (B), the 4100 acts as a true modem (because it is in bridge mode). In this case, you must set the WRT310N to an "Internet Connection Type" of "PPPoE", then place the PPPoE User Name and Password (from AT&T) into the WRT310N. The 4100 must be set to "bridge" mode.
Setup (B) is preferred. Setup (A) will work for most users.