# Ad-hoc suddenly goes wrong and gives ip address as 169.254.*

## womiluti

I have used my laptop as an hot spot in ad-hoc mode for nearly a month  and it was all right. 

Yesterday,  when my ipad connect to it, it gives an ip address 169.254.* and as a result my ipad cannot surf the Internet. 

How can I rescue it so that devices connected to the wireless can surf the internet again?

I'm raw in gentoo, so if any infomation is needed, please tell me

----------

## NeddySeagoon

womiluti,

Welcome to Gentoo.

In ad-hoc mode 169.254.*, self assigned IP addresses are correct.

Ad-hoc mode is intended for a localised group of systems to communicate among themselves.

There is no dhcp server and no gateway to any other network. 

Your laptop needs to run as an access point and probably provide NAT to your other devices.

You cannot use ad-hoc mode and have internet access from the ad-hoc network at the same time.

----------

## womiluti

 *NeddySeagoon wrote:*   

> womiluti,
> 
> Welcome to Gentoo.
> 
> In ad-hoc mode 169.254.*, self assigned IP addresses are correct.
> ...

 

Thanks!

But in the last month, I used kde's networkmangement.

When add a new wirelee and choose share, there are 3 mode -- two of them are ap and ad-hoc.

I choose ad-hoc and then mobile devices can have access to the internet through it.

That time, mobile devices can gain correct ip address, not 169.254.* ones.

----------

## NeddySeagoon

womiluti,

That way it was working was incorrect. It looks like its been fixed.

I don't use KDE, so I can't comment on its networkmangement.

Try the AP modes.

----------

## womiluti

 *NeddySeagoon wrote:*   

> womiluti,
> 
> That way it was working was incorrect. It looks like its been fixed.
> 
> I don't use KDE, so I can't comment on its networkmangement.
> ...

 

Well, I'll try hostapd

thanks~

----------

