Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1224  / 1 Year ago, wed, march 8, 2023, 2:26:15

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,


More From » wireless

 Answers
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.


[#23993] Thursday, March 9, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rmodmi

Total Points: 390
Total Questions: 122
Total Answers: 111

Location: Venezuela
Member since Mon, Oct 18, 2021
3 Years ago
;