Sunteți pe pagina 1din 6

Command Line Interface

======================

1. Run cmd

2. Telnet 192.168.1.1/router address

3. Username = root(always)

Pass = admin/router password

4. Commands = cd -> change direction

mkdir -> make folder

dmesg -> dmesg |grep usb

nvram -> nvram show |grep wan

ifconfig -> interface

ip rule

ip route

route -n

iptables -L

How to enable JFFS

==================

> Web GUI:

----------

1. On the router web page click on Administration.

2. Scroll down until you see JFFS2 Support section.

3. Click Enable JFFS.

4. Click Save.

5. Wait couple seconds, then click Apply.

6. Wait again. Go back to the Enable JFFS section, and enable Clean JFFS.

7. Do not click "Save". Click Apply instead.


The router formats the available space.

8. Wait till you get the web-GUI back, then disable "Clean JFFS" again.

9. Click "Save".

10.It may be wise to Reboot the router, just to make sure.

> Commands from CLI:

--------------------

nvram set jffs_mounted=1

nvram set enable_jffs2=1

nvram set sys_enable_jffs2=1

nvram set clean_jffs2=1

nvram set sys_clean_jffs2=1

nvram commit

reboot

to unmount

nvram set sys_enable_jffs2=0

nvram set sys_clean_jffs2=0

nvram set jffs_mounted=0

nvram commit

reboot

Vlans

=====

> Explanation:

--------------

nvram show |grep vlans


nvram show |grep ports

If you've ever pressed the save or apply buttons on the VLANs GUI page

then you'll also see 18 and 19 in the values for port[0-4]vlans.

The numbers mean the following:

0 = VLAN 0 is checked

1 = VLAN 1 is checked

...

15 = VLAN 15 is checked

16 = Tagged is checked

17 = Auto-Negotiate is unchecked

18 = 100 Mbit is unchecked or greyed because Auto-Negotiate is checked

19 = Full-Duplex is unchecked or greyed because Auto-Negotiate is checked

20 = Enabled is unchecked.

The port5vlans is a bit odd.

It corresponds to the internal port regardless of whether you have 100mbit or


gigabit ports.

ie. gigabit models do not have a port8vlans variable.

It is also essential to set it correctly if you are enabling additional VLAN's.

It must be set to include every active VLAN and be tagged.

> Settings:

-----------

nvram set port5vlans="1 2 3 16"

nvram set port4vlans="3 18 19"

nvram set vlan1ports="4 3 2 8*"

nvram set vlan3ports="1 8"

nvram set vlan3hwname=et0


nvram commit

reboot

nvram show |grep vlans

port5vlans=1 2 3 16

port3vlans=1 18 19

ping_ip=nvram show |grep vlans

port1vlans=1 18 19

port4vlans=3 18 19

vlans=1

port2vlans=1 18 19

port0vlans=2 18 19

nvram show |grep ports

vlan2ports=0 8

vlan0ports=1 2 3 4 5*

ping_ip=nvram show |grep ports

wshaper_noprioportsrc=

vlan3ports=1 8

vlan1ports=4 3 2 8*

Storing dualwan scripts

=======================

> Make scripts folder:

----------------------

mkdir /jffs/scripts

> Copy file using WinSCP:


-------------------------

1. Enable Secure Shell/SSH in the Web administration ->services page.

2. Download WinSCP and install it.

3. Launch the program. Under Session, enter:

Host name: Router's IP address

User name: Always 'root'. Even if you have changed the username for the web
interface.

Password: router password

Optional: Private key file: Only if you are using private/public key authentication,

instead of the router username/password. See Public Key authentication

File Protocol: SCP, not SFTP

4. You can save the session now for later use.

5. When connecting there is a 'command 'groups' ' error and possibly a 'pwd'
error.

Ignore these.

6. Then the window appears of the file manager.

Local content is on the left, router content on the right.

7. Copy/Drag script files (udhcpc-wan2.script, routes.firewall, firewall.firewall)

from windows to /jffs/scripts

8. Optional Copy iptables file from windows to /jffs

Execute dualwan scripts

=======================

1. Open and re-save (try space and backspace) each stored script files. Ignore
error messages

2. chmod 755 /jffs/iptables

chmod 755 /jffs/scripts/*

* udhcpc-wan2.script, routes.firewall, firewall.firewall

3. nvram set rc_startup='udhcpc -s /jffs/scripts/udhcpc-wan2.script -i vlan3'


nvram set rc_firewall='/jffs/scripts/routes.firewall

/jffs/scripts/firewall.firewall'

or using web GUI in administration -> commands page. Type:

udhcpc -s /jffs/scripts/udhcpc-wan2.script -i vlan3 -> save startup

/jffs/scripts/routes.firewall

/jffs/scripts/firewall.firewall

save firewall

4. nvram commit

5. reboot

6. check ip route, default should be changed

S-ar putea să vă placă și