Unlocking the potential of Sagemcom 2704N
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: Unlocking the potential of Sagemcom 2704N
Re: Unlocking the potential of Sagemcom 2704N
17-04-2015 10:57 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I would recommend to keep the DHCP server on the Draytek though, switching it off on the 2704N. This will keep the things simple. When sending DHCP offer to the client, 2704N sets itself as default gateway and DNS server, and I haven't yet found a way to make it work differently. So if you have Draytek serving the Internet connection, it would make sense to keep DHCP on it.
Darsh
Re: Unlocking the potential of Sagemcom 2704N
17-04-2015 11:04 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Unlocking the potential of Sagemcom 2704N
19-04-2015 11:22 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Also applied Matty's v3-A firmware and apart from me taking a while to realise the password changed to admin that was a breeze too.
Thanks again to both of you for all your efforts.
Re: Unlocking the potential of Sagemcom 2704N
21-04-2015 1:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
#!/bin/sh
# Router PPPoA interface traffic stats for MRTG
cd /stats/mrtg
curl -s --cookie cookies.txt http://192.168.1.254/statswan.cmd > statswan.html
grep -Fq "Login Required" statswan.html
if [ $? -eq 0 ]; then
curl -s --data "loginuser=admin&loginpasswd=<password>" --cookie-jar cookies.txt http://192.168.1.254/plusnetlogin.cgi > /dev/null
curl -s --cookie cookies.txt http://192.168.1.254/statswan.cmd > statswan.html
fi
xmllint --html --xpath '//tr[last()]/td[position()=3]/text()' statswan.html 2> /dev/null
echo
xmllint --html --xpath '//tr[last()]/td[position()=7]/text()' statswan.html 2> /dev/null
echo
rm statswan.html
#!/bin/sh
# Router ADSL sync rate stats for MRTG
cd /stats/mrtg
curl -s --cookie cookies.txt http://192.168.1.254/statsadsl.html > statsadsl.html
grep -Fq "Login Required" statsadsl.html
if [ $? -eq 0 ]; then
curl -s --data "loginuser=admin&loginpasswd=<password>" --cookie-jar cookies.txt http://192.168.1.254/plusnetlogin.cgi > /dev/null
curl -s --cookie cookies.txt http://192.168.1.254/statsadsl.html > statsadsl.html
fi
xmllint --html --xpath '//tr[position()=16]/td[position()=2]/text()' statsadsl.html 2> /dev/null
echo
xmllint --html --xpath '//tr[position()=16]/td[position()=3]/text()' statsadsl.html 2> /dev/null
echo
rm statsadsl.html
Next optimisation would be to avoid writing html pages to the disk. Will think about it.
Darsh
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 2:43 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Bob Would anybody care to share a screen grab?
Hello, I've attached a few screen shots.....
The last one where I list the web pages..... most dont work, because of compile-time limitations..... but I thought I'll add them anyway for the experimenters.
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 2:47 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: 11110_110 Is it possible to view firewall logs with the stock firmware by any chance.
Try http://192.168.1.254/logintro.html >> http://192.168.1.254/logview.cmd. ; No guarantee
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 6:05 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: grm Also applied Matty's v3-A firmware ........ ........ that was a breeze too.
Excellent, I've had no problems so far.
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 6:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Matty123123
Quote from: 11110_110 Is it possible to view firewall logs with the stock firmware by any chance.
Try http://192.168.1.254/logintro.html >> http://192.168.1.254/logview.cmd. No guarantee
No that just says your not allowed, thanks anyway.
I did try the following without success as yet, uploading the config with the lines shown below added to the bottom with no gaps, but that just stopped me gaining access to the router for some reason, I guess I must of done something wrong.
Quote from: 11110_110 Cheers Darsh, I'll have a mooch at adding ssh as well then.
[tt]<InternetGatewayDevice>
<X_BROADCOM_COM_AppCfg>
<SshdCfg>
<NetworkAccess>LAN</NetworkAccess>
</SshdCfg>
</X_BROADCOM_COM_AppCfg>
<SshControl>
<Enable>TRUE</Enable>
<UserName>username-here</UserName>
<Password>password-here</Password>
</SshControl>
</InternetGatewayDevice>[/tt]
[tt]<DslCpeConfig version="3.0">
<InternetGatewayDevice>
<X_BROADCOM_COM_SyslogCfg>
<Status>Enabled</Status>
<Option>local buffer</Option>
<LocalDisplayLevel>Error</LocalDisplayLevel>
<LocalLogLevel>Debug</LocalLogLevel>
</X_BROADCOM_COM_SyslogCfg>
</InternetGatewayDevice>
</DslCpeConfig>[/tt]
Quote from: Darsh
Quote from: Matty123123 Connect to fe80::XXXX:XXff:feXX:XXXX, where the X's are the routers MAC Address. ( I Hope )
Almost the MAC address. IPv6 link-local addresses are formed according to EUI-64, where the seventh bit of the MAC address is inverted, resulting in the first octet of the MAC address to either increase (usually) or decrease by two.
Example: MAC 0012.7feb.6b40 will produce IPv6 link-local address fe80::0212:7fff:feeb:6b40.
More info here: http://packetlife.net/blog/2008/aug/4/eui-64-ipv6/
For connecting from Linux, you need to specify the local interface you are connecting from, as link-local addresses are not meant for normal traffic use. The syntax is (with the above address and eth0 as local interface): "ssh -l <username> fe80::0212:7fff:feeb:6b40%eth0".
UPD0: Wow! It works!
UPD1: Matt, from examining the router internals dumpsysinfo command looks much more interesting than dumpmdm. 🙂
UPD2: Found a hidden iptables command, which should allow to change the firewall settings.
UPD3: And hidden sh command brings you directly to the BusyBox shell. Ah! Finally! 🙂
UPD4: Eh, pity - no snmpd anywhere 😞
Darsh
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 7:11 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: 11110_110 uploading the config with the lines shown below added to the bottom with no gaps
hmmm, that might be problem - if I've understood you right.
You need to intergrate those (easy to read) snippets into your current config.
E.G. current Config
<?xml version="1.0"?>
<DslCpeConfig version="3.0">
<InternetGatewayDevice>
<LANDeviceNumberOfEntries>1</LANDeviceNumberOfEntries>
<WANDeviceNumberOfEntries>1</WANDeviceNumberOfEntries>
<DeviceInfo>
<ManufacturerOUI>001556</ManufacturerOUI>
<ProductClass>Plusnet F@ST 2704N ADSL</ProductClass>
<FirstUseDate>0001-01-01T00:00:00Z</FirstUseDate>
<VendorConfigFileNumberOfEntries>0</VendorConfigFileNumberOfEntries>
</DeviceInfo>
<X_BROADCOM_COM_AppCfg>
<DnsProxyCfg>
<DeviceDomainName>lan</DeviceDomainName>
<DeviceHostName>dsldevice</DeviceHostName>
</DnsProxyCfg>
</X_BROADCOM_COM_AppCfg>
<X_BROADCOM_COM_EthernetSwitch>
<NumberOfVirtualPorts>4</NumberOfVirtualPorts>
<EnableVirtualPorts>TRUE</EnableVirtualPorts>
<IfName>NULL</IfName>
</X_BROADCOM_COM_EthernetSwitch>
Into:
<?xml version="1.0"?>
<DslCpeConfig version="3.0">
<InternetGatewayDevice>
<LANDeviceNumberOfEntries>1</LANDeviceNumberOfEntries>
<WANDeviceNumberOfEntries>1</WANDeviceNumberOfEntries>
<DeviceInfo>
<ManufacturerOUI>001556</ManufacturerOUI>
<ProductClass>Plusnet F@ST 2704N ADSL</ProductClass>
<FirstUseDate>0001-01-01T00:00:00Z</FirstUseDate>
<VendorConfigFileNumberOfEntries>0</VendorConfigFileNumberOfEntries>
</DeviceInfo>
<X_BROADCOM_COM_AppCfg>
<DnsProxyCfg>
<DeviceDomainName>lan</DeviceDomainName>
<DeviceHostName>dsldevice</DeviceHostName>
</DnsProxyCfg>
<SshdCfg>
<NetworkAccess>LAN</NetworkAccess>
</SshdCfg>
</X_BROADCOM_COM_AppCfg>
<SshControl>
<Enable>TRUE</Enable>
<UserName>username-here</UserName>
<Password>password-here</Password>
</SshControl>
<X_BROADCOM_COM_SyslogCfg>
<Status>Enabled</Status>
<Option>local buffer</Option>
<LocalDisplayLevel>Error</LocalDisplayLevel>
<LocalLogLevel>Debug</LocalLogLevel>
</X_BROADCOM_COM_SyslogCfg>
<X_BROADCOM_COM_EthernetSwitch>
<NumberOfVirtualPorts>4</NumberOfVirtualPorts>
<EnableVirtualPorts>TRUE</EnableVirtualPorts>
<IfName>NULL</IfName>
</X_BROADCOM_COM_EthernetSwitch>
Luckily Gaps and Leading spaces does not make a difference.
I wonder.... would people like a little program to (sort-of) easily adjust the config ?
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 7:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I think a little program to put it all together would be a brilliant idea
I only use Linux and OSX here.
Cheers Matty123123.
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 8:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 9:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: 11110_110
Quote from: Matty123123
Quote from: 11110_110 Is it possible to view firewall logs with the stock firmware by any chance.
Try http://192.168.1.254/logintro.html >> http://192.168.1.254/logview.cmd. No guarantee
No that just says your not allowed, thanks anyway.
EDIT: just noticed you asked about stock firmware....
With mattys FW those links work fo me:
System Log
Date/Time Facility Severity Message
Jan 5 10:56:54 syslog emerg syslogd started: BusyBox v1.17.2
Jan 5 10:56:54 daemon crit kernel: eth2 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link DOWN.
Jan 5 10:56:54 daemon crit kernel: eth0 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link DOWN.
Jan 5 10:56:54 daemon crit kernel: eth0 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link DOWN.
Jan 5 10:56:54 daemon crit kernel: eth0 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link DOWN.
Jan 5 10:56:54 daemon crit kernel: eth0 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link DOWN.
Jan 5 10:56:54 daemon crit kernel: eth0 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link DOWN.
Jan 5 10:56:54 daemon crit kernel: eth0 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link DOWN.
Jan 5 10:56:54 daemon crit kernel: eth0 Link UP 100 mbps full duplex
Jan 5 10:56:54 daemon crit kernel: eth0 Link DOWN.
(only using it as an AP so wouldn't expect any firewall entries)
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 10:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
samsung 850evo 250gig , WD black 2 TB . Asus Phoebus sound ,
16 gig Avexir ram 2400 , water cooling Corsair H100i gtx ,
Corsair 750HXI Psu , Phanteks Enthoo pro case .
Re: Unlocking the potential of Sagemcom 2704N
23-04-2015 11:32 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
http://stackoverflow.com/questions/14878706/merge-xml-files-with-nested-elements-without-external-li...
As its using Python, it has the possibility to work across all OSes.
Copy-n-Paste it into e.g. combiner.py (ignoring the line print '-'*20 at the bottom)
So, assuming your main-text-config is "sample1.xml"
and this is "sample2.xml"
[code=sample2.xml]<DslCpeConfig version="3.0">
<InternetGatewayDevice>
<X_BROADCOM_COM_AppCfg>
<SshdCfg>
<NetworkAccess>LAN</NetworkAccess>
</SshdCfg>
</X_BROADCOM_COM_AppCfg>
<SshControl>
<Enable>TRUE</Enable>
<UserName>username-here</UserName>
<Password>password-here</Password>
</SshControl>
<X_BROADCOM_COM_SyslogCfg>
<Status>Enabled</Status>
<Option>local buffer</Option>
<LocalDisplayLevel>Error</LocalDisplayLevel>
<LocalLogLevel>Debug</LocalLogLevel>
</X_BROADCOM_COM_SyslogCfg>
</InternetGatewayDevice>
</DslCpeConfig>
[/code]
$ python combiner.py > new-config.conf
This method requires a full hierarchical tree defined. In a previous post I purposely omitted the <DslCpeConfig version="3.0"> and <InternetGatewayDevice> which I should not have done that ! sorry.
I thought it would be easy to find a quick program I tried about a dozen "XML Mergers" and none of them worked correctly ! wow
EDIT:
Thanks to 11110_110, he pointed out that this line:
"<?xml version="1.0"?>"
Is missing fromt he top of the config. So you need to add it manually or add it as a print option in the python script.
Cheers.
Re: Unlocking the potential of Sagemcom 2704N
24-04-2015 12:31 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: rongtw As a matter of interest How come PN dont release an update for the router ?? with this added
I think thats a good question, I'll try to give a reason why ""I think"" they have not...
The software started out as a full software (with dect/phone option). How-ever I can see they have really cut down to save power. But they have also cut down on the amount of Flash & RAM it has, because of some managment guy.
Everyone like the idea of firewall this-n-that. But in theory they dont need to add it in, because of the firewall option when you log-into your account (which has its own issues)
so, they removed that part of the config - so they can reduce the space used. By this act alone, it will cut down the config size.
If you have a look at the stock firmware, where the menu items are in http://192.168.1.254/menuBcm.js ; guys called guxr,chengjianwei,Chen,Manju have marked lots of options as 'bugs' which are blocking menu options. The bugs are numbered, but the numbers appear to be referencing an internal ticketing system, but I believe has nothing to do with plusnet.?
Once a bug, its probably not going to go back!, because there is always another customer to have a problem of "Deleting the WAN interface" and demanding its plusnets fault.
Also I think they have disabled the serial port interface.... because when the aDSL is active. the responce time is soo slow it is really struggling to keep up with any command you type.
They have possibly another bug with the compressing of the config correctly. So removing more options keeps it down. The change I made to get round this works fine. But its not technically by-there-book. (My book is fine)
Ooooh, that felt good saying that
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: Unlocking the potential of Sagemcom 2704N