Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INTERFACE CONFIGURATION
- hm2_eth should be used on a dedicated network interface, with only a
- cable between the PC and the board. Wireless and USB network inter‐
- faces are not suitable.
- These instructions assume your dedicated network interface is "eth1",
- 192.168.1/24 is an unused private network, that the hostmot2 board is
- using the default address of 192.168.1.121, that you are using Debian 7
- or similar, and that you do not otherwise use iptables. If any of
- these are false, you will need to modify the instructions accordingly.
- After following all the instructions, reboot so that the changes take
- effect.
- It is particularly important to check that the network 192.168.1/24 is
- not already the private network used by your internet router, because
- this is a commonly-used value. If you use another network, you will
- also need to reconfigure the hostmot2 card to use an IP address on that
- network by using the mesaflash(1) utility.
- Use of the dedicated ethernet interface while linuxcnc is running can
- cause violation of realtime guarantees. The steps below mitigate most
- accidental causes of interference.
- Configure network with static address
- Add these lines to the file /etc/network/interfaces to configure eth1
- with a static address:
- auto eth1
- iface eth1 inet static
- address 192.168.1.1
- Disable IPv6 on the dedicated interface
- By default, Linux may transmit IPv6 packets on all interfaces, even if
- they are not explicitly configured with global IPv6 addresses. In
- /etc/sysctl.conf, disable ipv6 on eth1 by adding this line:
- net.ipv6.conf.eth1.disable_ipv6=1
- Configure iptables for exclusive access
- Install the package "iptables-persistent" and put this in the file
- /etc/iptables/rules.v4 (remove leading whitespace from every line):
- *filter
- :OUTPUT ACCEPT [0:0]
- :hm2-eth-rules-output - [0:0]
- -A OUTPUT -j hm2-eth-rules-output
- COMMIT
- If this configuration is present, then when hm2_eth loads it will add
- rules restricting use of the interface to only its own UDP socket; at
- (normal) exit, it will remove the rules. You can manually clear the
- rules with sudo iptables -F hm2-eth-rules-output.
- If you already use iptables, create an empty chain named "hm2-eth-
- rules-output" (you must use this name; it is hardcoded in hm2_eth), and
- place a call to this rule early in the OUTPUT chain, before any rules
- that could potentially pass packets out eth1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement