Lan port status

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
jass1989
DD-WRT Novice


Joined: 11 Jul 2016
Posts: 22

PostPosted: Mon May 15, 2017 5:17    Post subject: Lan port status Reply with quote
So either google is failing me or I am to tired to think of the right search keywords, I am looking to check the port status/link speed, either gui or cli. I can check the wifi link speed so I don't see why I couldn't get the ethernet link speed/status
Sponsor
jass1989
DD-WRT Novice


Joined: 11 Jul 2016
Posts: 22

PostPosted: Tue May 16, 2017 4:34    Post subject: Re: Lan port status Reply with quote
d0ug wrote:
jass1989 wrote:
So either google is failing me or I am to tired to think of the right search keywords, I am looking to check the port status/link speed, either gui or cli. I can check the wifi link speed so I don't see why I couldn't get the ethernet link speed/status


I don't think there is any way software wise to get the link speed status of the switch ports. The switch on this and most routers is a separate network switch ASIC. For all intents and purposes its like having another separate switch plugged into your router, but the router and switch is built into a single box.

This is why most router/switch combos have only 4 LAN ports, but 5 port stand alone switches are quite common. Basically the processor that runs the router has two ethernet interfaces. One for the WAN and another for the LAN. This LAN interface from the processor is tied to one of the 5 switch ports by wiring on the circuit board itself, leaving only 4 of the switch ports user accessible on the outside of the box for LAN use

*EDIT*

One way you MIGHT be able to determine the link status by software, if there are any unused GPIO pins on the processor. You could wire the status LEDs of the switch to these GPIO pins of the processor and read what the status is of the LEDs that way. I am not sure if there is documentation of the hardware at that level to know what if any GPIO pins are unused, and where they are located on the processor to solder wires. Since the processor is a BGA package this would be nearly impossible unless these GPIOs were brought out to test points somewhere else on the board.



Doug that is a great explanation.... so the status lights I am seeing on the front of my router signifying GB link or not is from the switch side of things?
So a managed switch we can set up vlan and view link status. Since DD-Wrt has vlan and QOS, wouldn't that seem like its a managed switch inside the router?

I like the idea of bringing link lights to chips... a bias diode maybe to keep form shorting out the chip.
WWTK
DD-WRT Novice


Joined: 14 May 2017
Posts: 38

PostPosted: Wed May 17, 2017 2:03    Post subject: Reply with quote
root@Mine:/tmp# swconfig dev switch0 show
Global attributes:
enable_vlan: 1
Port 0:
mask: 0x0000: (0)
qmode: 3
pvid: 1
link: port:0 link:down
Port 1:
mask: 0x0000: (1)
qmode: 3
pvid: 1
link: port:1 link:down
Port 2:
mask: 0x0000: (2)
qmode: 3
pvid: 1
link: port:2 link:down
Port 3:
mask: 0x0000: (3)
qmode: 3
pvid: 1
link: port:3 link:up speed:1000baseT full-duplex
Port 4:
mask: 0x0000: (4)
qmode: 3
pvid: 2
link: port:4 link:down
Port 5:
mask: 0x0000: (5)
qmode: 3
pvid: 2
link: port:5 link:up speed:1000baseT full-duplex
Port 6:
mask: 0x0000: (6)
qmode: 3
pvid: 1
link: port:6 link:up speed:1000baseT full-duplex
VLAN 1:
port_based: 0
vid: 1
ports: 0 1 2 3 6
VLAN 2:
port_based: 0
vid: 2
ports: 4 5
jass1989
DD-WRT Novice


Joined: 11 Jul 2016
Posts: 22

PostPosted: Wed May 17, 2017 2:32    Post subject: Reply with quote
maybe I should have added I'm using WRT3200ACM



WWTK wrote:
root@Mine:/tmp# swconfig dev switch0 show
Global attributes:
enable_vlan: 1
Port 0:
mask: 0x0000: (0)
qmode: 3
pvid: 1
link: port:0 link:down
Port 1:
mask: 0x0000: (1)
qmode: 3
pvid: 1
link: port:1 link:down
Port 2:
mask: 0x0000: (2)
qmode: 3
pvid: 1
link: port:2 link:down
Port 3:
mask: 0x0000: (3)
qmode: 3
pvid: 1
link: port:3 link:up speed:1000baseT full-duplex
Port 4:
mask: 0x0000: (4)
qmode: 3
pvid: 2
link: port:4 link:down
Port 5:
mask: 0x0000: (5)
qmode: 3
pvid: 2
link: port:5 link:up speed:1000baseT full-duplex
Port 6:
mask: 0x0000: (6)
qmode: 3
pvid: 1
link: port:6 link:up speed:1000baseT full-duplex
VLAN 1:
port_based: 0
vid: 1
ports: 0 1 2 3 6
VLAN 2:
port_based: 0
vid: 2
ports: 4 5




this is what I am looking for.... except I get "Failed to connect to switch" and swconfig list prints nothing... I guess what doug is saying is checking out with this linksys... damn it..

But the command does work for my tp-link network with 27PCs great!
WWTK
DD-WRT Novice


Joined: 14 May 2017
Posts: 38

PostPosted: Wed May 17, 2017 2:39    Post subject: Reply with quote
ah, ok mine was wrt1900acsv2

sorry
ATHF
DD-WRT Guru


Joined: 14 Dec 2015
Posts: 774
Location: 127.0.0.1

PostPosted: Wed May 17, 2017 3:10    Post subject: Reply with quote
jass1989 wrote:
maybe I should have added I'm using WRT3200ACM

this is what I am looking for.... except I get "Failed to connect to switch" and swconfig list prints nothing... I guess what doug is saying is checking out with this linksys... damn it..

But the command does work for my tp-link network with 27PCs great!


3200ACM here, swconfig dev switch0 show works for me. Which build are you using?

_________________
Tutorial for flashing WRT series
WRT Installation,Upgrade & Basic Setup–Cliff Notes
r52242: WRT3200ACM, WRT1200ACv1 & 1 Velop in bridge mode(IoT subnet), r52242 WRT1900ACv1 AP
Velop:2 WHW0101, RE6500, RE9000(AP)
Spectrum - 1000/50
SysLog Watcher 5, New security Onion box coming soon, Fingboxes, PiHoles, NEMS, Cacti, rpisurv
jass1989
DD-WRT Novice


Joined: 11 Jul 2016
Posts: 22

PostPosted: Wed May 17, 2017 3:26    Post subject: Reply with quote
31571. I know there is a newer one... I havn't had time to update it.... I should now though since I am sitting on my butt here
jass1989
DD-WRT Novice


Joined: 11 Jul 2016
Posts: 22

PostPosted: Wed May 17, 2017 4:14    Post subject: Reply with quote
ATHF wrote:
jass1989 wrote:
maybe I should have added I'm using WRT3200ACM

this is what I am looking for.... except I get "Failed to connect to switch" and swconfig list prints nothing... I guess what doug is saying is checking out with this linksys... damn it..

But the command does work for my tp-link network with 27PCs great!


3200ACM here, swconfig dev switch0 show works for me. Which build are you using?


Are you sure? what version are you using? I just flashed DD-WRT v3.0-r31924
Telnet in

Code:


     ___  ___     _      _____  ______       ____  ___
    / _ \/ _ \___| | /| / / _ \/_  __/ _  __|_  / / _ \
   / // / // /___/ |/ |/ / , _/ / /   | |/ //_ <_/ // /
  /____/____/    |__/|__/_/|_| /_/    |___/____(_)___/

                       DD-WRT v3.0
                   http://www.dd-wrt.com

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


BusyBox v1.26.2 (2017-05-02 01:16:56 CEST) built-in shell (ash)

root@DD-WRT:~# swconfig dev switch0
swconfig list
swconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>|load <config>|show)
root@DD-WRT:~# swconfig dev switch0 show
Failed to connect to the switch. Use the "list" command to see which switches are available.
root@DD-WRT:~# swconfig list
root@DD-WRT:~#
root@DD-WRT:~# WTH?!!!!!
jass1989
DD-WRT Novice


Joined: 11 Jul 2016
Posts: 22

PostPosted: Wed May 17, 2017 5:39    Post subject: Reply with quote
UPDATE: I found a link to DD-WRT v3.0-r32067. It's not on the beta folder. so... now its working
WWTK
DD-WRT Novice


Joined: 14 May 2017
Posts: 38

PostPosted: Thu May 18, 2017 0:28    Post subject: Reply with quote
port 5 and 6 are the cpu connections to the wan port and the lan switch ports
WWTK
DD-WRT Novice


Joined: 14 May 2017
Posts: 38

PostPosted: Thu May 18, 2017 2:05    Post subject: Reply with quote
[quote="d0ug"]
jass1989 wrote:
maybe I should have added I'm using WRT3200ACM



WWTK wrote:
root@Mine:/tmp# swconfig dev switch0 show


I just tried this on one of my WRT1200ACv2's. It does return info, however don't rely on the port # labels to align up with what the actual physical ports are on the switch.

On this one currently being used as an AP/Switch in my living room. It has no cable plugged into the WAN, Gigabit on port 1 coming from the office WRT1200 router, Gigabit on port 2 going to another WRT1200 being used as a 3rd AP, and 100mbps on port 3 going to a hard wired chromecast.

root@LivingRMAP:~# swconfig dev switch0 show
Global attributes:
enable_vlan: 0
Port 0:
mask: 0x004e: (0) 1 2 3 6
qmode: 0
pvid: 0
link: port:0 link:down
Port 1:
mask: 0x004d: 0 (1) 2 3 6
qmode: 0
pvid: 0
link: port:1 link:up speed:100baseT full-duplex
Port 2:
mask: 0x004b: 0 1 (2) 3 6
qmode: 0
pvid: 0
link: port:2 link:up speed:1000baseT full-duplex
Port 3:
mask: 0x0047: 0 1 2 (3) 6
qmode: 0
pvid: 0
link: port:3 link:up speed:1000baseT full-duplex
Port 4:
mask: 0x0020: (4) 5
qmode: 0
pvid: 0
link: port:4 link:down
Port 5:
mask: 0x0010: 4 (5)
qmode: 0
pvid: 0
link: port:5 link:up speed:1000baseT full-duplex
Port 6:
mask: 0x000f: 0 1 2 3 (6)
qmode: 0
pvid: 0
link: port:6 link:up speed:1000baseT full-duplex


Yeah I've noticed that on this and on my r8000 they are backwards :/

luci has a cool switch page that works Wink
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) 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