1. tcpdump : 可以查看网络传输状况
如: sudo tcpdump
或
sudo tcpdump -i eth0
2. vlan: 虚拟局域网
VLAN(Virtual Local Area Network)的中文名为"虚拟局域网"。VLAN是一种将局域网设备从逻辑上划分成一个个网段,从而实现虚拟工作组的新兴数据交换技术。
vlan的作用:
通过将企业网络划分为虚拟网络VLAN网段,可以强化网络管理和网络安全,控制不必要的数据广播。
同一个VLAN中的广播只有VLAN中的成员才能听到,而不会传输到其他的VLAN中去,这样可以很好的控制不必要的广播风暴的产生。同时,若没有路由的话,不同VLAN之间不能相互通讯,这样增加了企业网络中不同部门之间的安全性。网络管理员可以通过配置VLAN之间的路由来全面管理企业内部不同管理单元之间的信息互访。交换机是根据交换机的端口来划分VLAN的。所以,用户可以自由的在企业网络中移动办公,不论他在何处接入交换网络,他都可以与VLAN内其他用户自如通讯。
3. vconfig 命令:
@xxha:~$ 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.
4. ip 命令:
@xxha:~$ ip
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
ip [ -force ] -batch filename
where OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |
tunnel | maddr | mroute | monitor | xfrm }
OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
-f[amily] { inet | inet6 | ipx | dnet | link } |
-o[neline] | -t[imestamp] | -b[atch] [filename] |
-rc[vbuf] [size]}