Advertisement
hubutm20

ipconfig-linuxmint

Jun 12th, 2011
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. BOOTP/DHCP client for klibc
  2. ---------------------------
  3.  
  4. Usage:
  5.  
  6. ipconfig [-c proto] [-d interface] [-i identifier]
  7. [-n] [-p port] [-t timeout] [interface ...]
  8.  
  9. -c proto Use PROTO as the configuration protocol for all
  10. interfaces, unless overridden by specific interfaces.
  11. -d interface Either the name of an interface, or a long spec.
  12. -i identifier DHCP vendor class identifier. The default is
  13. "Linux ipconfig".
  14. -n Do nothing - just print the configuration that would
  15. be performed.
  16. -p port Send bootp/dhcp broadcasts from PORT, to PORT - 1.
  17. -t timeout Give up on all unconfigured interfaces after TIMEOUT secs.
  18.  
  19. You can configure multiple interfaces by passing multiple interface
  20. specs on the command line, or by using the special interface name
  21. "all". If you're autoconfiguring any interfaces, ipconfig will wait
  22. until either all such interfaces have been configured, or the timeout
  23. passes.
  24.  
  25. PROTO can be one of the following, which selects the autoconfiguration
  26. protocol to use:
  27.  
  28. not specified use all protocols (the default)
  29. dhcp use bootp and dhcp
  30. bootp use bootp only
  31. rarp use rarp (not currently supported)
  32. none no autoconfiguration - either static config, or none at all
  33.  
  34. An interface spec can be either short form, which is just the name of
  35. an interface (eth0 or whatever), or long form. The long form consists
  36. of up to seven elements, separated by colons:
  37.  
  38. <client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
  39.  
  40. <client-ip> IP address of the client. If empty, the address will
  41. either be determined by RARP/BOOTP/DHCP. What protocol
  42. is used de- pends on the <autoconf> parameter. If this
  43. parameter is not empty, autoconf will be used.
  44.  
  45. <server-ip> IP address of the NFS server. If RARP is used to
  46. determine the client address and this parameter is NOT
  47. empty only replies from the specified server are
  48. accepted. To use different RARP and NFS server,
  49. specify your RARP server here (or leave it blank), and
  50. specify your NFS server in the `nfsroot' parameter
  51. (see above). If this entry is blank the address of the
  52. server is used which answered the RARP/BOOTP/DHCP
  53. request.
  54.  
  55. <gw-ip> IP address of a gateway if the server is on a different
  56. subnet. If this entry is empty no gateway is used and the
  57. server is assumed to be on the local network, unless a
  58. value has been received by BOOTP/DHCP.
  59.  
  60. <netmask> Netmask for local network interface. If this is empty,
  61. the netmask is derived from the client IP address assuming
  62. classful addressing, unless overridden in BOOTP/DHCP reply.
  63.  
  64. <hostname> Name of the client. If empty, the client IP address is
  65. used in ASCII notation, or the value received by
  66. BOOTP/DHCP.
  67.  
  68. <device> Name of network device to use. If this is empty, all
  69. devices are used for RARP/BOOTP/DHCP requests, and the
  70. first one we receive a reply on is configured. If you
  71. have only one device, you can safely leave this blank.
  72.  
  73. <autoconf> Method to use for autoconfiguration. If this is either
  74. 'rarp', 'bootp', or 'dhcp' the specified protocol is
  75. used. If the value is 'both', 'all' or empty, all
  76. protocols are used. 'off', 'static' or 'none' means
  77. no autoconfiguration.
  78.  
  79. IP addresses and netmasks must be either absent (defaulting to zero)
  80. or presented in dotted-quad notation.
  81.  
  82. An interface spec can be prefixed with either "ip=", "nfsaddrs=", both
  83. of which are ignored. These (along with the ugliness of the long
  84. form) are present for compatibility with the in-kernel ipconfig code
  85. from 2.4 and earlier kernels.
  86.  
  87. Here are a few examples of valid ipconfig command lines.
  88.  
  89. Enable the loopback interface:
  90. ipconfig 127.0.0.1:::::lo:none
  91.  
  92. Try to configure eth0 using bootp for up to 30 seconds:
  93. ipconfig -t 30 -c bootp eth0
  94.  
  95. Configure eth0 and eth1 using dhcp or bootp, and eth2 statically:
  96. ipconfig -c any eth0 eth1 192.168.1.1:::::eth2:none
  97.  
  98. --
  99.  
  100. From Russell's original README, and still true:
  101.  
  102. The code in main.c is yucky imho. Needs cleaning.
  103.  
  104. --
  105. Russell King (2002/10/22)
  106. Bryan O'Sullivan (2003/04/29)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement