PDA

Bekijk de volledige versie : Help with vlans



WheresWaldo
31-01-2009, 10:57
I have searched the entire forum and I have an issue with vlan. I am trying to set up a vlan to access a speedstream modem that is in bridge mode. I am using this script:

#!/bin/sh

#IP Address of the modem, must be a different network from your local LAN.
#If you use 192.168.x.x for LAN then use 10.0.0.x for modem, etc.
#Obviously you need to configure the actual DSL modem to use the address.
MODEM_IP="192.168.254.254"

#IP address that will be bound to vlan1, just decrement MODEM_IP by 1.
VLAN_IP="192.168.254.253"

#Setup network interface and firewall rules.
ifconfig vlan1 $VLAN_IP netmask 255.255.255.0
iptables -A forwarding_rule -d $MODEM_IP -j ACCEPT
iptables -t nat -A POSTROUTING -d $MODEM_IP -j MASQUERADE
When I executed the script nothing happened. So I proceeded to execute one line at a time. When the ifconfig line is run I get the following response.

SIOCSIFADDR: No such device
SIOCSIFNETMASK: No such device
So I look around and issue an ifconfig -a command and ge the folllowing.

br0 Link encap:Ethernet HWaddr 00:23:54:5F:7B:CC
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::223:54ff:fe5f:7bcc/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16431 errors:0 dropped:0 overruns:0 frame:0
TX packets:22832 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1471848 (1.4 MiB) TX bytes:18362776 (17.5 MiB)

eth0 Link encap:Ethernet HWaddr 00:23:54:5F:7B:CC
inet6 addr: fe80::223:54ff:fe5f:7bcc/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12307 errors:0 dropped:0 overruns:0 frame:0
TX packets:23652 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1307906 (1.2 MiB) TX bytes:18190643 (17.3 MiB)
Interrupt:4 Base address:0x1000

eth1 Link encap:Ethernet HWaddr 00:23:54:5F:7B:CC
inet6 addr: fe80::223:54ff:fe5f:7bcc/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6677 errors:0 dropped:0 overruns:0 frame:0
TX packets:6966 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:5729193 (5.4 MiB) TX bytes:921012 (899.4 KiB)
Interrupt:5 Base address:0x2000

eth2 Link encap:Ethernet HWaddr 00:23:54:5F:7B:CC
inet6 addr: fe80::223:54ff:fe5f:7bcc/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4117 errors:0 dropped:0 overruns:0 frame:910160
TX packets:7032 errors:39 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:442534 (432.1 KiB) TX bytes:1428739 (1.3 MiB)
Interrupt:12 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MULTICAST MTU:16436 Metric:1
RX packets:4750 errors:0 dropped:0 overruns:0 frame:0
TX packets:4750 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:417564 (407.7 KiB) TX bytes:417564 (407.7 KiB)

ppp0 Link encap:Point-Point Protocol
inet addr:75.117.83.135 P-t-P:75.117.80.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING MULTICAST MTU:1492 Metric:1
RX packets:6289 errors:0 dropped:0 overruns:0 frame:0
TX packets:6560 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:5540690 (5.2 MiB) TX bytes:763830 (745.9 KiB)

sit0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

I tried to use robocfg to issue the following command.

robocfg switch disable vlans enable reset vlan 0 ports "1 2 3 4 5t" vlan 1 ports "0 5t" port 0 state enabled stp none switch enable
But it doesn't appear to work correctly. It does shut of the switch but it never comes back with the enable parameter.

It appears that none of the vlans exist nor can they be created. I am using the latest oleg firmware on a new Asus WL-500W. Any assistance would be appreciated.