Using Ubuntu 19.04 I am trying to connect to an ad-hoc network with my Wi-Fi card (wlo1) and use ethernet (eno2) for access to the internet. The ethernet internet connection works fine on it's own. In order to connect to the Ad-Hoc network my /etc/network/interfaces file is as follows:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto wlo1
iface wlo1 inet static
wireless-mode ad-hoc
wireless-channel 1
wireless-essid AdhocSSID
address 192.168.1.2
netmask 255.255.255.0
Now with the interfaces file like this I can access the Ad-Hoc network correctly, but I can no longer access the internet with ethernet. This is the output of ifconfig
for the interfaces file above, which suggests to me that the ethernet connection still works somewhat:
eno2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.129 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::9035:712a:baa8:687f prefixlen 64 scopeid 0x20<link>
ether b4:2e:99:39:dc:57 txqueuelen 1000 (Ethernet)
RX packets 30 bytes 7760 (7.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 51 bytes 6147 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0x55300000-55320000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 174 bytes 14210 (14.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 174 bytes 14210 (14.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::aa6d:aaff:fefd:661e prefixlen 64 scopeid 0x20<link>
ether a8:6d:aa:fd:66:1e txqueuelen 1000 (Ethernet)
RX packets 8 bytes 336 (336.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 53 bytes 6469 (6.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Any suggestions?
EDIT: I solved my problem by using Ad-Hoc ip addresses in the range 169.254.x.x rather than 192.168.1.x
0 Answers