/l3/users/devi/xen-for-zen/xen1.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 :39 :40 :41 :42 :43 :44 :45 :46 |
|
#brctl showmacs xenbr2 | sort -n
port no mac addr is local? ageing timer 1 00:16:3e:01:00:c3 no 292.08 2 00:16:3e:01:01:c2 no 292.08 3 00:13:d4:b2:4f:ec no 2.72 4 00:02:44:22:a5:b4 no 96.15 4 00:02:44:24:c6:2a no 69.70 4 00:02:44:4c:34:14 no 26.80 4 00:03:47:32:f9:12 no 0.30 4 00:03:47:32:f9:5a no 1.43 4 00:03:47:32:f9:66 no 1.10 ... 4 00:19:aa:10:6a:82 no 146.39 4 00:19:aa:10:6a:e9 no 217.44 4 00:19:aa:10:6b:78 no 219.64 4 00:1a:2f:26:57:8d no 145.61 4 00:1a:2f:83:3e:b7 no 26.94 4 00:20:af:be:10:e4 no 44.33 4 00:30:48:51:5b:5e no 273.91 4 00:50:04:af:07:3d no 239.72 4 00:60:b0:57:8d:50 no 5.06 4 fe:ff:ff:ff:ff:ff yes 0.00 |
#brctl showmacs xenbr2 | sort -n
port no mac addr is local? ageing timer 1 00:16:3e:01:00:c3 no 292.91 2 00:16:3e:01:01:c2 no 292.91 3 00:13:d4:b2:4f:ec no 3.56 4 00:02:44:22:a5:b4 no 96.98 4 00:02:44:24:c6:2a no 70.53 4 00:02:44:4c:34:14 no 27.63 4 00:03:47:32:f9:12 no 1.14 4 00:03:47:32:f9:5a no 0.26 4 00:03:47:32:f9:66 no 0.34 ... 4 00:19:aa:10:6a:82 no 147.22 4 00:19:aa:10:6a:e9 no 218.27 4 00:19:aa:10:6b:78 no 220.47 4 00:1a:2f:26:57:8d no 146.44 4 00:1a:2f:83:3e:b7 no 27.78 4 00:20:af:be:10:e4 no 45.17 4 00:30:48:51:5b:5e no 274.74 4 00:50:04:af:07:3d no 240.55 4 00:60:b0:57:8d:50 no 5.89 4 fe:ff:ff:ff:ff:ff yes 0.00 |
#brctl showmacs xenbr2 | sort -n
port no mac addr is local? ageing timer 1 00:16:3e:01:00:c3 no 294.42 2 00:16:3e:01:01:c2 no 294.42 3 00:13:d4:b2:4f:ec no 5.06 4 00:02:44:22:a5:b4 no 98.49 4 00:02:44:24:c6:2a no 72.04 4 00:02:44:4c:34:14 no 29.14 4 00:03:47:32:f9:12 no 2.64 4 00:03:47:32:f9:5a no 1.77 4 00:03:47:32:f9:66 no 1.84 ... 4 00:19:aa:10:6a:82 no 148.73 4 00:19:aa:10:6a:e9 no 219.78 4 00:19:aa:10:6b:78 no 221.98 4 00:1a:2f:26:57:8d no 147.95 4 00:1a:2f:83:3e:b7 no 29.28 4 00:20:af:be:10:e4 no 46.67 4 00:30:48:51:5b:5e no 276.25 4 00:50:04:af:07:3d no 242.06 4 00:60:b0:57:8d:50 no 7.40 4 fe:ff:ff:ff:ff:ff yes 0.00 |
#brctl showmacs xenbr2 | sort -n
port no mac addr is local? ageing timer 3 00:13:d4:b2:4f:ec no 19.08 4 00:02:44:22:a5:b4 no 36.23 4 00:02:44:24:c6:2a no 37.53 4 00:02:44:4c:34:14 no 114.49 4 00:03:47:32:f9:12 no 4.66 4 00:03:47:32:f9:5a no 1.80 4 00:03:47:32:f9:66 no 1.87 4 00:03:47:32:f9:fe no 1.23 4 00:03:47:f1:49:58 no 1.65 ... 4 00:18:ba:c8:08:18 no 1.16 4 00:19:56:fd:74:89 no 174.76 4 00:19:aa:10:6a:2d no 117.83 4 00:19:aa:10:6a:82 no 282.75 4 00:19:aa:10:6a:c0 no 105.59 4 00:1a:2f:26:57:8d no 281.97 4 00:1a:2f:83:3e:b7 no 163.31 4 00:20:af:be:10:e4 no 180.69 4 00:60:b0:57:8d:50 no 21.37 4 fe:ff:ff:ff:ff:ff yes 0.00 |
#brctl showmacs xenbr2 | sort -n
port no mac addr is local? ageing timer 3 00:13:d4:b2:4f:ec no 29.51 4 00:02:44:22:a5:b4 no 46.66 4 00:02:44:24:c6:2a no 47.96 4 00:02:44:4c:34:14 no 124.92 4 00:03:47:32:f9:12 no 4.10 4 00:03:47:32:f9:5a no 0.23 4 00:03:47:32:f9:66 no 0.30 4 00:03:47:32:f9:fe no 1.66 4 00:03:47:f1:49:58 no 0.08 ... 4 00:18:ba:c8:08:18 no 1.57 4 00:19:56:fd:74:89 no 185.19 4 00:19:aa:10:6a:2d no 128.27 4 00:19:aa:10:6a:82 no 293.18 4 00:19:aa:10:6a:c0 no 116.03 4 00:1a:2f:26:57:8d no 292.41 4 00:1a:2f:83:3e:b7 no 173.74 4 00:20:af:be:10:e4 no 191.13 4 00:60:b0:57:8d:50 no 31.80 4 fe:ff:ff:ff:ff:ff yes 0.00 |
#dpkg -S brctl
bridge-utils: /usr/sbin/brctl zsh: /usr/share/zsh/4.3.2/functions/Completion/Linux/_brctl bridge-utils: /usr/share/man/man8/brctl.8.gz |
#dpkg -L bridge-utils
/. /etc /etc/network /etc/network/if-pre-up.d /etc/network/if-pre-up.d/bridge /etc/network/if-post-down.d /etc/network/if-post-down.d/bridge /usr /usr/sbin /usr/sbin/brctl ... /usr/share/doc/bridge-utils/PROJECTS /usr/share/doc/bridge-utils/SMPNOTES /usr/share/doc/bridge-utils/WISHLIST /usr/share/doc/bridge-utils/changelog.gz /usr/share/doc/bridge-utils/copyright /usr/share/doc/bridge-utils/README.Debian.gz /usr/share/doc/bridge-utils/changelog.Debian.gz /usr/share/man /usr/share/man/man8 /usr/share/man/man8/brctl.8.gz |
#less /usr/share/doc/bridge-utils/README
|
#less /usr/share/doc/bridge-utils/
![]() |
#less /usr/share/doc/bridge-utils/HOWTO
|
#less /usr/share/doc/bridge-utils/
![]() |
#less /usr/share/doc/bridge-utils/TODO
|
#less /usr/share/doc/bridge-utils/
![]() |
#less /usr/share/doc/bridge-utils/WISHLIST
|
#less /usr/share/doc/bridge-utils/PROJECTS
|
#ping 192.168.4.4
![]() PING 192.168.4.4 (192.168.4.4) 56(84) bytes of data. --- 192.168.4.4 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4009ms |
#ping 192.168.4.4
![]() PING 192.168.4.4 (192.168.4.4) 56(84) bytes of data. --- 192.168.4.4 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3005ms |
#brctl show
bridge name bridge id STP enabled interfaces service0 8000.feffffffffff no vif4.0 vif5.0 xenbr0 8000.feffffffffff no vif0.1 peth1 vif1.0 xenbr1 8000.feffffffffff no vif4.1 xenbr2 8000.feffffffffff no vif4.2 vif5.1 vif0.2 peth0 xenbr3 8000.feffffffffff no vif5.2 xenbr4 8000.000000000000 no |
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:13:D4:B2:4F:EC inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::213:d4ff:feb2:4fec/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:519852 errors:0 dropped:0 overruns:0 frame:0 TX packets:1869 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:197627982 (188.4 MiB) TX bytes:60084 (58.6 KiB) |
#vconfig add eth0 4
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 == 4 to IF -:eth0:- |
#modprobe 8021q
|
#vconfig add eth0 4
ERROR: trying to add VLAN #4 to IF -:eth0:- error: Invalid argument |
#vconfig delete eth0 4
![]() Unknown command -:delete:- 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. ... DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * bind-type: PER_DEVICE # Allows vlan 5 on eth0 and eth1 to be unique. PER_KERNEL # Forces vlan 5 to be unique across all devices. * 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.4
Removed VLAN -:eth0.4:- |
#vconfig add eth0 4
Added VLAN with VID == 4 to IF -:eth0:- |
#ifconfig eth0.4
eth0.4 Link encap:Ethernet HWaddr 00:13:D4:B2:4F:EC 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 eth0.4 192.168.4.1
|
#ping 192.168.4.4
PING 192.168.4.4 (192.168.4.4) 56(84) bytes of data. 64 bytes from 192.168.4.4: icmp_seq=1 ttl=64 time=0.517 ms --- 192.168.4.4 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.517/0.517/0.517/0.000 ms |
#ping 192.168.4.3
PING 192.168.4.3 (192.168.4.3) 56(84) bytes of data. 64 bytes from 192.168.4.3: icmp_seq=1 ttl=64 time=0.457 ms --- 192.168.4.3 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.457/0.457/0.457/0.000 ms |
#ping 192.168.4.254
PING 192.168.4.254 (192.168.4.254) 56(84) bytes of data. 64 bytes from 192.168.4.254: icmp_seq=1 ttl=64 time=1.26 ms --- 192.168.4.254 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.269/1.269/1.269/0.000 ms |
#ip link show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,PROMISC,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#brctl show
bridge name bridge id STP enabled interfaces service0 8000.feffffffffff no vif4.0 vif5.0 xenbr0 8000.feffffffffff no vif0.1 peth1 vif1.0 xenbr1 8000.feffffffffff no vif4.1 xenbr2 8000.feffffffffff no vif4.2 vif5.1 vif0.2 peth0 xenbr3 8000.feffffffffff no vif5.2 xenbr4 8000.000000000000 no |
#brctl show xenbr2
bridge name bridge id STP enabled interfaces service0 8000.feffffffffff no vif4.0 vif5.0 xenbr0 8000.feffffffffff no vif0.1 peth1 vif1.0 xenbr1 8000.feffffffffff no vif4.1 xenbr2 8000.feffffffffff no vif4.2 vif5.1 vif0.2 peth0 xenbr3 8000.feffffffffff no vif5.2 xenbr4 8000.000000000000 no |
#brctl show
bridge name bridge id STP enabled interfaces service0 8000.feffffffffff no vif4.0 vif5.0 xenbr0 8000.feffffffffff no vif0.1 peth1 vif1.0 xenbr1 8000.feffffffffff no vif4.1 xenbr2 8000.feffffffffff no vif4.2 vif5.1 vif0.2 peth0 xenbr3 8000.feffffffffff no vif5.2 xenbr4 8000.000000000000 no |
#ip link show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,PROMISC,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#ip link show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,PROMISC,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#ip
![]() Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } ip [ -force ] [-batch filename where OBJECT := { link | addr | route | rule | neigh | ntable | tunnel | maddr | mroute | monitor | xfrm | moo } OPTIONS := { -V[ersion] | -s[tatistics] | -r[esolve] | -f[amily] { inet | inet6 | ipx | dnet | link } | -o[neline] | -t[imestamp] } |
#less /etc/xen/scripts/network-bridge
|
#ip
![]() Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } ip [ -force ] [-batch filename where OBJECT := { link | addr | route | rule | neigh | ntable | tunnel | maddr | mroute | monitor | xfrm | moo } OPTIONS := { -V[ersion] | -s[tatistics] | -r[esolve] | -f[amily] { inet | inet6 | ipx | dnet | link } | -o[neline] | -t[imestamp] } |
# link
![]() link: missing operand Try `link --help' for more information. |
#ip
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,PROMISC,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#ip link help
![]() Usage: ip link set DEVICE { up | down | arp { on | off } | dynamic { on | off } | multicast { on | off } | allmulticast { on | off } | promisc { on | off } | trailers { on | off } | txqueuelen PACKETS | name NEWNAME | address LLADDR | broadcast LLADDR | mtu MTU } ip link show [ DEVICE ] |
#ip link
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,PROMISC,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#ip link help
![]() Usage: ip link set DEVICE { up | down | arp { on | off } | dynamic { on | off } | multicast { on | off } | allmulticast { on | off } | promisc { on | off } | trailers { on | off } | txqueuelen PACKETS | name NEWNAME | address LLADDR | broadcast LLADDR | mtu MTU } ip link show [ DEVICE ] |
#ip link set peth0 promisc off
|
#ip link
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#brctl show
bridge name bridge id STP enabled interfaces service0 8000.feffffffffff no vif4.0 vif5.0 xenbr0 8000.feffffffffff no vif0.1 peth1 vif1.0 xenbr1 8000.feffffffffff no vif4.1 xenbr2 8000.feffffffffff no vif4.2 vif5.1 vif0.2 peth0 xenbr3 8000.feffffffffff no vif5.2 xenbr4 8000.000000000000 no |
#ip link set vif0.2 promisc off
|
#ip link | grep -i promisc
![]() |
#ip link
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#ping 192.168.4.1
PING 192.168.4.1 (192.168.4.1) 56(84) bytes of data. 64 bytes from 192.168.4.1: icmp_seq=1 ttl=64 time=0.037 ms --- 192.168.4.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.037/0.037/0.037/0.000 ms |
#ping 192.168.4.3
PING 192.168.4.3 (192.168.4.3) 56(84) bytes of data. 64 bytes from 192.168.4.3: icmp_seq=1 ttl=64 time=1.65 ms --- 192.168.4.3 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.654/1.654/1.654/0.000 ms |
#ping 192.168.4.4
PING 192.168.4.4 (192.168.4.4) 56(84) bytes of data. 64 bytes from 192.168.4.4: icmp_seq=1 ttl=64 time=0.451 ms --- 192.168.4.4 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.451/0.451/0.451/0.000 ms |
#ping 192.168.4.254
PING 192.168.4.254 (192.168.4.254) 56(84) bytes of data. 64 bytes from 192.168.4.254: icmp_seq=1 ttl=64 time=0.613 ms --- 192.168.4.254 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.613/0.613/0.613/0.000 ms |
#ip link show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#ip link set peth0 promisc on
|
#xm help --long
Usage: xm <subcommand> [args] Control, list, and manipulate Xen guest instances. xm full list of subcommands: console Attach to <Domain>'s console. create Create a domain based on <ConfigFile>. destroy Terminate a domain immediately. domid Convert a domain name to domain id. domname Convert a domain id to domain name. dump-core Dump core for a specific domain. list List information about all/some domains. ... getlabel Show security label for domain or resource. dry-run Test if a domain can access its resources. resources Show info for each labeled resource. makepolicy Build policy and create .bin/.map files. loadpolicy Load binary policy into hypervisor. cfgbootpolicy Add policy to boot configuration. dumppolicy Print hypervisor ACM state information. <Domain> can either be the Domain Name or Id. For more help on 'xm' see the xm(1) man page. For more help on 'xm create' see the xmdomain.cfg(5) man page. |
#xm network-list
![]() No domain parameter given Usage: xm network-list <Domain> [--long] List virtual network interfaces for a domain. -l, --long List resources as SXP |
#xm network-list xenomips0
Idx BE MAC Addr. handle state evt-ch tx-/rx-ring-ref BE-path 0 0 00:16:3e:01:0:c1 0 4 9 1547 /1548 /local/domain/0/backend/vif/4/0 1 0 00:16:3e:01:0:c2 1 4 10 1549 /1550 /local/domain/0/backend/vif/4/1 2 0 00:16:3e:01:0:c3 2 4 11 1551 /1552 /local/domain/0/backend/vif/4/2 |
#ip link show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: peth0: <BROADCAST,NOARP,PROMISC,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 3: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: vif0.0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff ... 28: vif4.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 29: vif5.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 30: vif5.1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 31: vif5.2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff 33: eth0.4@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:13:d4:b2:4f:ec brd ff:ff:ff:ff:ff:ff |
#man tcpdump
|
#brctl show
bridge name bridge id STP enabled interfaces service0 8000.feffffffffff no vif4.0 vif5.0 xenbr0 8000.feffffffffff no vif0.1 peth1 vif1.0 xenbr1 8000.feffffffffff no vif4.1 xenbr2 8000.feffffffffff no vif4.2 vif5.1 vif0.2 peth0 xenbr3 8000.feffffffffff no vif5.2 xenbr4 8000.000000000000 no |
#tcpdump -n -i xenbr2 arp and vlan 4
![]() tcpdump: WARNING: xenbr2: no IPv4 address assigned tcpdump: expression rejects all packets |
#tcpdump -n -i xenbr2
tcpdump: WARNING: xenbr2: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on xenbr2, link-type EN10MB (Ethernet), capture size 96 bytes 10:53:25.733786 arp who-has 10.0.1.21 (ff:ff:ff:ff:ff:ff) tell 10.0.1.21 10:53:25.966743 IP 10.0.16.3.137 > 10.255.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST 10:53:26.348896 arp who-has 10.0.1.9 (ff:ff:ff:ff:ff:ff) tell 10.0.1.9 10:53:26.606425 arp who-has 10.0.13.1 (ff:ff:ff:ff:ff:ff) tell 10.0.13.1 10:53:26.717869 IP 10.0.16.3.137 > 10.255.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST 10:53:26.809148 arp who-has 10.0.13.2 (ff:ff:ff:ff:ff:ff) tell 10.0.13.2 10:53:27.384963 arp who-has 10.0.1.5 (ff:ff:ff:ff:ff:ff) tell 10.0.1.5 ... 10:53:29.891546 IP 10.0.64.254.138 > 10.255.255.255.138: NBT UDP PACKET(138) 10:53:29.992796 IP 10.0.16.3.137 > 10.255.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST 10:53:30.344347 arp who-has 10.0.1.9 (ff:ff:ff:ff:ff:ff) tell 10.0.1.9 10:53:30.611912 arp who-has 10.0.13.1 (ff:ff:ff:ff:ff:ff) tell 10.0.13.1 10:53:30.743934 IP 10.0.16.3.137 > 10.255.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST 10:53:30.808649 arp who-has 10.0.13.2 (ff:ff:ff:ff:ff:ff) tell 10.0.13.2 10:53:31.379469 arp who-has 10.0.1.5 (ff:ff:ff:ff:ff:ff) tell 10.0.1.5 24 packets captured 24 packets received by filter 0 packets dropped by kernel |
#tcpdump -n -i xenbr2 vlan 4
tcpdump: WARNING: xenbr2: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on xenbr2, link-type EN10MB (Ethernet), capture size 96 bytes 10:53:36.589978 vlan 4, p 0, 00:0a:01:d4:d1:39 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: 0x0000: 0004 88a2 1000 ffff ff01 0000 0000 0000 ................ 0x0010: 0000 0000 0000 0e0e 0e0e 0e0e 0e0e 0e0e ................ 0x0020: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e ................ 0x0030: 0e0e .. 10:53:37.169001 vlan 4, p 0, IP 192.168.4.254 > 192.168.4.3: ICMP echo request, id 43897, seq 1, length 64 10:53:37.169574 vlan 4, p 0, IP 192.168.4.3 > 192.168.4.254: ICMP echo reply, id 43897, seq 1, length 64 10:53:38.170228 vlan 4, p 0, IP 192.168.4.254 > 192.168.4.3: ICMP echo request, id 43897, seq 2, length 64 10:53:38.170763 vlan 4, p 0, IP 192.168.4.3 > 192.168.4.254: ICMP echo reply, id 43897, seq 2, length 64 10:53:39.221633 vlan 4, p 0, IP 192.168.4.254 > 192.168.4.3: ICMP echo request, id 43897, seq 3, length 64 10:53:39.222146 vlan 4, p 0, IP 192.168.4.3 > 192.168.4.254: ICMP echo reply, id 43897, seq 3, length 64 10:53:40.224938 vlan 4, p 0, IP 192.168.4.254 > 192.168.4.3: ICMP echo request, id 43897, seq 4, length 64 10:53:40.225483 vlan 4, p 0, IP 192.168.4.3 > 192.168.4.254: ICMP echo reply, id 43897, seq 4, length 64 9 packets captured 9 packets received by filter 0 packets dropped by kernel |
#lspci
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02) 00:02.1 Display controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02) 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01) 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01) 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE (rev 01) 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01) 01:04.0 Mass storage controller: Integrated Technology Express, Inc. ITE 8211F Single Channel UDMA 133 (ASUS 8211 (ITE IT8212 ATA RAID Controller)) (rev 11) 01:09.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 74) 04:00.0 Ethernet controller: Intel Corporation 82573V Gigabit Ethernet Controller (Copper) (rev 03) |
#ifconfig
eth0.4 Link encap:Ethernet HWaddr 00:13:D4:B2:4F:EC inet addr:192.168.4.1 Bcast:192.168.4.255 Mask:255.255.255.0 inet6 addr: fe80::213:d4ff:feb2:4fec/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1439 errors:0 dropped:0 overruns:0 frame:0 TX packets:1432 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:72302 (70.6 KiB) TX bytes:52952 (51.7 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 ... TX packets:3269 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:768 (768.0 b) TX bytes:104884 (102.4 KiB) xenbr4 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:3269 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:104884 (102.4 KiB) |
#ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:04:76:A1:F0:5D inet addr:192.168.15.251 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::204:76ff:fea1:f05d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:849889 errors:0 dropped:0 overruns:0 frame:0 TX packets:16397 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:221359792 (211.1 MiB) TX bytes:3637875 (3.4 MiB) |
#ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:04:76:A1:F0:5D inet addr:192.168.15.251 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::204:76ff:fea1:f05d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:849925 errors:0 dropped:0 overruns:0 frame:0 TX packets:16415 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:221362404 (211.1 MiB) TX bytes:3641829 (3.4 MiB) |
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:13:D4:B2:4F:EC inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::213:d4ff:feb2:4fec/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:837050 errors:0 dropped:0 overruns:0 frame:0 TX packets:4696 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:220230898 (210.0 MiB) TX bytes:157680 (153.9 KiB) |
#ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:04:76:A1:F0:5D inet addr:192.168.15.251 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::204:76ff:fea1:f05d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:849980 errors:0 dropped:0 overruns:0 frame:0 TX packets:16447 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:221366446 (211.1 MiB) TX bytes:3648069 (3.4 MiB) |
#tcpdump -n -i eth1
19:33:20.659838 IP 192.168.15.251.22 > 192.168.15.254.38096: P 39168:39344(176) ack 49 win 93 <nop,nop,timestamp 48893741 49345144> 19:33:20.660170 IP 192.168.15.251.22 > 192.168.15.254.38096: P 39344:39520(176) ack 49 win 93 <nop,nop,timestamp 48893741 49345144> 19:33:20.660504 IP 192.168.15.251.22 > 192.168.15.254.38096: P 39520:39696(176) ack 49 win 93 <nop,nop,timestamp 48893741 49345144> 19:33:20.660834 IP 192.168.15.251.22 > 192.168.15.254.38096: P 39696:39872(176) ack 49 win 93 <nop,nop,timestamp 48893741 49345144> 19:33:20.661170 IP 192.168.15.251.22 > 192.168.15.254.38096: P 39872:40048(176) ack 49 win 93 <nop,nop,timestamp 48893741 49345144> 19:33:20.661504 IP 192.168.15.251.22 > 192.168.15.254.38096: P 40048:40224(176) ack 49 win 93 <nop,nop,timestamp 48893741 49345144> 19:33:20.682939 IP 192.168.15.254.38096 > 192.168.15.251.22: . ack 40224 win 1002 <nop,nop,timestamp 49345151 48893740> 19:33:20.682970 IP 192.168.15.251.22 > 192.168.15.254.38096: P 40224:40400(176) ack 49 win 93 <nop,nop,timestamp 48893747 49345151> 19:33:20.683331 IP 192.168.15.251.22 > 192.168.15.254.38096: P 40400:40688(288) ack 49 win 93 <nop,nop,timestamp 48893747 49345151> 19:33:20.683414 IP 192.168.15.254.38096 > 192.168.15.251.22: . ack 40400 win 1002 <nop,nop,timestamp 49345151 48893747> ... 19:33:20.772208 IP 192.168.15.251.22 > 192.168.15.254.38096: P 62448:62624(176) ack 97 win 93 <nop,nop,timestamp 48893767 49345172> 19:33:20.772517 IP 192.168.15.251.22 > 192.168.15.254.38096: P 62624:62800(176) ack 97 win 93 <nop,nop,timestamp 48893767 49345172> 19:33:20.797321 IP 192.168.15.254.38096 > 192.168.15.251.22: . ack 62800 win 1002 <nop,nop,timestamp 49345180 48893767> 19:33:20.797356 IP 192.168.15.251.22 > 192.168.15.254.38096: P 62800:63328(528) ack 97 win 93 <nop,nop,timestamp 48893776 49345180> 19:33:20.797720 IP 192.168.15.251.22 > 192.168.15.254.38096: P 63328:63616(288) ack 97 win 93 <nop,nop,timestamp 48893776 49345180> 19:33:20.797899 IP 192.168.15.254.38096 > 192.168.15.251.22: . ack 63328 win 1002 <nop,nop,timestamp 49345180 48893776> 19:33:20.797983 IP 192.168.15.254.38096 > 192.168.15.251.22: . ack 63616 win 1002 <nop,nop,timestamp 49345180 48893776> 19:33:20.798322 IP 192.168.15.251.22 > 192.168.15.254.38096: P 63616:63792(176) ack 97 win 93 <nop,nop,timestamp 48893776 49345180> 19:33:20.798544 IP 192.168.15.251.22 > 192.168.15.254.38096: P 63792:64080(288) ack 97 win 93 <nop,nop,timestamp 48893776 49345180> 19:33:20.798962 IP 192.168.15.251.22 > 192.168.15.254.38096: P 64080:64256(176) ack 97 win 93 <nop,nop,timestamp 48893776 49345180> |
#tcpdump -n -i eth1 cdp
![]() tcpdump: syntax error |
#grep cdp /etc/protocols
![]() |
#tcpdump -n -i eth1 host 192.168.200.1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 0 packets captured 0 packets received by filter 0 packets dropped by kernel |
#tcpdump -n -i eth1 host 192.168.200.2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 19:34:16.941711 arp who-has 192.168.200.2 tell 192.168.200.17 19:34:45.131535 arp who-has 192.168.200.2 tell 192.168.200.25 19:34:54.111330 arp who-has 192.168.200.2 tell 192.168.200.19 19:35:19.387645 arp who-has 192.168.200.2 tell 192.168.200.26 19:35:22.315081 arp who-has 192.168.200.2 tell 192.168.200.13 19:36:11.448939 arp who-has 192.168.200.2 tell 192.168.200.23 19:37:13.580615 arp who-has 192.168.200.2 tell 192.168.200.16 19:37:33.181225 arp who-has 192.168.200.2 tell 192.168.200.21 ... 19:41:37.538295 arp who-has 192.168.200.2 tell 192.168.200.19 19:42:00.108450 arp who-has 192.168.200.2 tell 192.168.200.26 19:42:06.680476 arp who-has 192.168.200.2 tell 192.168.200.13 19:42:47.606965 arp who-has 192.168.200.2 tell 192.168.200.118 19:42:56.915615 arp who-has 192.168.200.2 tell 192.168.200.23 19:43:56.899540 arp who-has 192.168.200.2 tell 192.168.200.16 19:44:14.279657 arp who-has 192.168.200.2 tell 192.168.200.21 21 packets captured 21 packets received by filter 0 packets dropped by kernel |
#tcpdump -n -i eth1 -e host 192.168.200.2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 19:46:00.480216 00:19:56:fd:71:26 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.11 19:46:49.322576 00:19:aa:10:6a:82 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.18 19:47:04.785893 00:19:aa:10:6b:78 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.15 19:47:07.737848 00:1a:2f:83:3e:b7 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.20 19:47:58.173120 00:19:aa:10:6a:e9 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.17 19:48:11.815655 00:15:62:92:e2:8a > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.25 19:48:20.875643 00:19:aa:10:6a:2d > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.19 19:48:30.295822 00:17:5a:75:69:c4 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.12 ... 19:53:57.221250 00:19:aa:10:6b:78 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.15 19:54:44.481151 00:19:aa:10:6a:e9 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.17 19:54:55.440918 00:15:62:92:e2:8a > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.25 19:55:16.221775 00:19:aa:10:6a:2d > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.19 19:55:28.863251 00:14:6a:ff:49:4f > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.26 19:55:35.304746 00:19:56:fd:75:0a > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.13 19:56:28.530250 00:19:56:fd:74:89 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: arp who-has 192.168.200.2 tell 192.168.200.23 24 packets captured 24 packets received by filter 0 packets dropped by kernel |
#tcpdump -n -i eth1 mac 00:18:ba:c8:08:40
![]() tcpdump: syntax error |
#man tcpdump
|
#tcpdump -n -i eth1 ethernet
![]() tcpdump: syntax error |
#tcpdump -n -i eth1 ethernet src 00:18:ba:c8:08:40
![]() tcpdump: syntax error |
#tcpdump -n -i eth1 ether src 00:18:ba:c8:08:40
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 20:05:52.733558 arp who-has 10.0.1.0 tell 10.0.3.4 20:06:01.726013 arp who-has 10.0.1.0 tell 10.0.3.4 20:22:16.833462 arp who-has 10.0.1.0 tell 10.0.3.4 20:22:19.836639 arp who-has 10.0.1.0 tell 10.0.3.4 20:22:25.844781 arp who-has 10.0.1.0 tell 10.0.3.4 ^X 5 packets captured 5 packets received by filter 0 packets dropped by kernel |
#apt-cache seach cisco
![]() E: Invalid operation seach |
#apt-cache search cisco
cdpr - Cisco Discovery Protocol Reporter filtergen - packet filter generator for various firewall systems flowscan - flow-based IP traffic analysis and visualization tool fwlogwatch - Firewall log analyzer hlfl - translator for firewalling rules ipcalc - parameter calculator for IPv4 addresses ipcheck - Dyndns.org client to register your dynamic IP address jffnms - web-based Network Management System (NMS) for IP networks kvpnc - vpn clients frontend for KDE libcflow-perl - perl module for analyzing raw IP flow files written by cflowd ... sing - A fully programmable ping replacement sipcalc - Advanced console-based ip subnet calculator ulog-acctd - Accounting daemon for Linux 2.4+ netfilter vpnc - Cisco-compatible VPN client wflogs - The modular firewall log analyzer of the WallFire project yardradius - YARD Radius Auth/Acct Server irpas - Internetwork Routing Protocol Attack Suite rancid-cgi - CGI for rancid rancid-core - rancid -- Really Awesome New Cisco confIg Differ rancid-util - Utilities for rancid |
#apt-get install cdpr
Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed: cdpr 0 upgraded, 1 newly installed, 0 to remove and 145 not upgraded. Need to get 15.2kB of archives. After unpacking 73.7kB of additional disk space will be used. Get:1 http://192.168.15.251 testing/main cdpr 2.2.1-1 [15.2kB] Fetched 15.2kB in 3s (4534B/s) Selecting previously deselected package cdpr. (Reading database ... 32971 files and directories currently installed.) Unpacking cdpr (from .../archives/cdpr_2.2.1-1_i386.deb) ... Setting up cdpr (2.2.1-1) ... |
#cdpr
![]() cdpr - Cisco Discovery Protocol Reporter Version 2.2.1 Copyright (c) 2002-2006 - MonkeyMental.com 1. peth0 (No description available) 2. vif0.1 (No description available) 3. vif0.2 (No description available) 4. eth0 (No description available) 5. xenbr0 (No description available) 6. eth0.4 (No description available) 7. peth1 (No description available) ... 17. vif5.0 (No description available) 18. vif5.1 (No description available) 19. vif5.2 (No description available) 20. any (Pseudo-device that captures on all interfaces) 21. lo (No description available) Enter the interface number (1-21):8 Using Device: eth1 Waiting for CDP advertisement: (default config is to transmit CDP packets every 60 seconds) Aborting due to timeout |
#man cdpr
|
#cdpr -d eth1
![]() cdpr - Cisco Discovery Protocol Reporter Version 2.2.1 Copyright (c) 2002-2006 - MonkeyMental.com Using Device: eth1 Waiting for CDP advertisement: (default config is to transmit CDP packets every 60 seconds) Aborting due to timeout |
#cdpr -d eth0
![]() cdpr - Cisco Discovery Protocol Reporter Version 2.2.1 Copyright (c) 2002-2006 - MonkeyMental.com Using Device: eth0 Waiting for CDP advertisement: (default config is to transmit CDP packets every 60 seconds) |
#apt-cache search wireshark
ethereal - dummy upgrade package for ethereal -> wireshark ethereal-common - dummy upgrade package for ethereal -> wireshark ethereal-dev - dummy upgrade package for ethereal -> wireshark tethereal - dummy upgrade package for ethereal -> wireshark tshark - network traffic analyzer (console) wireshark - network traffic analyzer wireshark-common - network traffic analyser (common files) wireshark-dev - network traffic analyser (development tools) |
#apt-get install tshark
![]() Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: libadns1 wireshark-common Recommended packages: libadns1-bin The following NEW packages will be installed: libadns1 tshark wireshark-common 0 upgraded, 3 newly installed, 0 to remove and 145 not upgraded. Need to get 7658kB of archives. After unpacking 31.6MB of additional disk space will be used. Do you want to continue [Y/n]? Get:1 http://192.168.15.251 testing/main libadns1 1.4-0.1 [56.7kB] Err http://192.168.15.251 testing/main wireshark-common 0.99.4-4 404 file not found on backend Err http://192.168.15.251 testing/main tshark 0.99.4-4 404 file not found on backend Fetched 56.7kB in 0s (91.1kB/s) Failed to fetch http://192.168.15.251:9999/debian/pool/main/w/wireshark/wireshark-common_0.99.4-4_i386.deb 404 file not found on backend Failed to fetch http://192.168.15.251:9999/debian/pool/main/w/wireshark/tshark_0.99.4-4_i386.deb 404 file not found on backend E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? |
#apt-get updat
![]() E: Invalid operation updat |
#apt-get update
![]() Get:1 http://192.168.15.251 testing Release.gpg [189B] Get:2 http://192.168.15.251 testing Release [68.5kB] Get:3 http://192.168.15.251 testing/main Packages/DiffIndex [509B] Get:4 http://192.168.15.251 testing/contrib Packages/DiffIndex [367B] Get:5 http://192.168.15.251 testing/non-free Packages/DiffIndex [229B] Get:6 http://192.168.15.251 testing/main Packages [4469kB] Get:7 http://192.168.15.251 testing/main Packages [4469kB] Get:8 http://192.168.15.251 testing/contrib Packages [63.2kB] Get:9 http://192.168.15.251 testing/contrib Packages [63.2kB] Get:10 http://192.168.15.251 testing/non-free Packages [85.7kB] Get:11 http://192.168.15.251 testing/non-free Packages [85.7kB] 99% [7 Packages bzip2 0] 48.8kB/s 0s |
#apt-get update
![]() Get:1 http://192.168.15.251 testing Release.gpg [189B] Hit http://192.168.15.251 testing Release Hit http://192.168.15.251 testing/main Packages/DiffIndex Hit http://192.168.15.251 testing/contrib Packages/DiffIndex Hit http://192.168.15.251 testing/non-free Packages/DiffIndex Get:2 http://192.168.15.251 testing/contrib Packages [63.2kB] Get:3 http://192.168.15.251 testing/contrib Packages [63.2kB] Ign http://192.168.15.251 testing/non-free Packages Ign http://192.168.15.251 testing/non-free Packages Err http://192.168.15.251 testing/non-free Packages Bad header line Err http://192.168.15.251 testing/non-free Packages Bad header line 99% [3 Packages bzip2 0] 99% [3 Packages bzip2 0] 99% [3 Packages bzip2 0] 99% [3 Packages bzip2 0] |
#/etc/init.d/apt-proxy restart
Stopping apt-proxy. Starting apt-proxy. |
#apt-get update
![]() Get:1 http://192.168.15.251 testing Release.gpg [189B] Hit http://192.168.15.251 testing Release Hit http://192.168.15.251 testing/main Packages/DiffIndex Hit http://192.168.15.251 testing/contrib Packages/DiffIndex Hit http://192.168.15.251 testing/non-free Packages/DiffIndex Get:2 http://192.168.15.251 testing/non-free Packages [85.7kB] Get:3 http://192.168.15.251 testing/non-free Packages [85.7kB] 99% [3 Packages bzip2 0] |
#tail /var/log/apt-proxy.log
2007/04/09 21:23 EEST [FetcherHttpClient,client] [CacheEntry] transfer_file:/var/cache/apt-proxy/debian/dists/testing/non-free/binary-i386/Packages.bz2 2007/04/09 21:23 EEST [FetcherHttpClient,client] Stopping factory <apt_proxy.fetchers.HttpFetcher instance at 0xb7799ecc> 2007/04/09 21:23 EEST [Channel,0,192.168.15.251] [CacheEntry] file_sent:/var/cache/apt-proxy/debian/dists/testing/non-free/binary-i386/Packages.bz2 2007/04/09 21:23 EEST [-] [verify] cache file verification FAILED for /var/cache/apt-proxy/debian/dists/testing/non-free/binary-i386/Packages.bz2: bunzip2 failed 2007/04/09 21:23 EEST [-] [CacheEntry] start download:dists/testing/non-free/binary-i386/Packages.bz2 2007/04/09 21:23 EEST [-] Starting factory <apt_proxy.fetchers.HttpFetcher instance at 0xb7799fac> 2007/04/09 21:23 EEST [FetcherHttpClient,client] [CacheEntry] download started:/var/cache/apt-proxy/debian/dists/testing/non-free/binary-i386/Packages.bz2 2007/04/09 21:23 EEST [FetcherHttpClient,client] [CacheEntry] download_data_end:/var/cache/apt-proxy/debian/dists/testing/non-free/binary-i386/Packages.bz2 2007/04/09 21:23 EEST [FetcherHttpClient,client] [CacheEntry] file_sent:/var/cache/apt-proxy/debian/dists/testing/non-free/binary-i386/Packages.bz2 2007/04/09 21:23 EEST [FetcherHttpClient,client] Stopping factory <apt_proxy.fetchers.HttpFetcher instance at 0xb7799fac> |
#vi /etc/apt/sources.list
3,4c3,4 < #deb http://debian.org.ua/debian unstable main contrib non-free < deb http://192.168.15.251:9999/debian testing main contrib non-free --- > deb http://debian.org.ua/debian unstable main contrib non-free > #deb http://192.168.15.251:9999/debian testing main contrib non-free |
#apt-get update
Get:1 http://debian.org.ua unstable Release.gpg [189B] Get:2 http://debian.org.ua unstable Release [79.6kB] Get:3 http://debian.org.ua unstable/main Packages [4647kB] Get:4 http://debian.org.ua unstable/contrib Packages [68.9kB] Get:5 http://debian.org.ua unstable/non-free Packages [93.0kB] Fetched 4889kB in 50s (97.6kB/s) Reading package lists... Done |
#apt-get install tshark
Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: libadns1 wireshark-common Recommended packages: libadns1-bin The following NEW packages will be installed: libadns1 tshark wireshark-common 0 upgraded, 3 newly installed, 0 to remove and 220 not upgraded. Need to get 7942kB/7999kB of archives. ... Selecting previously deselected package libadns1. (Reading database ... 32978 files and directories currently installed.) Unpacking libadns1 (from .../libadns1_1.4-0.1_i386.deb) ... Selecting previously deselected package wireshark-common. Unpacking wireshark-common (from .../wireshark-common_0.99.5-1_i386.deb) ... Selecting previously deselected package tshark. Unpacking tshark (from .../tshark_0.99.5-1_i386.deb) ... Setting up libadns1 (1.4-0.1) ... Setting up wireshark-common (0.99.5-1) ... Setting up tshark (0.99.5-1) ... |
#tshark -i eth0 -V -f "ether host 01000ccccccc" -c 2
Capturing on eth0 Frame 1 (60 bytes on wire, 60 bytes captured) Arrival Time: Apr 9, 2007 21:34:31.722513000 [Time delta from previous packet: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Packet Length: 60 bytes Capture Length: 60 bytes [Frame is marked: False] [Protocols in frame: eth:llc:dtp] ... Status: 0x04 Dtptype: 0x40 Type: Type (0x0003) Length: 5 Dtptype: 0x40 Neighbor: 00:18:ba:c8:08:18 Type: Neighbor (0x0004) Length: 10 Neighbor: Cisco_c8:08:18 (00:18:ba:c8:08:18) 2 packets captured |
Время первой команды журнала | 10:02:52 2007- 4- 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 21:28:57 2007- 4- 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 20.79 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.61 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.65 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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