📄 ifconfig.8
字号:
.TH IFCONFIG 8 "14 August 2000" "net-tools" "Linux Programmer's Manual".SH NAMEifconfig \- configure a network interface.SH SYNOPSIS.B "ifconfig [interface]".br.B "ifconfig interface [aftype] options | address ...".SH DESCRIPTION.B Ifconfigis used to configure the kernel-resident network interfaces. It isused at boot time to set up interfaces as necessary. After that, itis usually only needed when debugging or when system tuning is needed..LPIf no arguments are given,.B ifconfigdisplays the status of the currently active interfaces. Ifa single.B interfaceargument is given, it displays the status of the given interfaceonly; if a single.B -aargument is given, it displays the status of all interfaces, eventhose that are down. Otherwise, it configures an interface..SH Address FamiliesIf the first argument after the interface name is recognized asthe name of a supported address family, that address family isused for decoding and displaying all protocol addresses. Currentlysupported address families include.B inet(TCP/IP, default), .B inet6(IPv6),.B ax25(AMPR Packet Radio),.B ddp(Appletalk Phase 2),.B ipx(Novell IPX) and.B netrom(AMPR Packet radio)..SH OPTIONS.TP.B interfaceThe name of the interface. This is usually a driver name followed bya unit number, for example.B eth0for the first Ethernet interface..TP.B upThis flag causes the interface to be activated. It is implicitlyspecified if an address is assigned to the interface..TP.B downThis flag causes the driver for this interface to be shut down..TP.B "[\-]arp"Enable or disable the use of the ARP protocol on this interface..TP.B "[\-]promisc"Enable or disable the.B promiscuousmode of the interface. If selected, all packets on the network willbe received by the interface..TP.B "[\-]allmulti"Enable or disable .B all-multicastmode. If selected, all multicast packets on the network will bereceived by the interface..TP.B "metric N"This parameter sets the interface metric..TP.B "mtu N"This parameter sets the Maximum Transfer Unit (MTU) of an interface..TP.B "dstaddr addr"Set the remote IP address for a point-to-point link (such asPPP). This keyword is now obsolete; use the.B pointopointkeyword instead..TP.B "netmask addr"Set the IP network mask for this interface. This value defaults to theusual class A, B or C network mask (as derived from the interface IPaddress), but it can be set to any value..TP.B "add addr/prefixlen"Add an IPv6 address to an interface. .TP.B "del addr/prefixlen"Remove an IPv6 address from an interface..TP.B "tunnel aa.bb.cc.dd"Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination..TP.B "irq addr"Set the interrupt line used by this device. Not all devices candynamically change their IRQ setting..TP.B "io_addr addr"Set the start address in I/O space for this device. .TP.B "mem_start addr"Set the start address for shared memory used by this device. Only afew devices need this..TP.B "media type"Set the physical port or medium type to be used by the device. Notall devices can change this setting, and those that can vary in whatvalues they support. Typical values for.B typeare .B 10base2(thin Ethernet),.B 10baseT(twisted-pair 10Mbps Ethernet),.B AUI (external transceiver) and so on. The special medium type of.B autocan be used to tell the driver to auto-sense the media. Again, notall drivers can do this..TP.B "[-]broadcast [addr]"If the address argument is given, set the protocol broadcastaddress for this interface. Otherwise, set (or clear) the.B IFF_BROADCASTflag for the interface..TP.B "[-]pointopoint [addr]"This keyword enables the.B point-to-pointmode of an interface, meaning that it is a direct link between twomachines with nobody else listening on it..brIf the address argument is also given, set the protocol address ofthe other side of the link, just like the obsolete.B dstaddrkeyword does. Otherwise, set or clear the.B IFF_POINTOPOINTflag for the interface. .TP.B hw class addressSet the hardware address of this interface, if the device driversupports this operation. The keyword must be followed by thename of the hardware class and the printable ASCII equivalent ofthe hardware address. Hardware classes currently supported include.B ether(Ethernet),.B ax25(AMPR AX.25),.B ARCnetand.B netrom(AMPR NET/ROM)..TP.B multicastSet the multicast flag on the interface. This should not normally be neededas the drivers set the flag correctly themselves..TP.B addressThe IP address to be assigned to this interface..TP.B txqueuelen lengthSet the length of the transmit queue of the device. It is useful to set thisto small values for slower devices with a high latency (modem links, ISDN)to prevent fast bulk transfers from disturbing interactive traffic liketelnet too much. .SH NOTESSince kernel release 2.2 there are no explicit interface statistics foralias interfaces anymore. The statistics printed for the original addressare shared with all alias addresses on the same device. If you want per-addressstatistics you should add explicit accountingrules for the address using the .BR ipchains(8)command..LPInterrupt problems with Ethernet device drivers fail with EAGAIN. See.I http://cesdis.gsfc.nasa.gov/linux/misc/irq-conflict.htmlfor more information..SH FILES.I /proc/net/socket .br.I /proc/net/dev.br.I /proc/net/if_inet6.SH BUGSWhile appletalk DDP and IPX addresses will be displayed they cannot bealtered by this command..SH SEE ALSOroute(8), netstat(8), arp(8), rarp(8), ipchains(8).SH AUTHORSFred N. van Kempen, <waltje@uwalt.nl.mugnet.org>.brAlan Cox, <Alan.Cox@linux.org>.brPhil Blundell, <Philip.Blundell@pobox.com>.brAndi Kleen
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -