Notes by woolf
Displaying keyword search results 1 - 9
Created by woolf on September 21, 2011 16:23:06
Last update: September 21, 2011 16:24:29
VirtualBox creates/uses a network adapter named vboxnet0 on the host, when a VM network adapter is connected as "host-only". As the VM starts, VirtualBox assigns the IP address 192.168.56.1 to vboxnet0 on the host. The VM DHCP client grabs the IP address 192.168.56.101 from the VirtualBox DHCP server. Connectivity is limited between the VM and the host - unless you configure NAT and IP forwarding on the host.
For OpenWRT, if the DHCP client is not started automatically:
#/sbin/udhcpc -i br-lan -p /var/run/udhcpc.pid -s ...
Created by woolf on July 31, 2011 12:43:21
Last update: July 31, 2011 12:43:21
Ports used by DHCP (Dynamic Host Configuration Protocol).
Port Protocol Description
67 UDP Bootstrap Protocol (BOOTP) Server; also used by Dynamic Host Configuration Protocol (DHCP)
68 UDP Bootstrap Protocol (BOOTP) Client; also used by Dynamic Host Configuration Protocol (DHCP)
546 TCP/UDP DHCPv6 client
547 TCP/UDP DHCPv6 server
647 TCP DHCP Failover protocol
847 TCP DHCP Failover 2
Created by woolf on July 29, 2011 08:34:34
Last update: July 29, 2011 08:34:34
This errors out, but will remove an assigned IP address anyway:
$ sudo ifconfig eth0 0.0.0.0 netmask 0.0.0.0
if...
Created by woolf on July 05, 2011 16:03:48
Last update: July 05, 2011 16:03:48
The DHCP client packaged with BusyBox is udhcpc . It negotiates a lease with the DHCP server and executes a script when it is obtained or lost. There are four possible arguments to this script: deconfig : The script should put the interface in an up but deconfigured state. bound : The script should configure the interface and set any other relevant parameters. renew : This is used when a lease is renewed. IP address does not change but other parameters may change. nak : This happens when a NAK packet is received from the DHCP server. Network parameters are passed to the script via environment variables. Ubuntu documents that the default script is at /etc/udhcpc/default.script . For OpenWRT, it is located at /usr/share/udhcpc/default.script ....
Created by woolf on July 05, 2011 15:38:52
Last update: July 05, 2011 15:39:55
By default VirtualBox enables one network adapter ("Adapter 1") with NAT. Connection from the guest OS to the outside world works natually when the guest network adapter is assigned an IP address by the VirtualBox DHCP server. Use VBoxManage to see a list of DHCP servers:
$ VBoxManage list dhcpservers NetworkName: H... The guest IP address is not visible from the outside world. If you need to access a server on the guest OS, you need to set up port forwarding in VirtualBox settings: Settings -> Network -> Adapter 1 -> Advanced -> Port Forwarding . Beware that on Linux/Unix, port forwarding may not work if you bind to a privileged port (port number < 1024) but you are not root. Bridged networking can be...
Created by woolf on May 15, 2011 15:11:42
Last update: May 15, 2011 15:11:57
On windows, display IPv4 routing table:
route -4 print
On Linux:
$ route
Kernel IP routing table
Destination ...
This works for both Linux and Windows (" -r ": display routing table, " -n ": display address and port numbers in numerical form):
netstat -rn
Created by woolf on May 15, 2011 14:35:58
Last update: May 15, 2011 14:36:47
Assign IP adrress and network mask:
sudo ifconfig eth0 192.168.183.5 netmask 255.255.2...
Add default gateway:
sudo route add default gw 192.168.183.2
Add name server: " sudo vi /etc/resolv.conf " and add:
nameserver 192.168.183.2
Created by woolf on May 15, 2011 14:18:54
Last update: May 15, 2011 14:19:49
/etc/resolve.conf : DNS server configuration.
Example:
search localdomain
nameserver 192.168.183.2
/etc/hosts : map hostname to IP address locally instead of using DNS, often take precedence over DNS.
Example:
127.0.0.1 localhost
127.0.1.1 myserver
#...
/etc/nsswitch.conf : system databases and Name Service Switch configuration file.
Example:
# /etc/nsswitch.conf
#
# Example configurati...
/etc/sysconfig/network (for Fedora, Redhat, CentOS): specify network configuration - static IP, DHCP, NIS, etc.
/etc/network/interfaces (for Ubuntu): specify network configuration - static IP, DHCP, NIS, etc.
Example:
auto lo
iface lo inet loopback
auto eth0...
Created by woolf on February 10, 2011 12:51:14
Last update: February 10, 2011 13:06:11
Windows command line shell does not come with a sleep command. One trick is to emulate sleep using the ping command:
C:\>ping /?
Usage: ping [-t] [-a] [-n count...
To sleep for about 5 seconds:
@rem make sure to ping a non-existing IP, otherwis...
If you have the Windows Resource Kit installed, it does provide a sleep command:
C:\>sleep
Usage: sleep time-to-sleep-in-s...