LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Internet Sharing using Edge/Gprs Modem & LAN/Router (http://www.linuxquestions.org/questions/linux-networking-3/internet-sharing-using-edge-gprs-modem-and-lan-router-808502/)

cyberdudez 05-18-2010 12:39 AM

Internet Sharing using Edge/Gprs Modem & LAN/Router
 
I use Opensuse 11.2 & Edge/Gprs Modem to connect Internet.

I configured /etc/wvdial.conf & /etc/resolv.conf. Now I can connect Internet using this command "wvdial MYNET" in terminal.

After connecting It gives me that info in terminal :
............
ATDT*99***1#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon May 17 15:26:23 2010
--> Pid of pppd: 11095
--> Using interface ppp0
--> local IP address 10.80.72.44
--> remote IP address 192.200.1.21
--> primary DNS address 203.223.92.100
--> secondary DNS address 203.223.93.100
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect



Now I want to share my internet using Lan card & Netgear Router. If i connect my PC with Router using wire & change option ON BOOT find this device in ifup then it'll show in ifconfig command.

My Router IP : 192.168.0.1
& It gives my PC an IP automatically : 192.168.0.2

I can ping my router.. even I can browse Router Admin page in browser. No problem there.

But now If i want to connect my net using wvdial command... net connected... but no data passing!!! If i disable Lan card in ifup then Edge/Gprs net connection again OK!

How can I solve this problem? please need assistance.

jschiwal 05-18-2010 01:35 AM

Could you provide a link to your modem and router model? I googled for Edge/Gprs and found different types of modems. One was wireless while another was a usb dongle.

This openSuSE wiki page may help with using YaST 2 to configure internet sharing: http://en.opensuse.org/ICS

cyberdudez 05-18-2010 02:55 AM

Internet Sharing using Edge/Gprs Modem & LAN/Router
 
Quote:

Originally Posted by jschiwal (Post 3972376)
Could you provide a link to your modem and router model? I googled for Edge/Gprs and found different types of modems. One was wireless while another was a usb dongle.

This openSuSE wiki page may help with using YaST 2 to configure internet sharing: http://en.opensuse.org/ICS


My PC connected to Router using WIRE connection. I can enable/disable my LAN Card using YAST > Network Settings

If I enable My Lan Card : IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY

linux-l86c:/home/sakib # ifconfig
eth1 Link encap:Ethernet HWaddr 00:27:19:B5:BD:92
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::227:19ff:feb5:bd92/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1276 (1.2 Kb) TX bytes:2369 (2.3 Kb)
Interrupt:19 Base address:0xef00

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 MTU:16436 Metric:1
RX packets:481 errors:0 dropped:0 overruns:0 frame:0
TX packets:481 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:248986 (243.1 Kb) TX bytes:248986 (243.1 Kb)


Then I can ping my Router(ping 192.168.1.1) & can also browse the Router Admin Page(http://192.168.1.1/start.htm)
My Router Model : Netgear 54 Mbps Wireless Router model WGR614 v6

Now I need to connect INTERNET using my EDGE/GPRS Modem

linux-l86c:/home/sakib # wvdial blink
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","blweb"
AT+CGDCONT=1,"IP","blweb"
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon May 17 16:33:43 2010
--> Pid of pppd: 3335
--> Using interface ppp0
--> local IP address 10.82.23.115
--> remote IP address 192.200.1.21
--> primary DNS address 203.223.92.100
--> secondary DNS address 203.223.93.100
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> warning, can't find address for `www.suse.de`
--> warning, address lookup does not work
--> Nameserver (DNS) failure, the connection may not work.
--> Connected... Press Ctrl-C to disconnect


It's connected but a WARNING showed! Now if I try to browse a page in Firefox, no response there!

This is ifconfig result after connecting using Edge/Gprs Modem :

linux-l86c:/home/sakib # ifconfig
eth1 Link encap:Ethernet HWaddr 00:27:19:B5:BD:92
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::227:19ff:feb5:bd92/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1576 (1.5 Kb) TX bytes:8165 (7.9 Kb)
Interrupt:19 Base address:0xef00

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 MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:480 (480.0 b) TX bytes:480 (480.0 b)

ppp0 Link encap:Point-to-Point Protocol
inet addr:10.82.23.115 P-t-P:192.200.1.21 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:64 (64.0 b) TX bytes:125 (125.0 b)




Now If I disable my LAN CARD using YAST > Network Settings then try to reconnect my Edge/Gprs Modem :

linux-l86c:/home/sakib # wvdial blink
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","blweb"
AT+CGDCONT=1,"IP","blweb"
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon May 17 16:39:26 2010
--> Pid of pppd: 9244
--> Using interface ppp0
--> local IP address 10.80.66.122
--> remote IP address 192.200.1.21
--> primary DNS address 203.223.92.100
--> secondary DNS address 203.223.93.100
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect


It's working, no warning showed! I can browse internet now!

My Edge/Gprs Modem Homepage : http://www.sentarwireless.com/rdr/?l...=st860u_en.php
I installed this modem in my Opensuse 11.2 using this tutorial : http://www.sentarwireless.com/rdr/?a...U&lang=english

I just need to edit 2 files : /etc/wvdial.conf, /etc/resolv.conf

linux-l86c:/home/sakib # vi /etc/wvdial.conf
[Modem0]
Modem = /dev/ttyACM0
Baud = 460800
Dial Command = ATDT
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
[Dialer blink]
Username = a
Password = b
Phone = *99***1#
Init3 = AT+CGDCONT=1,"IP","blweb"
Stupid Mode = 1
Inherits = Modem0

linux-l86c:/home/sakib # vi /etc/resolv.conf
nameserver 203.223.92.100
nameserver 203.223.93.100


My problem is Edge modem working perfectly if I disabled LAN CARD. I need to enable it to share internet connection with my other PC.

jschiwal 05-18-2010 03:18 AM

Make sure that your modem is listed at the default gateway device. When you are using the eth0 interface, the routers DHCP server is supplying it's own address as the nameserver (check in /etc/resolv.conf) and it's IP address as the default gateway.

If you can, disable the routers DHCP server. Given that the internet connection is through a different interface on your computer, you don't need a router but can do with a switch. The routing, masquerading, firewall & dhcp supplied by your SuSE box.

You can follow this howto to enable ip_forwarding, masquerading and a dhcp server in openSuSE 11.2 using YaST2.
http://en.opensuse.org/ICS
This will enable you to share your internet connection,


All times are GMT -5. The time now is 12:15 PM.