Flint
Well-Known Member
Doh! I can't believe I didn't try that- long day
Thanks milomak.
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
--- vpi:vci matches existing connection: ppp1
% Apply not accepted. Please fix the above issues first
enable 5
<enter default enable password "Admin">
wan
connection 2
connection type pppoe
connection name ppp2
atm pvc 8 35
atm qos ubr
nat enable
firewall enable
ppp authentication type auto
ppp authentication username <ADSL_USERNAME>
ppp authentication password <ADSL_PASSWORD>
ppp connection-mode keep-alive time 10
apply
<error here because pvc settings clash with already existing connection>
pppd plugin pppoe nas0 user XXXXXX password XXXXXX defaultroute mtu 1400 mru 1492 maxfail 10 demand idle 65520
What's up with these ping results (run from the router). Below is info from the router. I am able to browse both local and international sites. But when I run a wget from the router the host is unkown even though when I ping it I get results.
Code:# ping www.google.com PING www.l.google.com (64.233.189.104): 56 data bytes 64 bytes from 64.233.189.104: icmp_seq=0 ttl=246 time=320.0 ms 64 bytes from 64.233.189.104: icmp_seq=0 ttl=246 time=1330.0 ms (DUP!) 64 bytes from 64.233.189.104: icmp_seq=1 ttl=246 time=1010.0 ms 64 bytes from 64.233.189.104: icmp_seq=1 ttl=246 time=2020.0 ms (DUP!) 64 bytes from 64.233.189.104: icmp_seq=2 ttl=246 time=2020.0 ms 64 bytes from 64.233.189.104: icmp_seq=2 ttl=246 time=3030.0 ms (DUP!) 64 bytes from 64.233.189.104: icmp_seq=3 ttl=246 time=3030.0 ms 64 bytes from 64.233.189.104: icmp_seq=3 ttl=246 time=4040.0 ms (DUP!) --- www.l.google.com ping statistics --- 8 packets transmitted, 4 packets received, 4 duplicates, 50% packet loss round-trip min/avg/max = 320.0/2100.0/4040.0 ms # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 196.209.xxx.xxx 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 196.43.xxx.xxx 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1 196.43.xxx.xxx 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1 41.241.xxx.xxx 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 239.0.0.0 0.0.0.0 255.0.0.0 U 1 0 0 br0 0.0.0.0 41.241.xxx.xxx 0.0.0.0 UG 0 0 0 ppp1 0.0.0.0 196.209.xxx.xxx 0.0.0.0 UG 0 0 0 ppp0 # ifconfig ppp0 ppp0 Link encap:Point-Point Protocol inet addr:196.209.xxx.xxx P-t-P:196.209.xxx.xxx Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 ASYMMTU:1500 RX packets:588 errors:0 dropped:0 overruns:0 frame:0 TX packets:484 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:239220 (233.6 kb) TX bytes:43332 (42.3 kb) # ifconfig ppp1 ppp1 Link encap:Point-Point Protocol inet addr:41.244.xxx.xxx P-t-P:41.241.xxx.xxx Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 ASYMMTU:1500 RX packets:1264 errors:0 dropped:0 overruns:0 frame:0 TX packets:1102 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:631218 (616.4 kb) TX bytes:186546 (182.1 kb)
# ifconfig ppp0
ppp0 Link encap:Point-Point Protocol
inet addr:41.242.101.229 P-t-P:41.242.64.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 ASYMMTU:1500
RX packets:3206 errors:0 dropped:0 overruns:0 frame:0
TX packets:3343 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1682451 (1.6 Mb) TX bytes:511549 (499.5 kb)
# ifconfig ppp1
ppp1 Link encap:Point-Point Protocol
inet addr:10.64.64.65 P-t-P:10.112.112.113 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 ASYMMTU:1500
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:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
# route add -net 196.14.52.0 netmask 255.255.255.0 ppp1
Tracing route to www.news24.co.za [196.14.52.227]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms login.router [10.0.0.2]
2 * * * Request timed out.
3 36 ms 39 ms 36 ms rrba [196.43.9.121]
4 37 ms 39 ms 39 ms 196.43.25.138
5 38 ms 40 ms 36 ms internet [196.25.127.182]
6 37 ms 40 ms 38 ms 168.209.86.165
7 37 ms 39 ms 39 ms core1a [196.26.0.7]
8 61 ms 61 ms 59 ms 168.209.100.74
9 61 ms 59 ms 59 ms 168.209.6.252
10 * * * Request timed out.
11 60 ms 61 ms 62 ms www.news24.co.za [196.14.52.227]
Trace complete.
#!/bin/sh
cd ~
curl http://alm.za.net/ip/localroutes4.txt | while read line
do
[ "$( echo $line | grep \/32 )" ] && line=$( echo $line | sed s/net/host/ )
echo $line | sed s/\$LOCAL/ppp1/
done > ~/newroutes.txt
cat ~/newroutes.txt | while read route
do
export $(ipcalc -m $(echo $route | sed -e 's/^.*net\ \([0-9\.\/]*\).*$/\1/'))
echo $route | sed -e "s/\/[0-9]*/ netmask $NETMASK/"
done > ~/netroutes.txt
rm -f localroutes4.txt
rm -f newroutes.txt
cat netroutes.txt | grep route > clean.txt
cat clean.txt | while read line
do
echo 'send "'$line'\r"'
echo 'expectprompt "#"'
done > routes.txt
rm -f setrouter.sh
cat routerlogin.txt routes.txt dns.txt > setrouter.sh
chmod +x setrouter.sh
rm -f netroutes.txt
rm -f routes.txt
rm -f clean.txt
[root:~#] cat routerlogin.txt
/usr/bin/expect << EOF
proc expectprompt { txt } {
expect {
\$txt {}
timeout exit;
eof exit;
}
}
set timeout 60
spawn telnet 10.0.0.2
expectprompt "login:"
send "root\r"
expectprompt "Password:"
send "insert_your_router_password_here\r"
expectprompt "cli>"
send "shell\r"
expectprompt "#"
[root:~#] cat dns.txt
send "route add -host 196.43.46.190 ppp0\r"
expectprompt "#"
send "route add -host 196.43.38.190 ppp0\r"
expectprompt "#"
send "exit\r"
expectprompt "cli>"
send "quit\r"