WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: requesting help for 2 internet key  (Read 6845 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: requesting help for 2 internet key
« Reply #15 on: April 11, 2011, 07:04:25 PM »
try this (adapted if parameters change)
Code: [Select]
sudo route del default gw 192.168.1.1
sudo route add default gw 10.64.64.64

Also avoid to have any dhcp client running, because that could overturn your settings later, static address for eth0 might be more simple.

Generally speaking, it might be easiest to kill udhcpc and have eth0 down while you are testing with ppp0.
« Last Edit: April 11, 2011, 08:22:50 PM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #16 on: April 11, 2011, 07:54:46 PM »
i don't have del & add among my commands, however, udhcpc is killed when I try to set the ppp0 in netcard conf of controlpanel, after uncheck "use DHCP"
« Last Edit: April 11, 2011, 07:56:31 PM by vinnie »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: requesting help for 2 internet key
« Reply #17 on: April 11, 2011, 08:06:45 PM »
i don't have del & add among my commands, however, udhcpc is killed when I try to set the ppp0 in netcard conf of controlpanel, after uncheck "use DHCP"
Yeah tinypoodle did give you slightly incomplete commands, it probably should have been:
Code: [Select]
sudo route del default gw 192.168.1.1
sudo route add default gw 10.64.64.64

But from my own experience with testing WiFi setup when I also have a working 'eth0' I can say with confidence: "that's just asking for trouble". As you now have two internet connection "fighting" with each other. Instead of trying to adjust routes, I simple turn off the 'eth0' NIC with sudo ifconfig eth0 down and the routing will sort itself out.

Please try this and then the four tests I gave you in reply #12 might show different results.

Edit: I don't see the need to mess around with 'udhcpc' processes when the 'eth0' NIC is down. IIRC I just kept 'udhcpc' (for 'eth0') running, and when I decided to re-activate 'eth0' (via sudo ifconfig eth0 up) it continued to use the settings it had originally obtained from my local router (which is just as well as typically each of my local clients gets the same local IP address assigned again and again).
« Last Edit: April 11, 2011, 08:14:18 PM by maro »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: requesting help for 2 internet key
« Reply #18 on: April 11, 2011, 08:25:03 PM »
i don't have del & add among my commands, however, udhcpc is killed when I try to set the ppp0 in netcard conf of controlpanel, after uncheck "use DHCP"
Yeah tinypoodle did give you slightly incomplete commands, it probably should have been:
Code: [Select]
sudo route del default gw 192.168.1.1
sudo route add default gw 10.64.64.64

Oops!   ::)
Sorry vinnie and thanks maro for rectifying that.
(last post corrected accordingly)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: requesting help for 2 internet key
« Reply #19 on: April 11, 2011, 08:33:47 PM »
But from my own experience with testing WiFi setup when I also have a working 'eth0' I can say with confidence: "that's just asking for trouble". As you now have two internet connection "fighting" with each other. Instead of trying to adjust routes, I simple turn off the 'eth0' NIC with sudo ifconfig eth0 down and the routing will sort itself out.

Please try this and then the four tests I gave you in reply #12 might show different results.

Edit: I don't see the need to mess around with 'udhcpc' processes when the 'eth0' NIC is down. IIRC I just kept 'udhcpc' (for 'eth0') running, and when I decided to re-activate 'eth0' (via sudo ifconfig eth0 up) it continued to use the settings it had originally obtained from my local router (which is just as well as typically each of my local clients gets the same local IP address assigned again and again).

Not being an expert in networking and more empirically speaking, my impression is that for multiple network interfaces without going into any particular configuration it could work fine under the condition that there is only one dhcpc client and other interfaces are statically configure, but only if the dhcpc interface is connected to the desirable default gateway.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #20 on: April 11, 2011, 09:01:19 PM »
@maro, here is the test

Code: [Select]
root@box:~# ifconfig eth0 down
Code: [Select]
root@box:~# wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: at
at
OK
--> Sending: AT+CGDCONT=1,"IP","internet.wind"
AT+CGDCONT=1,"IP","internet.wind"
OK
--> Modem initialized.
--> Sending: ATD*99#
--> Waiting for carrier.
ATD*99#
CONNECT 7200000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Tue Apr 12 02:21:36 2011
--> Pid of pppd: 13638
--> Using interface ppp0
--> pppd: H�l[08]`�l[08]
--> pppd: H�l[08]`�l[08]
--> pppd: H�l[08]`�l[08]
--> pppd: H�l[08]`�l[08]
--> pppd: H�l[08]`�l[08]
--> pppd: H�l[08]`�l[08]
--> local  IP address 164.132.23.235
--> pppd: H�l[08]`�l[08]
--> remote IP address 10.64.64.64
--> pppd: H�l[08]`�l[08]
--> primary   DNS address 193.70.152.25
--> pppd: H�l[08]`�l[08]
--> secondary DNS address 193.70.192.25
--> pppd: H�l[08]`�l[08]


Code: [Select]
tc@box:/$ ifconfig -a
dummy0    Link encap:Ethernet  HWaddr 9A:55:B6:B7:E6:F2  
          BROADCAST NOARP  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      Link encap:Ethernet  HWaddr 20:CF:30:6E:C8:D2  
          inet addr:164.132.63.82  Bcast:164.132.63.82  Mask:255.255.255.255
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:126060841 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132916 errors:0 dropped:0 overruns:0 carrier:12
          collisions:0 txqueuelen:1000
          RX bytes:229426766 (218.7 MiB)  TX bytes:15027641 (14.3 MiB)
          Interrupt:30

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:2325 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2325 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:225774 (220.4 KiB)  TX bytes:225774 (220.4 KiB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:164.132.23.235  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:118 (118.0 B)  TX bytes:154 (154.0 B)

wlan0     Link encap:Ethernet  HWaddr 48:5D:60:04:E8:F7  
          BROADCAST 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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


Code: [Select]
tc@box:/$ cat /etc/resolv.conf
nameserver 193.70.152.25
nameserver 193.70.192.25
(entered manually)


Code: [Select]
tc@box:/$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     *               255.255.255.255 UH    0      0        0 ppp0
127.0.0.1       *               255.255.255.255 UH    0      0        0 lo
default         164.132.63.254  0.0.0.0         UG    0      0        0 lo
default         151.81.44.254   0.0.0.0         UG    0      0        0 lo
default         127.0.0.254     0.0.0.0         UG    0      0        0 lo


Code: [Select]
tc@box:/$ ping 164.132.23.235
PING 164.132.23.235 (164.132.23.235): 56 data bytes
64 bytes from 164.132.23.235: seq=0 ttl=64 time=0.118 ms
64 bytes from 164.132.23.235: seq=1 ttl=64 time=0.083 ms
64 bytes from 164.132.23.235: seq=2 ttl=64 time=0.083 ms
^C
--- 164.132.23.235 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.083/0.094/0.118 ms


Code: [Select]
tc@box:/$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
...indefinitely time...

Code: [Select]
tc@box:/$ nslookup google.com
Server:    193.70.152.25
Address 1: 193.70.152.25

nslookup: can't resolve 'google.com'


Code: [Select]
tc@box:/$ wget -qO- http://example.com
wget: bad address 'example.com'


Now i go to bed, here is 3'o'clock, within four hours I have to wake up  ;D

I think tomorrow (actually, tonight) I'll try to do the whole process without ever having attacked the ethernet cable from the boot, and also tinypoddle's command (I forgot to try)

in the meantime, thanks maro & tinyp. for your help
« Last Edit: April 11, 2011, 09:04:34 PM by vinnie »

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: requesting help for 2 internet key
« Reply #21 on: September 28, 2011, 05:02:29 AM »
@vinnie
had you success with your project?
I try to make running a Huawei E1750 from www.fonic.de and Im interested in any result on your side.
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #22 on: September 28, 2011, 09:18:33 AM »
I had done with the MBD-220HU but then that modem was broken twice and I have renounce.
I remember you had to start without connecting any wires tinyconre network, or connect via "dial-up modem" not working.
At the time I did the tests with a ubuntu live, once I get a certainly configuration working, then I tried to make it work in tinycore.

I also looked for answers in the official forum:
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=4406#4406

Currently I have only the pen E173, but I could not get it to work, I connect through windows (cross cable).

I took notes, but I can not see if they are correct, I translate them to you quickly:

1)install usb-utils, and enter command "lsusb", annotate the output, insert key and reenter "lsusb", the new entry in second output is your modem (in my case is Bus 001  Device 007: ID 1c9e:f000)

2) install modeswitch and wvdial, I remember that a restart is required.
after restart insert the internetkey, wait a few minutes to do allow modeswitch to do its job (transform the device from mass storage to analog modem) and retype "lsusb", if string of modem is changed modeswith work correctly.
2bis) if the string remain the same you check if a file with the name of your device is in /usr/share/usb_modeswitch/vendor:product, otherwise you have to search in internet. (the command to tell to modeswith to swith a devise usb_modeswitch -c /usr/share/usb_modeswitch/vendor:product, but it should be automatic)

3) Once the modem has been properly recognized and switched (control with lsusb) you mount a modem properly with :"modprobe usbserial vendor=0xvendor product=0xproduct" (take valor from lsusb vendor --> xxxx:xxxx <-- product)

4) If all going well you must see in /dev/ ttyUSB2 ttyUSB3 ttyUSB1 ttyUSB0, for connect i use 2

5) edit /etc/wvdial.conf according to your key (search in internet), You sure you did not put an ethernet cable, I do not remember what was the reason but it gave me problems, otherwise reset. Control /etc/resolv.conf , to be sure you can use 8.8.8.8 and 8.8.4.4 (google dns)

9) start connection with sudo wvdial (and remember store /etc/wvdial.conf and /etc/resolv.conf to your backup file of tinycore)

All operations should be automatic unless wvdial configuration and its launch.
« Last Edit: September 28, 2011, 09:21:11 AM by vinnie »

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: requesting help for 2 internet key
« Reply #23 on: September 29, 2011, 01:47:48 PM »
Thanks Vinnie for the last status.
I am progressing in another thread. see http://forum.tinycorelinux.net/index.php/topic,11509.msg60985.html#msg60985
According your message I forgot to put /etc/resolv.conf in the .filetool.lst
I will have a look if this is the issue I currently have.
As I can see, you are the issuer of wvdial.tcz. Do you have any idea what are the reasons of the errors in the other thread?
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed