|
DHCP_SERVER的命令---------------------------------------------------------------------------------------------
serv dhcP
ip dhcp excluded-address 192.168.3.1 192.168.3.10
ip dhcp pool vlan3
network 192.168.3.0 255.255.255.0
dns 65.65.65.3
dom cisco
default-rout 192.168.3.1
le 3
exit
ip dhcp excluded-address 192.168.4.1 192.168.4.10
ip dhcp pool vlan4
network 192.168.4.0 255.255.255.0
dns 65.65.65.4
dom cisco
default-rout 192.168.4.1
le 3
exit
ip dhcp excluded-address 192.168.5.1 192.168.5.10
ip dhcp pool vlan5
network 192.168.5.0 255.255.255.0
dns 65.65.65.5
dom cisco
default-rout 192.168.5.1
le 3
exit
ip dhcp excluded-address 192.168.6.1 192.168.6.10
ip dhcp pool vlan6
network 192.168.6.0 255.255.255.0
dns 65.65.65.6
dom cisco
default-rout 192.168.6.1
le 3
exit
in f1/0
no ip add
int f1/0.3
enca dot1q 3
ip add 192.168.3.1 255.255.255.0
end
conf t
int f1/0.4
enca dot1q 4
ip add 192.168.4.1 255.255.255.0
int f1/0.5
enca dot1q 5
ip add 192.168.5.1 255.255.255.0
int f1/0.6
enca dot1q 6
ip add 192.168.6.1 255.255.255.0
end
conf t
in f1/0
no shutdown
end
sw1 的配置命令------------------------------------------------------------------------------------------------
vlan database
vlan 3 name v3
vlan 4 name v4
vlan 5 name v5
vlan 6 name v6
exit
conf t
int f1/3
switchport mode access
switchport access vlan 3
int f1/4
switchport mode access
switchport access vlan 4
int f1/5
switchport mode access
switchport access vlan 5
int f1/6
switchport mode access
switchport access vlan 6
int f1/0
sw encap dot1q
sw mode trunk
end
client端的命令------------------------------------------------------------------------------------------------
int f0
ip address dhcp
no sh
client A,B,C,D命令行一样
|
|