Page 1 of 2
troubleshooting lan connection
Posted: Mon Dec 14, 2009 6:32 pm
by eli2k
I'm trying to do part 8 right now, connected a cross-over cable, and modified the network config file:
Code: Select all
#option type bridge
option ifname "eth0.0"
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
When I try to telnet to 192.168.1.1, it doesn't seem to work, and if I telnet over the wireless, that doesn't work either. So I had to go back to the serial port (luckily that still works, whew!). Anything I can try to figure out what's going on?
Thanks,
- Eli
Re: troubleshooting lan connection
Posted: Tue Dec 15, 2009 2:05 pm
by mightyohm
Are you connecting to a LAN port on the router (and not a WAN port)?
Is your home network also on the 192.168.1.xxx subnet, and if so, have you taken measures to ensure that traffic to 192.168.1.1 actually gets to the router?
Re: troubleshooting lan connection
Posted: Tue Dec 15, 2009 2:42 pm
by eli2k
Yes, I have tried two different LAN ports. My home network is on 10.0.0.x subnet, and it's mostly wireless. In the computer network settings (XP), I set a random IP under 192.168.1.x w/gateway IP of 192.168.1.1, not sure if there was anything else I am supposed to change.
Re: troubleshooting lan connection
Posted: Tue Dec 15, 2009 7:03 pm
by mightyohm
And I just noticed - why are you using a cross over cable? Try a normal ethernet cable instead.
Re: troubleshooting lan connection
Posted: Tue Dec 15, 2009 8:01 pm
by eli2k
Ah, good point. I will try a normal cable later tonight. I used a cross-over because in your tutorial you said "Save changes, restart the router, and connect an ethernet crossover cable (straight cable might work on some computers) to the router." I guess it makes sense to use a normal cable.
update - nah, that did not work either. I'm not familiar with linux. Is there a way to check the current network settings, kinda like the network info in Windows?
Re: troubleshooting lan connection
Posted: Sat Dec 19, 2009 7:59 am
by mightyohm
Hmm, good question! Does ifconfig work on the router? I don't have mine here to check.
Did you set a password when you were logged into the router on the serial console? If so, telnet won't work anymore. You would need to use ssh instead.
Re: troubleshooting lan connection
Posted: Tue Dec 22, 2009 10:25 pm
by eli2k
I don't think I set a password, because I can telnet normally over the wireless connection. The first code snippet is running ifconfig when the wireless is working normally:
Code: Select all
root@OpenWrt:/# ifconfig
br-lan Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:10.0.0.4 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4445 (4.3 KiB) TX bytes:6211 (6.0 KiB)
eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:16465 (16.0 KiB)
Interrupt:4
eth0.0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:4011 (3.9 KiB)
eth0.1 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:12180 (11.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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)
wl0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:5150
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5117 (4.9 KiB) TX bytes:6268 (6.1 KiB)
Interrupt:2 Base address:0x5000
root@OpenWrt:/#
Connection to host lost.
This second snippet is after I changed the configuration settings in /etc/config/network file.
Code: Select all
eth0 Link encap:Ethernet
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:15580 (15.2 KiB)
Interrupt:4
eth0.0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.173.1 Bcast:192.168.173.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 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)
eth0.1 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:15428 (15.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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)
wl0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.173.1 Bcast:192.168.173.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23 errors:0 dropped:0 overruns:0 frame:6406
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3833 (3.7 KiB) TX bytes:1241 (1.2 KiB)
Interrupt:2 Base address:0x5000
root@OpenWrt:/#
Re: troubleshooting lan connection
Posted: Thu Dec 24, 2009 11:36 pm
by mightyohm
Very interesting. Can you post both copies of your /etc/config/network and /etc/config/wireless as well?
Re: troubleshooting lan connection
Posted: Fri Dec 25, 2009 12:29 am
by eli2k
Here they are, below. have a Merry Christmas!
/etc/config/wireless
Code: Select all
config wifi-device wl0
option type broadcom
option channel 2
# REMOVE THIS LINE TO ENABLE WIFI:
# option disabled 1
config wifi-iface
option device wl0
option network lan
option mode sta
option ssid MYSSID
option encryption psk
option key MYKEY
/etc/config/network
Code: Select all
#### VLAN configuration
config switch eth0
option vlan0 "1 2 3 4 5*"
option vlan1 "0 5"
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto dhcp
# option proto static
# option ipaddr 192.168.173.1
# option netmask 255.255.255.0
# option gateway 192.168.173.1
# option dns 192.168.173.1
#### WAN configuration
config interface wan
option ifname "eth0.1"
option proto dhcp
Re: troubleshooting lan connection
Posted: Sun Dec 27, 2009 11:21 pm
by mightyohm
A few things I see here:
In /etc/config/wireless:
The line that says "option type lan" should read "option type wan" instead.
/etc/config/network:
I recommend setting up the LAN like this:
Code: Select all
#### LAN configuration
config interface lan
#option type bridge
option ifname "eth0.0"
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
I also recommend making the firewall config changes listed in part 8 of the tutorial (
http://mightyohm.com/blog/2009/05/build ... -and-ends/).
Try making those fixes and see if you can telnet to 192.168.1.1 from one of the LAN ports of the router, or over the wireless (note that you'll have to use the correct WAN IP for the router, this can usually be determined by looking at the status page of your home's wireless network.)