CONTENT
  • CHANGES
Szukaj
counter

#top ifconfig


ifconfig - configure a network interface

Powiązane:
ifconfig, ifenslave, ip, netstat, netstat-nat, route,

SYNOPSIS
ifconfig [interface]
ifconfig interface [aftype] options | address ...


DESCRIPTION



OPTIONS
interface
The name of the interface. This is usually a driver name followed by a unit number, for example eth0 for the first Ethernet interface.

up
This flag causes the interface to be activated. It is implicitly specified if an address is assigned to the interface.

down
This flag causes the driver for this interface to be shut down.

dstaddr addr
Set the remote IP address for a point-to-point link (such as PPP). This keyword is now obsolete; use the pointopoint keyword instead.

netmask addr
Set the IP network mask for this interface. This value defaults to the usual class A, B or C network mask (as derived from the interface IP address), but it can be set to any value.

add addr/prefixlen
Add an IPv6 address to an interface.

del addr/prefixlen
Remove an IPv6 address from an interface.

tunnel ::aa.bb.cc.dd
Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination.



EXAMPLES
ifconfig eth1
ifconfig eth1 10.44.0.58/16
ifconfig eth1 10.44.0.58/16 up


ifconfig eth1 add 10.44.2.58 netmask 255.255.0.0

ip a s dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:04:00:58 brd ff:ff:ff:ff:ff:ff
    inet 10.44.0.58/16 brd 10.44.255.255 scope global eth1
    inet 10.44.2.58/16 brd 10.44.255.255 scope global secondary eth1:0
    inet6 fe80::216:3eff:fe04:58/64 scope link
       valid_lft forever preferred_lft forever

ifconfig eth1 add 2a00:1450:400c:c00::1b
ip a s dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:04:00:58 brd ff:ff:ff:ff:ff:ff
    inet 10.44.0.58/16 brd 10.44.255.255 scope global eth1
    inet 10.44.2.58/16 brd 10.44.255.255 scope global secondary eth1:0
    inet6 2a00:1450:400c:c00::1b/0 scope global tentative
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe04:58/64 scope link
       valid_lft forever preferred_lft forever




Zmodyfikowany ostatnio: 2015/11/16 01:15:53 (8 lat temu), textsize: 3,15 kB, htmlsize: 4,06 kB

Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników