From Fedora Project Wiki
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:AArch64]]
[[Category:AArch64]]
The [[Architectures/ARM/AArch64/FoundationModel|Foundation Model]] can be networked in three different ways:
The [[Architectures/ARM/AArch64/FoundationModel|Foundation Model]] can be networked in three different ways (in addition to the approach outlined on the [[Architectures/ARM/AArch64/FASTandNFS|FAST and NFS]] page):


== NAT Networking ==
== NAT Networking ==
Line 9: Line 9:
** Works with any type of host network (wired, wireless)
** Works with any type of host network (wired, wireless)
* Disadvantages:
* Disadvantages:
** Outbound networking only (you can't connect ''to'' the Model, but the Model can connect ''to'' other resources)
** While the Model can connect to other resources "dynamically", you can only connect to pre-specified TCP ports of the Model


Instructions:
Instructions:
# Start the Foundation Model with the <code>--network=nat</code> option. The model may be run with regular user permissions.
# Start the Foundation Model with the <code>--network=nat</code> option. The model may be run with regular user permissions.
# Within the model, as root, use DHCP to get an IP address: <code>udhcpc</code>
# Use <code>--network-nat-ports=host_port_1=model_port_1,...,host_port_N=model_port_N</code> to expose specific ports of the guest on the host.
## For example, with <code>--network-nat-ports=8022=22</code>, connections to the host's TCP port 8022 will be forwarded to the guest's sshd.
# Within the model, as root, use DHCP to get an IP address: <code>/sbin/udhcpc eth0</code>


You should be able to connect out from the Model using tools such as wget, git, and ssh/scp.
You should be able to connect out from the Model using tools such as wget, git, and ssh/scp.
Line 20: Line 22:


* Advantages:
* Advantages:
** Enables connections from the host running the Model to the Model
** Enables connections from the host running the Model to the Model (so you can ssh/scp to the model, for example)
** Works with any type of host network (wired, wireless)
** Works with any type of host network (wired, wireless)
* Disadvantages:
* Disadvantages:
Line 28: Line 30:


Instructions:
Instructions:
# As root, start the Foundation Model with the <code>--network=bridged</code> option. A virtual interface named "ARM0" will be created on the host, and "eth0" will be created within the Model.
# As root, start the Foundation Model with the <code>--network=bridged</code> option. A virtual interface named "ARM0" will be created on the host, and "eth0" will be created within the Model. To change the name of the virtual interface on the host, use the <code>--bridge-name=XXXX</code> option when booting the host.
# Within the model, as root, assign an IP address: <code>ifconfig eth0 10.10.10.10</code>
# Within the model, as root, assign an IP address: <code>ifconfig eth0 10.10.10.10</code>
# On the host, as root, assign an IP address to the ARM0 virtual interface: <code>ifconfig ARM0 10.10.10.11</code>
# On the host, as root, assign an IP address to the ARM0 virtual interface: <code>ifconfig ARM0 10.10.10.11</code>
Line 44: Line 46:


Instructions:
Instructions:
# Start the Foundation Model with the <code>--network=bridge</code> option. A virtual interface named "ARM0" will be created on the host, and "eth0" will be created within the Model.
# Start the Foundation Model with the <code>--network=bridged</code> option. A virtual interface named "ARM0" will be created on the host, and "eth0" will be created within the Model. To change the name of the virtual interface on the host when running multiple copies of the Model, use the <code>--bridge-name=XXXX</code> option when booting the host.
# Select an IP address for the Model that is on the same network as the host, and determine the host IP interface and address. In the example below, the Model address is set to 192.168.1.100 and the Host address is 192.168.1.150.
# Select an IP address for the Model that is on the same network as the host, and determine the host IP interface and address. In the example below, the Model address is set to 192.168.1.100 and the Host address is 192.168.1.150.
# On the Model, ''if you have not already done so'', set a password for the root account: <code>passwd</code>
# On the Model, ''if you have not already done so'', set a password for the root account: <code>passwd</code>

Latest revision as of 15:37, 6 November 2014

The Foundation Model can be networked in three different ways (in addition to the approach outlined on the FAST and NFS page):

NAT Networking

  • Advantages:
    • Model does not have to be executed as root
    • Set up is trivial
    • Works with any type of host network (wired, wireless)
  • Disadvantages:
    • While the Model can connect to other resources "dynamically", you can only connect to pre-specified TCP ports of the Model

Instructions:

  1. Start the Foundation Model with the --network=nat option. The model may be run with regular user permissions.
  2. Use --network-nat-ports=host_port_1=model_port_1,...,host_port_N=model_port_N to expose specific ports of the guest on the host.
    1. For example, with --network-nat-ports=8022=22, connections to the host's TCP port 8022 will be forwarded to the guest's sshd.
  3. Within the model, as root, use DHCP to get an IP address: /sbin/udhcpc eth0

You should be able to connect out from the Model using tools such as wget, git, and ssh/scp.

Private Networking

  • Advantages:
    • Enables connections from the host running the Model to the Model (so you can ssh/scp to the model, for example)
    • Works with any type of host network (wired, wireless)
  • Disadvantages:
    • Model must be run as root
    • Does not permit connections to the Model from outside the host running the Model
    • Model can connect only to the host

Instructions:

  1. As root, start the Foundation Model with the --network=bridged option. A virtual interface named "ARM0" will be created on the host, and "eth0" will be created within the Model. To change the name of the virtual interface on the host, use the --bridge-name=XXXX option when booting the host.
  2. Within the model, as root, assign an IP address: ifconfig eth0 10.10.10.10
  3. On the host, as root, assign an IP address to the ARM0 virtual interface: ifconfig ARM0 10.10.10.11

You should be able to ssh to the Model from the host system, and to connect out from the Model to the host using tools such as nfs, wget, git, and ssh/scp. For example, on the host: ssh root@10.10.10.10

Public Bridge Networking

  • Advantages:
    • Enables connections from any host to the Model
  • Disadvantages:
    • Model must be run as root
    • Works only with wired networking on the host (wireless interfaces cannot be bridged)
    • SECURITY: The Model is not well-secured against external access. You must at least set the root password before using this network approach. Note that sshd is started by default in the Linaro OpenEmbedded rootfs.

Instructions:

  1. Start the Foundation Model with the --network=bridged option. A virtual interface named "ARM0" will be created on the host, and "eth0" will be created within the Model. To change the name of the virtual interface on the host when running multiple copies of the Model, use the --bridge-name=XXXX option when booting the host.
  2. Select an IP address for the Model that is on the same network as the host, and determine the host IP interface and address. In the example below, the Model address is set to 192.168.1.100 and the Host address is 192.168.1.150.
  3. On the Model, if you have not already done so, set a password for the root account: passwd
  4. On the Model, execute: ifconfig eth0 192.168.1.100 # Alternately, use DHCP to pick up an address after the Host configuration
  5. On the host, execute:
brctl addbr armbr0
brctl addif armbr0 ARM0
brctl addif armbr0 eth0    # assuming eth0 is the host interface to be bridged
ifconfig eth0 0.0.0.0 up
ifconfig br0 192.168.1.150
ifconfig ARM0 up

You should be able to ssh to the Model from the any system that can reach the host, and to connect out from the Model using tools such as wget, git, and ssh/scp. For example, from another system on the LAN: ssh 192.168.1.100