Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface f0/0
Router(config-if)#ip add 192.1.1.254 255.255.255.0
Router(config-if)#no shutdown
3.对DHCP服务器进行配置
4.对交换机S1进行配置(创建vlan)
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#VLAN 2
Switch(config-vlan)#NAME V2
Switch(config-vlan)#interface f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#vlan 3
Switch(config-vlan)#name v3
Switch(config-vlan)#interface f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface f0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#
5.配置路由器,并分配逻辑接口
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface f0/1
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#interface f0/1.1
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/1.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.1, changed state to up
Router(config-subif)#encap dot1q 2
Router(config-subif)#ip add 192.1.2.254 255.255.255.0
Router(config-subif)#ip helper 192.1.1.1
Router(config-subif)#exit
Router(config)#interface f0/1.2
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/1.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.2, changed state to up
Router(config-subif)#encap dot1q 3
Router(config-subif)#ip add 192.1.3.254 255.255.255.0
Router(config-subif)#ip helper 192.1.1.1
Router(config-subif)#end