- 画出拓扑,笔记本要关机,添加无线网卡
主要设置三层交换机。
Switch>en
Switch#config t
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 104
Switch(config-vlan)#vlan 105
Switch(config-vlan)#vlan 108
Switch(config-vlan)#int vlan 104
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan104, changed state to up
Switch(config-if)#ip add 192.168.104.254 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#no shutdown
Switch(config-if)#int vlan 105
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan105, changed state to up
Switch(config-if)#ip add 192.168.105.254 255.255.255.0
Switch(config-if)#
Switch(config-if)#no shut
Switch(config-if)#no shutdown
Switch(config-if)#int vlan 108
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan108, changed state to up
Switch(config-if)#ip add 192.168.108.254 255.255.255.0
Switch(config-if)#
Switch(config-if)#no shut
Switch(config-if)#no shutdown
Switch(config-if)#int f0/1
Switch(config-if)#swi t
Switch(config-if)#swi trunk en
Switch(config-if)#swi trunk encapsulation d
Switch(config-if)#swi trunk encapsulation dot1q
Switch(config-if)#swi m
Switch(config-if)#swi mode t
Switch(config-if)#swi mode trunk
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan104, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan105, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan108, changed state to up
Switch(config-if)#int f0/2
Switch(config-if)#swi t
Switch(config-if)#swi trunk en
Switch(config-if)#swi trunk encapsulation d
Switch(config-if)#swi trunk encapsulation dot1q
Switch(config-if)#swi m
Switch(config-if)#swi mode t
Switch(config-if)#swi mode trunk
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
Switch(config-if)#int f0/23
Switch(config-if)#swi mo
Switch(config-if)#swi mode a
Switch(config-if)#swi mode access
Switch(config-if)#swi acc vlan 108
Switch(config-if)#
Switch(config-if)#int f0/24
Switch(config-if)#no swi
Switch(config-if)#ip add 192.168.107.1 255.255.255.0
Switch(config-if)#
Switch(config-if)#no shut
Switch(config-if)#no shutdown
Switch(config-if)#
Switch(config-if)#exit
Switch(config)#
Switch(config)#ip routing
Switch(config)#
Switch(config)#
Switch(config)#ip dhcp pool 104
Switch(dhcp-config)#netw 192.168.104.0 255.255.255.0
Switch(dhcp-config)#defa
Switch(dhcp-config)#default-router 192.168.104.254
Switch(dhcp-config)#dns
Switch(dhcp-config)#dns-server 114.114.114.114
Switch(dhcp-config)#exit
Switch(config)#
然后配置这个
Switch>en
Switch#config t
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
Switch(config)#vlan 104
Switch(config-vlan)#vlan 105
Switch(config-vlan)#int range f0/2-10
Switch(config-if-range)#swi mode acc
Switch(config-if-range)#swi acc vlan 104
Switch(config-if-range)#int range f0/11-20
Switch(config-if-range)#swi mode acc
Switch(config-if-range)#swi acc vlan 105
Switch(config-if-range)#
Switch(config-if-range)#int f0/1
Switch(config-if)#swi mode t
Switch(config-if)#swi mode trunk
Switch(config-if)#
此时,我们在配置三层
Switch(config)#ip dhcp pool 105
Switch(dhcp-config)#netw 192.168.105.0 255.255.255.0
Switch(dhcp-config)#def
Switch(dhcp-config)#default-router 192.168.105.254
Switch(dhcp-config)#
Switch(dhcp-config)#dns
Switch(dhcp-config)#dns-server 114.114.114.114
Switch(dhcp-config)#exi
Switch(config)#ip dhcp pool 108
Switch(dhcp-config)#netw 192.168.108.0 255.255.255.0
Switch(dhcp-config)#de
Switch(dhcp-config)#default-router 192.168.108.254
Switch(dhcp-config)#dns
Switch(dhcp-config)#dns-server 114.114.114.114
Switch(dhcp-config)#
Switch(dhcp-config)#exit
Switch(config)#
为了无线安全起见,我们得在AP上配置,因为无线的设备会直接得到ip
这个是最简单的WEP密码设置
这样,无线就不会被直接连上。
那么,我们该如何连上这个网络。
Vlan108 配置正确
Showrunning:查看接口配置。
如果VLAN的某个接口配置错误怎么办?
Int vlan 105
No ip add
Ip add 192.168.105.254 255.255.255.0
No shutdown
然后配置一个这个东西
Switch>
Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
Switch(config)#vlan 104
Switch(config-vlan)#vlan 105
Switch(config-vlan)#int range f0/2-10
Switch(config-if-range)#swi mo acc
Switch(config-if-range)#swi acc vlan 104
Switch(config-if-range)#int range f0/11-20
Switch(config-if-range)#swi mode acc
Switch(config-if-range)#swi acc vlan 105
Switch(config-if-range)#int f0/1
Switch(config-if)#swi mode t
Switch(config-if)#swi mode trunk
Switch(config-if)#