Linux VLAN 筆記
Linux VLAN 筆記 kernel 開啟802.1q功能後,便可以透過簡單指令,設定VLAN. brctl delif br0 ath0 brctl delif br0 eth0 vconfig add ath0 555 vconfig add eth0 555 ifconfig ath0.555 up brctl addbr br555 brctl addif br555 ath0.555 brctl addif br555 eth0.555 ifconfig ath0.555 up ifconfig eth0.555 up ifconfig br555 10.0.0.11 up Wireless AP mode運作正常,抓無線封包有看到帶了VLAN ID 555. 不幸的是,我的Wireless STA,不能成功ping到我的AP,只好下去看程式,這邊有幾個部份要看. 1. Linux kernel 802.1q 2.Wireless driver.(我手邊的是Atheros proprietary LSDK driver,所以這部份內容都不會放上來) 3.hostapd跟wpa_supplicant. Linux的net_dev是用一個list串起來,每個net_dev都有會呼叫ev_queue_xmit ->dev_hard_start_xmit ,去傳送封包至下一步。 vlan.c::vlan_proto_init()時會invoke,dev_add_pack(&vlan_packet_type); static struct packet_type vlan_packet_type __read_mostly = { .type = cpu_to_be16(ETH_P_8021Q), .func = vlan_skb_r...