1

I'm setting up an Ubuntu Server 14.04 with a wired connection (p4p1) and creating an ad-hoc wireless network. Here's my interfaces file:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto p4p1
iface p4p1 inet dhcp

# WiFi
auto wlan0
iface wlan0 inet dhcp
wireless-mode ad-hoc
wireless-channel 4
wireless-essid Augmented Learning
wireless-key 1234567890
address 192.168.0.2
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.2

Things are running smooth when one of the two interface is up, but when both are up, I can neither access Internet (via p4p1) nor access my ad-hoc network (with wlan0).

What should I do to run them both at the same time ? I don't need to share the connection.

Thanks,

NorTicUs
  • 2,382

2 Answers2

1

One thing you should not do is point the gateway to your own IP. The gateway tells the system how to route to any IP address not in any of the subnets to which it is directly connected. Normally this is the route to "the Internet", so should not be present for a connection to an internal network unless the route to the Internet is on a host on that network. So remove the gateway line from your definition of wlan0.

There may be multiple things wrong here, so this might not be the only change needed to fix your problem.

Robie Basak
  • 15,670
-2

Maybe i know how you could use a file called asleep.d it can be downloaded here.

https://app.box.com/s/5nj2xuhby5kqk1y3o7wb

you just copy it over to /etc/pm

Michael
  • 2,499
  • 5
  • 19
  • 24