Architectures/AArch64/Archive/FoundationModel Networking

From FedoraProject

< Architectures | AArch64(Difference between revisions)
Jump to: navigation, search
(Initial)
 
m
Line 20: Line 20:
  
 
* Advantages:
 
* Advantages:
** Permits connections from the host running the Model to the Model
+
** Enables connections from the host running the Model to the Model
 
** Works with any type of host network (wired, wireless)
 
** Works with any type of host network (wired, wireless)
 
* Disadvantages:
 
* Disadvantages:
Line 36: Line 36:
  
 
* Advantages:
 
* Advantages:
** Permits connections from any host to the Model
+
** Enables connections from any host to the Model
 
* Disadvantages:
 
* Disadvantages:
 
** Model must be run as root
 
** Model must be run as root

Revision as of 16:07, 22 November 2012

The Foundation Model can be networked in three different ways:

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:
    • Outbound networking only (you can't connect to the Model, but the Model can connect to other resources)

Instructions:

  1. Start the Foundation Model with the --network=nat option. The model may be run with regular user permissions.
  2. Within the model, as root, use DHCP to get an IP address: udhcpc

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
    • 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

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.
  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 using tools such as 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=bridge option. A virtual interface named "ARM0" will be created on the host, and "eth0" will be created within the Model.
  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