смена Wan на Lan на tp-link wr1043 v1

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Оборудование на основе Atheros WiSOC
Author Message
stranger_roman
DD-WRT Novice


Joined: 04 Jun 2014
Posts: 1

PostPosted: Sat Jul 19, 2014 22:29    Post subject: смена Wan на Lan на tp-link wr1043 v1 Reply with quote
Как это обычно бывает у знакомых сгорел WAN порт на роутере, после грозы.

Перепрошился на DD-WRT.
Почитав форум и поэкспериментировав, нашел решение (правда проверял его пока только на DHCP, завтра уже буду пробовать на pppoe)

после команд в консоле

swconfig dev eth0 vlan 1 set ports "2 3 4 5t"
swconfig dev eth0 vlan 2 set ports "1 5t"

Все заработало как нужно (wan настроен на 1 lan порт). После перезагрузки пропадало. Прописал эти же команды через веб интерфейс, для старта при загрузке. Все работает, но появилось небольшое неудобство при включении роутера нужно выключить кабель из wan (lan1) порта, а уже после загрузки включить его (если этого не сделать то клиент получает IP от провайдера, а не от роутера).
Я так подозреваю все происходит из-за того, что до получения выше написанных команд роутер на lan портах работает как свич.

Есть какой либо вариант это побороть ?
Sponsor
vasek00
DD-WRT Guru


Joined: 06 Nov 2010
Posts: 3310

PostPosted: Sun Jul 20, 2014 5:29    Post subject: Re: смена Wan на Lan на tp-link wr1043 v1 Reply with quote
У вас роутер построен на базе чипов:
AR9132@400+AR9103+switch RTL8366RB (10/100/1000)

Используя в данном варианте команду swconfig ее нужно использовать так же с командой swconfig dev eth0 set apply

Code:
swconfig dev eth0 vlan 1 set ports "2 3 4 5t"
swconfig dev eth0 vlan 2 set ports "1 5t"
swconfig dev eth0 set apply


Да есть ограничение про которое вы пишите при включении и от любимого использования клиентами получение DHCP в локальной сети, так как до выполнения вашего скрипта роутер имеет нормальную конфигурацию портов - WLLLL, кабель от провайдера включен в один из LAN портов, т.е. вся сеть провайдера на несколько секунд будет у вас в локалке, так как это switch. После настройки switch как вам надо например -WLLL все встает на свои места, но клиенты ваши уже получили что-то IP от провайдерской сети. Ввиду того что роутер перегружается очень редко включил и работает, то с этим можно смериться.
Fidel686
DD-WRT Novice


Joined: 22 Jun 2015
Posts: 11

PostPosted: Mon Jun 22, 2015 15:52    Post subject: Reply with quote
Доброго времени суток!
Такая же проблема гроза->выгоревший порт-> смена WAN на LAN посредством команд
Code:
swconfig dev eth0 vlan 1 set ports "2 3 4 5t"
swconfig dev eth0 vlan 2 set ports "1 5t"
swconfig dev eth0 set apply

все заработало, только вот теперь Wi-Fi не раздается ни на ноуты, ни на гаджеты...
подключаться подключается, но без доступа в инет
подскажите, пожалуйста, есть ли решения данной проблемы?

на всякий случай выложу выводы команд
dmesg:
<5>Linux version 2.6.24.111 (root@dd-wrt) (gcc version 4.3.3 (GCC) ) #3413 Sat Aug 7 06:49:52 CEST 2010
<4>flash_size passed from bootloader = 8
<4>CPU revision is: 00019374
<6>booting platform Atheros AR9132 rev 2 (0xb9)
<4>Determined physical RAM map:
<4> memory: 02000000 @ 00000000 (usable)
<7>On node 0 totalpages: 8192
<7> Normal zone: 64 pages used for memmap
<7> Normal zone: 0 pages reserved
<7> Normal zone: 8128 pages, LIFO batch:0
<7> Movable zone: 0 pages used for memmap
<4>Built 1 zonelists in Zone order. Total pages: 8128
<5>Kernel command line: console=ttyS0,115200 root=1f02 rootfstype=squashfs noinitrd init=/sbin/init
<4>Primary instruction cache 64kB, physically tagged, 4-way, linesize 32 bytes.
<4>Primary data cache 32kB, 4-way, linesize 32 bytes.
<6>Synthesized TLB refill handler (20 instructions).
<6>Synthesized TLB load handler fastpath (32 instructions).
<6>Synthesized TLB store handler fastpath (32 instructions).
<6>Synthesized TLB modify handler fastpath (31 instructions).
<6>Cache parity protection disabled
<4>PID hash table entries: 128 (order: 7, 512 bytes)
<4>Using 200.000 MHz high precision timer.
<6>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
<6>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
<6>Memory: 29660k/32768k available (1991k kernel code, 3108k reserved, 312k data, 112k init, 0k highmem)
<7>Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200)
<4>Mount-cache hash table entries: 512
<6>NET: Registered protocol family 16
<6>Generic PHY: Registered new driver
<6>NET: Registered protocol family 2
<6>Time: MIPS clocksource has been installed.
<6>IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP established hash table entries: 1024 (order: 1, 8192 bytes)
<6>TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP: Hash tables configured (established 1024 bind 1024)
<6>TCP reno registered
<5>gpio_proc: module loaded and /proc/gpio/ created
<4>AR7100 GPIOC major 0
<6>devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
<6>devfs: boot_options: 0x1
<6>squashfs: version 3.0 (2006/03/15) Phillip Lougher
<6>io scheduler noop registered
<6>io scheduler deadline registered (default)
<6>Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
<6>serial8250.0: ttyS0 at MMIO 0x0 (irq = 19) is a 16550A
<6>console [ttyS0] enabled
<6>PPP generic driver version 2.4.2
<6>PPP Deflate Compression module registered
<6>PPP BSD Compression module registered
<6>MPPE/MPPC encryption/compression module registered
<6>NET: Registered protocol family 24
<6>PPPoL2TP kernel driver, V1.0
<6>IMQ starting with 2 devices...
<6>IMQ driver loaded successfully.
<6> Hooking IMQ before NAT on PREROUTING.
<6> Hooking IMQ after NAT on POSTROUTING.
<6>tun: Universal TUN/TAP device driver, 1.6
<6>tun: (C) 1999-2004 Max Krasnyansky
<0>guessed flashsize = 8M
<0>scanning for root partition
<0>tplink uboot detected
<0>bootloader size = 20000
<0>
<4>found squashfs at 160000
<5>Creating 8 MTD partitions on "ar7100-nor0":
<5>0x00000000-0x00020000 : "RedBoot"
<5>0x00020000-0x007e0000 : "linux"
<5>0x00160000-0x006f0000 : "rootfs"
<5>0x006f0000-0x007e0000 : "ddwrt"
<5>0x007e0000-0x007f0000 : "nvram"
<5>0x007f0000-0x00800000 : "FIS directory"
<5>0x007f0000-0x00800000 : "board_config"
<5>0x00000000-0x00800000 : "fullflash"
<6>Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=60 sec (nowayout= 0)
<4>GACT probability on
<4>Mirror/redirect action on
<4>Simple TC action Loaded
<4>u32 classifier
<4> Actions configured
<4>Netfilter messages via NETLINK v0.30.
<4>nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
<4>ctnetlink v0.93: registering with nfnetlink.
<6>IPv4 over IPv4 tunneling driver
<6>GRE over IPv4 tunneling driver
<6>ip_tables: (C) 2000-2006 Netfilter Core Team
<6>IPP2P v0.8.2 loading
<5>ClusterIP Version 0.8 loaded successfully
<6>TCP bic registered
<6>TCP cubic registered
<6>TCP westwood registered
<6>TCP highspeed registered
<6>TCP hybla registered
<6>TCP htcp registered
<6>TCP vegas registered
<6>TCP scalable registered
<6>NET: Registered protocol family 1
<6>NET: Registered protocol family 17
<4>Welcome to PF_RING 3.2.1
<4>(C) 2004-06 L.Deri
<6>NET: Registered protocol family 27
<4>PF_RING: bucket length 128 bytes
<4>PF_RING: ring slots 4096
<4>PF_RING: sample rate 1 [1=no sampling]
<4>PF_RING: capture TX No [RX only]
<4>PF_RING: transparent mode Yes
<4>PF_RING initialized correctly.
<4>PF_RING: registered /proc/net/pf_ring/
<6>802.1Q VLAN Support v1.8 Ben Greear
<6>All bugs added by David S. Miller
<0>decode 1f02
<4>VFS: Mounted root (squashfs filesystem) readonly.
<6>Mounted devfs on /dev
<6>Freeing unused kernel memory: 112k freed
<6>Realtek RTL8366rb: Registered new driver
<5>Realtek RTL8366rb switch driver version 0.1.0
<6>rtl8366rb-smi rtl8366rb-smi: using GPIO pins 18 (SDA) and 19 (SCK)
<6>rtl8366rb-smi rtl8366rb-smi: RTL5937 ver. 3 chip found
<6>rtl8366-smi: probed
<4>rtl8366rb init vlan
<4> [0]phy_abilityAutoNegotiation : 1
<4>[0]phy_abilityHalf_10 : 1
<4>[0]phy_abilityFull_10 : 1
<4>[0]phy_abilityHalf_100 : 1
<4>[0]phy_abilityFull_100 : 1
<4>[0]phy_abilityFull_1000 : 1
<4>[0]phy_abilityFC : 1
<4>[0]phy_abilityAsyFC : 1
<4>[1]phy_abilityAutoNegotiation : 1
<4>[1]phy_abilityHalf_10 : 1
<4>[1]phy_abilityFull_10 : 1
<4>[1]phy_abilityHalf_100 : 1
<4>[1]phy_abilityFull_100 : 1
<4>[1]phy_abilityFull_1000 : 1
<4>[1]phy_abilityFC : 1
<4>[1]phy_abilityAsyFC : 1
<4>[2]phy_abilityAutoNegotiation : 1
<4>[2]phy_abilityHalf_10 : 1
<4>[2]phy_abilityFull_10 : 1
<4>[2]phy_abilityHalf_100 : 1
<4>[2]phy_abilityFull_100 : 1
<4>[2]phy_abilityFull_1000 : 1
<4>[2]phy_abilityFC : 1
<4>[2]phy_abilityAsyFC : 1
<4>[3]phy_abilityAutoNegotiation : 1
<4>[3]phy_abilityHalf_10 : 1
<4>[3]phy_abilityFull_10 : 1
<4>[3]phy_abilityHalf_100 : 1
<4>[3]phy_abilityFull_100 : 1
<4>[3]phy_abilityFull_1000 : 1
<4>[3]phy_abilityFC : 1
<4>[3]phy_abilityAsyFC : 1
<4>[4]phy_abilityAutoNegotiation : 1
<4>[4]phy_abilityHalf_10 : 1
<4>[4]phy_abilityFull_10 : 1
<4>[4]phy_abilityHalf_100 : 1
<4>[4]phy_abilityFull_100 : 1
<4>[4]phy_abilityFull_1000 : 1
<4>[4]phy_abilityFC : 1
<4>[4]phy_abilityAsyFC : 1
<4>rtl8366s_getEthernetPHY fail for 5!!!!
<4>rtl8366s_getEthernetPHY fail for 6!!!!
<4>rtl8366s_getEthernetPHY fail for 7!!!!
<4>rtl8366s_getEthernetPHY fail for 8!!!!
<4>rtl8366s_getEthernetPHY fail for 9!!!!
<4>rtl8366s_getEthernetPHY fail for 10!!!!
<4>rtl8366s_getEthernetPHY fail for 11!!!!
<4>rtl8366s_getEthernetPHY fail for 12!!!!
<4>rtl8366s_getEthernetPHY fail for 13!!!!
<4>rtl8366s_getEthernetPHY fail for 14!!!!
<4>rtl8366s_getEthernetPHY fail for 15!!!!
<4>ag7100_mod: module license 'unspecified' taints kernel.
<4>AG7100: Length per segment 1536
<4>AG7100: Max segments per packet 1
<4>AG7100: Max tx descriptor count 100
<4>AG7100: Max rx descriptor count 252
<4>AG7100: fifo cfg 3 00780008
<4>AG7100CHH: Mac address for unit 0
<4>AG7100CHH: ff:ff:ff:ff:ff:ff
<6>ag7100_mii: probed
<0>phymap is null
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>ar71xx-ehci ar71xx-ehci.0: Atheros AR91xx built-in EHCI controller
<6>ar71xx-ehci ar71xx-ehci.0: new USB bus registered, assigned bus number 1
<6>ar71xx-ehci ar71xx-ehci.0: irq 3, io mem 0x1b000000
<6>ar71xx-ehci ar71xx-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
<6>usb usb1: configuration #1 chosen from 1 choice
<6>hub 1-0:1.0: USB hub found
<6>hub 1-0:1.0: 1 port detected
<5>SCSI subsystem initialized
<4>sr_mod: Unknown symbol register_cdrom
<4>sr_mod: Unknown symbol cdrom_ioctl
<4>sr_mod: Unknown symbol cdrom_media_changed
<4>sr_mod: Unknown symbol cdrom_release
<4>sr_mod: Unknown symbol cdrom_open
<4>sr_mod: Unknown symbol unregister_cdrom
<4>sr_mod: Unknown symbol cdrom_number_of_slots
<6>Initializing USB Mass Storage driver...
<6>usbcore: registered new interface driver usb-storage
<6>USB Mass Storage support registered.
<4>ag7100_ring_alloc Allocated 1600 at 0x81c55800
<4>ag7100_ring_alloc Allocated 4032 at 0x8138d000
<4>AG7100: cfg1 0x2f cfg2 0x7014
<4>AG7100: unit 0 phy is up...RGMii 1000Mbps full duplex
<4>AG7100: pll reg 0x18050014: 0x1a000000 AG7100: CPU PhaseLockLoop : 0x1050
<4>AG7100: Secondary PhaseLockLoop: 0x1032
<4>AG7100: Ethernet Internal Clock Control: 0x0
<4>AG7100: mii: 0x22
<4>AG7100: cfg1: 0x2f
<4>AG7100: cfg2: 0x7215
<4>AG7100: fcfg_0: 0x1d1f00
<4>AG7100: fcfg_1: 0x7ff0000
<4>AG7100: fcfg_2: 0xfff
<4>AG7100: fcfg_3: 0x7803ff
<4>AG7100: fcfg_4: 0xffff
<4>AG7100: fcfg_5: 0xfefef
<4>AG7100: done cfg2 0x7215 ifctl 0x0 miictrl 0x22
<4>AG7100: LAN Rx Hang Detected 1 times!
<4>Writing 4
<6>ath_mimo_hal: 0.9.17.1 (AR5416, REGOPS_FUNC)
<6>ath_ahb: 0.9.4.5 (Atheros/multi-bss)
<6>ath_dfs: Version 2.0.0
<4>Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved
<6>wlan: 0.8.4.2 (Atheros/multi-bss)
<6>wlan: mac acl policy registered
<6>ath_rate_atheros: Version 2.0.1
<4>Copyright (c) 2001-2004 Atheros Communications, Inc, All Rights Reserved
<6>ar5416CheckEepromDef: Read Magic = 0xFFFF
<6>EEPROM being read from flash @0xbfff1000
<6>need_swap = False.
<6>Howl Revision ID 0xb9
<4>dfs_init_radar_filters: dfs->dfs_rinfo.rn_numradars: 0
<4>1Mbps 2Mbps 5.5Mbps 11Mbps
<4>1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
<4>1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
<4> 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
<4>1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
<4> 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
<4>1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
<4> 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
<4>wifi0: mac 20.0 phy 10.2 radio 13.0
<4>wifi0: Use hw queue 1 for WME_AC_BE traffic
<4>wifi0: Use hw queue 0 for WME_AC_BK traffic
<4>wifi0: Use hw queue 2 for WME_AC_VI traffic
<4>wifi0: Use hw queue 3 for WME_AC_VO traffic
<4>wifi0: Use hw queue 8 for CAB traffic
<4>wifi0: Use hw queue 9 for beacons
<4>wifi0: Use hw queue 7 for UAPSD
<6>wifi0: Atheros AR9100 WiSoC: mem=0xb80c0000, irq=2
<3>br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
<6>device br0 entered promiscuous mode
<6>device vlan1 entered promiscuous mode
<6>device eth0 entered promiscuous mode
<4>
<4> ath_numswbaperbc = 8(1)adj=76800
<6>device ath0 entered promiscuous mode
<6>br0: port 2(ath0) entering learning state
<6>br0: port 1(vlan1) entering learning state
<6>device br0 left promiscuous mode
<6>device br0 entered promiscuous mode
<6>device br0 left promiscuous mode
<6>device br0 entered promiscuous mode
<6>Ethernet Channel Bonding Driver: v3.1.3 (June 13, 2007)
<6>bonding: MII link monitoring set to 100 ms
<6>device vlan2 entered promiscuous mode
<6>device vlan2 left promiscuous mode
<6>br0: topology change detected, propagating
<6>br0: port 2(ath0) entering forwarding state
<6>br0: topology change detected, propagating
<6>br0: port 1(vlan1) entering forwarding state
<6>etherip: Ethernet over IPv4 tunneling driver
<4>Freeing node: f4:ec:38:dd:b2:44
<4>ic->ic_cwm.cw_width :0, ic->ic_cwm.cw_extoffset: 0

ifconfig:

ath0 Link encap:Ethernet HWaddr F4:EC:38:DD:B2:44
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:458 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:89781 (87.6 KiB)
br0 Link encap:Ethernet HWaddr F4:EC:38:DD:B2:42
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:1997 errors:0 dropped:0 overruns:0 frame:0
TX packets:1549 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:194824 (190.2 KiB) TX bytes:1584972 (1.5 MiB)
br0:0 Link encap:Ethernet HWaddr F4:EC:38:DD:B2:42
inet addr:169.254.255.1 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
eth0 Link encap:Ethernet HWaddr F4:EC:38:DD:B2:42
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1997 errors:0 dropped:0 overruns:0 frame:0
TX packets:1618 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:230770 (225.3 KiB) TX bytes:1613800 (1.5 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:16436 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:348 (348.0 B) TX bytes:348 (348.0 B)
vlan1 Link encap:Ethernet HWaddr F4:EC:38:DD:B2:42
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1997 errors:0 dropped:0 overruns:0 frame:0
TX packets:1549 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:202812 (198.0 KiB) TX bytes:1591168 (1.5 MiB)
vlan2 Link encap:Ethernet HWaddr C4:46:19:28:37:31
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:22632 (22.1 KiB)
wifi0 Link encap:Ethernet HWaddr F4:EC:38:DD:B2:44
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11103 errors:0 dropped:0 overruns:0 frame:24708
TX packets:596 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:499
RX bytes:3537811 (3.3 MiB) TX bytes:130239 (127.1 KiB)
Interrupt:2 Memory:b80c0000-b8100000

swconfig dev eth0 show не проходит
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Оборудование на основе Atheros WiSOC 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