Nighthawk X10 (R9000)

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3 ... 51, 52, 53
Author Message
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 4836
Location: Texas

PostPosted: Tue Feb 12, 2019 11:52    Post subject: Re: Want Factory Firmware back! Reply with quote
Arnesen Buddy wrote:
Does anyone know how to come back to Factory Firmware?
Thank You!

Did you do read this---
http://www.desipro.de/ddwrt/K4-AC-ALPINE/Readme

and use this ---
http://www.desipro.de/ddwrt/K4-AC-ALPINE/NetgearFW/ Question Question Question
Sponsor
Arnesen Buddy
DD-WRT Novice


Joined: 12 Feb 2019
Posts: 4

PostPosted: Tue Feb 12, 2019 14:50    Post subject: Re: Want Factory Firmware back! Reply with quote
mrjcd wrote:
Arnesen Buddy wrote:
Does anyone know how to come back to Factory Firmware?
Thank You!

Did you do read this---
http://www.desipro.de/ddwrt/K4-AC-ALPINE/Readme

and use this ---
http://www.desipro.de/ddwrt/K4-AC-ALPINE/NetgearFW/ Question Question Question


Thank you so much!!!!!!!!!!!!!!!!!!!
It really helped me out.
gomfedj
DD-WRT Novice


Joined: 16 Sep 2013
Posts: 20

PostPosted: Sun Feb 17, 2019 18:32    Post subject: R9000 - wifi issue Reply with quote
Greetings,

I recently upgraded to a CM1150V and a week later to a R9000 netgear router with Kongs 38100m firmware (was previously running a AC68R with a DD-wrt Kong build form a year and a half ago). I have noticed something odd happening however and I can't seem to solve it.

After a wifi device is connected for ~ 24 hours or so, it gets into a weird situation where it shows connected, but when i try to go to any website it says i am connected to a "unsecured" location (every website turns to HTTPS from HTTP) and it tells me i need to "login" to get a secure connection, if i hit that button it redirects me to the activate page for my comcast device as if i needed to reauthorize my cable "modem" with comcast.

A disconnect/reconnect on the wifi for PC(s) clears up the issue, however on two samsung S8's the only way to clear it is a reboot of the phones.

I don't believe this is an issue with the CM1150V, because the hard wired devices work just fine. I suspect i have something set wrong on my new R9000 but not sure what, any suggestions would be appreciated, thank you.


******
Quick Edit, had my first wired PC show this same behavior, so I am moving away from suspecting the R9000/DD-WRT, just surprised it worked for 4 or so days on the AC-68R and then suddenly started this oddness after upgrading the router.

reactivated the modem again via the web portal will see if this clears it up.


Last edited by gomfedj on Sun Feb 17, 2019 19:37; edited 1 time in total
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 5196
Location: Akershus, Norway

PostPosted: Sun Feb 17, 2019 18:56    Post subject: Reply with quote
I don't know your ISP, but I have seen this behaviour when you configure a 3. party DNS server instead of your ISP's DNS. The DNS lookup is part of the authentication process.
gomfedj
DD-WRT Novice


Joined: 16 Sep 2013
Posts: 20

PostPosted: Sun Feb 17, 2019 19:38    Post subject: Reply with quote
Per Yngve Berg wrote:
I don't know your ISP, but I have seen this behaviour when you configure a 3. party DNS server instead of your ISP's DNS. The DNS lookup is part of the authentication process.


Interesting i do use internal DNS servers (run a win domain) that then refer too googles DNS servers for all non internal queries.

I was doing that previously but perhaps comcast changed something, they are my ISP
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 5196
Location: Akershus, Norway

PostPosted: Sun Feb 17, 2019 20:54    Post subject: Reply with quote
Have you enabled PPPoE on the modem?

Can you set it in bridge mode?

Otherwise set your internal DNS server to use the modem as upstream server.
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 569
Location: Illinois

PostPosted: Sun Feb 17, 2019 21:45    Post subject: Reply with quote
Per Yngve Berg wrote:
Have you enabled PPPoE on the modem?

Can you set it in bridge mode?

Otherwise set your internal DNS server to use the modem as upstream server.


PPPoE is used for DSL lines; as best I know...
gomfedj is using a cable modem; which means it's already a bridge device. The only extra feature of this modem is that it handles VOIP from the ISP.

@gomfedj: This modem does support Link Aggregation (LAG) for 2gig+ service. I believe by default anything up to 1gig will use Port 1, speeds beyond that will require you to do LAG.

My guess is that you need to add some commands to the services>DNSMASQ>Additional Dnsmasq Options section to make sure you're setting the DNS servers correctly if you have the DNSMASQ option turned on under Setup>Basic Setup>Network Address Server Settings (DHCP) section.
Make sure to also add the DNS servers in Setup>Network Address Server Settings (DHCP) section and use all three; if you only spec 2, the third one will become your ISP DNS.

Use these commands under the services tab. As best I know the last server in the list is the first to be used when you use these lines(edit the DNS servers to your choice, these are the one's I use):

Code:

domain-needed
bogus-priv
no-resolv
server=1.1.1.1
server=149.112.112.112
server=9.9.9.9
no-negcache

_________________
[r9000]BS 41477alpha (Main Router)
[EA8500]Kong 40270M (Offsite)
[R7800]taking a nap
[WDR3600]BS 36808 (Offsite)


TIPS/TRICKS:

Best QCA Wifi settings to use|Latency tricks|QoS Port priority||NEVER USE MU-MIO

Why to NOT use MU-MIMO||Max Wifi Pwr by Country||MCS Index Speeds||Correct QCA 5Ghz chnls to use||WIFI Chnl Freq WIKI


Last edited by msoengineer on Fri Aug 02, 2019 13:37; edited 1 time in total
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 569
Location: Illinois

PostPosted: Tue Jun 04, 2019 18:33    Post subject: Messing around with Cores and IRQ's Reply with quote
I've been wanting to play around with moving around some IRQ's to different CPU cores for testing latency/throughput purposes.

Here are my findings so far...
There is no ETH0 interface. It appears BS has split up the ETH0 interface to "load balance" across all 4 cores of the CPU. The R9000 has 2 switches inside and the WAN is VLAN'd to the remaining ports...based on BS's comments back around page 5 and 8 of this particular thread. You'll see the funky labeling for the TX and RX ports...

This is what I see under cat /proc/interrupts:
Code:
root@DD-WRT:~# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
 17:          0          0          0          0     GICv2  29 Level     arch_timer
 18:       5401       3658       3865       3085     GICv2  30 Level     arch_timer
 21:          0          0          0          0     GICv2  42 Level     timer
161:       1368          0          0          0     GICv2  53 Level     fd880000.i2c-pld
168:        522          0          0          0     GICv2  49 Level     serial
170:      24645          0          0          0     GICv2  33 Level     al-nand
220:          0          0          0          0      MSIx 134217728 Edge      aerdrv, PCIe PME
224:          0          0          0          0      MSIx 268435456 Edge      aerdrv, PCIe PME
225:          0          0          0          0      MSIx 402653184 Edge      aerdrv, PCIe PME
226:          0          0          0          0      MSIx 81923 Edge      al-dma-comp-0@pci:0000:00:05.0
227:          0          0          0          0      MSIx 81924 Edge      al-dma-comp-1@pci:0000:00:05.0
228:          0          0          0          0      MSIx 81925 Edge      al-dma-comp-2@pci:0000:00:05.0
229:          0          0          0          0      MSIx 81926 Edge      al-dma-comp-3@pci:0000:00:05.0
230:          0          0          0          0      MSIx 67587 Edge      al-crypto-comp-0@pci:0000:00:04.1
231:          0          0          0          0      MSIx 67588 Edge      al-crypto-comp-1@pci:0000:00:04.1
232:          0          0          0          0      MSIx 67589 Edge      al-crypto-comp-2@pci:0000:00:04.1
233:          0          0          0          0      MSIx 67590 Edge      al-crypto-comp-3@pci:0000:00:04.1
234:          0          0          0          0      MSIx 67586 Edge      al-crypto-interrupt-group-d@pci:0000:00
235:          0          0          0          0      MSIx 65539 Edge      al-crypto-comp-0@pci:0000:00:04.0
236:          0          0          0          0      MSIx 65540 Edge      al-crypto-comp-1@pci:0000:00:04.0
237:          0          0          0          0      MSIx 65541 Edge      al-crypto-comp-2@pci:0000:00:04.0
238:          0          0          0          0      MSIx 65542 Edge      al-crypto-comp-3@pci:0000:00:04.0
239:          0          0          0          0      MSIx 65538 Edge      al-crypto-interrupt-group-d@pci:0000:00
240:        552          0      16461          0      MSIx 135790592 Edge      ath10k_pci
241:        300          0          0      13766      MSIx 136314880 Edge      ath10k_pci
242:          0          0          0          0      MSIx 403177472 Edge      wil6210
243:          0          0          0          0      MSIx 16386 Edge      al-eth-msix-mgmt@pci:0000:00:01.0
244:       1982          0          0          0      MSIx 16387 Edge      al-eth-rx-comp-0@pci:0000:00:01.0
245:          0       2631          0          0      MSIx 16388 Edge      al-eth-rx-comp-1@pci:0000:00:01.0
246:          0          0       2027          0      MSIx 16389 Edge      al-eth-rx-comp-2@pci:0000:00:01.0
247:          0          0          0       2784      MSIx 16390 Edge      al-eth-rx-comp-3@pci:0000:00:01.0
248:       1371          0          0          0      MSIx 16391 Edge      al-eth-tx-comp-0@pci:0000:00:01.0
249:          0       1177          0          0      MSIx 16392 Edge      al-eth-tx-comp-1@pci:0000:00:01.0
250:          0          0       1332          0      MSIx 16393 Edge      al-eth-tx-comp-2@pci:0000:00:01.0
251:          0          0          0       1158      MSIx 16394 Edge      al-eth-tx-comp-3@pci:0000:00:01.0
252:          0          0          0          0      MSIx 49154 Edge      al-eth-msix-mgmt@pci:0000:00:03.0
253:        298          0          0          0      MSIx 49155 Edge      al-eth-rx-comp-0@pci:0000:00:03.0
254:          0        320          0          0      MSIx 49156 Edge      al-eth-rx-comp-1@pci:0000:00:03.0
255:          0          0        507          0      MSIx 49157 Edge      al-eth-rx-comp-2@pci:0000:00:03.0
256:          0          0          0        542      MSIx 49158 Edge      al-eth-rx-comp-3@pci:0000:00:03.0
257:        523          0          0          0      MSIx 49159 Edge      al-eth-tx-comp-0@pci:0000:00:03.0
258:        333          0          0          0      MSIx 49160 Edge      al-eth-tx-comp-1@pci:0000:00:03.0
259:          0        737          0          0      MSIx 49161 Edge      al-eth-tx-comp-2@pci:0000:00:03.0
260:          0          0          0        508      MSIx 49162 Edge      al-eth-tx-comp-3@pci:0000:00:03.0
IPI0:         0          1          0          0       CPU wakeup interrupts
IPI1:         0          0          0          0       Timer broadcast interrupts
IPI2:      2350       5878       3767       6549       Rescheduling interrupts
IPI3:      7134       1651        997       2724       Function call interrupts
IPI4:         0          0          0          0       CPU stop interrupts
IPI5:         0          0          0          0       IRQ work interrupts
IPI6:         0          0          0          0       completion interrupts
Err:          0



By Default, all three wifi's sit on Core 0.

Echo 1= Core 0
Echo 2= Core 1
Echo 4= Core 2
Echo 8= Core 3

I have moved IRQ 240 (I assume this is the 5ghz radio) to Echo 4 (Core 2) and IRQ 241 (I assume this is the 2.4ghz radio) to Echo 8 (Core 3).

Will see how she runs...

EDIT, looking at the above output, it also looks like BS hard coded IRQ 258 and 259 to the wrong cpu cores.

As a result, this is what I am running in my startup command right now:
Code:
echo 4 > /proc/irq/240/smp_affinity
echo 8 > /proc/irq/241/smp_affinity
echo 2 > /proc/irq/258/smp_affinity
echo 4 > /proc/irq/259/smp_affinity


Code:
root@DD-WRT:~# lspci
0000:00:00.0 Ethernet controller: Annapurna Labs Ltd. SFP+ 10G Ethernet Adapter (rev 01)
0000:00:01.0 Ethernet controller: Annapurna Labs Ltd. Gigabit Ethernet Adapter (rev 01)
0000:00:03.0 Ethernet controller: Annapurna Labs Ltd. Gigabit Ethernet Adapter (rev 01)
0000:00:04.0 Network and computing encryption device: Annapurna Labs Ltd. Device 0011 (rev 01)
0000:00:04.1 Network and computing encryption device: Annapurna Labs Ltd. Device 8011 (rev 01)
0000:00:05.0 System peripheral: Annapurna Labs Ltd. Device 0021 (rev 01)
0000:00:05.1 System peripheral: Annapurna Labs Ltd. Device 8021 (rev 01)
0001:00:00.0 PCI bridge: Annapurna Labs Ltd. Device 0031 (rev 01)
0001:01:00.0 PCI bridge: ASMedia Technology Inc. Device 1182
0001:02:03.0 PCI bridge: ASMedia Technology Inc. Device 1182
0001:02:07.0 PCI bridge: ASMedia Technology Inc. Device 1182
0001:03:00.0 Network controller: Qualcomm Atheros QCA9984 802.11ac Wave 2 Wireless Network Adapter
0001:04:00.0 Network controller: Qualcomm Atheros QCA9984 802.11ac Wave 2 Wireless Network Adapter
0002:00:00.0 PCI bridge: Annapurna Labs Ltd. Device 0031 (rev 01)
0002:01:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
0003:00:00.0 PCI bridge: Annapurna Labs Ltd. Device 0031 (rev 01)
0003:01:00.0 Network controller: Wilocity Ltd. Wil6200 802.11ad Wireless Network Adapter (rev 02)


_________________
[r9000]BS 41477alpha (Main Router)
[EA8500]Kong 40270M (Offsite)
[R7800]taking a nap
[WDR3600]BS 36808 (Offsite)


TIPS/TRICKS:

Best QCA Wifi settings to use|Latency tricks|QoS Port priority||NEVER USE MU-MIO

Why to NOT use MU-MIMO||Max Wifi Pwr by Country||MCS Index Speeds||Correct QCA 5Ghz chnls to use||WIFI Chnl Freq WIKI
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 569
Location: Illinois

PostPosted: Wed Jun 05, 2019 16:25    Post subject: Reply with quote
Ok, Took the plunge...

Before setting/locking the cores:
Wifi: https://www.dslreports.com/speedtest/50511583
LAN: https://www.dslreports.com/speedtest/49997096

After running the code below:
Wifi: https://www.dslreports.com/speedtest/50512405
Lan: https://www.dslreports.com/speedtest/50513055
(This code fixed my shittastic LAN performance I've been bitching about since I bought the R9000 over a year ago!)

Code:
echo 4 > /proc/irq/240/smp_affinity
echo 8 > /proc/irq/241/smp_affinity

echo 1 > /proc/irq/252/smp_affinity
echo 1 > /proc/irq/253/smp_affinity
echo 1 > /proc/irq/254/smp_affinity
echo 1 > /proc/irq/255/smp_affinity
echo 1 > /proc/irq/256/smp_affinity
echo 1 > /proc/irq/257/smp_affinity
echo 1 > /proc/irq/258/smp_affinity
echo 1 > /proc/irq/259/smp_affinity
echo 1 > /proc/irq/260/smp_affinity

echo 2 > /proc/irq/243/smp_affinity
echo 2 > /proc/irq/244/smp_affinity
echo 2 > /proc/irq/245/smp_affinity
echo 2 > /proc/irq/246/smp_affinity
echo 2 > /proc/irq/247/smp_affinity
echo 2 > /proc/irq/248/smp_affinity
echo 2 > /proc/irq/249/smp_affinity
echo 2 > /proc/irq/250/smp_affinity
echo 2 > /proc/irq/251/smp_affinity


She runs fine with the above code.
When BS releases 39953+ The first two code lines can go away. (IRQ 240 & 241)

The above code puts Wan on Core 0, Lan on Core 1, 5ghz on Core 2, and 2.4ghz on Core 3. I am not using 802.11AD and so I assume the default is that it's on Core 0. It shouldn't affect anything.

The default code is that WAN and Lan are "balanced" across the 4 cores, but when you look at cat /proc/interrupts you will see that there is a slight imbalance between cores.

I'll let her run with the above code until BS pushes out the next build and report back. I don't imagine any issues.

EDIT
So, as of build 39957 you don't need to do any of the above. BS implemented the changes as of build 39957+

_________________
[r9000]BS 41477alpha (Main Router)
[EA8500]Kong 40270M (Offsite)
[R7800]taking a nap
[WDR3600]BS 36808 (Offsite)


TIPS/TRICKS:

Best QCA Wifi settings to use|Latency tricks|QoS Port priority||NEVER USE MU-MIO

Why to NOT use MU-MIMO||Max Wifi Pwr by Country||MCS Index Speeds||Correct QCA 5Ghz chnls to use||WIFI Chnl Freq WIKI
sensei73
DD-WRT Novice


Joined: 14 Oct 2019
Posts: 5

PostPosted: Mon Oct 14, 2019 19:36    Post subject: Reply with quote
Please as I have no success to connect dd-wrt with my isp, I want to revert back to stock firmware but

http://www.desipro.de/ddwrt/K4-AC-ALPINE/NetgearFW/ddwrt-to-netgear-R9000.bin

is unavailable. Could someone repost it. Thanks
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 569
Location: Illinois

PostPosted: Mon Oct 14, 2019 19:47    Post subject: Reply with quote
sensei73 wrote:
Please as I have no success to connect dd-wrt with my isp, I want to revert back to stock firmware but

http://www.desipro.de/ddwrt/K4-AC-ALPINE/NetgearFW/ddwrt-to-netgear-R9000.bin

is unavailable. Could someone repost it. Thanks


You don't need that file.

Go and get whichever Netgear firmware date/version you want on the R9000, put the R9000 into TFTP mode, and then TFTP the Netgear firmware back onto the R9000. It's not that hard to do. Maybe adds 2 minutes of total time.

To get the R9000 in TFTP mode:
1-Turn off router
2-Hold down the reset button
3-Power on the router and continue holding the reset button
4-The power LED will switch from slow flashes to rapid flashes; when that happens, the R9000 is in TFTP mode.
5-"put" the new IMG file onto the R9000.
6-Wait till TFTP64 says you're done and wait another few minutes. The router should reboot by itself. if it doesn't...make sure you've waited about 6-8 minutes before power cycling the router.

That's it.

Netgear Firmware:
https://www.netgear.com/support/product/R9000.aspx#download

TFTP how to:
https://kb.netgear.com/000059633/How-to-upload-firmware-to-a-NETGEAR-router-using-TFTP-client

TFTP Software:
http://www.tftpd64.com/tftpd32_download.html

_________________
[r9000]BS 41477alpha (Main Router)
[EA8500]Kong 40270M (Offsite)
[R7800]taking a nap
[WDR3600]BS 36808 (Offsite)


TIPS/TRICKS:

Best QCA Wifi settings to use|Latency tricks|QoS Port priority||NEVER USE MU-MIO

Why to NOT use MU-MIMO||Max Wifi Pwr by Country||MCS Index Speeds||Correct QCA 5Ghz chnls to use||WIFI Chnl Freq WIKI


Last edited by msoengineer on Mon Oct 14, 2019 19:51; edited 1 time in total
sensei73
DD-WRT Novice


Joined: 14 Oct 2019
Posts: 5

PostPosted: Mon Oct 14, 2019 19:50    Post subject: Reply with quote
msoengineer wrote:
sensei73 wrote:
Please as I have no success to connect dd-wrt with my isp, I want to revert back to stock firmware but

http://www.desipro.de/ddwrt/K4-AC-ALPINE/NetgearFW/ddwrt-to-netgear-R9000.bin

is unavailable. Could someone repost it. Thanks


You don't need that file.

Go and get whichever Netgear firmware date/version you want on the R9000, put the R9000 into TFTP mode, and then TFTP the Netgear firmware back onto the R9000. It's not that hard to do. Maybe adds 2 minutes of total time.

Netgear Firmware:
https://www.netgear.com/support/product/R9000.aspx#download

TFTP how to:
https://kb.netgear.com/000059633/How-to-upload-firmware-to-a-NETGEAR-router-using-TFTP-client

TFTP Software:
http://www.tftpd64.com/tftpd32_download.html


Thanks
The only computer with a lan port is a nas with linux, I already tried but without success, tftp client doesn't connect to the router ip 192.168.1.1.
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 569
Location: Illinois

PostPosted: Mon Oct 14, 2019 20:01    Post subject: Reply with quote
sensei73 wrote:
msoengineer wrote:
sensei73 wrote:
Please as I have no success to connect dd-wrt with my isp, I want to revert back to stock firmware but

http://www.desipro.de/ddwrt/K4-AC-ALPINE/NetgearFW/ddwrt-to-netgear-R9000.bin

is unavailable. Could someone repost it. Thanks


You don't need that file.

Go and get whichever Netgear firmware date/version you want on the R9000, put the R9000 into TFTP mode, and then TFTP the Netgear firmware back onto the R9000. It's not that hard to do. Maybe adds 2 minutes of total time.

Netgear Firmware:
https://www.netgear.com/support/product/R9000.aspx#download

TFTP how to:
https://kb.netgear.com/000059633/How-to-upload-firmware-to-a-NETGEAR-router-using-TFTP-client

TFTP Software:
http://www.tftpd64.com/tftpd32_download.html


Thanks
The only computer with a lan port is a nas with linux, I already tried but without success, tftp client doesn't connect to the router ip 192.168.1.1.


You must be doing something wrong. I added a step by step how to put the router into TFTP; scroll back up. Make sure you static set IP of the linux box. If you follow all the directions it should work just fine.

_________________
[r9000]BS 41477alpha (Main Router)
[EA8500]Kong 40270M (Offsite)
[R7800]taking a nap
[WDR3600]BS 36808 (Offsite)


TIPS/TRICKS:

Best QCA Wifi settings to use|Latency tricks|QoS Port priority||NEVER USE MU-MIO

Why to NOT use MU-MIMO||Max Wifi Pwr by Country||MCS Index Speeds||Correct QCA 5Ghz chnls to use||WIFI Chnl Freq WIKI
sensei73
DD-WRT Novice


Joined: 14 Oct 2019
Posts: 5

PostPosted: Tue Oct 15, 2019 7:15    Post subject: Reply with quote
@msoengineer Thanks
I don't know, what I did wrong the first time. It worked really easily, in 30s it was done. Thanks
sensei73
DD-WRT Novice


Joined: 14 Oct 2019
Posts: 5

PostPosted: Tue Nov 12, 2019 9:28    Post subject: Reply with quote
Hi, I'm trying to make this script work for my R9000 to connect to my ISP but When I do the fallowing command, there is no switch...

cat /proc/switch/

The script:
Code:

### Version 21 20190310
### https://lafibre.info/remplacer-livebox/tuto-remplacer-la-livebox-par-un-routeur-dd-wrt-internet-tv/

### Informations utilisateur

# Identifiant de connexion, sur le contrat Orange
user=fti/abcdefg
# Mot de passe de connexion, sur le contrat Orange
pass=hijklmn
# Adresse MAC de la Livebox, sous la Livebox
maclivebox=01:23:45:67:89:AB
# Version de la Livebox, 3 ou 4
verlivebox=3
# Numero de serie de la Livebox, sous la Livebox
serlivebox=ABCDE0123456789
# Adresse MAC du/des decodeur(s) TV, sous le(s) decodeur(s) TV
macdecodeur=01:23:45:67:89:CD,01:23:45:67:89:EF
# Serveurs DNS1,DNS2 Orange, si DD-WRT en utilise d'autres
dnsorange=

### Detection type switch et interface / port WAN

wanif=$(nvram get wan_default | sed 's/^vlan[0-9][0-9]*$/eth0/; s/^$/eth0/')
wanvid=2
swconfswitch=$(swconfig list | awk '/^Found:/ {print $2; exit}')
if [[ "$swconfswitch" ]]
then
  if [[ "$(swconfig dev $swconfswitch get enable_vlan)" == "1" ]]
  then
    wanprt=$(swconfig dev $swconfswitch vlan $wanvid show |
      awk '$1=="ports:" {print substr($2,1,1)"t "substr($3,1,1)"t"}')
  fi
else
  wanprt=$(cat /proc/switch/$wanif/vlan/$wanvid/ports |
    awk '/\d/ {print substr($1,1,1)"t "substr($2,1,1)"t"}')
fi

### Debug

{
echo === DEBUG START ===
echo; echo === Router model
nvram get DD_BOARD
nvram get os_version
uname -a
echo; echo === before: swconfig
swconfig list
echo; echo === before: swconfig vlan config
swconfig dev $swconfswitch show
echo; echo === before: /proc number of vlans
ls -lR /proc/switch/*/vlan | wc -l
echo; echo === before: /proc/switch/
ls -l /proc/switch/
echo; echo === before: /proc vlan config
grep . /proc/switch/*/vlan/*/ports
echo; echo === before: wan_default
nvram get wan_default
echo; echo === detect: wanif $wanif
echo; echo === detect: wanprt $wanprt
} >>/tmp/debugorange.log 2>&1

### Options DHCP

tohex() {
for h in $(echo $1 | sed "s/\(.\)/\1 /g")
do
  printf "%02x$2" \'$h
done | sed "s/$2$//"
}
maclivebox=$(echo $maclivebox |  tr '[a-z]' '[A-Z]')
r=$(openssl rand -base64 12)
c=$(openssl rand -base64 1 | cut -c 1)
o60=sagem
o16=$o60
o61=01${maclivebox//:/}
o01=000300$o61
o77=+FSVDSL_livebox.Internet.softathome.Livebox$verlivebox
o15=${o77:1}
o90=00000000000000000000001a0900000558010341
o90=${o90}010d$(tohex $user)
o90=${o90}3c12$(tohex $r)
o90=${o90}0313$(tohex $c)$(printf $c$pass$r | md5sum | cut -c1-32)
o11=$o90
[[ "$(nvram get dhcpc_vendorclass)" != "$o60" ]] && reboot=1
nvram set dhcpc_vendorclass=$o60
[[ "$(nvram get dhcp_clientid)" != "$o61" ]] && reboot=1
nvram set dhcp_clientid=$o61
[[ "$(nvram get dhcp_userclass)" != "$o77" ]] && reboot=1
nvram set dhcp_userclass=$o77
[[ "$(nvram get dhcp_authentication)" == "" ]] && reboot=1
nvram set dhcp_authentication=$o90
[[ "$(nvram get dhcp6c_vendorclass)" != "$o16" ]] && reboot=1
nvram set dhcp6c_vendorclass=$o16
[[ "$(nvram get dhcp6c_clientid)" != "$o01" ]] && reboot=1
nvram set dhcp6c_clientid=$o01
[[ "$(nvram get dhcp6c_userclass)" != "$o15" ]] && reboot=1
nvram set dhcp6c_userclass=$o15
[[ "$(nvram get dhcp6c_authentication)" == "" ]] && reboot=1
nvram set dhcp6c_authentication=$o11

### VLAN 832 (Internet) sur le port WAN

if [[ "$wanprt" ]]
then
  if [[ "$swconfswitch" ]]
  then
    swconfig dev $swconfswitch vlan $wanvid set vid 832
    swconfig dev $swconfswitch vlan $wanvid set ports "$wanprt"
    swconfig dev $swconfswitch set apply
  else
    echo $wanprt >/proc/switch/$wanif/vlan/832/ports
    echo >/proc/switch/$wanif/vlan/$wanvid/ports
  fi
  brctl delif br0 vlan$wanvid
  vconfig rem vlan$wanvid
fi
brctl delif br0 $wanif

### Support TV, VLAN 840 sur le port WAN

if [[ "$wanprt" ]] && [[ "$macdecodeur" ]]
then
  if [[ "$swconfswitch" ]]
  then
    swconfig dev $swconfswitch vlan 3 set vid 840
    swconfig dev $swconfswitch vlan 3 set ports "$wanprt"
    swconfig dev $swconfswitch set apply
  else
    echo $wanprt >/proc/switch/$wanif/vlan/840/ports
  fi
fi

### Support TV, IGMPproxy

if [[ "$macdecodeur" ]]
then
  [[ "$(nvram get tvnicfrom)" != "$wanif.840" ]] && reboot=1
  nvram set tvnicfrom=$wanif.840
fi

### Support TV, options DHCP

if [[ "$macdecodeur" ]]
then
  f=/tmp/dnsmasq.livebox.conf
  if [[ "$dnsorange" ]]
  then
    echo dhcp-option=tag:decodeur,option:dns-server,$dnsorange >>$f
  fi
  if [[ "$serlivebox" ]]
  then
    serlivebox=$(echo $serlivebox |  tr '[a-z]' '[A-Z]')
    echo -n dhcp-option=tag:decodeur,125,00:00:0d:e9:24:
    echo -n 04:06:$(tohex ${maclivebox//:/} : | cut -c 1-17):
    echo -n 05:0f:$(tohex ${serlivebox} :):
    echo    06:09:$(tohex Livebox :):20:$(tohex $verlivebox)
  fi >>$f
  for mac in ${macdecodeur//,/ }
  do
    echo dhcp-host=$mac,set:decodeur >>$f
  done
  stopservice dnsmasq
  sleep 5
  startservice dnsmasq
fi

### Reboot

nvram commit
[[ "$reboot" == 1 ]] && reboot

### Debug

sleep 90
{
echo; echo === after: swconfig vlan config
swconfig dev $swconfswitch show
echo; echo === after: /proc vlan config
grep . /proc/switch/*/vlan/*/ports
echo; echo === after: vlan maps
cat /proc/net/vlan/$wanif.*
echo; echo === after: ifconfig
ifconfig -a | sed 's/\(inet6* addr:......\).*/\1.../'
echo; echo === after: bridge
brctl show br0
echo; echo === after: udhcpc
ps ww | grep udhcpc | grep -v grep | sed 's/\( -x 0x..:......\)[^ ]*/\1.../g'
echo; echo === after: dhcp6c
ps ww | grep dhcp6c | grep -v grep
echo; echo === after: dhcp6c config
cat /tmp/dhcp6c.conf | sed 's/\(send raw-option ......\).*/\1.../g'
echo; echo === after: dnsmasq
ps ww | grep dnsmasq | grep -v grep
echo; echo === after: igmprt
ps ww | grep igmprt | grep -v grep
echo; echo === after: igmprt config
cat /tmp/igmpproxy.conf
echo; echo === DEBUG END ===
} >>/tmp/debugorange.log 2>&1
Goto page Previous  1, 2, 3 ... 51, 52, 53 Display posts from previous:    Page 53 of 53
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum