linux vlan configuration
来源:互联网 发布:手机如何连接电脑网络 编辑:程序博客网 时间:2024/04/30 15:22
1.installation
sample:ubuntu
apt-get install vlan
modprobe 8021q
2. create subinterface eth0.100 belong to vlan 100,eth0.200 belong to vlan 200
vconfig add eth0 100
vconfig add eth0 200
3. make host use vlan interface
ifconfig eth0.100 192.168.100.1
ping 192.168.100.254
tcpdump -i eth0 -nn -e
root@xiaotech-desktop:~# tcpdump -i eth0 -nn -e arp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
08:33:01.043090 30:0e:d5:1a:97:4d > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46:vlan 100, p 0, ethertype ARP, Request who-has 192.168.100.100 tell 192.168.100.1, length 28
08:33:02.041380 30:0e:d5:1a:97:4d > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 100, p 0, ethertype ARP, Request who-has 192.168.100.100 tell 192.168.100.1, length 28
4.make vm use vlan interface
brctl addbr test
brctl addif test eth0.200
create vm user virt-manager,attach the vm interface to the bridge test such as follows
root@xiaotech-desktop:~# brctl show
bridge name bridge idSTP enabled interfaces
test 8000.300ed51a974d no eth0.200
vnet0
in the vm,ping 192.168.200.254
root@xiaotech-desktop:~# tcpdump -i eth0 -nn -e arp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
08:36:59.738330 52:54:00:5e:cd:49 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 200, p 0, ethertype ARP, Request who-has 192.168.200.254 tell 192.168.200.2, length 46
- Linux vlan configuration
- Linux vlan configuration
- Linux vlan configuration
- linux vlan configuration
- linux VLAN配置(vconfig)
- linux的vlan模型
- linux vlan实现
- linux VLAN配置(vconfig)
- Linux vlan 功能模块分析
- Linux vlan 功能模块分析
- linux vlan 配置
- linux vlan 配置
- linux VLAN配置(vconfig)
- linux VLAN配置(vconfig)
- Linux 如何实现 VLAN
- 动手实践 Linux VLAN
- 动手实践 Linux VLAN
- Linux 如何实现 VLAN
- 绑定一把枪到手上,添加一个开枪的效果
- 彩票小例子
- 【bzoj1444】【jsoi2009】【有趣的游戏】【AC自动机+矩阵乘法】
- CSS3重复渐变(线性和径向渐变)
- APP跳到AppStore 下载的实现
- linux vlan configuration
- python爬虫1
- UML类图建模简介
- java学习路线图
- UITabView/UICollectionView 全选问题
- XSS实战篇
- Android Studio下开启手机无线调试
- JAVA枚举的作用与好处
- Java环境的搭建