《企業項目綜合實戰》綜合實訓(四)

Router>en
Router>en
Router#con
Router#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname DHCP-2
DHCP-2(config)#line vty 0 4
DHCP-2(config-line)#password cisco
DHCP-2(config-line)#login
DHCP-2(config-line)#exit
DHCP-2(config)#enable secret cisco
DHCP-2(config)#int g0/1
DHCP-2(config-if)#ip add 172.16.1.6 255.255.255.252
DHCP-2(config-if)#int g0/2.1
DHCP-2(config-subif)#encapsulation dot1Q 10
DHCP-2(config-subif)#ip add 172.16.10.1 255.255.255.0
DHCP-2(config-subif)#int g0/2.2
DHCP-2(config-subif)#encapsulation dot1Q 20
DHCP-2(config-subif)#ip add 172.16.20.1 255.255.255.0
DHCP-2(config-subif)#exit
DHCP-2(config)#router rip
DHCP-2(config-router)#version 2
DHCP-2(config-router)#no auto-summary 
DHCP-2(config-router)#network 172.16.10.0
DHCP-2(config-router)#network 172.16.20.0
DHCP-2(config-router)#network 172.16.1.0
DHCP-2(config-router)#exit
DHCP-2(config)#service dhcp
DHCP-2(config)#ip dhcp excluded-address 172.16.10.1 172.16.10.100
DHCP-2(config)#ip dhcp excluded-address 172.16.20.1 172.16.20.100
DHCP-2(config)#ip dhcp pool vlan10
DHCP-2(config)#ip dhcp pool vlan10
DHCP-2(dhcp-config)#dns-server 114.114.114.114
DHCP-2(dhcp-config)#network 172.16.10.0 255.255.255.0
DHCP-2(dhcp-config)#default-router 172.1exi
DHCP-2(dhcp-config)#exit 
DHCP-2(config)#ip dhcp pool vlan20
DHCP-2(dhcp-config)#dns-server 114.114.114.114
DHCP-2(dhcp-config)#network 172.16.20.0 255.255.255.0
DHCP-2(dhcp-config)#
DHCP-2(dhcp-config)#default-router 172.16.20.1
DHCP-2(dhcp-config)#

dhcp-server

Router>en
Router#config ter
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname DHCP-server
DHCP-server(config)#line vty 0 4
DHCP-server(config-line)#password cisco
DHCP-server(config-line)#login
DHCP-server(config-line)#exit
DHCP-server(config)#enable secret cisco
DHCP-server(config)#int g0/0
DHCP-server(config-if)#ip add 192.168.1.1 255.255.255.252
DHCP-server(config-if)#int g0/1
DHCP-server(config-if)#ip add 192.168.1.5 255.255.255.252
DHCP-server(config-if)#int g0/2
DHCP-server(config-if)#ip add 172.16.1.1 255.255.255.252
DHCP-server(config-if)#int loopback 0

DHCP-server(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

DHCP-server(config-if)#ip add 1.1.1.1 255.255.255.255
DHCP-server(config-if)#exi
DHCP-server(config-if)#exit 
DHCP-server(config)#service dhcp
DHCP-server(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.100
DHCP-server(config)#ip dhcp excluded-address 192.168.20.1 192.168.20.100
DHCP-server(config)#ip dhcp excluded-address 192.168.30.1 192.168.30.100
DHCP-server(config)#ip dhcp excluded-address 192.168.40.1 192.168.40.100
DHCP-server(config)#ip dhcp pool vlan10
DHCP-server(dhcp-config)#dns-server 114.114.114.114
DHCP-server(dhcp-config)#network 192.168.10.0 255.255.255.0
DHCP-server(dhcp-config)#default-router 192.168.10.1
DHCP-server(dhcp-config)#exi
DHCP-server(dhcp-config)#exit 
DHCP-server(config)#ip dhcp pool vlan20
DHCP-server(dhcp-config)#dns-server 114.114.114.114
DHCP-server(dhcp-config)#network 192.168.20.0 255.255.255.0
DHCP-server(dhcp-config)#default-router 192.168.20.1
DHCP-server(dhcp-config)#exi
DHCP-server(dhcp-config)#exit 
DHCP-server(config)#ip dhcp pool vlan30
DHCP-server(dhcp-config)#dns-server 114.114.114.114
DHCP-server(dhcp-config)#network 192.168.30.0 255.255.255.0
DHCP-server(dhcp-config)#default-router 192.168.30.1
DHCP-server(dhcp-config)#exi
DHCP-server(dhcp-config)#exit 
DHCP-server(config)#ip dhcp pool vlan40
DHCP-server(dhcp-config)#dns-server 114.114.114.114
DHCP-server(dhcp-config)#network 192.168.40.0 255.255.255.0
DHCP-server(dhcp-config)#default-router 192.168.40.1
DHCP-server(dhcp-config)#exi
DHCP-server(dhcp-config)#exit 
DHCP-server(config)#route ospf 1
DHCP-server(config-router)#network 192.168.1.0 0.0.0.3 area 0
DHCP-server(config-router)#network 192.168.1.4 0.0.0.3 area 0
DHCP-server(config-router)#network 1.1.1.1 0.0.0.0 area 0
DHCP-server(config-router)#redistribute rip metric 3
% Only classful networks will be redistributed
DHCP-server(config-router)#
DHCP-server#
%SYS-5-CONFIG_I: Configured from console by console

DHCP-server#con
DHCP-server#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
DHCP-server(config)#route rip
DHCP-server(config-router)#network 172.16.1.0
DHCP-server(config-router)#redistribute ospf 1 metric 3
DHCP-server(config-router)#version 2
DHCP-server(config-router)#no auto-summary 

router-rip

Router>en
Router#config ter
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname Router-RIP
Router-RIP(config)#line vty 0 4
Router-RIP(config-line)#password cisco
Router-RIP(config-line)#login
Router-RIP(config-line)#enable secret cisco
Router-RIP(config)#int g0/0
Router-RIP(config-if)#ip add 172.16.1.5 255.255.255.252
Router-RIP(config-if)#int g0/2
Router-RIP(config-if)#ip add 172.16.1.2 255.255.255.252
Router-RIP(config-if)#exi
Router-RIP(config-if)#exit 
Router-RIP(config)#router rip
Router-RIP(config-router)#version 2
Router-RIP(config-router)#no auto-summary 
Router-RIP(config-router)#network 172.16.1.0
Router-RIP(config-router)#exi
Router-RIP(config)#

交換機sw2-A

Switch>
Switch>en
Switch#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#
Switch(config)#hostname S2-A
S2-A(config)#line vty 0 4
S2-A(config-line)#password cisco
S2-A(config-line)#login
S2-A(config-line)#enable secret cisco
S2-A(config)#vlan 10
S2-A(config-vlan)#vlan 900
S2-A(config-vlan)#name Ez
S2-A(config-vlan)#int vlan 900
S2-A(config-if)#
%LINK-5-CHANGED: Interface Vlan900, changed state to up

S2-A(config-if)#ip add 192.168.100.1 255.255.255.192
S2-A(config-if)#int f0/1
S2-A(config-if)#sw acc vlan 10
S2-A(config-if)#int f0/2
S2-A(config-if)#sw acc vlan 10
S2-A(config-if)#int f0/24
S2-A(config-if)#sw mode trunk 

S2-A(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan900, changed state to up

S2-A(config-if)#exit
S2-A(config)#ip default-gateway 192.168.100.62
S2-A(config)#

S2-B

Switch>en
Switch#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname S2-B
S2-B(config)#line vty 0 4
S2-B(config-line)#password cisco
S2-B(config-line)#login
S2-B(config-line)#enable secret cisco
S2-B(config)#vlan20
                 ^
% Invalid input detected at '^' marker.
	
S2-B(config)#vlan 20
S2-B(config-vlan)#vlan 900
S2-B(config-vlan)#name JIA
S2-B(config-vlan)#int f0/1
S2-B(config-if)#sw acc vlan 20
S2-B(config-if)#int f0/2
S2-B(config-if)#sw acc vlan 20
S2-B(config-if)#int vlan 900
S2-B(config-if)#
%LINK-5-CHANGED: Interface Vlan900, changed state to up

S2-B(config-if)#ip add 192.168.100.2 255.255.255.192
S2-B(config-if)#int f0/24
S2-B(config-if)#sw mo tr

S2-B(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan900, changed state to up

S2-B(config-if)#
S2-B(config-if)#exit
S2-B(config)#ip default-gateway 192.168.100.62
S2-B(config)#

s2-c

Switch>
Switch>
Switch>
Switch>en 
Switch#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname S2-C
S2-C(config)#line vty 0 4
S2-C(config-line)#password cisco
S2-C(config-line)#login
S2-C(config-line)#enable secret cisco
S2-C(config)#vlan 30
S2-C(config-vlan)#vlan 900
S2-C(config-vlan)#name SHENG
S2-C(config-vlan)#int vlan 900
S2-C(config-if)#
%LINK-5-CHANGED: Interface Vlan900, changed state to up

S2-C(config-if)#ip add 192.168.100.65 255.255.255.192
S2-C(config-if)#int f0/1
S2-C(config-if)#sw acc vlan 30
S2-C(config-if)#int f0/2
S2-C(config-if)#sw acc vlan 30
S2-C(config-if)#int f0/24
S2-C(config-if)#sw mo tr

S2-C(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan900, changed state to up

S2-C(config-if)#exi
S2-C(config-if)#exit 
S2-C(config)#ip default-gateway 192.168.100.126
S2-C(config)#
S2-C(config)#

s2-D

Switch>
Switch>en
Switch#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#
Switch(config)#hostname S2-D
S2-D(config)#line vty 0 4
S2-D(config-line)#password cisco
S2-D(config-line)#login
S2-D(config-line)#enable secret cisco
S2-D(config)#vlan 40
S2-D(config-vlan)#vlan 900
S2-D(config-vlan)#name Ez
S2-D(config-vlan)#int f0/1
S2-D(config-if)#sw acc vlan 40
S2-D(config-if)#int f0/2
S2-D(config-if)#sw acc vlan 40
S2-D(config-if)#int vlan 900
S2-D(config-if)#
%LINK-5-CHANGED: Interface Vlan900, changed state to up

S2-D(config-if)#ip add 192.168.100.66 255.255.255.192
S2-D(config-if)#int f0/24
S2-D(config-if)#sw mo tr

S2-D(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan900, changed state to up

S2-D(config-if)#exit
S2-D(config)#ip default-gateway 192.168.100.126
S2-D(config)#

s2-e

Switch>
Switch>
Switch>en 
Switch#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname S2-E
S2-E(config)#line vty 0 4
S2-E(config-line)#password cisco
S2-E(config-line)#login
S2-E(config-line)#exit
S2-E(config)#enable secret cisco
S2-E(config)#vlan 10
S2-E(config-vlan)#vlan 20
S2-E(config-vlan)#name SHENG
S2-E(config-vlan)#int f0/1
S2-E(config-if)#sw acc vlan 10
S2-E(config-if)#int f0/2
S2-E(config-if)#sw acc vlan 20
S2-E(config-if)#int vlan 10
S2-E(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

S2-E(config-if)#ip add 172.16.10.100 255.255.255.0
S2-E(config-if)#int vlan 20
S2-E(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

S2-E(config-if)#ip add 172.16.20.100 255.255.255.0
S2-E(config-if)#int g0/2
S2-E(config-if)#switchport mode trunk 
S2-E(config-if)#exit
S2-E(config)#ip default-gateway 172.16.10.1
S2-E(config)#

switch-A

Switch>en
Switch#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname SwitchA
SwitchA(config)#line vty 0 4
SwitchA(config-line)#password cisco
SwitchA(config-line)#login
SwitchA(config-line)#exit
SwitchA(config)#enable secret cisco
SwitchA(config)#vlan 500
SwitchA(config-vlan)#vlan 700
SwitchA(config-vlan)#name JIA
SwitchA(config-vlan)#int vlan 500
SwitchA(config-if)#
%LINK-5-CHANGED: Interface Vlan500, changed state to up

SwitchA(config-if)#ip add 192.168.1.13 255.255.255.252
SwitchA(config-if)#int vlan 700
SwitchA(config-if)#
%LINK-5-CHANGED: Interface Vlan700, changed state to up

SwitchA(config-if)#ip add 192.168.1.25 255.255.255.252
SwitchA(config-if)#int port-channel 1
SwitchA(config-if)#no switchport 
SwitchA(config-if)#ip add 192.168.1.9 255.255.255.252
SwitchA(config-if)#int g0/2
SwitchA(config-if)#no switchport 
SwitchA(config-if)#ip add 192.168.1.2 255.255.255.252
SwitchA(config-if)#int range f0/23-24
SwitchA(config-if-range)#no switchport 
SwitchA(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

SwitchA(config-if-range)#channel-group 1 mode on
SwitchA(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

SwitchA(config-if-range)#int g0/1
SwitchA(config-if)#switchport mode dynamic desirable 

SwitchA(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan500, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan700, changed state to up

SwitchA(config-if)#switchport mode acc
SwitchA(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan500, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan700, changed state to down

SwitchA(config-if)#switchport mode tr

SwitchA(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan500, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan700, changed state to up

SwitchA(config-if)#
SwitchA(config-if)#
SwitchA(config-if)#int f0/1
SwitchA(config-if)#switchport mode dynamic desirable

SwitchA(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%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

SwitchA(config-if)#sw mo access 
SwitchA(config-if)#sw mo tr

SwitchA(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

SwitchA(config-if)#exit
SwitchA(config)#route ospf 1
SwitchA(config-router)#network 192.168.1.12 0.0.0.3 area 10
SwitchA(config-router)#network 192.168.1.24 0.0.0.3 area 20
SwitchA(config-router)#network 192.168.1.8 0.0.0.3 area 0
SwitchA(config-router)#network 192.168.1.0 0.0.0.3 area 0
SwitchA(config-router)#router-id 5.5.5.5
SwitchA(config-router)#Reload or use "clear ip ospf process" command, for this to take effect


SwitchA(config-router)#
00:26:53: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 192.168.1.13, Vlan500

SwitchA(config-router)#area 10 range 1.1.4.0 255.255.252.0
SwitchA(config-router)#area 20 range 4.4.0.0 255.255.252.0
SwitchA(config-router)#
00:27:03: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 192.168.1.13, Vlan500

switch-B

Switch>EN
Switch#CONFI TER
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#
Switch(config)#hostname SwitchB
SwitchB(config)#line vty 0 4 
SwitchB(config-line)#password cisco
SwitchB(config-line)#login
SwitchB(config-line)#exit
SwitchB(config)#enable secret cisco
SwitchB(config)#vlan 600
SwitchB(config-vlan)#vlan 800
SwitchB(config-vlan)#name SHENG
SwitchB(config-vlan)#int g0/2
SwitchB(config-if)#no switchport 
SwitchB(config-if)#ip add 192.168.1.6 255.255.255.252
SwitchB(config-if)#exit
SwitchB(config)#int port-channel 1
SwitchB(config-if)#no switchport 
SwitchB(config-if)#ip add 192.168.1.10 255.255.255.252
SwitchB(config-if)#int vlan 600
SwitchB(config-if)#
%LINK-5-CHANGED: Interface Vlan600, changed state to up

SwitchB(config-if)#ip add 192.168.1.17 255.255.255.252
SwitchB(config-if)#int vlan 800
SwitchB(config-if)#
%LINK-5-CHANGED: Interface Vlan800, changed state to up

SwitchB(config-if)#ip add 192.168.1.21 255.255.255.252
SwitchB(config-if)#int g0/1
SwitchB(config-if)#switchport mode access 
SwitchB(config-if)#switchport mode trunk

SwitchB(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan600, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan800, changed state to up

SwitchB(config-if)#int f0/1
SwitchB(config-if)#switchport mode access
SwitchB(config-if)#switchport mode trunk 

SwitchB(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

SwitchB(config-if)#exit
SwitchB(config)#route ospf 1
SwitchB(config-router)#network 192.168.1.20 0.0.0.3 area 20
SwitchB(config-router)#network 192.168.1.16 0.0.0.3 area 10
SwitchB(config-router)#network 192.168.1.4 0.0.0.3 area 0
SwitchB(config-router)#
00:29:53: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 192.168.1.17, Vlan600

SwitchB(config-router)#network 192.168.1.8 0.0.0.3 area 0
SwitchB(config-router)#router-id 6.6.6.6
SwitchB(config-router)#Reload or use "clear ip ospf process" command, for this to take effect


SwitchB(config-router)#
00:30:03: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 192.168.1.17, Vlan600
area 20 range 4.4.0.0 255.255.252.0
SwitchB(config-router)#area 10 range 1.1.4.0 255.255.252.0
SwitchB(config-router)#
00:30:13: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 192.168.1.17, Vlan600

SwitchB(config-router)#
SwitchB(config-router)#
SwitchB(config-router)#exi
SwitchB(config-router)#exit 
SwitchB(config)#
00:30:23: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 192.168.1.17, Vlan600

SwitchB(config)#int range f0/23-24
SwitchB(config-if-range)#no switchport
SwitchB(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

SwitchB(config-if-range)#channel-group 1 mode on
SwitchB(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

SwitchB(config-if-range)#

switchC

Switch>en 
Switch#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname SwitchC
SwitchC(config)#line vty 0 4
SwitchC(config-line)#password cisco
SwitchC(config-line)#login
SwitchC(config-line)#exit
SwitchC(config)#enable secret cisco
SwitchC(config)#int loopback 0

SwitchC(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

SwitchC(config-if)#ip add 1.1.4.1 255.255.255.0
SwitchC(config-if)#int loopback 1

SwitchC(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

SwitchC(config-if)#ip add 1.1.5.1 255.255.255.0
SwitchC(config-if)#int loopback 2

SwitchC(config-if)#
%LINK-5-CHANGED: Interface Loopback2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback2, changed state to up

SwitchC(config-if)#
SwitchC(config-if)#ip add 1.1.6.1 255.255.255.0
SwitchC(config-if)#int loopback 3

SwitchC(config-if)#
%LINK-5-CHANGED: Interface Loopback3, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback3, changed state to up

SwitchC(config-if)#ip add 1.1.7.1 255.255.255.0
SwitchC(config-if)#exit
SwitchC(config)#vlan 10
SwitchC(config-vlan)#vlan 20
SwitchC(config-vlan)#vlan 500
SwitchC(config-vlan)#vlan 600
SwitchC(config-vlan)#vlan 900
SwitchC(config-vlan)#name Manager
SwitchC(config-vlan)#exit
SwitchC(config)#int vlan 10
SwitchC(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

SwitchC(config-if)#ip add 192.168.10.1 255.255.255.0
SwitchC(config-if)#int vlan 20
SwitchC(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

SwitchC(config-if)#ip add 192.168.20.1 255.255.255.0
SwitchC(config-if)#int vlan 500
SwitchC(config-if)#
%LINK-5-CHANGED: Interface Vlan500, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan500, changed state to up

SwitchC(config-if)#ip add 192.168.1.14 255.255.255.252
SwitchC(config-if)#int vlan 600
SwitchC(config-if)#
%LINK-5-CHANGED: Interface Vlan600, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan600, changed state to up

SwitchC(config-if)#ip add 192.168.1.18 255.255.255.252
SwitchC(config-if)#int vlan 900
SwitchC(config-if)#
%LINK-5-CHANGED: Interface Vlan900, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan900, changed state to up

SwitchC(config-if)#ip add 192.168.100.62 255.255.255.192
SwitchC(config-if)#exit
SwitchC(config)#route ospf 1
SwitchC(config-router)#network 1.1.4.0 0.0.0.255 area 10
SwitchC(config-router)#network 1.1.5.0 0.0.0.255 area 10
SwitchC(config-router)#network 1.1.6.0 0.0.0.255 area 10
SwitchC(config-router)#network 1.1.7.0 0.0.0.255 area 10
SwitchC(config-router)#network 192.168.10.0 0.0.0.255 area 10
SwitchC(config-router)#network 192.168.20.0 0.0.0.255 area 10
SwitchC(config-router)#network 192.168.1.12 0.0.0.3 area 10
SwitchC(config-router)#network 192.168.1.16 0.0.0.3 area 10
SwitchC(config-router)#
00:34:32: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.25 on Vlan500 from LOADING to FULL, Loading Done

SwitchC(config-router)#network 192.168.100.0 0.0.0.63 area 10
SwitchC(config-router)#
00:34:40: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.21 on Vlan600 from LOADING to FULL, Loading Done

SwitchC(config-router)#router-id 7.7.7.7
SwitchC(config-router)#Reload or use "clear ip ospf process" command, for this to take effect


SwitchC(config-router)#exit
SwitchC(config)#route ospf 1
SwitchC(config-router)#router-id 7.7.7.7
SwitchC(config-router)#Reload or use "clear ip ospf process" command, for this to take effect


SwitchC(config-router)#exit
SwitchC(config)#int g0/1
SwitchC(config-if)#sw mo acc
SwitchC(config-if)#sw mo tr

SwitchC(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

SwitchC(config-if)#int f0/1
SwitchC(config-if)#sw mo acc
SwitchC(config-if)#sw mo tr

SwitchC(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

SwitchC(config-if)#int f0/2
SwitchC(config-if)#sw mo acc
SwitchC(config-if)#sw mo tr

SwitchC(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

SwitchC(config-if)#
SwitchC(config-if)#int
00:36:27: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.25 on Vlan500 from FULL to DOWN, Neighbor Down: Dead timer expired

00:36:27: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.25 on Vlan500 from FULL to DOWN, Neighbor Down: Interface down or detached
 f0/24
SwitchC(config-if)#sw mo acc
SwitchC(config-if)#sw mo access 
SwitchC(config-if)#sw mo tr

SwitchC(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

SwitchC(config-if)#
00:36:38: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.25 on Vlan500 from LOADING to FULL, Loading Done

SwitchC(config-if)#
SwitchC(config-if)#exit
SwitchC(config)#

SwitchD

Switch>
Switch>
Switch>en
Switch#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname SwitchD
SwitchD(config)#line vty 0 4
SwitchD(config-line)#password cisco
SwitchD(config-line)#login
SwitchD(config-line)#enable secret cisco
SwitchD(config)#vlan 30
SwitchD(config-vlan)#vlan 40
SwitchD(config-vlan)#vlan 70
SwitchD(config-vlan)#vlan 80
SwitchD(config-vlan)#undo vlan 80
                     ^
% Invalid input detected at '^' marker.
	
SwitchD(config-vlan)#vlan 700
SwitchD(config-vlan)#vlan 800
SwitchD(config-vlan)#vlan 900
SwitchD(config-vlan)#name Ez
SwitchD(config-vlan)#int vlan 30
SwitchD(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

SwitchD(config-if)#ip add 192.168.30.1 255.255.255.0
SwitchD(config-if)#int vlan 40
SwitchD(config-if)#int vlan 40
SwitchD(config-if)#
%LINK-5-CHANGED: Interface Vlan40, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up

SwitchD(config-if)#ip add 192.168.40.1 255.255.255.0
SwitchD(config-if)#int vlan 700
SwitchD(config-if)#
%LINK-5-CHANGED: Interface Vlan700, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan700, changed state to up

SwitchD(config-if)#ip add 192.168.1.26 255.255.255.252
SwitchD(config-if)#int vlan 800
SwitchD(config-if)#
%LINK-5-CHANGED: Interface Vlan800, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan800, changed state to up

SwitchD(config-if)#ip add 192.168.1.22 255.255.255.252
SwitchD(config-if)#int vlan 900
SwitchD(config-if)#
%LINK-5-CHANGED: Interface Vlan900, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan900, changed state to up

SwitchD(config-if)#ip add 192.168.100.126 255.255.255.192
SwitchD(config-if)#int loopback 0

SwitchD(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

SwitchD(config-if)#ip add 4.4.0.4 255.255.255.0
SwitchD(config-if)#int loopback 1

SwitchD(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

SwitchD(config-if)#ip add 4.4.1.4 255.255.255.0
SwitchD(config-if)#int loopback 2

SwitchD(config-if)#
%LINK-5-CHANGED: Interface Loopback2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback2, changed state to up

SwitchD(config-if)#ip add 4.4.2.4 255.255.255.0
SwitchD(config-if)#int loopback 3

SwitchD(config-if)#
%LINK-5-CHANGED: Interface Loopback3, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback3, changed state to up

SwitchD(config-if)#ip add 4.4.3.4 255.255.255.0
SwitchD(config-if)#
SwitchD(config-if)#exit
SwitchD(config)#route ospf 1
SwitchD(config-router)#router-id 8.8.8.8
SwitchD(config-router)#network 4.4.0.0 0.0.0.255 area 20
SwitchD(config-router)#network 4.4.1.0 0.0.0.255 area 20
SwitchD(config-router)#network 4.4.2.0 0.0.0.255 area 20
SwitchD(config-router)#network 4.4.3.0 0.0.0.255 area 20
SwitchD(config-router)#network 192.168.30.0 0.0.0.255 area 20
SwitchD(config-router)#network 192.168.40.0 0.0.0.255 area 20
SwitchD(config-router)#network 192.168.1.24 0.0.0.3 area 20
SwitchD(config-router)#network 192.168.1.20 0.0.0.3 area 20
SwitchD(config-router)#
00:40:46: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.25 on Vlan700 from LOADING to FULL, Loading Done
network 192.168.100.64 0.0.0.63 area 20
SwitchD(config-router)#network 192.168.100.64 0.0.0.63 area 20
SwitchD(config-router)#
00:40:54: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.21 on Vlan800 from LOADING to FULL, Loading Done

交換機SwitchC

SwitchC(config)#
SwitchC(config)#int vlan 10
SwitchC(config-if)#ip helper-address 1.1.1.1
SwitchC(config-if)#int vlan 20
SwitchC(config-if)#ip helper-address 1.1.1.1
SwitchC(config-if)#

交換機SwitchD

SwitchD(config)#int vlan 30
SwitchD(config-if)#ip helper-address 1.1.1.1
SwitchD(config-if)#int vlan 40
SwitchD(config-if)#ip helper-address 1.1.1.1
SwitchD(config-if)#
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章