Commit Graph

7 Commits

Author SHA1 Message Date
Rolf Neugebauer
81c8a2a53d config: overwrite resolv.conf and interfaces from database
Allow the host to configure a static IP address for eth0 by setting the
following DB keys:
- net/config: "static" (default or not set -> dhcp)
- net/address: IP address
- net/netmask: netmask in dot notation
- net/gateway: default gateway

Also allow overwriting/setting "/etc/resolve.conf" by writing to
the "etc/resolv.conf" key.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-05-30 10:01:42 +02:00
David Scott
da954e93e3 tap-vsockd: add tap-vsockd service to bring up eth1
The tap-vsockd service is started from eth1's pre-up script.

On the Mac: the bind of the AF_HYPERV socket fails, and eth1 is skipped.
On Windows: if there is no database then eth1 is skipped.
On Windows: if the database has network=native then eth1 is brought up.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-05-21 21:58:38 +01:00
David Scott
47ff9eb817 In a dual NIC configuration, use eth1 for routing
The NIC with the lowest metric is used for routing, while the NIC with
the highest index is used for DNS. Set the metric of eth1 to 199, so it
is higher-priority than eth0, so we use eth1 for everything in a dual
NIC configuration.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-18 18:45:32 +01:00
David Scott
6ca504f192 Configure a second possible NIC (eth1)
This makes it possible to have one NIC controlled by vmnet and another
controlled by slirp.

If eth1 doesn't exist then a harmless message is generated during
bootup: (with no appreciable delay)

 * Starting networking ... *   lo ... [ ok ]
 *   eth0 ... [ ok ]
 *   eth1 ...ip: ioctl 0x8913 failed: No such device
 [ !! ]

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-16 19:31:32 +01:00
Justin Cormack
be2612bfd8 do not set hostname in dhcp
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-01 14:57:11 +00:00
Magnus Skjegstad
b084fc0301 udhcpc: set retransmission timeout to 1 sec (was 3 sec), retry if no offer after 3 sec (was 20 sec)
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2016-01-28 21:24:37 +01:00
Justin Cormack
717a378df9 Configure network and timezone
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-07 15:54:54 +00:00