tcpdump_vlan_vconfig_ip

本文介绍了如何利用tcpdump工具监控网络传输,理解VLAN(虚拟局域网)技术及其在增强网络管理和安全方面的优势,以及vconfig命令的相关应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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]}


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值