公司局域网网络设备配置
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
网络地址分配
Switch 0
Switch>enable
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#enable password 123
Switch(config)#line con 0
Switch(config-line)#password 123
Switch(config-line)#login
Switch(config-line)#line vty 0 4
Switch(config-line)#password 123
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#int f0/4-5
^
% Invalid input detected at '^' marker.
Switch(config)#int range f0/4-5
Switch(config-if-range)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode. Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.
Switch(config-if-range)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name XSB
Switch(config-vlan)#exit
Switch(config)#vlan 30
Switch(config-vlan)#name CWB
Switch(config-vlan)#exit
Switch(config)#no vlan 20
Switch(config)#no vlan 30
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#no vlan 20
Switch(config)#vlan 10
Switch(config-vlan)#name XSB
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name CWB
Switch(config-vlan)#exit
Switch(config)#vlan 30
Switch(config-vlan)#name manage
Switch(config-vlan)#exit
Switch(config)#vlan 40
Switch(config-vlan)#name RSB
Switch(config-vlan)#exit
Switch(config)#vlan 50
Switch(config-vlan)#name Admin
Switch(config-vlan)#exit
Switch(config)#int vlan 10
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#int vlan 20
%LINK-5-CHANGED: Interface Vlan20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up Switch(config-if)#ip add 192.168.20.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#int vlan 30
%LINK-5-CHANGED: Interface Vlan30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up
Switch(config-if)#ip add 192.168.30.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#int vlan 40
%LINK-5-CHANGED: Interface Vlan40, changed state to up
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up
Switch(config-if)#ip add 192.168.40.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#int vlan 50
%LINK-5-CHANGED: Interface Vlan50, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan50, changed state to up
Switch(config-if)#ip add 192.168.50.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#
Switch(config)#router ospf 10
Switch(config-router)#network 192.168.10.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.20.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.30.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.40.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.50.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.3.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.60.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.70.0 0.0.0.255 area 0
Switch(config-router)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport access vlan 50
Switch(config-if)#exit
Switch(config)#int f0/1
Switch(config-if)#no switchport
%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