Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. INTERFACE CONFIGURATION
  2. hm2_eth should be used on a dedicated network interface, with only a
  3. cable between the PC and the board. Wireless and USB network inter‐
  4. faces are not suitable.
  5.  
  6. These instructions assume your dedicated network interface is "eth1",
  7. 192.168.1/24 is an unused private network, that the hostmot2 board is
  8. using the default address of 192.168.1.121, that you are using Debian 7
  9. or similar, and that you do not otherwise use iptables. If any of
  10. these are false, you will need to modify the instructions accordingly.
  11. After following all the instructions, reboot so that the changes take
  12. effect.
  13.  
  14. It is particularly important to check that the network 192.168.1/24 is
  15. not already the private network used by your internet router, because
  16. this is a commonly-used value. If you use another network, you will
  17. also need to reconfigure the hostmot2 card to use an IP address on that
  18. network by using the mesaflash(1) utility.
  19.  
  20. Use of the dedicated ethernet interface while linuxcnc is running can
  21. cause violation of realtime guarantees. The steps below mitigate most
  22. accidental causes of interference.
  23.  
  24. Configure network with static address
  25. Add these lines to the file /etc/network/interfaces to configure eth1
  26. with a static address:
  27.  
  28. auto eth1
  29. iface eth1 inet static
  30. address 192.168.1.1
  31.  
  32. Disable IPv6 on the dedicated interface
  33. By default, Linux may transmit IPv6 packets on all interfaces, even if
  34. they are not explicitly configured with global IPv6 addresses. In
  35. /etc/sysctl.conf, disable ipv6 on eth1 by adding this line:
  36.  
  37. net.ipv6.conf.eth1.disable_ipv6=1
  38.  
  39. Configure iptables for exclusive access
  40. Install the package "iptables-persistent" and put this in the file
  41. /etc/iptables/rules.v4 (remove leading whitespace from every line):
  42.  
  43. *filter
  44. :OUTPUT ACCEPT [0:0]
  45. :hm2-eth-rules-output - [0:0]
  46. -A OUTPUT -j hm2-eth-rules-output
  47. COMMIT
  48.  
  49. If this configuration is present, then when hm2_eth loads it will add
  50. rules restricting use of the interface to only its own UDP socket; at
  51. (normal) exit, it will remove the rules. You can manually clear the
  52. rules with sudo iptables -F hm2-eth-rules-output.
  53.  
  54. If you already use iptables, create an empty chain named "hm2-eth-
  55. rules-output" (you must use this name; it is hardcoded in hm2_eth), and
  56. place a call to this rule early in the OUTPUT chain, before any rules
  57. that could potentially pass packets out eth1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement