I am attempting to set up a MT box with a DSL connection to the Internet. I have so far used a combined router and modem between the MT and the ADSL connection. Now, I want to use just an ADSL modem with ethernet port connected directly to the MT. I have carried out some experiemnts with the modem (D-Link DSL-300T) just connected directly to a PC but I cannot seem to access my /29 public subnet from my upstream provider. The modem uses PPPoA to connect to the ISP and appears to get just one address, which it then DHCPs to the attached PC i.e. subnet is X.X.X.240 - 247, modem gets address of X.X.X.246. I have tried setting the other addresses statically on the PC but they don’t work.
I can’t be the first person to use an ADSL modem with MT and want to use a block of public IPs so how is it done? My combined router and modem has two networks on the LAN side, private plus the public subnet assigned by the ISP. So how does this device do it (Draytek Vigor 2600)?
I’m not sure that this is the correct way to do it but this is how I have done it before
normally you get a main Ip address which is not in the block of Ip address
set this as the Ip address for the Internet side
I then set the internal network cards ip address to be the last usable ip address in the block
I then set on the static ip address up on the workstations and put the gateway on the workstations as the last usable ip address in the block (the ip that you set on the network card)
for your private ip address its best to put in a new network in the mikrotik box and use this for the private ip address range, but I believe its possible to set a second Ip address to the internal network card and use this for both the internal and public address’s
Thanks for your reply robIce, but I’m not sure I have the same type of service from my upstream ISP. I’m not aware of having any address available to me outside the assigned /29 block. I am in the UK, in case this sheds any light.
I’ve done some experimenting with this now, and what you say , RobIce, makes perfect sense. It would seem to me that I need an address in the same network as the DSL gateway at my ISP, on my MT WAN port. Otherwise, my router’s WAN port and the ISPs upstream router will be in different networks and won’t be able to communicate. However, my ISP says no, I don’t need an address for their gateway, and that the gateway is assigned dynamically. So , it would seem that the gateway address is being assigned by the PPPoA protocol that is establishing the connection to the ISP. But, after the PPPoA (very similar to PPPoE I beleive) negotiation, the modem is offering my WAN port one of my public addresses with a subnet mask of /32. So how is this ever going to communicate with the ISPs network? My ISP says, no problem, it’s routed. So, what is doing the routing, the modem, or the PPPoA access concentrator, or something else?
Hmm…some success, but still a mystery. I’ve gone back to basics somewhat, this is what I found.
Connect the 300T directly to a single W2K PC. Set it as a DHCP client and the 300T as a DHCP server, and let the 300T establish the ADSL connection. The lease obtained by the PC is:
Addr: X.X.X.246
Mask: 255.255.255.255
Gateway: X.X.X.246
DHCP server: 192.168.1.1
DNS servers: 212.23.8.1 etc.
Internet access from the PC works fine.
Then, I turned off the DHCP server on the 300T and set the IP configuration on the PC manually, to exactly the details above. Windows says that the subnet mask is invalid. It will only accept a subnet mask of 255.255.255.0 or “lower” e.g. 255.255.0.0. So, I set 255.255.255.0. The actual subnet I am assigned by the ISP is /29. Again, Internet access works fine.
I then re-enabled the DHCP server on the 300T, connected it to the WAN port of the MT, and setup a DHCP client on that port. I also set the DHCP client to add a default route. The lease obtained by the router was exactly as above. The default route was added but MT says it’s invalid.
I then disabled DHCP on the 300T and the router. I added a static address on the WAN interface as listed above (i.e. mask of /32) and MT says the subnet mask is invalid. So, I set a subnet mask of /24. I added a static default route with X.X.X.246 as the gateway. Now I can ping a host on the Internet from the router!
I then tried adding other addresses from my /29 subnet to the WAN interface of the router and they could not be pinged FROM the Internet, so were seemingly not being passed through the modem.
Anybody know what’s happening with the subnet mask?
I’m planning a very similar setup with MT and DSL-300T but the ADSL line isn’t live until next Monday.
The web interface on the 300T isn’t too brilliant. Have you taken a look at the XML file generated by saving the config? Make changes directly to this file and then upload it.
Have you got the latest D-Link firmware?
The 300T has telnet enabled and seems to be a pretty standard Linux box.
Hopefully I’ll have more info when I’ve had a chance to play with this myself.
I’ve just about given up on getting the 300T to work with Mikrotik. Most of the stuff I’ve read and the suggestions are for a NAT setup where the WAN port of the router can take a host address (/32), which is OK if you are only using a single public IP address assigned by the ISP.
It seems to me that the 300T just takes the address assigned from the PPPoA process and expects to see a host with this address connected to it’s ethernet port. MT needs a network connected to it’s WAN port so that it can forward packets onto the upstream router.
Do you have an IP block or just a single address from your ADSL provider?
I’m now looking to get a no-NAT modem/router and use proxy-arp to get the public addresses onto the LAN.
Guy
Guy: Have you tried putting the 300T into bridge mode and using the MT PPPoE client as described in the first thread on the Expansys forum? Of all the solutions, this would appear to offer the most possibilities.
My setup will be simpler than yours because I’m only trying to get a single IP NAT setup working.
OK. Maybe a miss-type in the post on the Expansys forum, or, maybe a different service provider or, the router auto-detected the PPPoA connection even though it was set to PPPoE. Unfortunately, I’m guessing at the moment as Wanadoo/BT don’t fixup my connection until next Monday.
I too have tried this (PPPoE client on MT) and it doesn’t work. I believe PPPoE and PPPoA are sufficiently similar for PPPoE to work on a PPPoA service, but not with MT, any how.
A NAT setup will work (I have had this working). The trick is to set the public interface to X.X.X.X/24, even though this is not the correct subnet mask.
Well, some success at last. Not sure if it was worth the effort though.
The 300T runs embedded Linux and does have quite comprehensive routing capability, including NAT. It builds it’s routing table from the PPP process and by leases assigned by the built in DHCP server. It runs proxy ARP on the LAN port and bridges this port to the PPP interface, which is the WAN port. Manual entries can be added to the routing table, which was the key to passing a public subnet to clients on the LAN. The modem also uses a “system” known as single host route. This is why the /32 subnet mask is always assigned to a connected DHCP client. W2K and XP are reported to support this and some routers. This allows only a single host to be connected to the modem and, of course, as a router interface is not a host this is where the problems begin. Quite why only a /32 address can be obtained from the router I am not sure but it seems like an attempt by D-Link to differentiate the 300T from it’s router products.
So, the working setup is as follows:
/29 public subnet assigned to the routers LAN port
Proxy arp enabled on both LAN and WAN ports.
Address 192.168.1.2 assigned to the WAN port, modem port has default address of 192.168.1.1
Router’s routing table has 192.168.1.1 as the default
Telnet to the modem with username root, password admin.
Add default route to modem (“route add default ppp0”). This can also be accomplished by allowing the modem’s DHCP server to provide a lease to a client.
Add static routes to the modem for each public address e.g. “route add X.X.X.241 br0” (this will create a route with a netmask of 255.255.255.255, I have not found a way to enter a 248 mask [returns an error of ‘makes no sense with route to host’] so it is neccessary to add a route for every address, so it seems the router regognises connected hosts only)
That’s it I think. I could not get the modem to pass anything other than the “router” address, without there being a static routing table entry in the modem This was tested by pinging from another host on the Internet and the ethernet light on the 300T would not flash.
The major problem is that the static routing table entries are not retained by the 300T after a power cycle. There may be some way of storing the entries but I have not found it yet. I could write a script on Mikrotik to add the entries automatically but I’m starting to wonder whether it’s all worth the effort.
For those that might be interested the 300T can be used as a simple NAT router by connecting hosts via a switch, adding the default route and assigning static addresses in the 192.168.1.0/24 range to the hosts.
Excellent work Guy. I shall try this out when I finally get my line installed.
I wonder what sort of licence the embedded code is released under. If it’s GPL’d then we should be able to get hold of the source code. It’s a very nice compact box, pity that D-Link have crippled it as they have.
Well, no luck. I tried modifying a stored backup file and searched long and hard for a way to edit files via telnet. This is not so surprising as I know nothing about Linux and this is a Linux box!
Any Linux gurus out there that could have a go at this?
Is it possible to FTP to that box? If it is, and you have root access to is at least through telnet, then the problem is solved. Most probably you should check the /etc/inittab file to find out how the damn box is started. Then you could make your own script to add routes, that is starting along with the ones are there by default. Of course, there might be another way around…
hmm…I tried to open an ftp session from Windows but I get:
c:\ftp 192.168.1.1
ftp: connect :Connection refused
ftp
I also cannot telnet on port 21. Is there a way to find out if ftp is available on a different port. The box has firmware update capability via web interface so would this not use ftp?
I have found the /etc/inittab file, but I don’t know how to read it. vi does not seem to be present on the box. Is there a way to echo the file to the screen or other method to read it’s contents?