/l3/users/igor-public/nt-scale/debian5.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 |
|
#ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0f:fe:e6:dd:33 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:1b:21:ad:7c:cd brd ff:ff:ff:ff:ff:ff 4: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN link/ether 0a:af:fd:50:3a:6c brd ff:ff:ff:ff:ff:ff |
#dmesg | grep eth
[ 0.296242] ACPI Error: Method parse/execution failed [\_SB_.PCI0._OSC] (Node f24406c8), AE_ALREADY_EXISTS (20110316/psparse-536) [ 0.296249] ACPI: Marking method _OSC as Serialized because of AE_ALREADY_EXISTS error [ 0.304599] ACPI Error: Method parse/execution failed [\_SB_.PCI0._OSC] (Node f24406c8), AE_ALREADY_EXISTS (20110316/psparse-536) [ 0.304667] ACPI Error: Method parse/execution failed [\_SB_.PCI0._OSC] (Node f24406c8), AE_ALREADY_EXISTS (20110316/psparse-536) [ 1.494272] e1000e 0000:00:19.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:0f:fe:e6:dd:33 [ 1.494275] e1000e 0000:00:19.0: eth0: Intel(R) PRO/1000 Network Connection [ 1.494297] e1000e 0000:00:19.0: eth0: MAC: 7, PHY: 6, PBA No: 1062FF-0FF [ 1.627420] e1000e 0000:30:00.0: eth1: (PCI Express:2.5GB/s:Width x1) 00:1b:21:ad:7c:cd [ 1.627423] e1000e 0000:30:00.0: eth1: Intel(R) PRO/1000 Network Connection [ 1.627436] e1000e 0000:30:00.0: eth1: MAC: 3, PHY: 8, PBA No: E46981-005 ... [79016.904879] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None [79016.904884] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO [79018.260993] e1000e: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None [79018.260997] e1000e 0000:30:00.0: eth1: 10/100 speed: disabling TSO [79042.176139] e1000e: eth0 NIC Link is Down [79043.804164] e1000e: eth1 NIC Link is Down [79064.444876] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None [79064.444881] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO [79064.464996] e1000e: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None [79064.465000] e1000e 0000:30:00.0: eth1: 10/100 speed: disabling TSO |
#dmesg | grep eth | less
|
#mii-tool .
SIOCGMIIPHY on '.' failed: No such device |
#mii-tool
SIOCGMIIREG on eth0 failed: Input/output error SIOCGMIIREG on eth0 failed: Input/output error eth0: negotiated 100baseTx-FD, link ok SIOCGMIIREG on eth1 failed: Input/output error SIOCGMIIREG on eth1 failed: Input/output error eth1: negotiated 100baseTx-FD, link ok |
#apt-cache search eth-tool
|
#apt-cache search eth tool
libace-flreactor-5.7.7 - ACE-GUI reactor integration for Fl libace-tkreactor-5.7.7 - ACE-GUI reactor integration for Tk adns-tools - Asynchronous-capable DNS client library and utilities aldo - Morse code training program amap-align - Protein multiple alignment by sequence annealing aoetools - tools to assist in using ATA over Ethernet apt-listbugs - tool which lists critical bugs before each apt installation audex - Audio grabber tool for KDE autopsy - graphical interface to SleuthKit backup2l - low-maintenance backup/restore tool ... vim-latexsuite - view, edit and compile LaTeX documents from within Vim vobcopy - A tool to copy DVD VOBs to hard disk wakeonlan - Sends 'magic packets' to wake-on-LAN enabled ethernet adapters watchupstream - Look for newer upstream releases weka-doc - Machine learning algorithms for data mining tasks weka - Machine learning algorithms for data mining tasks xapian-omega - CGI search interface and indexers using Xapian apache2-utils - utility programs for webservers devscripts - scripts to make the life of a Debian Package maintainer easier policykit-1 - framework for managing administrative policies and privileges |
#apt-cache search eth tool | less
|
#apt-cache search eth tool | grep eth.*tool
etherwake - A little tool to send magic Wake-on-LAN packets ethtool - display or change Ethernet device settings nethogs - Net top tool grouping bandwidth per process |
#apt-get install ethtool
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: ethtool 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 71.8 kB of archives. After this operation, 266 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! ethtool Install these packages without verification [y/N]? Y Get:1 http://10.0.35.1/debian/ squeeze/main ethtool i386 1:2.6.34-3 [71.8 kB] Fetched 71.8 kB in 2s (26.4 kB/s) Selecting previously deselected package ethtool. (Reading database ... 112006 files and directories currently installed.) Unpacking ethtool (from .../ethtool_1%3a2.6.34-3_i386.deb) ... Processing triggers for man-db ... Setting up ethtool (1:2.6.34-3) ... |
#ifconfig -l
ifconfig: option `-l' not recognised. ifconfig: `--help' gives usage information. |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 inet addr:10.0.35.45 Bcast:10.0.35.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fee6:dd33/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1772513 errors:0 dropped:30 overruns:0 frame:0 TX packets:386387 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:918134473 (875.6 MiB) TX bytes:37779679 (36.0 MiB) Interrupt:19 Memory:f0180000-f01a0000 eth1 Link encap:Ethernet HWaddr 00:1b:21:ad:7c:cd ... RX packets:4175 errors:0 dropped:0 overruns:0 frame:0 TX packets:4175 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1128560 (1.0 MiB) TX bytes:1128560 (1.0 MiB) pan0 Link encap:Ethernet HWaddr 0a:af:fd:50:3a:6c BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ifconfig -a | less
|
#ifconfig | less
|
#ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0f:fe:e6:dd:33 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:1b:21:ad:7c:cd brd ff:ff:ff:ff:ff:ff 4: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN link/ether 0a:af:fd:50:3a:6c brd ff:ff:ff:ff:ff:ff |
#ethtool
ethtool: bad command line argument(s) For more information run ethtool -h |
#ethtool eth0
Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No ... Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: off Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000001 (1) Link detected: yes |
#ethtool eth1
Settings for eth1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No ... Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: on Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000001 (1) Link detected: yes |
#mii-tool
SIOCGMIIREG on eth0 failed: Input/output error SIOCGMIIREG on eth0 failed: Input/output error eth0: negotiated 100baseTx-FD, link ok SIOCGMIIREG on eth1 failed: Input/output error SIOCGMIIREG on eth1 failed: Input/output error eth1: negotiated 100baseTx-FD, link ok |
#apt-cache search mii diag
mii-diag - A little tool to manipulate network cards |
#apt-get install mii-diag
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: nictools-pci nictools-nopci The following NEW packages will be installed: mii-diag 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 18.3 kB of archives. After this operation, 77.8 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! mii-diag Install these packages without verification [y/N]? Y Get:1 http://10.0.35.1/debian/ squeeze/main mii-diag i386 2.11-3 [18.3 kB] Fetched 18.3 kB in 1s (11.3 kB/s) Selecting previously deselected package mii-diag. (Reading database ... 112018 files and directories currently installed.) Unpacking mii-diag (from .../mii-diag_2.11-3_i386.deb) ... Processing triggers for man-db ... Setting up mii-diag (2.11-3) ... |
#mii-diag
Using the default interface 'eth0'. SIOCGMIIREG on eth0 failed: Input/output error Basic registers of MII PHY #1: 1140 792d 02a8 0390 0de1 41e1 0005 ffff. The autonegotiated capability is 01e0. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x1140: Auto-negotiation enabled. You have link beat, and everything is working OK. Your link partner advertised 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT. End of basic transceiver information. |
#mii-diag eth0
SIOCGMIIREG on eth0 failed: Input/output error Basic registers of MII PHY #1: 1140 792d 02a8 0390 0de1 41e1 0005 ffff. The autonegotiated capability is 01e0. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x1140: Auto-negotiation enabled. You have link beat, and everything is working OK. Your link partner advertised 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT. End of basic transceiver information. |
#mii-diag eth1
SIOCGMIIREG on eth1 failed: Input/output error Basic registers of MII PHY #1: 1140 796d 0141 0cb1 0de1 41e1 0005 ffff. The autonegotiated capability is 01e0. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x1140: Auto-negotiation enabled. You have link beat, and everything is working OK. Your link partner advertised 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT. End of basic transceiver information. |
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02) 00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02) 00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02) 00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02) 00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02) 30:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection |
#lspci | less
|
#lspci | less
|
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 inet addr:10.0.35.45 Bcast:10.0.35.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fee6:dd33/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1785077 errors:0 dropped:30 overruns:0 frame:0 TX packets:389495 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:920878403 (878.2 MiB) TX bytes:38187170 (36.4 MiB) Interrupt:19 Memory:f0180000-f01a0000 |
#lspci -v | less
|
#lspci -v | less
|
#lspci -v | less
|
#ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:1b:21:ad:7c:cd inet addr:10.0.100.37 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::21b:21ff:fead:7ccd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1081248 errors:0 dropped:0 overruns:0 frame:0 TX packets:5180 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:86798309 (82.7 MiB) TX bytes:391338 (382.1 KiB) Interrupt:17 Memory:f0280000-f02a0000 |
#lspci -v | less
|
#find /sys -name \*eth0\*
/sys/devices/pci0000:00/0000:00:19.0/net/eth0 /sys/class/net/eth0 |
#find /sys -name \*eth1\*
/sys/devices/pci0000:00/0000:00:1c.1/0000:30:00.0/net/eth1 /sys/class/net/eth1 |
#man lspci
|
#apt-get install vlan
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: vlan 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 39.6 kB of archives. After this operation, 176 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! vlan Install these packages without verification [y/N]? Y Get:1 http://10.0.35.1/debian/ squeeze/main vlan i386 1.9-3 [39.6 kB] Fetched 39.6 kB in 0s (0 B/s) Selecting previously deselected package vlan. (Reading database ... 112023 files and directories currently installed.) Unpacking vlan (from .../archives/vlan_1.9-3_i386.deb) ... Processing triggers for man-db ... Setting up vlan (1.9-3) ... |
#vconfig add eth0 10
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Added VLAN with VID == 10 to IF -:eth0:- |
#ifconfig eth0.10
eth0.10 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#vconfig add eth0 20
Added VLAN with VID == 20 to IF -:eth0:- |
#ifconfig eth0.20
eth0.20 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#vconfig del eth0 20
Unknown command -:del:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig rem eth0 20
ERROR: trying to remove VLAN -:eth0:- error: Invalid argument |
#vconfig rem eth0 10
ERROR: trying to remove VLAN -:eth0:- error: Invalid argument |
#vconfig rem eth0.10
Removed VLAN -:eth0.10:- |
#vconfig rem eth0.20
Removed VLAN -:eth0.20:- |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 inet addr:10.0.35.45 Bcast:10.0.35.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fee6:dd33/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1820521 errors:0 dropped:30 overruns:0 frame:0 TX packets:394554 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:925814669 (882.9 MiB) TX bytes:38777448 (36.9 MiB) Interrupt:19 Memory:f0180000-f01a0000 eth1 Link encap:Ethernet HWaddr 00:1b:21:ad:7c:cd ... RX bytes:89074634 (84.9 MiB) TX bytes:391489 (382.3 KiB) Interrupt:17 Memory:f0280000-f02a0000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4237 errors:0 dropped:0 overruns:0 frame:0 TX packets:4237 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1135516 (1.0 MiB) TX bytes:1135516 (1.0 MiB) |
#ssh 10.0.35.203
middling# sh arp IP ARP table IP Address MAC Address Type Port --------------- ----------------- ------- ---- 10.0.35.41 000ffe-7eb8fb dynamic 12 10.0.35.42 000ffe-7eb92f dynamic 6 10.0.35.43 0007e9-0c4511 dynamic 1 10.0.35.44 000ffe-7ea77b dynamic 7 10.0.35.45 000ffe-e6dd33 dynamic 4 Connection to 10.0.35.203 closed. |
#ifconfig eth0.10 192.168.10.5
SIOCSIFADDR: No such device eth0.10: ERROR while getting interface flags: No such device |
#vconfig add eth0 10
Added VLAN with VID == 10 to IF -:eth0:- |
#ifconfig eth0.10 192.168.10.5
|
#ifconfig eth0.20 192.168.20.5
|
#ping 192.168.20.4
PING 192.168.20.4 (192.168.20.4) 56(84) bytes of data. 64 bytes from 192.168.20.4: icmp_req=1 ttl=64 time=0.542 ms ^C --- 192.168.20.4 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.542/0.542/0.542/0.000 ms |
#ping -f 192.168.20.4
PING 192.168.20.4 (192.168.20.4) 56(84) bytes of data. |
#^C
|
#^C
|
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 eth0.10 eth0.20 iface eth0 inet static address 10.0.35.45 netmask 255.255.255.0 ... gateway 10.0.35.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt iface eth0.10 inet static address 192.168.10.1 netmask 255.255.255.0 iface eth0.20 inet static address 192.168.20.1 netmask 255.255.255.0 |
#vconfig
Expecting argc to be 3-5, inclusive. Was: 1 Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0f:fe:e6:dd:33 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:1b:21:ad:7c:cd brd ff:ff:ff:ff:ff:ff 4: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN link/ether 0a:af:fd:50:3a:6c brd ff:ff:ff:ff:ff:ff 7: eth0.10@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:0f:fe:e6:dd:33 brd ff:ff:ff:ff:ff:ff 8: eth0.20@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:0f:fe:e6:dd:33 brd ff:ff:ff:ff:ff:ff |
#ip link | grep @eth0
7: eth0.10@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 8: eth0.20@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP |
#vim /etc/network/interfaces
--- /tmp/l3-saved-27323.16930.27913 2012-02-21 17:34:40.000000000 +0200 +++ /etc/network/interfaces 2012-02-21 17:34:56.000000000 +0200 @@ -20,6 +20,7 @@ iface eth0.10 inet static address 192.168.10.5 netmask 255.255.255.0 + broadcast 192.168.10.255 iface eth0.20 inet static address 192.168.20.5 |
#ifconfig eth0.10 down
|
#vconfig del eth0.10
Unknown command -:del:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig rem eth0.10
Removed VLAN -:eth0.10:- |
#ifup eth0.10
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config Added VLAN with VID == 10 to IF -:eth0:- |
## http://xgu.ru/wiki/xen/drbd
|
#ssh 10.0.35.203
10.0.35.41 is alive, time = 1 ms middling# ping 10.0.35.43 10.0.35.43 is alive, time = 1 ms middling# ping 10.0.35.44 10.0.35.44 is alive, time = 1 ms middling# ping 10.0.35.41 10.0.35.41 is alive, time = 1 ms middling# ping 10.0.35.42 Target did not respond. middling# ping 10.0.35.42 ... middling(config)# sh run Running configuration: ; J8164A Configuration Editor; Created on release #H.10.83 hostname "middling" ip default-gateway 10.0.3.4 ip routing snmp-server community "45544545" Unrestricted vlan 1 name "DEFAULT_VLAN" Connection to 10.0.35.203 closed. |
#cat /proc/sys/net/ipv4/ip_forward
0 |
#for i in 1 2 3 4; do route add -net 192.168.${i}0.0/24 gw 10.0.35.4$i ; done
|
#ping 192.168.10.2
PING 192.168.10.2 (192.168.10.2) 56(84) bytes of data. ^C --- 192.168.10.2 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1008ms |
#ping 192.168.20.3
PING 192.168.20.3 (192.168.20.3) 56(84) bytes of data. ^C --- 192.168.20.3 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping 192.168.30.4
PING 192.168.30.4 (192.168.30.4) 56(84) bytes of data. ^C --- 192.168.30.4 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping 192.168.40.1
PING 192.168.40.1 (192.168.40.1) 56(84) bytes of data. ^C --- 192.168.40.1 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#cat /proc/sys/net/ipv4/ip_forward
0 |
#echo 1 > /proc/sys/net/ipv4/ip_forward
|
#ping 192.168.30.2
PING 192.168.30.2 (192.168.30.2) 56(84) bytes of data. ^C --- 192.168.30.2 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping 192.168.40.3
PING 192.168.40.3 (192.168.40.3) 56(84) bytes of data. 64 bytes from 192.168.40.3: icmp_req=1 ttl=64 time=5.91 ms 64 bytes from 192.168.40.3: icmp_req=2 ttl=64 time=0.689 ms 64 bytes from 192.168.40.3: icmp_req=3 ttl=64 time=0.702 ms 64 bytes from 192.168.40.3: icmp_req=4 ttl=64 time=0.597 ms ^C --- 192.168.40.3 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3000ms rtt min/avg/max/mdev = 0.597/1.976/5.917/2.275 ms |
#ping 192.168.10.4
PING 192.168.10.4 (192.168.10.4) 56(84) bytes of data. From 10.0.35.41: icmp_seq=1 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=1 ttl=64 time=0.517 ms From 10.0.35.41: icmp_seq=2 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=2 ttl=64 time=0.538 ms From 10.0.35.41: icmp_seq=3 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=3 ttl=64 time=0.755 ms From 10.0.35.41: icmp_seq=4 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=4 ttl=64 time=0.820 ms From 10.0.35.41: icmp_seq=5 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=5 ttl=64 time=0.476 ms From 10.0.35.41: icmp_seq=6 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=6 ttl=64 time=0.504 ms 64 bytes from 192.168.10.4: icmp_req=7 ttl=64 time=0.580 ms ^C --- 192.168.10.4 ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 5997ms rtt min/avg/max/mdev = 0.476/0.598/0.820/0.127 ms |
#ping 192.168.10.4
PING 192.168.10.4 (192.168.10.4) 56(84) bytes of data. From 10.0.35.41: icmp_seq=1 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=1 ttl=64 time=0.786 ms From 10.0.35.41: icmp_seq=2 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=2 ttl=64 time=0.659 ms From 10.0.35.41: icmp_seq=3 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=3 ttl=64 time=0.650 ms From 10.0.35.41: icmp_seq=4 Redirect Host(New nexthop: 192.168.10.4) 64 bytes from 192.168.10.4: icmp_req=4 ttl=64 time=0.820 ms ^C --- 192.168.10.4 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.650/0.728/0.820/0.082 ms |
#traceroute -I 192.168.10.4
traceroute to 192.168.10.4 (192.168.10.4), 30 hops max, 60 byte packets ^C |
#traceroute -I 192.168.10.4 n
Cannot handle "packetlen" cmdline arg `n' on position 2 (argc 3) |
#traceroute -I 192.168.10.4 -n
traceroute to 192.168.10.4 (192.168.10.4), 30 hops max, 60 byte packets 1 10.0.35.41 0.426 ms 0.426 ms 0.426 ms 2 192.168.10.4 0.430 ms 0.430 ms 0.429 ms |
#traceroute -I 192.168.10.4 -n
traceroute to 192.168.10.4 (192.168.10.4), 30 hops max, 60 byte packets 1 10.0.35.41 0.141 ms 0.140 ms 0.140 ms 2 192.168.10.4 0.370 ms 0.609 ms 0.610 ms |
#ping 192.168.40.3
PING 192.168.40.3 (192.168.40.3) 56(84) bytes of data. 64 bytes from 192.168.40.3: icmp_req=1 ttl=64 time=0.546 ms ^C --- 192.168.40.3 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.546/0.546/0.546/0.000 ms |
#ping 192.168.30.2
PING 192.168.30.2 (192.168.30.2) 56(84) bytes of data. ^C --- 192.168.30.2 ping statistics --- 6 packets transmitted, 0 received, 100% packet loss, time 5040ms |
#ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1) 56(84) bytes of data. 64 bytes from 192.168.20.1: icmp_req=1 ttl=64 time=0.503 ms ^C --- 192.168.20.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.503/0.503/0.503/0.000 ms |
#ping 192.168.10.4
PING 192.168.10.4 (192.168.10.4) 56(84) bytes of data. 64 bytes from 192.168.10.4: icmp_req=1 ttl=64 time=0.590 ms ^C --- 192.168.10.4 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.590/0.590/0.590/0.000 ms |
#ping 192.168.30.2
PING 192.168.30.2 (192.168.30.2) 56(84) bytes of data. ^C --- 192.168.30.2 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 999ms |
#ping 192.168.20.2
PING 192.168.20.2 (192.168.20.2) 56(84) bytes of data. 64 bytes from 192.168.20.2: icmp_req=1 ttl=64 time=0.201 ms 64 bytes from 192.168.20.2: icmp_req=2 ttl=64 time=0.495 ms 64 bytes from 192.168.20.2: icmp_req=3 ttl=64 time=0.492 ms 64 bytes from 192.168.20.2: icmp_req=4 ttl=64 time=0.547 ms 64 bytes from 192.168.20.2: icmp_req=5 ttl=64 time=0.504 ms 64 bytes from 192.168.20.2: icmp_req=6 ttl=64 time=0.548 ms 64 bytes from 192.168.20.2: icmp_req=7 ttl=64 time=0.497 ms 64 bytes from 192.168.20.2: icmp_req=8 ttl=64 time=0.494 ms 64 bytes from 192.168.20.2: icmp_req=9 ttl=64 time=0.161 ms ^C --- 192.168.20.2 ping statistics --- 9 packets transmitted, 9 received, 0% packet loss, time 7999ms rtt min/avg/max/mdev = 0.161/0.437/0.548/0.141 ms |
#ping 192.168.20.2
PING 192.168.20.2 (192.168.20.2) 56(84) bytes of data. 64 bytes from 192.168.20.2: icmp_req=1 ttl=64 time=0.338 ms 64 bytes from 192.168.20.2: icmp_req=2 ttl=64 time=0.493 ms ^C --- 192.168.20.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.338/0.415/0.493/0.080 ms |
#ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1) 56(84) bytes of data. 64 bytes from 192.168.20.1: icmp_req=1 ttl=64 time=0.466 ms ^C --- 192.168.20.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.466/0.466/0.466/0.000 ms |
#ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1) 56(84) bytes of data. 64 bytes from 192.168.20.1: icmp_req=1 ttl=64 time=0.496 ms 64 bytes from 192.168.20.1: icmp_req=2 ttl=64 time=0.774 ms ^C --- 192.168.20.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.496/0.635/0.774/0.139 ms |
#ping 192.168.20.2
PING 192.168.20.2 (192.168.20.2) 56(84) bytes of data. 64 bytes from 192.168.20.2: icmp_req=1 ttl=64 time=0.225 ms 64 bytes from 192.168.20.2: icmp_req=2 ttl=64 time=0.545 ms 64 bytes from 192.168.20.2: icmp_req=3 ttl=64 time=0.538 ms 64 bytes from 192.168.20.2: icmp_req=4 ttl=64 time=0.538 ms 64 bytes from 192.168.20.2: icmp_req=5 ttl=64 time=0.541 ms 64 bytes from 192.168.20.2: icmp_req=6 ttl=64 time=0.534 ms 64 bytes from 192.168.20.2: icmp_req=7 ttl=64 time=0.539 ms 64 bytes from 192.168.20.2: icmp_req=8 ttl=64 time=0.545 ms ^C --- 192.168.20.2 ping statistics --- 8 packets transmitted, 8 received, 0% packet loss, time 6997ms rtt min/avg/max/mdev = 0.225/0.500/0.545/0.107 ms |
#traceroute -I 192.168.20.1
traceroute to 192.168.20.1 (192.168.20.1), 30 hops max, 60 byte packets ^C |
#traceroute -I 192.168.20.1 -n
traceroute to 192.168.20.1 (192.168.20.1), 30 hops max, 60 byte packets 1 10.0.35.42 0.528 ms 0.527 ms 0.526 ms 2 10.0.35.1 0.869 ms 0.870 ms 0.870 ms 3 10.0.64.155 1.120 ms 1.120 ms 1.121 ms 4 * * * 5 * * * 6 * * * 7 * * * 8 * * * 9 * * * ... 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * * |
#ssh 10.0.35.42
root@10.0.35.42's password: Linux debian2 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Feb 22 10:01:15 2012 from 10.0.35.40 l3-agent is already running: pid=2911; pidfile=/root/.lilalo/l3-agent.pid |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.0.35.1 0.0.0.0 UG 0 0 0 eth0 10.0.35.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.10 |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:10.0.35.42 Bcast:10.0.35.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:74921 errors:0 dropped:0 overruns:0 frame:0 TX packets:20971 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16425281 (15.6 MiB) TX bytes:3172655 (3.0 MiB) Interrupt:19 Memory:f0180000-f01a0000 eth0.10 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f ... collisions:0 txqueuelen:0 RX bytes:1212 (1.1 KiB) TX bytes:22309 (21.7 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:150 errors:0 dropped:0 overruns:0 frame:0 TX packets:150 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:14167 (13.8 KiB) TX bytes:14167 (13.8 KiB) |
#ifconfig eth0.10 down
|
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 eth0.10 eth0.20 iface eth0 inet static address 10.0.35.45 netmask 255.255.255.0 network 10.0.35.0 broadcast 10.0.35.255 gateway 10.0.35.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt iface eth0.10 inet static address 192.168.10.1 netmask 255.255.255.0 iface eth0.20 inet static address 192.168.20.1 netmask 255.255.255.0
0
Время первой команды журнала | 15:41:22 2012- 2-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:34:06 2012- 2-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 16.83 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.27 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008