Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2 3

Author Topic: DLink DSL-320B-Z1 first impressions.  (Read 19215 times)

G.DMT

  • Member
  • **
  • Posts: 76
DLink DSL-320B-Z1 first impressions.
« on: February 22, 2016, 03:38:38 PM »

A used  DLink DSL-320B-Z1  purchased on ebay arrived yesterday.

I am using it in 'modem only' mode bridged behind an OpenWRT router using PPPoE

The DSL-320B has only one Network port, so I had to setup OpenWRT to route a subnet out the red (WAN) interface to allow me to access ports on the modem for admin and telnet .

HOWTO here: https://simplebeian.wordpress.com/2014/03/12/accessing-your-modem-from-openwrt-router/

Code: [Select]
[root@k8 admin]# nmap -T4 192.168.0.6

Starting Nmap 7.00 ( https://nmap.org ) at 2016-02-22 15:33 GMT
Nmap scan report for 192.168.0.6
Host is up (0.0044s latency).
Not shown: 997 closed ports
PORT   STATE SERVICE
21/tcp open  ftp
23/tcp open  telnet
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 0.25 seconds
[root@k8 admin]#

Some ADSL statistics are visible in the web GUI.

If you have a Raspberry Pi you could run this little script to scrape them.
dsl-320b.sh

Code: [Select]
#!/bin/sh

## requires: curl,lynx

username='admin'
password='admin'

modem_ip='192.168.0.6'

curl --silent --anyauth --user "$username":"$password"   "http://$modem_ip/statsifcwan.html?Rtabhead=Status" | lynx --stdin --dump



[user@k8 scripts]$ ./dsl-320b.sh
     Statistics

   This information reflects the current status of your router.

   WAN Statistics
   Service VPI/VCI Protocol Received         Transmitted
                            Pkts  Errs Drops Pkts  Errs Drops
   -       0/38    RFC 1483 73228 0    0     55060 0    0

   LAN Statistics
   Interface

                                  Received

                                 Transmitted

     Bytes Pkts Errs Drops Bytes Pkts Errs Drops
   Ethernet 9480742 65749 0 0 95900079 85405 0 0

   ADSL Statistics
   Mode:                              G.DMT
   Type:                              ANNEX_A
   Status:                            Showtime

                            Downstream Upstream
   Rate (Kbps):             4224 kbps 448 kbps

   SNR Margin (dB):         6.0       17.0
   Attenuation (dB):        63.5      31.5
   Output Power (dBm):      19.0      12.5

   Super Frames:            681173    681173
   RS Correctable Errors:   58089     29
   RS Uncorrectable Errors: 543       42

   HEC Errors:              2796      41
   Total Cells:             406586    183053
   Data Cells:              1022660   112124
   Bit Errors:              0         0


I have a longish line >4300m with poor stability.

I will note here that ADSL option 'Bitswap' was not enabled by default.
When I checked the checkbox for 'Enable Bitswap' sync speed increased from 4032 -> 4224 kbps
 

This post is getting a bit long with pasted text.
I will start a new post for the telnet cli.

[Moderator edited to correct a minor typographical error.]
« Last Edit: February 22, 2016, 05:22:01 PM by G.DMT »
Logged

G.DMT

  • Member
  • **
  • Posts: 76
Re: DLink DSL-320B-Z1 first impressions.
« Reply #1 on: February 22, 2016, 03:50:57 PM »

There is a cli available via telnet.


[root@k8 admin]# telnet -l admin 192.168.0.6 23
Trying 192.168.0.6...
Connected to 192.168.0.6.
Escape character is '^]'.

Password: *****


The inteface is pretty basic, and I don't see the usual unix/linux style commands one would expect with a proper command interpreter shell such as ash / dash / bash etc.

This is a bit more like the context aware interface you see if you are familiar with cisco IOS or junos.

except the prompt does not change when  the context does, so I am finding it a bit confusing.  ???

Anyway help shows there are a few commands available.

I shall record some of the basics here.
tc> ls
Valid commands are:
sys             exit            ether           wan               
etherdbg        tcephydbg       usb             ip               
bridge          dot1q           pktqos          show             
set             lan                                               
tc>


tc> sys
adjtime         countrycode     edit            feature           
hostname        log             resetlog        stdio             
time            syslog          version         view             
wdog            romreset        upnp            atsh             
diag            routeip         bridge          save             
display         password        default         adminname         
modelcheck      parentctrl      multiuser       defaultTCrestore 
pswauthen       hangdbg         ledtr68         pppnamelock       
defaultpwdcheck autocwmpoui     atshw           remotemgropen     
sptromsize      compileid       dhcpprobe       dhcpfor2ndusr     
cwmp            socket          filter          ddns             
cpu             snmp                                             

tc>

tc> wan
atm             node            hwsar           tdebug           
adsl            tsarm                                             

tc> show
wan             lan             cpe             community         
channel         all                                               

tc> show wan
help            node            status          adsl             
tsarm                                                             

tc>


In the GUI you can define up to eight Permanent Virtual Circuits
Each could be e.g. a diferent VLAN for your ISP.

tc> show wan status
PVC-0
        Status = Up
PVC-1
        Status = Down
PVC-2
        Status = Down
PVC-3
        Status = Down
PVC-4
        Status = Down
PVC-5
        Status = Down
PVC-6
        Status = Down
PVC-7
        Status = Down

tc>
« Last Edit: February 22, 2016, 04:13:32 PM by G.DMT »
Logged

G.DMT

  • Member
  • **
  • Posts: 76
Re: DLink DSL-320B-Z1 some telnet commands
« Reply #2 on: February 22, 2016, 03:52:28 PM »

tc> wan adsl chandata
near-end interleaved channel bit rate: 4032 kbps
near-end fast channel bit rate: 0 kbps
far-end interleaved channel bit rate: 448 kbps
far-end fast channel bit rate: 0 kbps

tc> wan adsl linedata
far             near                                             

tc> wan adsl perfdata
near-end FEC error fast: 0
near-end FEC error interleaved: 52019
near-end CRC error fast: 0
near-end CRC error interleaved: 94
near-end HEC error fast: 0
near-end HEC error interleaved: 377
far-end FEC error fast: 0
far-end FEC error interleaved: 5
far-end CRC error fast: 0
far-end CRC error interleaved: 4
far-end HEC error fast: 0
far-end HEC error interleaved: 11
Error second in 15min           : 1
Error second in 24hr            : 7
Error second after power-up     : 7
ADSL uptime     1:36:39

tc> wan adsl status
current modem status: up

tc> wan adsl rateadap
on              off                                               

tc> wan adsl noisemargin
Usage: noisemargin_value

tc> wan adsl txgain
usage: gain value should be >= 0x0c or <= 0x00 (-12~0dB)
current value:80

tc> wan adsl txtones
usage: <start tone> <end tone> tone=0x6~0x1F
current value: start_tone=6 end_tone=1f

tc> wan adsl watchdog
adsl dsp watchdog: 1

tc> wan adsl annex
ADSL ANNEX[HW] : A

tc> wan adsl defbitmap
current near-end defects bitmaps:
    Los              :0
    Lof              :0
    Lop              :0
    LcdNonInterleaved:0
    LcdInterleaved   :0
    Lom              :0
current far-end defects bitmaps:
    Los              :0
    Lof              :0
    Lop              :0
    LcdNonInterleaved:0
    LcdInterleaved   :0
    Lom              :0
current near-end defects bitmaps changed:
    Los              :0
    Lof              :0
    Lop              :0
    LcdNonInterleaved:0
    LcdInterleaved   :0
    Lom              :0
current far-end defects bitmaps changed:
    Los              :0
    Lof              :0
    Lop              :0
    LcdNonInterleaved:0
    LcdInterleaved   :0
    Lom              :0

tc> wan adsl opmode
operational mode: ITU G.992.1(G.DMT)


tc> wan adsl version
near-end version: 1
far-end version: 0

tc> wan adsl farituid
far end itu identification: b5 0 54 53 54 43 5 10

tc> wan adsl dumpcondition
on              off                                               

tc> wan adsl persisttime
Usage: time_sec

tc> wan adsl targetnoise
usage: gain value should be snr margin(dB) * 512
current value:0

tc> wan adsl snroffset
usage: set snr offset (offset(db)*512)
current value:0

tc> wan adsl fwversion
DMT FwVer: 3.22.2.0_A60394 HwVer: T14F7_12.0

tc>

tc> wan adsl txgain
usage: gain value should be >= 0x0c or <= 0x00 (-12~0dB)
current value:80

tc> wan adsl status
current modem status: up

tc> wan adsl rateadap
on              off                                               

tc> wan adsl chandata
near-end interleaved channel bit rate: 4032 kbps
near-end fast channel bit rate: 0 kbps
far-end interleaved channel bit rate: 448 kbps
far-end fast channel bit rate: 0 kbps

tc> wan adsl linedata
far             near                                             

tc>
« Last Edit: February 22, 2016, 04:03:24 PM by G.DMT »
Logged

G.DMT

  • Member
  • **
  • Posts: 76
Re: DLink DSL-320B-Z1 first impressions.
« Reply #3 on: February 22, 2016, 03:58:07 PM »

Fortunately there is a line diagnosis command implemented - broadly similar to the Broadcom equivalent.

It returned 994 lines of text, so I will refrain from pasting it here.
I will attach the file in case anyone is interested.  ;)

This is handy as it shows correct usage for many of the commands, and contains a load of tone data so looks like it could easily be parsed to generate graphs of line stats. :-)
« Last Edit: February 22, 2016, 04:15:20 PM by G.DMT »
Logged

aesmith

  • Kitizen
  • ****
  • Posts: 1216
Re: DLink DSL-320B-Z1 first impressions.
« Reply #4 on: February 22, 2016, 04:03:00 PM »

How does that attenuation figure compare with other routers/modems that you've tried?   

If it's truly 63.5dB then that's a pretty impressive synch data rate.  On the other hand compared to our own line (5.3km/54dB) the attenuation figure looks high for the length you mention.
Logged

G.DMT

  • Member
  • **
  • Posts: 76
Re: DLink DSL-320B-Z1 first impressions.
« Reply #5 on: February 22, 2016, 04:11:56 PM »

How does that attenuation figure compare with other routers/modems that you've tried?   

If it's truly 63.5dB then that's a pretty impressive synch data rate.  On the other hand compared to our own line (5.3km/54dB) the attenuation figure looks high for the length you mention.

Yeah I noticed that too.
IIRC 63.5dB is the max value supported by the ADSL1 standard

Previous modems have reported similar, and in the past I had assumed that this just may be a reporting
foible.
Now I am not so sure.
Logged

Chunkers

  • Reg Member
  • ***
  • Posts: 525
  • Brick Wall head-banger
Re: DLink DSL-320B-Z1 first impressions.
« Reply #6 on: February 22, 2016, 04:14:18 PM »

This is super handy as I have just bought one of these, also ..... wow your line is even worse than mine  :-X

All things considered it looks like it is doing a pretty good job

When I get mine up and running I will post a comparison between is and my other modems for info :)

Thanks!

Chunks
Logged

G.DMT

  • Member
  • **
  • Posts: 76
Re: DLink DSL-320B-Z1 first impressions.
« Reply #7 on: February 22, 2016, 04:39:18 PM »

Some more telnet info

tc> show wan help
show wan help                     Display help information
show wan node <vc_index:0~7>     Display WAN PVC information
tc> show wan node 0
RemoteNode     = 0
Rem Node Name  = Node1(ISP)
Encapsulation  = RFC 1483
Multiplexing   = LLC-based
Channel active = Yes
VPI/VCI value  = 0/38
IP Routing mode= No
Bridge mode    = Yes
Remote IP Addr        = 0.0.0.0
Remote IP Subnet Mask = 0.0.0.0
IP address assignment type = Dynamic
SUA            = Yes
Multicast      = None
Default Route node            = Yes
tc>
 

so, don't type
tc> show wan adsl close
ok


as that will close your dsl connection!

As will:

tc> show wan adsl reset
ok
tc>

The first 'close' caused sync to come back up at an improved 4320 kbps
The second 'reset' came back up  2 speed bands slower at 4256 kbps

So be careful with this - you don't want to get clobbered by the dreaded Dynamic Line Management system.

tc> show wan adsl open
The line is already up
tc>


don't run
tc >  sys default

That resets the modem to default settings, including resetting VCI back to 33 which will disconnect you from your ISP and drop your PPP connection.

also resets 'Enable bitswap' to off.
« Last Edit: February 23, 2016, 11:10:19 AM by G.DMT »
Logged

G.DMT

  • Member
  • **
  • Posts: 76
Re: DLink DSL-320B-Z1 first impressions.
« Reply #8 on: February 22, 2016, 09:39:47 PM »

This is super handy as I have just bought one of these, also ..... wow your line is even worse than mine  :-X

All things considered it looks like it is doing a pretty good job

When I get mine up and running I will post a comparison between is and my other modems for info :)

Thanks!

Chunks

I was inspired by you Chunkers and Weaver in  the previous thread.  ;D

"New Broadcom based modem to bridge to my router"
http://forum.kitz.co.uk/index.php/topic,16973.msg312386.html#msg312386

;D I hope this thread may help you to get set up quickly and easily and provide you with all the stats you need to compare performance to the ZyXEL VMG8324-B10A

I wrote a little script to download relevant data from the modem using plink.

[edit: I updated the script it a little, so use the .zip attached to the subsequent post.]
;-)
« Last Edit: February 26, 2016, 11:03:41 PM by G.DMT »
Logged

G.DMT

  • Member
  • **
  • Posts: 76
plink script to retreive lina statistics from DLink DSL-320B-Z1
« Reply #9 on: February 22, 2016, 10:29:03 PM »

I decide to move this into its own post, since I updated the script a little to make it a bit more maintainable, and readable.
 
The zip archive provides a .sh file to be executed from the shell command line.
plus some individual .telnet files which contain the commands which are to be executed on the modem.

This requires that plink is installed.

You can install plink on a Raspberry Pi using
'apt-cache show putty-tools'
'apt-get install putty-tools'

plink.exe is also available for windows,
so you could use the plink-stats.sh as a guide to make a windows batch file if that is what you need.

usage is simple:
Expand the zip archive into its own directory and cd into the directory.

You can either uncomment whichever line calls the function(s) you want
and then execute ./plink-stats.sh

OR (the more flexible way)

'source  ./plink-stats.sh'
then
call a script function directly by name
e.g. 'telnet_diagnostic'
Logged

Chunkers

  • Reg Member
  • ***
  • Posts: 525
  • Brick Wall head-banger
Re: DLink DSL-320B-Z1 first impressions.
« Reply #10 on: February 23, 2016, 04:36:20 AM »

;D I hope this thread may help you to get set up quickly and easily and provide you with all the stats you need to compare performance to the ZyXEL VMG8324-B10A


Brilliant!  I am looking forward to trying this, it will be a while as I am currently working on rotation in Africa, I am due back in the UK next week so it'll a few weeks yet I imagine :)

Chunks
Logged

Jaggies

  • Member
  • **
  • Posts: 92
Re: DLink DSL-320B-Z1 first impressions.
« Reply #11 on: February 23, 2016, 10:37:04 PM »

Multiplexing   = LLC-based

This is normally "VC-MUX", or "VC Based" for G.DMT connections on BTwholesale lines.
Logged

Chunkers

  • Reg Member
  • ***
  • Posts: 525
  • Brick Wall head-banger
Re: DLink DSL-320B-Z1 first impressions.
« Reply #12 on: February 26, 2016, 09:12:47 AM »

Hi  ::)

I set up my D-Link by putting it into bridge mode, disabling DHCP and before doing this I set the IP to 192.168.1.2.  My router, an Asus AC68U, has the IP 192.168.1.1 and the DHCP server uses the range from 192.168.1.5 to 192.168.1.254.

At the moment it is connected fine and seems to be working well but I am struggling a bit to get stats from the modem as it only has the one network port and I am a bit unsure whether the AC68U has the ability to setup a subnet on the WAN side like G.DMT did above.  My knowledge of networking is pretty basic (read almost non-existant)

Can anyone give me a few hints on the easiest way to get the stats from my setup?

Thanks!

Chunks  :baby:
Logged

G.DMT

  • Member
  • **
  • Posts: 76
Re: DLink DSL-320B-Z1 first impressions.
« Reply #13 on: February 26, 2016, 10:21:22 AM »

Hi Chunkers.

 So once I had telnet access, I spent some time examining how this modem works.

And I was not very encouraged with what I found.

There is a worrying history of remotely exploitable security holes, and there appears to be very little in the way of updates.  :(

I can see why AA advocate to only use it in bridge mode.

When you add an IP address, you are providing an endpoint to attack from the network.

Anyone who buys this modem needs to

1) Login to the web GUI, goto  Advanced / Remote Management and uncheck all of the remotely available services:
FTP   
HTTP    
ICMP (Ping)    
TELNET    
TFTP

2) Download and install the latest firmware image - (currently 1.06):

http://www.dlink.com/uk/en/support/product/dsl-320b-adsl-2-ethernet-modem?revision=deu_revz#downloads

This adds some authentication to attempted accesses to the device.

This was one of the many Zynos devices subject to the rom-0 attack where an unauthenticated request could download the section of the rom image that contained the admin password ! :-(

This was used for a mass DNS hijacking attack against these routers.  :(
 
I would strongly suggest you deal with this first before you leave the device 'in service'.

p.s. The new firmware prevents the simple curl script that I posted earlier from working, but I wrote a new version to get around that.

I will post that up here soon so others can use it.

As further sensible precautions, I would advise moving the device off of the default (local,private) IP address and changing the default password.

Cheers!
p.s. I will make another post addressing your actual question.  ;)
Logged

G.DMT

  • Member
  • **
  • Posts: 76
Re: DLink DSL-320B-Z1 first impressions.
« Reply #14 on: February 26, 2016, 11:01:00 AM »

Hi  ::)

I set up my D-Link by putting it into bridge mode, disabling DHCP and before doing this I set the IP to 192.168.1.2.  My router, an Asus AC68U, has the IP 192.168.1.1 and the DHCP server uses the range from 192.168.1.5 to 192.168.1.254.

At the moment it is connected fine and seems to be working well but I am struggling a bit to get stats from the modem as it only has the one network port and I am a bit unsure whether the AC68U has the ability to setup a subnet on the WAN side like G.DMT did above.  My knowledge of networking is pretty basic (read almost non-existant)

Can anyone give me a few hints on the easiest way to get the stats from my setup?

Thanks!

Chunks  :baby:

Few points to note here.

In the general case there are two obvious solutions here.

The problem here is that you have only one physical network port on the modem, but desire to utilise it for 2 distinct use cases.

1) internet connection
2) connection for monitoring.

You could solve this by either
1) Multiplying the number of physical ports you have available i.e. plug it into a switch.
or
2) Ensure that the device it is connected to is sufficiently flexible to handle both Internet/Firewall/Router duties AND monitoring.

The _easiest_ solution is to just plug the modem port into a little dedicated switch, then use a low power device with 2 ethernet ports (like a raspberry Pi with a USB network dongle)  as a proxy for monitoring.

I have been happily using 1) to give me a single point of access to multiple devices for years now.  :)
But this does require that you have the additional kit running.

I do not have an Asus AC68U so I did a quick google for your router.

It seems you have a choice of options for solution 2.

http://www.asus.com/us/site/routers/DD-WRT/
http://www.dd-wrt.com/wiki/index.php/Asus_RT-AC68U

I did a quick check on one of my  DD-WRT devices-

If you have installed DD-WRT you can go to web GUI / Setup / Advanced Routing / Static routing
and add a new route (out the WAN interface) there.

I personally have stopped installing DD-WRT as I find OpenWRT preferable.

It would appear there has been an openWRT build available for the Asus AC68U for some time:
https://wiki.openwrt.org/toh/asus/rt-ac68u

Whichever route you choose to go- I would suggest that you put the modem on a subnet (i.e. IP address range) of its own.
I chose a /29 to suit my particular setup here- there is no actual _need_ for a full /24

I would advize _not_ to try to have it in the same IP range as the rest of your LAN.

i.e. in your case where the LAN had network address 192.168.1.0/24

I would prefer _not_  to try and subnet the 192.168.1.0 subnet as this provides scope for getting it wrong later if you are not fully comfortable with routing and subnetting.

Why not just put it on e.g. 192.168.2.0/30 or similar?

The packet routing algorithm picks the 'Longest Match First'- so avoid ambiguity by selecting the network prefix for your monitoring subnet ( the /30 ) that is a better (more specific) match than your LAN ( the /24 ) 

Apologies  if this is a granny / eggs situation!  ;D

Cheers.  ;D

« Last Edit: February 26, 2016, 11:36:56 AM by G.DMT »
Logged
Pages: [1] 2 3
 

anything