5/直連三層組網直接轉發
AP管理vlan 10 11
業務vlan 20 30
DHCP 分配
AC-AP dhcp
LSW2 --- STA dhcp
配置要點,
1 二層部份
1) 接入層LSW3的兩個接口,肯定是都要trunk的,但是需要注意的是,要放行哪些VLAN的數據呢?哪里應該配置pvid 呢?
這要看數據的二層封裝了,要結合三層的DHCP來看,
LSW2為AP提供DHCP 中繼,並且由AC下發IP地址,那這樣一來,我得在LSW2上能夠看到VLAN ID是10的數據我才可以下發地址吧,才知道去找vlan10,然后再則LSW2的dhcp 中繼去處理
如圖中所示,在LSW3上抓包所得,顯示的802.1Q 是10,才會正常
那就應該是這樣
讓SW3發出來的幀打tag ,10 ,為的是讓sw2認識,去做DHCP
而后面的SW2—AC,要打VLAN 11的tag,
至於放行的流量,則於是直接轉發模式,所以都放就行了,
[coresw2]
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30
在coresw2上,和AC相連的接口,向下不再需要VLAN 11的流量了,所以可以不放,即使是放了也沒事兒
詳細配置
Access sw
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 to 11 20 30
#
interface Ethernet0/0/2
port link-type trunk
port trunk pvid vlan 10
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 to 11 20 30
port-isolate enable group 1
CORESW
二層部份
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 11 20 30
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30
Port Link Type PVID Trunk VLAN List
-------------------------------------------------------------------------------
GigabitEthernet0/0/1 trunk 1 1 11 20 30
GigabitEthernet0/0/2 trunk 1 1 10-11 20 30
三層部份
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
dhcp select relay //dhcp 中繼
dhcp relay server-ip 192.168.11.1 //指向AC地址/dhcp server 地址
interface Vlanif20
ip address 192.168.20.2 255.255.255.0
dhcp select global
interface Vlanif30
ip address 192.168.30.2 255.255.255.0
dhcp select global
interface Vlanif11
ip address 192.168.11.2 255.255.255.0
-------------------------
ip pool vlan20
gateway-list 192.168.20.1
network 192.168.20.0 mask 255.255.255.0
ip pool vlan30
gateway-list 192.168.30.1
network 192.168.30.0 mask 255.255.255.0
AC配置
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 20 30 //上行只放行業務流量即可
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 to 11 20 30 //下連接口要放行所有流量
Interface IP Address/Mask Physical Protocol
NULL0 unassigned up up(s)
Vlanif11 192.168.11.1/24 up up
僅僅配置一個和SW2相連的VLAN if
上聯接口使用trunk
DHCP部份,為ap下放地址
ip pool 11
gateway-list 192.168.10.1 網關並不是自己,所以肯定只能用global模式的
network 192.168.10.0 mask 255.255.255.0
option 43 sub-option 3 ascii 192.168.11.1 //告訴AP AC的地址是哪一個,不在同一網段
最主要的還需要一個靜態路由指過去,因為想要DHCP生效,必須兩端可以通信才OK
[AC]ip route-s 192.168.10.0 24 192.168.11.2
AP獲取地址成功后,開始配置WLAN部份
隧道 capwap source interface vlan 11 在AC上肯定指11,因為從兩個地方看,AP的管理VLAN是不同的,只看AC自己的
另外,還為STA創建了VLAN池,為用戶提供服務
[AC6005]dis vlan pool name wfy
-------------------------------------------------------------------------------
Name : wfy
Total : 2
Assignment : hash
VLAN ID : 20 30
-------------------------------------------------------------------------------
[AC6005]
其它的配置不變
wlan
security-profile name wfy
security wpa2 psk pass-phrase %^%#DVii4zoBFT!!K*CM#A:;Z6HEGYiNX8MOy{I&TnqE%^%# aes
ssid-profile name wfy
ssid wfy
ssid-profile name default
vap-profile name wfy
service-vlan vlan-pool wfy
ssid-profile wfy
security-profile wfy
ap-group name wfy
radio 0
vap-profile wfy wlan 1
radio 1
vap-profile wfy wlan 1
radio 2
vap-profile wfy wlan 1
ap-id 0 type-id 69 ap-mac 00e0-fc1e-7b80 ap-sn 2102354483104F1AAF2A
ap-name wfy
ap-group wfy
6/直連三層組網隧道轉發
基本情況和上面一樣
core
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 11 20 30
ip route-static 192.168.10.0 255.255.255.0 192.168.11.1
interface Vlanif11
ip address 192.168.11.2 255.255.255.0
dhcp select global
#
ip pool vlan10
gateway-list 192.168.10.1
network 192.168.10.0 mask 255.255.255.0
option 43 sub-option 3 ascii 192.168.11.2
------------------------------
CCIE成長之路 --- 梅利