# ppp wifi problem



## robspop (Oct 30, 2011)

I am trying to set up a mobile broadband connection using ppp.

Establishing a connection manually seemed a good place to start, so I have tried to do this following a combination of the advice in the Handbook and the ppp man page.  All goes well until a connection is made, then there is an IP address problem:


```
# ppp
Working in interactive mode
Warning: No default entry found in config file.
Using interface: tun0
ppp ON X61> set device /dev/cuaU0.0
ppp ON X61> set speed 115200
ppp ON X61> enable dns
ppp ON X61> term
deflink: Entering terminal mode on /dev/cuaU0.0
Type `~?' for help
at
OK
atdt*99#
CONNECT

[Nothing happens now, so I enter Â¬p to enter packet mode]

Packet mode.
ppp ON X61> 
Ppp ON X61> 
PPp ON X61> Warning: iface add: ioctl(SIOCAIFADDR, 94.197.51.122 -> 0.0.0.0): Destination address required
Error: ipcp_InterfaceUp: unable to set ip address
ppp ON X61>
```

I cannot find any reference to this error, yet it looks as if it should be fairly simple to fix.

I am assuming that using ppp interactively like this means that it does not read ppp.conf: is this true?

Thanks!


----------



## SirDice (Oct 31, 2011)

Handbook: Chapter 28 PPP and SLIP


----------



## robspop (Oct 31, 2011)

> Handbook: Chapter 28 PPP and SLIP



Fair point, but I have read the handbook, and the man page, and consulted the Complete FreeBSD book, and I cannot find any reference to this specific error. Generally, the instructions seem to assume that if you get as far as a connection, the IP addressing part will work.

I might have stupidly missed something: trying to work this out is very awkward at the moment because the only internet connection I have is via the laptop I am trying to set this up on.  To get to the internet I have to swap hard disks and boot linux, so then I can't actually see any of the BSD stuff.


----------



## SirDice (Oct 31, 2011)

robspop said:
			
		

> Fair point, but I have read the handbook, and the man page, and consulted the Complete FreeBSD book, and I cannot find any reference to this specific error. Generally, the instructions seem to assume that if you get as far as a connection, the IP addressing part will work.


28.2.1.2.2 PPP and Dynamic IP Addresses


----------



## robspop (Oct 31, 2011)

First, many thanks for replying, I am most grateful for the help.

However, I have read this section of the Handbook and I do have a ppp.linkup file that, so far as I can see, is correct.  I also have a ppp.conf file that is, again, correct so far as I can tell.

I have managed to set ppp for wifi up in the past on this laptop with this modem under opensolaris, so I am not completely without experience (and, believe me, the setup under opensolaris was extremely arcane, involving disabling multiple cpu cores amongst other things). I can also confirm that the hardware setup worked under opensolaris and linux, so there sohould not be a hardware problem. I also have several wifi dongles and get the same result with all of them (currently: works under linux, does not work under FreeBSD).

I am obviously doing something wrong, as it is clearly possible to get this to work, but the something is not simple a failure to RTFM.  Having followed the Handbooks as carefully as I can, I still get this:


```
ppp ON X61>
Ppp ON X61>
PPp ON X61> Warning: iface add: ioctl(SIOCAIFADDR, 94.196.22.89 -> 0.0.0.0): Des
tination address required
Error: ipcp_InterfaceUp: unable to set ip address
ppp ON X61>
```


----------



## ecazamir (Nov 1, 2011)

It would be useful to post here the relevant part of your /etc/ppp.conf file. It seems that there is a problem somewhere at 
	
	



```
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
```
 /etc/ppp.conf must be written indented by at least one space, except for labels.


----------



## SirDice (Nov 1, 2011)

Just a note, you're not using Wifi. Wifi is 802.11a/b/g/n Wireless LAN. What you are using is GPRS/UMTS/3G/HSDPA/EDGE (or whatever else your provider is offering). Completely different technology.

That said, just skip the manual test and go straight for a ppp.conf.


----------



## ecazamir (Nov 1, 2011)

@SirDice: I think *robspop* is trying to use PPPoE over WiFi.


----------



## SirDice (Nov 1, 2011)

ecazamir said:
			
		

> @SirDice: I think *robspop* is trying to use PPPoE over WiFi.



Nope. *99# is a special telephonenumber used to connect with GPRS/UMTS/3G.


----------



## robspop (Nov 1, 2011)

*solved!*



> Just a note, you're not using Wifi. Wifi is 802.11a/b/g/n Wireless LAN. What you are using is GPRS/UMTS/3G...



You are absolutely right. It seems to get called mobile wifi in UK so I suppose I have become sloppy with my terminology.

Anyway, the issue has been solved (not, to be fair, by me, but by Nick Hibna, to whom my thanks should he ever read this thread). The problem was something to do with how much of the script was in the _default_ part, and how much in the _myisp_ part. With it all in default I did get it to the stage where I could connect if I used ppp interactively, but not otherwise. I could not get the address setting to work: it either refused to set it at all, or set it to the value in the _set ifaddr_ line, however meaningless that was.

I now have all the script in the myisp part with an empty default part at the head, and this seems to work fine.

My thanks to all who have made suggestions.


----------



## SirDice (Nov 1, 2011)

robspop said:
			
		

> You are absolutely right. It seems to get called mobile wifi in UK so I suppose I have become sloppy with my terminology.


That's ok but you can tell by ecazamir's post it confuses people. I just wanted to clarify it


----------



## wblock@ (Nov 1, 2011)

robspop said:
			
		

> I now have all the script in the myisp part with an empty default part at the head, and this seems to work fine.



Please post the working script (with password or other private data obscured) and mention the make/model of wireless hardware involved.

This will help future users in the same situation.


----------



## robspop (Nov 2, 2011)

This is my ppp.conf.  I am using it for 3 network in UK.  There is no private information as authentication is handled at SIM level so this should work "as is".  Hardware is Huawei E169G with no additional drivers.


```
default:

3:
        set device /dev/cuaU0.0
        set speed 115200
        set timeout 0
        set log Connect 
        set log local Phase Chat Connect LCP IPCP CCP tun LQM
        set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 3 \
                  \"\" \
                  AT OK \
                  AT+CFUN=1 OK \
                  ATDT*99# CONNECT"
        set authname 3
        set authkey 3
        set mtu maximum 512
        set stopped 30 30
        disable vjcomp
        disable acfcomp
        disable deflate
        disable deflate24
        disable pred1
        disable protocomp
        disable mppe
        disable lqr
        deny lqr
        disable echo
        set ifaddr 10.255.255.254/0 10.255.255.253/0 255.255.255.255
        enable dns
```

I also have ppp.linkup and ppp.linkdown files, as follows:


```
3:
 shell route delete default
 shell route add default -interface INTERFACE
```


```
default:
 shell logger "LABEL down (up UPTIME): OCTETSIN received, OCTETSOUT sent"

3:
 shell route delete default
```


----------

