This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
change eth0 to static
#1
Hi
I want to change my eth0 to static ip 192.168.1.5 and netmask 255.255.255.0
Either it is change, but then i have no internetaccess thue wlan1(a wifi dongle)
or OpenPlotter changes the settings automatic...
Anybody who can help?
  Reply
#2
Okay, first thing... let's have a look at your /etc/network/interfaces file.
  Reply
#3
abarrow
[quote pid='2121' dateline='1498595532']
Okay, first thing... let's have a look at your /etc/network/interfaces file.
[/quote]

# generated by openplotter
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug usb0
iface usb0 inet static
address 192.168.42.100
netmask 255.255.255.0
allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
address 10.10.10.1
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
post-up iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
post-up iptables -A FORWARD -i wlan1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
post-up iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT
post-up systemctl daemon-reload
  Reply
#4
Right now, your eth0 port is still set up to get it's address from DHCP. Also, the only entry I see for wlan1 is in the post-up iptables line.

What's in your /etc/hostapd/hostapd.conf file?
  Reply
#5
(06-28-2017, 09:38 AM)abarrow Wrote: Right now, your eth0 port is still set up to get it's address from DHCP. Also, the only entry I see for wlan1 is in the post-up iptables line.

What's in your /etc/hostapd/hostapd.conf file?
File: /etc/hostapd/hostapd.conf                        

interface=wlan0
hw_mode=g
channel=6
ieee80211n=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
wmm_enabled=1
ssid=OpenPlotter
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=12345678
  Reply
#6
It looks like you are using your wlan0 as your access point. It sounded like you were trying to get the AP working on an external dongle (wlan0). Is that true?
  Reply
#7
No my wlan0 is the internal that OpenPlotter use as AP. It is working great.
I would like to change ip and netmask on eth0.
I have some devices on ethernet which is on 255.255.255.0. Maybe it is just easier to change all the other devices..

But what do I then do when I have to connect my Garmin Radar to OpenCPN? As far as I remember it is on something like 255.255.172.12... or something like that..
  Reply
#8
255.255.255.0 is what is called a "netmask". It defines the size of your local network (in this case, 254 total addresses), but not an actual IP address or subnet. Typically, a network interface is defined by a few parameters, the main ones being IP address, netmask and often things like gateway address an a few others. When you set an interface to get it's address from a DHCP server, you are telling it to broadcast a request to your local network (typically) to ask if any device on the network is the DHCP server, which is responsible for issuing addresses from a predefined range. What should happen is that one of the devices on your network will say "Me! Me!" and send the requesting device an address, a netmask, a gateway address and usually the addresses of DNS servers. In the case of the Openplotter access point, the netmask is 255.255.255.0 and the address range, by default, is 10.10.10.1-254. The DHCP server will be given a somewhat smaller range of addresses to choose from that overall range.

Sooooo, not sure what the address is that you are talking about for your Garmin Radar. I doesn't look like a multicast address. As far as putting your Garmin Radar data over WiFi, Stripydog has some interesting observations on that here: http://stripydog.blogspot.mx/2015/01/rad...retty.html

As far as your wlan1 is concerned, try adding this to your interfaces file, before the iptables lines:

allow-hotplug wlan1
iface usb0 inet dhcp

Openplotter might overwrite this next time you reconfigure your network devices, but it's work a quick try to see if it starts working.
  Reply
#9
OpenPlotter overwrites all network settings if they aren't original. When openplotter.conf is set to
[WIFI]
enable = 1

Only if it is set to "enable = 0" and there is no line "# generated by openplotter" in /etc/network/interfaces.
Then it doesn't change anything.

So setup your AP.
If everything is correct, change enable = 1 to 0.
Edit /etc/network/interfaces
-delete first line
and edit/add some lines

iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0


Another easy solution could be to "Enable bridge to eth0" and change the IP-address in
openplotter.conf to
[WIFI]
ip = 192.168.1.5
  Reply
#10
how do I access openplotter.conf?
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)