mNo edit summary |
|||
Line 25: | Line 25: | ||
** Model must be run as root | ** Model must be run as root | ||
** Does not permit connections to the Model from outside the host running the Model | ** Does not permit connections to the Model from outside the host running the Model | ||
** Model can connect only to the host | |||
Instructions: | Instructions: |
Revision as of 19:53, 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:
- Start the Foundation Model with the
--network=nat
option. The model may be run with regular user permissions. - 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
- Model can connect only to the host
Instructions:
- 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. - Within the model, as root, assign an IP address:
ifconfig eth0 10.10.10.10
- 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:
- 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. - 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:
passwd
- On the Model, execute:
ifconfig eth0 192.168.1.100
# Alternately, use DHCP to pick up an address after the Host configuration - 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