Page 1 of 1

Change WAN interface...

Posted: 11 May 2011, 16:23
by karl-petter
Hi,

I have got a driver for my 4G modem working(I think) but cannot get any traffic out or in...

When I do ifup wwan0(wwan0 is the 4G dongle interface) I get a ip number via DHCP. So it seems to work. But I cannot get any traffic anywhere!

I noticed one strange thing is that my current WAN interface(eth0) stops working when I do ifup wwan0 and once I do ifdown wwan0 eth0 starts working again. I'm not used to Linux and Debian but it seems something else is going on in the background. Could someone give some more insights into what is going on?

Re: Change WAN interface...

Posted: 14 May 2011, 01:11
by Cheeseboy
Hi karl-petter,

I don't know much about ifup/ifdown and the network daemons, but I think you will need to give more information than that if you are going to get an answer here.

What configuration changes have you done?

What do you get in /var/log/syslog during the operation you described?

Best regards,

Cheeseboy

Re: Change WAN interface...

Posted: 14 May 2011, 04:26
by karl-petter
aah sorry if not providing enough with info!

I have not changed any of the config files. What I have done is following the instructions here https://github.com/mkotsbak/Samsung-GT- ... nux-driver to compile the driver and install it. To summarize:

As root:
modprobe option && sudo rmmod option
insmod ./option/option.ko
modprobe usbnet
insmod ./gt_b3730.ko
sh chat.sh
sudo ifup wwan0

The chat script just sends a series of AT commands to configure the modem. I'll get back with the syslog info.

Re: Change WAN interface...

Posted: 14 May 2011, 05:45
by karl-petter
Here is the syslog:

Code: Select all

May 14 11:22:30 media kernel: [143667.090579] usb 1-1.1: new high speed USB device using orion-ehci and address 11
May 14 11:22:31 media kernel: [143667.244386] scsi7 : usb-storage 1-1.1:1.0
May 14 11:22:32 media kernel: [143668.244013] scsi 7:0:0:0: CD-ROM            Samsung  Install Disk     0.10 PQ: 0 ANSI: 0 CCS
May 14 11:22:32 media kernel: [143668.256593] sr0: scsi3-mmc drive: 0x/0x caddy
May 14 11:22:32 media kernel: [143668.261055] cdrom: Uniform CD-ROM driver Revision: 3.20
May 14 11:22:32 media kernel: [143668.266990] sr 7:0:0:0: Attached scsi CD-ROM sr0
May 14 11:22:32 media kernel: [143668.267276] sr 7:0:0:0: Attached scsi generic sg2 type 5
May 14 11:22:32 media kernel: [143668.303811] sr0: Hmm, seems the drive doesn't support multisession CD's
May 14 11:22:33 media usb_modeswitch: switching 04e8:689a (: not provided)
May 14 11:22:33 media kernel: [143669.660028] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd usb_modeswitch rqt 128 rq 6 len 255 ret -110
May 14 11:22:33 media kernel: [143669.767432] usb 1-1.1: USB disconnect, address 11
May 14 11:22:33 media kernel: [143670.010329] usb 1-1.1: new high speed USB device using orion-ehci and address 12
May 14 11:22:33 media kernel: [143670.165259] gt_b3730 1-1.1:1.0: wwan0: register 'gt_b3730' at usb-orion-ehci.0-1.1, Samsung GT-B3730 LTE USB dongle, 60:a1:0a:0d:0c:42
May 14 11:22:33 media kernel: [143670.178100] option 1-1.1:1.1: GSM modem (1-port) converter detected
May 14 11:22:33 media kernel: [143670.184776] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
May 14 11:22:34 media usb_modeswitch: switched to 04e8:6889 (SAMSUNG ELECTRONICS Co.Ltd.: not provided)
May 14 11:23:17 media chat[12030]: abort on (TIME OUT)
May 14 11:23:17 media chat[12030]: abort on (ERROR)
May 14 11:23:17 media chat[12030]: send (AT^M)
May 14 11:23:17 media chat[12030]: expect (OK)
May 14 11:23:17 media chat[12030]: AT
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]: OK
May 14 11:23:17 media chat[12030]:  -- got it
May 14 11:23:17 media chat[12030]: send (AT+CGREG=2^M)
May 14 11:23:17 media chat[12030]: expect (OK)
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]: AT+CGREG=2
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]: +CGREG: 0,0000,0000,7,0000
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]: OK
May 14 11:23:17 media chat[12030]:  -- got it
May 14 11:23:17 media chat[12030]: send (AT+CFUN=5^M)
May 14 11:23:17 media chat[12030]: expect (OK)
May 14 11:23:17 media chat[12030]:
May 14 11:23:17 media chat[12030]:
May 14 11:23:18 media chat[12030]: AT+CFUN=5
May 14 11:23:18 media chat[12030]:
May 14 11:23:18 media chat[12030]:
May 14 11:23:18 media chat[12030]:
May 14 11:23:18 media chat[12030]: OK
May 14 11:23:18 media chat[12030]:  -- got it
May 14 11:23:18 media chat[12030]: send (AT+MODESELECT=3^M)
May 14 11:23:18 media chat[12030]: expect (ACTIVERATIND)
May 14 11:23:18 media chat[12030]:
May 14 11:23:18 media chat[12030]:
May 14 11:23:18 media chat[12030]:
May 14 11:23:18 media chat[12030]:
May 14 11:23:18 media chat[12030]: +MODECHANGEIND:3
May 14 11:23:18 media chat[12030]:
May 14 11:23:18 media chat[12030]: AT+MODESELECT=3
May 14 11:23:18 media chat[12030]:
May 14 11:23:20 media chat[12030]:
May 14 11:23:20 media chat[12030]:
May 14 11:23:20 media chat[12030]: +MODESELECT:3
May 14 11:23:20 media chat[12030]:
May 14 11:23:20 media chat[12030]:
May 14 11:23:20 media chat[12030]:
May 14 11:23:20 media chat[12030]: OK
May 14 11:23:20 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]: +ACTIVERATIND
May 14 11:23:21 media chat[12030]:  -- got it
May 14 11:23:21 media chat[12030]: send (AT+CGACT?^M)
May 14 11:23:21 media chat[12030]: expect (CGACT:1,0)
May 14 11:23:21 media chat[12030]: :4
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]: +CGREG: 0,0000,0000,7,0000
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]: +NWSTATEIND: 3
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]: AT+CGACT?
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]: +CGACT:1,0
May 14 11:23:21 media chat[12030]:  -- got it
May 14 11:23:21 media chat[12030]: send (AT+CGDCONT=1,"IP","online.telia.se"^M)
May 14 11:23:21 media chat[12030]: expect (OK)
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]: OK
May 14 11:23:21 media chat[12030]:  -- got it
May 14 11:23:21 media chat[12030]: send (AT+CGATT=1^M)
May 14 11:23:21 media chat[12030]: expect (CGACT:1,1)
May 14 11:23:21 media chat[12030]:
May 14 11:23:21 media chat[12030]:
May 14 11:23:22 media chat[12030]: AT+CGDCONT=1,"IP","online.telia.
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]: +CSQ: 18,0
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]: +NWSTATEIND: 4
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]: se"
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]: OK
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]: AT+CGATT=1
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]:
May 14 11:23:22 media chat[12030]: +NWSTATEIND: 5
May 14 11:23:22 media chat[12030]:
May 14 11:23:23 media chat[12030]:
May 14 11:23:23 media chat[12030]:
May 14 11:23:23 media chat[12030]: +CGACT:1,1
May 14 11:23:23 media chat[12030]:  -- got it
May 14 11:23:33 media dhclient: Internet Systems Consortium DHCP Client 4.1.1-P1
May 14 11:23:33 media dhclient: Copyright 2004-2010 Internet Systems Consortium.
May 14 11:23:33 media dhclient: All rights reserved.
May 14 11:23:33 media dhclient: For info, please visit https://www.isc.org/software/dhcp/
May 14 11:23:33 media dhclient:
May 14 11:23:33 media dhclient: Listening on LPF/wwan0/60:a1:0a:0d:0c:42
May 14 11:23:33 media dhclient: Sending on   LPF/wwan0/60:a1:0a:0d:0c:42
May 14 11:23:33 media dhclient: Sending on   Socket/fallback
May 14 11:23:35 media avahi-daemon[8593]: Joining mDNS multicast group on interface wwan0.IPv6 with address fe80::62a1:aff:fe0d:c42.
May 14 11:23:35 media avahi-daemon[8593]: New relevant interface wwan0.IPv6 for mDNS.
May 14 11:23:35 media avahi-daemon[8593]: Registering new address record for fe80::62a1:aff:fe0d:c42 on wwan0.*.
May 14 11:23:37 media dhclient: DHCPDISCOVER on wwan0 to 255.255.255.255 port 67 interval 7
May 14 11:23:37 media dhclient: DHCPOFFER from 217.214.239.1
May 14 11:23:37 media dhclient: DHCPREQUEST on wwan0 to 255.255.255.255 port 67
May 14 11:23:37 media dhclient: DHCPACK from 217.214.239.1
May 14 11:23:37 media avahi-daemon[8593]: Joining mDNS multicast group on interface wwan0.IPv4 with address 217.214.239.170.
May 14 11:23:37 media avahi-daemon[8593]: New relevant interface wwan0.IPv4 for mDNS.
May 14 11:23:37 media avahi-daemon[8593]: Registering new address record for 217.214.239.170 on wwan0.IPv4.
May 14 11:23:37 media dhclient: bound to 217.214.239.170 -- renewal in 37397 seconds.
May 14 11:23:44 media kernel: [143741.063404] wwan0: no IPv6 routers present
May 14 11:23:50 media ntpd[1448]: Listen normally on 20 wwan0 217.214.239.170 UDP 123
May 14 11:23:50 media ntpd[1448]: Listen normally on 21 wwan0 fe80::62a1:aff:fe0d:c42 UDP 123
May 14 11:23:50 media ntpd[1448]: 130.236.254.102 interface 192.168.2.2 -> 217.214.239.170
May 14 11:23:50 media ntpd[1448]: 192.121.13.59 interface 192.168.2.2 -> 217.214.239.170
May 14 11:23:50 media ntpd[1448]: 192.157.38.60 interface 192.168.2.2 -> 217.214.239.170
May 14 11:23:50 media ntpd[1448]: 88.80.6.138 interface 192.168.2.2 -> 217.214.239.170
May 14 11:24:25 media dhclient: Internet Systems Consortium DHCP Client 4.1.1-P1
May 14 11:24:25 media dhclient: Copyright 2004-2010 Internet Systems Consortium.
May 14 11:24:25 media dhclient: All rights reserved.
May 14 11:24:25 media dhclient: For info, please visit https://www.isc.org/software/dhcp/
May 14 11:24:25 media dhclient:
May 14 11:24:25 media dhclient: Listening on LPF/wwan0/60:a1:0a:0d:0c:42
May 14 11:24:25 media dhclient: Sending on   LPF/wwan0/60:a1:0a:0d:0c:42
May 14 11:24:25 media dhclient: Sending on   Socket/fallback
May 14 11:24:25 media dhclient: DHCPRELEASE on wwan0 to 217.214.239.1 port 67
May 14 11:24:25 media avahi-daemon[8593]: Withdrawing address record for 217.214.239.170 on wwan0.
May 14 11:24:25 media avahi-daemon[8593]: Leaving mDNS multicast group on interface wwan0.IPv4 with address 217.214.239.170.
May 14 11:24:25 media dnsmasq[8214]: reading /etc/resolv.conf
May 14 11:24:25 media avahi-daemon[8593]: Interface wwan0.IPv4 no longer relevant for mDNS.
May 14 11:24:25 media dnsmasq[8214]: using nameserver 195.67.199.19#53
May 14 11:24:25 media dnsmasq[8214]: using nameserver 195.67.199.18#53
May 14 11:24:25 media avahi-daemon[8593]: Interface wwan0.IPv6 no longer relevant for mDNS.
May 14 11:24:25 media avahi-daemon[8593]: Leaving mDNS multicast group on interface wwan0.IPv6 with address fe80::62a1:aff:fe0d:c42.
May 14 11:24:25 media avahi-daemon[8593]: Withdrawing address record for fe80::62a1:aff:fe0d:c42 on wwan0.
May 14 11:25:01 media /USR/SBIN/CRON[12228]: (root) CMD (test -x /usr/bin/php && /usr/bin/php /usr/share/horde3/scripts/alarms.php)
May 14 11:25:01 media /USR/SBIN/CRON[12229]: (root) CMD (test -x /usr/lib/web-admin/notify-dispatcher.pl && /usr/lib/web-admin/notify-dispatcher.pl)
At 11:22:30 I connected the USB dongel. To monitor the internet connection I had a ping started on a machine connected on the LAN network pinging a machine on the net. Pings go through as expected.

At 11:23:33 I gave the ifup wwan0 command. The pings stopped going through at this moment.

At 11:24:25 I gave ifdown wwan0 and the ping packets started again to go through!

I do not understand at all how just bringing up another interface interferes with the other interfaces. I have never seen anything similar on other unix systems, though I have basically no experience of Linux systems, though I have been working with many others like FreeBSD, HPUX, Solaris and IRIX. Therefore I expect there is some else going on in the background though I cannot not see what!!

Re: Change WAN interface...

Posted: 14 May 2011, 07:34
by Cheeseboy
Hi karl-petter,

Again, I'm no expert, but there are a lot of hard-coded references to network interfaces in /etc/network.
wwan0 is none of them...

Code: Select all

grep -r -e wlan -e eth -e wwan /etc/network/*
Looks like you will have some reconfiguring to do...
There is a post on the wiki on 3G stuff. I haven't read it, but perhaps it could help?

Best regards,

Cheeseboy

EDIT:
Here is the link:
http://wiki.excito.org/wiki/index.php/U ... gle_as_WAN

Re: Change WAN interface...

Posted: 14 May 2011, 08:12
by karl-petter
But still I should be able to get traffic through the interface without configuring a lot of services, and even if routes are not setup correctly atleast an outside ping towards the IP the dongle get should reply right? Or do you mean the firewall etc is configured to block on all interfaces other than the default ones?

Re: Change WAN interface...

Posted: 14 May 2011, 08:15
by Cheeseboy
I honestly don't know.
I would have to try it myself to find out the answer, and I don't have a 3/4-G dongle to try with.
But I strongly suspect what you just said is true.

EDIT:

Actually:

Code: Select all

/etc/network/firewall.conf:-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p icmp -m icmp --icmp-type 11 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p icmp -m icmp --icmp-type 8 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 443 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 143 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 993 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 21 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 10000:14000 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 52525 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 30750 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 8081 -j ACCEPT 
/etc/network/firewall.conf:-A INPUT -i eth0 -p tcp -m tcp --dport 4949 -j ACCEPT 
Yes.