Preview of some of the stuff I'm working on for b4:
http://openwrt.ksilebo.net/temp/b4-pre/adm-test.tgz
(dammit, this forum doesn't have an "upload file" option .. yet)
EDIT: newer sources appear later in this thread
The content of this topic has been archived between 3 Mar 2018 and 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
Preview of some of the stuff I'm working on for b4:
http://openwrt.ksilebo.net/temp/b4-pre/adm-test.tgz
(dammit, this forum doesn't have an "upload file" option .. yet)
EDIT: newer sources appear later in this thread
this will allow to use the ports of switch as independent interfaces?
if so, it's great!
Yes, you will be allowed to set each port as a different vlan target and essentially get 5 interfaces. See http://www.admtek.com.tw/download/Switc … 0V1.02.pdf for what we can do by tweaking registers.
Preview of some of the stuff I'm working on for b4:
http://openwrt.ksilebo.net/temp/b4-pre/adm-test.tgz
(dammit, this forum doesn't have an "upload file" option .. yet)
I have been working on the same thing for the sveasoft firmware, simply because that is what I have been using. I assume you will be releasing the code for this when b4 comes out? If so, I can tack on some of the features I wanted to expose.
Some of the things I have/had planned are:
per port counters/statistics (for accounting)
port speed/duplex (including setting them)
port admin status (turn the port on or off)
port status (is there a link)
port mac address assignments (locking the port to specific mac addresses)
port mac history (all macs that are on that port)
vlan config per port
per port QoS config including queue setup (802.1p)
internal buffer statistics
device flag setting (aging, broadcast storm, etc)
Btw, the design of your release is great. It makes it so simple to duplicate your environment for dev and get right to work. Much appreciated.
Tim
First off, this isn't the post you hoped it was.
I had originally planned to have admcfg finished by now, but as always happens when you set goals real life tells you otherwise. So, admcfg is unfinished.
Instead of delaying things further I figured I'd toss the sources up for grabs, perhaps someone will finish it before I do. The goals for it are pretty simple, an ifconfig knockoff. Syntax wise it should probably accept a commandline such as the following:
admcfg port2 vlan 2 speed 100 duplex full up
or simply put,
admcfg [port [setting .. ]]*
- all settings refer to the last instance of port on the commandline
- after applying all the settings it should print out each given, or all if none were given
Yes, you will be allowed to set each port as a different vlan target and essentially get 5 interfaces. See http://www.admtek.com.tw/download/Switc … 0V1.02.pdf for what we can do by tweaking registers.
actually, you don't need to change any registers to do that part. it is all built into the drivers already. see http://www.sveasoft.com/modules/phpBB2/ … .php?t=191
actually, you don't need to change any registers to do that part. it is all built into the drivers already. see http://www.sveasoft.com/modules/phpBB2/ … .php?t=191
I'm aware of the vlan*ports nvram variables, however due to a hardware check that code isn't active on the v1 hardware nor does it allow you to change the values at runtime.
Ok, ADM6996 utils updated.
USAGE:
admcfg [<port> [option]]port is in the form of "portX"
option is one of:ENABLED, DISABLED - enable/disable port
100Mbps, 10Mbps - port speed
FD, HD - full duplex/half duplex
FLOW, NOFLOW - 802.3 flow control
TAG, UNTAG - output vlan tagging
TOS, VLAN - priority given to TOS/VLAN
PRIO, NOPRIO - port based priority
PVID:X - set the primary vlan id
vlanX - set the vlan mappings
show all ports:
admcfg
show specific ports:
admcfg port0 port2
port 0 (wan) to vlan1
ports 1 & 2 as vlan0
ports 3 & 4 disabled
admcfg port0 PVID:1 vlan1
admcfg port1 PVID:0 vlan0
admcfg port2 PVID:0 vlan0
admcfg port3 DISABLED
admcfg port4 DISABLED
which can be rewritten as
admcfg port0 PVID:1 vlan1 port1 PVID:0 vlan0 port2 PVID:0 vlan0 port3 DISABLED port4 DISABLED
Ok, ADM6996 utils updated.
Probably, you know it yourself, but maybe you could strip the binary before finally adding it to the core.
$> file admcfg
admcfg: ELF 32-bit LSB MIPS-I executable, MIPS, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
as I'm reading this I'm thinking on load balancing via 2 WAN ports.
As you probably know, there are cost-expensive router products out there with can bundle multiple internet connections.
They can make that work via 2x WAN.
I had seen many folks talking about load sharing with multiple internet cable/DSL lines (not bonding on your site + isp site).
Therefore I had patched my linux kernel for multipath routing , alternate route with kernel stuff.
There is just the need to give a specific interfaces for the multiple routing with multiple routing tables, etc. eth0, eth1.
Does the adm port vlan1 (first lan port vlan, while giving ports 2-4 vlan2 or multiple vlan's) behave like normal WAN vlan0 (which has own controller) ?
Does it matter that in fact there is only one network card ? Does this create any problem when using also other ports for clients, servers, DMZ, etc. ?
Hi, I'm intrested in having the 5 ethaernet ports separated to make a router instead of a switch, I want to connect 5 diferents IP networks. I have the wrt54g v1.1 and I tried with admcfg, but I don't understand at all what it does. I tell you what I did.
insmod adm.o
brctl delbr br0
admcfg port0 PVID:1 vlan0
admcfg port1 PVID:0 vlan1
admcfg port2 PVID:0 vlan2
admcfg port3 PVID:3 vlan3
admcfg port4 PVID:4 vlan4
vconfig add eth0 0
vconfig add eth0 1
vconfig add eth0 2
vconfig add eth0 3
vconfig add eth0 4
ifconfig vlan0 [ip A] up
ifconfig vlan1 [ip B] up
ifconfig vlan2 [ip C] up
ifconfig vlan3 [ip D] up
ifconfig vlan4 [ip E] up
ifconfig shows me all the ethernet (eth0 and eth1 are in promisc mode) and the vlan interfaces, but I can't connect to anywhere. Pings from the wrt54 to any PC fail and pings from the PC to any port of the wrt fails too.
I really need to split the eth0 port into four ports, so please if you can help, I will thank you a lot.
First, linux won't let you have overlapping netmasks without routing headaches, so for example you can't have each port be a different 192.168.1.X address.
Second, the PVID value is what vlan to assume when no vlan information is given, ie incoming packets, you almost certainly want this to match the vlan number you've assigned to the port.
example:
admcfg port0 PVID:0 vlan0
admcfg port1 PVID:1 vlan1
admcfg port2 PVID:2 vlan2
admcfg port3 PVID:3 vlan3
admcfg port4 PVID:4 vlan4
First, linux won't let you have overlapping netmasks without routing headaches, so for example you can't have each port be a different 192.168.1.X address.
First off, I don't think any of the message I am about to write has anything to do with the previous posters question but do you mean "overlapping networks" or "overlapping subnets"? If not I don't understand what you mean by "overlapping netmasks". If you meant one of the former then I would agree with you that not only Linux but any router would have a problem with it.
Now as far as having multiple subnetworks on the 192.168.1.x range then I would have to say that Linux itself has no problem with this I have been doing this for several years under Linux. Say I have a machine with 5 NICs I have instances where I will use a 30 bit subnet mask (255.255.255.252) and maybe put three different subnets all on the 192.168.1.x range. Say they are on eth0 through eth2:
The first subnet would be the 192.168.1.0/30 network:
192.168.1.0 - network address
192.168.1.1 - host address (eth0)
192.168.1.2 - host address (other machine 1)
192.168.1.3 - broadcast address
The second subnet would be the 192.168.1.4/30 network:
192.168.1.4 - network address
192.168.1.5 - host address (eth1)
192.168.1.6 - host address (other machine 2)
192.168.1.7 - broadcast address
The third subnet would be the 192.168.1.8/30 network:
192.168.1.8 - network address
192.168.1.9 - host address (eth2)
192.168.1.10 - host address (other machine 3)
192.168.1.11 - broadcast address
You could also break the 192.168.1.x range into just 2 subnets (25 bit subnet mask). That would give you 192.168.1.0 through 192.168.1.127 on the first subnet and 192.168.1.128 through 192.168.1.255 on the second subnet.
Now I have never done this on a LinkSys router but it works just fine on normal computers with multiple NICs. Maybe I misunderstood what you meant, or maybe there are reasons you can not do it on the LinkSys router in which case I would find this to be a useful piece of information. I would also be interested to know if there were some way to treat each port as an individual interface. It sounds like that's a "no". I just need to grasp some of the VLAN concepts (something I'm not as up on as I should be).
First, linux won't let you have overlapping netmasks without routing headaches, so for example you can't have each port be a different 192.168.1.X address
I don't know if you understood me, but what I try to mean is, for example:
admcfg port0 PVID:0 vlan0
admcfg port1 PVID:1 vlan1
admcfg port2 PVID:2 vlan2
admcfg port3 PVID:3 vlan3
admcfg port4 PVID:4 vlan4
vconfig add eth0 0
vconfig add eth0 1
vconfig add eth0 2
vconfig add eth0 3
vconfig add eth0 4
ifconfig vlan0 10.10.10.1 up
ifconfig vlan1 20.20.20.1 up
ifconfig vlan2 30.30.30.1 up
ifconfig vlan3 40.40.40.1 up
ifconfig vlan4 50.50.50.1 up
and of course enable routing on all vlans interfaces.
Is this possible or not?
May I add all vlans to the bridge br0 or not?
I just want to treat each port on the back of the wrt54g as a different interface, is this possible?
I understand what marcosmas is trying to do, and this is of interest to me also.
Since nobody had answered I thought I write, so maybe somebody
notices this and answers.
Basically what I want to do is to treat all those switch ports
as separate interfaces so I can give different subnet to all of them. Then there will be the WAN port with broadband connections.
This gives me the ability to provide network to different clients (using NAT) and also limit it so that those networks can't see each other (local security).
I've this old PII-233 here doing the same thing with 4 NICs which I would like to replace with LinkSys WRT54G(S?) - it would be cooler, more quiet etc ...
So somebody knows the answer?
Finally I've got the 5 ports separated in indepent vlans.
I followed the commands in my previous post and worked fine, but I installed a pre-compiled adm.o module and admcfg application, which I got from the valenciawirless.net site.
Hi Guys,
Wow, what an awesome job you've all done getting this unit doing the trick's it's doing
It's been a great adventure teaching myself linux vlanning as I learnt my way around this thing.
2 Questions about ADMCFG if I may.
1, Am I right in guessing that port5 is the intergrated port through which the linksys accesses the switch?
2, I seen to have the problem that whenever I add an even numbered vlan to a port, I also get the number below it also.
So if I say admcfg port2 vlan6, I end up with vlan 5 and 6 on port2. Is this a bug or just something I don't understand with vlans?
Thanks,
Gr|ffous
For those of you who want to compile the source code yourself, here is a makefile:
# Makefile for building admcfg and adm.o
#
# NOTE: you will want to adjust this path:
#
OPENWRT_DIR=/home/werner/projects/openwrt
#
# You shouldn't need to change any of the following...
#
ARCH:=mipsel
OPTIMIZE_FOR_CPU=$(ARCH)
STAGING_DIR=$(OPENWRT_DIR)/buildroot/build_mipsel/staging_dir
KERNEL_DIR=$(OPENWRT_DIR)/buildroot/build_mipsel/linux
WRT_DIR=$(OPENWRT_DIR)/buildroot/build_mipsel/WRT54GS/release/src
ET_DIR=$(OPENWRT_DIR)/buildroot/build_mipsel/WRT54GS/release/src/et
TARGET_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-
TARGET_CC=$(TARGET_CROSS)gcc
TARGET_LD=$(TARGET_CROSS)ld
STRIP=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
CFLAGS_MODULE=-c -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
-finline-limit=5000 -G 0 -mno-abicalls -fno-pic -mips2 -Wa,--trap
-pipe -DMODULE -D__KERNEL__ -mlong-calls
all: admcfg adm.o
adm.o: adm.c
$(TARGET_CC) $(CFLAGS_MODULE) -I $(KERNEL_DIR)/include -I $(WRT_DIR)/include
-I $(ET_DIR)/sys -o adm.o adm.c
admcfg: admcfg.c
$(TARGET_CC) -o admcfg admcfg.c
$(STRIP) admcfg
clean:
rm adm.o admcfg
Hope it is helpful, for example if you want to write your own kernel module, using adm.o as example. (It was quite tricky to find out the right CFLAGS...)
cheers, ScrollLock
Marcosmas, how does it work so far?
Am particularly concerned about CPU load, as mentioned on this thread :
http://openwrt.org/forum/viewtopic.php?t=191
-Q
Ok, ADM6996 utils updated.
USAGE:
admcfg [<port> [option]]
port is in the form of "portX"
option is one of:
ENABLED, DISABLED - enable/disable port
100Mbps, 10Mbps - port speed
FD, HD - full duplex/half duplex
FLOW, NOFLOW - 802.3 flow control
TAG, UNTAG - output vlan tagging
TOS, VLAN - priority given to TOS/VLAN
PRIO, NOPRIO - port based priority
PVID:X - set the primary vlan id
vlanX - set the vlan mappings
I've downloaded the first test-release of the adm utils and there is something about bandwith control, tag shift for vlan grouping, etc. But in the latest version of this utils I don't find anything about that. I'm interesting in setting vlan tags greater than 15, and also setting a bandwith for each port.
How could I make this settings work?
Thanks
I've downloaded the first test-release of the adm utils and there is something about bandwith control, tag shift for vlan grouping, etc. But in the latest version of this utils I don't find anything about that. I'm interesting in setting vlan tags greater than 15, and also setting a bandwith for each port.
How could I make this settings work?
Thanks
Nico has a build of adm6996.o which uses procfs to control the port setting. It can set any vlan number you want. I only tried it on sveasoft and didn't test Nico's build on openwrt. I don't see why it shouldn't be working.
Nico has a build of adm6996.o which uses procfs to control the port setting. It can set any vlan number you want. I only tried it on sveasoft and didn't test Nico's build on openwrt. I don't see why it shouldn't be working.
It used to be in nicowrt, but since it is now deprecated, the module was re-compiled with a recent CVS buildroot.
The new package is available in my testing repository.
Feedback welcome, could be nice to see more packages in the stable repository one day
--
Nico
Nico has a build of adm6996.o which uses procfs to control the port setting. It can set any vlan number you want.
I didn't test the module yet, but I wonder which are the settings to modify in the /proc directory?
As I said in a previous post, I want to set up more than 16 tagged vlans and I don't know how to resolve this task, either with admcfg or with the /proc filesystem?
Thanks, and sorry about my English, I know I have to practise it :oops:
I didn't test the module yet, but I wonder which are the settings to modify in the /proc directory?
As I said in a previous post, I want to set up more than 16 tagged vlans and I don't know how to resolve this task, either with admcfg or with the /proc filesystem?
Thanks, and sorry about my English, I know I have to practise it :oops:
In /proc, if you want to set port 1 as access vlan 401,
/bin/echo "401" > /proc/sys/dev/adm6996/port1/vlan-group-mask
Ok, I could set up a port as vlanid > 15, that's fine. But what about setting up more than one vlan on the same port?
Another question, I read in the ADM datasheet that it is possible to control the bandwith on each port: 256k, 512k, 1M, 2M, 5M, 10M, 20M, 50M. Is this possible with the adm6996 module?