1. Make sure internet connection is ok.
2. Execute the following command
opkg update
opkg install
or we can it under a single line
opkg update && opkg install
1. Make sure internet connection is ok.
2. Execute the following command
opkg update
opkg install
or we can it under a single line
opkg update && opkg install
Hi all, I’ve OpenWrt installed in VirtualBox. Network has been set to NAT so that I can download update from the internet.
When I perform ping test to internet, I found that it has been failed. Then, I realized eth0 don’t have valid ip address. So I rebooted this machine but still don’t get valid ip address.
I’ve also run DHCP client, udhcpc in order to get a new ip but failed. I’ve attached the screenshot here for your reference. Please help.
Network Config
DISCUSSION
https://forum.openwrt.org/viewtopic.php?pid=210226#p210226
REFERENCE
http://wiki.openwrt.org/doc/uci/network
SOLUTION
Chnage the proto from static to dhcp
I was wondering is there anyone experienced this kind of issue before? I was getting this error when configuring authorized_keys in /home/tc/.ssh/authorized_keys
Configuration steps are as follows:
1. Generate public/private key pair using PuTTY Key Generator
2. Copy generated public key to /home/tc/.ssh/authorized_keys
tc@Core1:/$ ls -la /home/tc/ | grep ssh
drwxr-sr-x 2 tc staff 60 Aug 17 17:25 .ssh/
tc@Core1:/$tc@Core1:/$ ls -la /home/tc/.ssh/ | grep key
-rw-r–r– 1 tc staff 226 Aug 17 17:25 authorized_keys
tc@Core1:/$
3. Configured putty client with the private key
4. Trying to login but getting the following error message. “Server refused our key”
Using username “tc”.
Server refused our key
tc@192.168.10.11‘s password:
DISCUSSION
PROBLEM
You do not have enough RAM to install CENTOS on this machine
if RAM: 128 MMB
if RAM: 256 – 392 MB
SOLUTION
Change the minimum memory to 512 MB for GUI or 392MB for CLI.
1.Select devices at host > Install Guest Additions …
2. Mount cdrom
tc@Core1:/$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 8 Aug 17 12:57 /dev/cdrom -> /dev/sr0
tc@Core1:/$tc@Core1:/$ mount /dev/sr0
tc@Core1:/$or
tc@Core1:/$ mount /mnt/sr0/
tc@Core1:/$
3. Check cdrom content
tc@Core1:/$ cd /mnt/sr0/
tc@Core1:/mnt/sr0$ ls -l
total 52898
dr-xr-xr-x 2 root root 2048 Jul 4 14:19 32Bit/
dr-xr-xr-x 2 root root 2048 Jul 4 14:19 64Bit/
-r-xr-xr-x 1 root root 647 Sep 13 2012 AUTORUN.INF
dr-xr-xr-x 2 root root 2048 Jul 4 14:19 OS2/
-r-xr-xr-x 1 root root 9133518 Jul 4 14:18 VBoxLinuxAdditions.run
-r-xr-xr-x 1 root root 19089408 Jul 4 15:10 VBoxSolarisAdditions.pkg
-r-xr-xr-x 1 root root 15999344 Jul 4 14:04 VBoxWindowsAdditions-amd64.exe
-r-xr-xr-x 1 root root 9611144 Jul 4 13:56 VBoxWindowsAdditions-x86.exe
-r-xr-xr-x 1 root root 311568 Jul 4 13:55 VBoxWindowsAdditions.exe
-r-xr-xr-x 1 root root 6966 Jul 4 14:14 autorun.sh
dr-xr-xr-x 2 root root 2048 Jul 4 14:19 cert/
-r-xr-xr-x 1 root root 5523 Jul 4 14:14 runasroot.sh
tc@Core1:/mnt/sr0$
Install VBoxLinuxAdditions.run
tc@Core1:/mnt/sr0$ ./VBoxLinuxAdditions.run
Verifying archive integrity… All good.
Uncompressing VirtualBox 4.2.16 Guest Additions for Linux…………
This program must be run with administrator privileges. Aborting
tc@Core1:/mnt/sr0$
Install VBoxLinuxAdditions.run (must be run with administrator privileges/sudo)
tc@Core1:/mnt/sr0$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity… All good.
Uncompressing VirtualBox 4.2.16 Guest Additions for Linux…………
VirtualBox Guest Additions installer
Copying additional installer modules …
Killed
tar: short read
tc@Core1:/mnt/sr0$
Problem
Error message
Killed
tar: short read
DISCUSSION
NETWORK DIAGRAM
PROBLEM
tc@Core1:~$ traceroute 172.16.0.1
traceroute to 172.16.0.1 (172.16.0.1), 30 hops max, 38 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
TROUBLESHOOTING STEPS
Check routes on all devices
tc@Core1:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.0.2 0.0.0.0 UG 0 0 0 eth1
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core1:~$tc@Core2:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 * 255.255.0.0 U 0 0 0 eth2
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core2:~$tc@Core3:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 172.16.0.2 255.255.255.0 UG 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 * 255.255.0.0 U 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core3:~$
FINDINGS
All routes look fine
FURTHER TROUBLESHOOTING WITH TCPDUMP
Core1, interface eth1
tc@Core1:~$ sudo tcpdump -i 2 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 68 bytes
12:24:41.681744 IP 10.0.0.1.42332 > 172.16.0.1.33435: UDP, length 10
12:24:46.687038 IP 10.0.0.1.42332 > 172.16.0.1.33436: UDP, length 10
12:24:46.690790 arp who-has 10.0.0.2 tell 10.0.0.1
12:24:46.691203 arp reply 10.0.0.2 is-at 08:00:27:10:0c:49
12:24:51.692250 IP 10.0.0.1.42332 > 172.16.0.1.33437: UDP, length 10
12:24:56.698376 IP 10.0.0.1.42332 > 172.16.0.1.33438: UDP, length 10
12:25:01.704608 IP 10.0.0.1.42332 > 172.16.0.1.33439: UDP, length 10
12:25:06.709748 IP 10.0.0.1.42332 > 172.16.0.1.33440: UDP, length 10
12:25:11.714829 IP 10.0.0.1.42332 > 172.16.0.1.33441: UDP, length 10
12:25:11.716603 arp who-has 10.0.0.2 tell 10.0.0.1
12:25:11.717025 arp reply 10.0.0.2 is-at 08:00:27:10:0c:49
^C
11 packets captured
11 packets received by filter
0 packets dropped by kernel
tc@Core1:~$
Core2, interface eth1
tc@Core2:~$ sudo tcpdump -i 2 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 68 bytes
12:32:17.105116 IP 10.0.0.1.42332 > 172.16.0.1.33435: UDP, length 10
12:32:22.293545 IP 10.0.0.1.42332 > 172.16.0.1.33436: UDP, length 10
12:32:22.297261 arp who-has 10.0.0.2 tell 10.0.0.1
12:32:22.297269 arp reply 10.0.0.2 is-at 08:00:27:10:0c:49
12:32:27.481478 IP 10.0.0.1.42332 > 172.16.0.1.33437: UDP, length 10
12:32:32.669707 IP 10.0.0.1.42332 > 172.16.0.1.33438: UDP, length 10
12:32:37.858409 IP 10.0.0.1.42332 > 172.16.0.1.33439: UDP, length 10
12:32:43.046765 IP 10.0.0.1.42332 > 172.16.0.1.33440: UDP, length 10
12:32:48.235227 IP 10.0.0.1.42332 > 172.16.0.1.33441: UDP, length 10
12:32:48.237083 arp who-has 10.0.0.2 tell 10.0.0.1
12:32:48.237099 arp reply 10.0.0.2 is-at 08:00:27:10:0c:49
^C
11 packets captured
11 packets received by filter
0 packets dropped by kernel
tc@Core2:~$
Core2, interface eth2
tc@Core2:~$ sudo tcpdump -i 3 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 68 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
tc@Core2:~$
Core3, interface eth1
tc@Core3:~$ sudo tcpdump -i 2 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 68 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
tc@Core3:~$
SOLUTION
???
DISCUSSION
NETWORK DIAGRAM
PROBLEM
tc@Core1:~$ traceroute 172.16.0.1
traceroute to 172.16.0.1 (172.16.0.1), 30 hops max, 38 byte packets
1 10.0.0.2 (10.0.0.2) 0.350 ms 0.310 ms 0.223 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
TROUBLESHOOTING STEPS
1, Check route in all devices
tc@Core1:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 10.0.0.2 255.255.255.0 UG 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core1:~$tc@Core2:/opt$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 * 255.255.0.0 U 0 0 0 eth2
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core2:/opt$tc@Core3:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 * 255.255.0.0 U 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core3:~$
FINDINGS
There is no return route to 10.0.0.0 at Core3
tc@Core3:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 * 255.255.0.0 U 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core3:~$
We can also test route with ip route get, ping or traceroute command
tc@Core3:~$ ip route get 10.0.0.1
RTNETLINK answers: Network is unreachable
tc@Core3:~$tc@Core3:~$ ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
ping: sendto: Network is unreachable
tc@Core3:~$tc@Core3:~$ traceroute 10.0.0.1
traceroute to 10.0.0.1 (10.0.0.1), 30 hops max, 38 byte packets
1traceroute: sendto: Network is unreachable
tc@Core3:~$
SOLUTION
Add route at Core3
FORMAT: route add –net <destination-network> gw <next-hop-gateway>
EXAMPLE: route add -net 10.0.0.0/24 gw 172.16.0.2
tc@Core3:~$ sudo route add -net 10.0.0.0/24 gw 172.16.0.2
tc@Core3:~$
VERIFY ROUTE FROM Core3
tc@Core3:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 172.16.0.2 255.255.255.0 UG 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 * 255.255.0.0 U 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core3:~$tc@Core3:~$ ip route get 10.0.0.1
10.0.0.1 via 172.16.0.2 dev eth1 src 172.16.0.1
cache
tc@Core3:~$tc@Core3:~$ traceroute 10.0.0.1
traceroute to 10.0.0.1 (10.0.0.1), 30 hops max, 38 byte packets
1 172.16.0.2 (172.16.0.2) 0.422 ms 0.314 ms 0.259 ms
2 10.0.0.1 (10.0.0.1) 0.608 ms 0.643 ms 0.609 ms
tc@Core3:~$tc@Core3:~$ ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: seq=0 ttl=63 time=2.385 ms
64 bytes from 10.0.0.1: seq=1 ttl=63 time=0.888 ms
^C
— 10.0.0.1 ping statistics —
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.888/1.636/2.385 ms
tc@Core3:~$
VERIFY ROUTE FROM Core1
tc@Core1:~$ ip route get 172.16.0.1
172.16.0.1 via 10.0.0.2 dev eth1 src 10.0.0.1
cache ipid 0xa95d
tc@Core1:~$tc@Core1:~$ traceroute 172.16.0.1
traceroute to 172.16.0.1 (172.16.0.1), 30 hops max, 38 byte packets
1 10.0.0.2 (10.0.0.2) 0.303 ms 0.281 ms 0.214 ms
2 172.16.0.1 (172.16.0.1) 0.598 ms 0.496 ms 0.479 ms
tc@Core1:~$tc@Core1:~$ ping 172.16.0.1
PING 172.16.0.1 (172.16.0.1): 56 data bytes
64 bytes from 172.16.0.1: seq=0 ttl=63 time=0.948 ms
64 bytes from 172.16.0.1: seq=1 ttl=63 time=0.775 ms
64 bytes from 172.16.0.1: seq=2 ttl=63 time=1.057 ms
^C
— 172.16.0.1 ping statistics —
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.775/0.926/1.057 ms
tc@Core1:~$
NETWORK DIAGRAM
PROBLEM
tc@Core1:~$ traceroute 172.16.0.1
traceroute to 172.16.0.1 (172.16.0.1), 30 hops max, 38 byte packets
1traceroute: sendto: Network is unreachable
tc@Core1:~$tc@Core1:~$ ping 172.16.0.1
PING 172.16.0.1 (172.16.0.1): 56 data bytes
ping: sendto: Network is unreachable
tc@Core1:~$tc@Core1:~$ ip route get 172.16.0.1
RTNETLINK answers: Network is unreachable
tc@Core1:~$
SOLUTION
1. Check existing route
tc@Core1:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core1:~$
2. Since there is no route to 172.16.0.1, add it with the following command
FORMAT: route add –net <destination-network> gw <next-hop-gateway>
EXAMPLE: route add -net 172.16.0.0/24 gw 10.0.0.2
3. Check route again
tc@Core1:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 10.0.0.2 255.255.255.0 UG 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core1:~$
4. Verify with ping/traceroute/ip route get command
tc@Core1:~$ ip route get 172.16.0.1
172.16.0.1 via 10.0.0.2 dev eth1 src 10.0.0.1
cache
tc@Core1:~$
I’m trying to setup a basic networking lab with Tiny Core Linux.
I’ve setup all necessary routing configurations, unfortunately, Core_1 still unable to communicate with Core_3.
IP Setting
tc@Core1:~$ alias i
i=’ifconfig | grep dd’
tc@Core1:~$tc@Core1:~$ i
eth0 Link encap:Ethernet HWaddr 08:00:27:6C:E7:79
inet addr:192.168.10.11 Bcast:192.168.10.255 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr 08:00:27:26:33:AF
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
inet addr:127.0.0.1 Mask:255.0.0.0
tc@Core1:~$tc@Core2:~$ i
eth0 Link encap:Ethernet HWaddr 08:00:27:CE:5F:07
inet addr:192.168.10.12 Bcast:192.168.10.255 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr 08:00:27:10:0C:49
inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.0.0.0
eth2 Link encap:Ethernet HWaddr 08:00:27:36:07:3E
inet addr:172.16.0.2 Bcast:172.16.255.255 Mask:255.255.0.0
inet addr:127.0.0.1 Mask:255.0.0.0
tc@Core2:~$tc@Core3:~$ i
eth0 Link encap:Ethernet HWaddr 08:00:27:46:BF:41
inet addr:192.168.10.13 Bcast:192.168.10.255 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr 08:00:27:37:61:DF
inet addr:172.16.0.1 Bcast:172.16.255.255 Mask:255.255.0.0
inet addr:127.0.0.1 Mask:255.0.0.0
tc@Core3:~$
Original Route
tc@Core1:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core1:~$tc@Core2:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 * 255.255.0.0 U 0 0 0 eth2
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core2:~$tc@Core3:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 * 255.255.0.0 U 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core3:~$
Test Route
tc@Core1:~$ traceroute 172.16.0.1
traceroute to 172.16.0.1 (172.16.0.1), 30 hops max, 38 byte packets
1traceroute: sendto: Network is unreachable
tc@Core1:~$tc@Core1:~$ ip route get 172.16.0.1
RTNETLINK answers: Network is unreachable
tc@Core1:~$tc@Core2:~$ ip route get 172.16.0.1
172.16.0.1 dev eth2 src 172.16.0.2
cache
tc@Core2:~$tc@Core3:~$ ip route get 172.16.0.1
local 172.16.0.1 dev lo src 172.16.0.1
cache <local>
tc@Core3:~$
Adding Static Route
tc@Core1:~$ sudo route add -net 172.16.0.0 netmask 255.255.255.0 gw 10.0.0.2
tc@Core1:~$
Verify Route
tc@Core1:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
172.16.0.0 10.0.0.2 255.255.255.0 UG 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
tc@Core1:~$tc@Core1:~$ ip route get 172.16.0.1
172.16.0.1 via 10.0.0.2 dev eth1 src 10.0.0.1
cache
tc@Core1:~$
Traceroute Test
tc@Core1:~$ traceroute 172.16.0.1
traceroute to 172.16.0.1 (172.16.0.1), 30 hops max, 38 byte packets
1 * * *
2 * * *
3 * * *
tcpdump in Core2
tc@Core2:~$ sudo tcpdump -i 2 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 68 bytes
16:00:03.193443 IP 10.0.0.1.52221 > 172.16.0.1.33435: UDP, length 10
16:00:08.201546 IP 10.0.0.1.52221 > 172.16.0.1.33436: UDP, length 10
16:00:13.208567 IP 10.0.0.1.52221 > 172.16.0.1.33437: UDP, length 10
Hi all, please advise as I can’t find bashrc file in Tiny Core Linux.
root@box:/# find / -name bashrc
root@box:/# find / -name bash
root@box:/#
Reference:
http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
Discussion: