三层交换+路由+NAT+OSPF.docx
《三层交换+路由+NAT+OSPF.docx》由会员分享,可在线阅读,更多相关《三层交换+路由+NAT+OSPF.docx(23页珍藏版)》请在冰豆网上搜索。
三层交换+路由+NAT+OSPF
三层交换+路由+NAT+OSPF
三层交换机1配置:
WHGCDX1#showrun
Buildingconfiguration...
Currentconfiguration:
2514bytes
!
version12.2
noservicetimestampslogdatetimemsec
noservicetimestampsdebugdatetimemsec
noservicepassword-encryption
!
hostnameWHGCDX1
!
!
!
enablesecret5$1$mERr$hx5rVt7rPNoS4wqbXKX7m0
!
!
ipdhcpexcluded-address10.4.1.110.4.1.100
!
ipdhcppoolV5
network10.2.1.0255.255.255.0
default-router10.2.1.254
dns-server10.1.1.1
ipdhcppoolV45
network10.4.1.0255.255.255.0
default-router10.7.1.1
!
!
!
!
!
!
!
noipdomain-lookup
!
!
spanning-treevlan1priority24576
!
!
!
!
interfaceFastEthernet0/1
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/2
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/3
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
!
interfaceFastEthernet0/24
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceGigabitEthernet0/1
noswitchport
ipaddress192.168.1.2255.255.255.0
duplexauto
speedauto
!
interfaceGigabitEthernet0/2
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceVlan1
noipaddress
shutdown
!
interfaceVlan2
ipaddress10.1.1.254255.255.255.0
!
interfaceVlan5
ipaddress10.2.1.254255.255.255.0
!
interfaceVlan25
ipaddress10.3.1.254255.255.255.0
!
interfaceVlan45
ipaddress10.4.1.254255.255.255.0
!
interfaceVlan65
ipaddress10.5.1.254255.255.255.0
!
interfaceVlan85
ipaddress10.6.1.254255.255.255.0
!
interfaceVlan105
ipaddress10.7.1.254255.255.255.0
!
routerospf100
log-adjacency-changes
network192.168.1.00.0.0.255area100
network10.1.1.00.0.0.255area100
network10.2.1.00.0.0.255area100
network10.3.1.00.0.0.255area100
network10.4.1.00.0.0.255area100
network10.5.1.00.0.0.255area100
network10.6.1.00.0.0.255area100
network10.7.1.00.0.0.255area100
!
ipclassless
!
!
!
!
!
!
!
linecon0
linevty04
exec-timeout1010
passwordcisco
login
!
!
!
End
三层交换机2配置:
WHGCDX2#showrun
Buildingconfiguration...
Currentconfiguration:
1430bytes
!
version12.2
noservicetimestampslogdatetimemsec
noservicetimestampsdebugdatetimemsec
noservicepassword-encryption
!
hostnameWHGCDX2
!
!
!
!
!
!
!
!
!
!
!
!
noipdomain-lookup
!
!
!
!
!
!
interfaceFastEthernet0/1
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/2
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/3
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/4
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
!
interfaceFastEthernet0/24
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceGigabitEthernet0/1
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceGigabitEthernet0/2
!
interfaceVlan1
noipaddress
shutdown
!
ipclassless
!
!
!
!
!
!
!
linecon0
linevty04
login
!
!
!
End
SW0配置:
SW001#showrun
Buildingconfiguration...
Currentconfiguration:
1054bytes
!
version12.2
noservicetimestampslogdatetimemsec
noservicetimestampsdebugdatetimemsec
noservicepassword-encryption
!
hostnameSW001
!
noipdomain-lookup
!
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
!
interfaceFastEthernet0/24
!
interfaceGigabitEthernet1/1
!
interfaceGigabitEthernet1/2
switchportaccessvlan2
!
interfaceVlan1
noipaddress
shutdown
!
!
linecon0
!
linevty04
login
linevty515
login
!
!
End
SW1配置:
SW002#showrun
Buildingconfiguration...
Currentconfiguration:
1265bytes
!
version12.2
noservicetimestampslogdatetimemsec
noservicetimestampsdebugdatetimemsec
noservicepassword-encryption
!
hostnameSW002
!
!
vtpdomaincisco
vtpmodetransparent
vtppasswordcisco
vtpversion2
!
!
vlan2
nameV2
!
vlan5
nameV5
!
vlan25
nameV25
!
vlan45
nameV45
!
vlan65
nameV65
!
vlan85
nameV85
!
vlan105
nameV105
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
!
interfaceFastEthernet0/24
!
interfaceGigabitEthernet1/1
switchportmodetrunk
!
interfaceGigabitEthernet1/2
switchportmodetrunk
!
interfaceVlan1
noipaddress
shutdown
!
!
linecon0
!
linevty04
login
linevty515
login
!
!
end
SW3配置:
SW00201#showru
Buildingconfiguration...
Currentconfiguration:
1059bytes
!
version12.1
noservicetimestampslogdatetimemsec
noservicetimestampsdebugdatetimemsec
noservicepassword-encryption
!
hostnameSW00201
!
!
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
!
interfaceFastEthernet0/24
!
interfaceGigabitEthernet1/1
switchportmodetrunk
!
interfaceGigabitEthernet1/2
switchportaccessvlan5
!
interfaceVlan1
noipaddress
shutdown
!
!
linecon0
!
linevty04
login
linevty515
login
!
!
End
Route1配置:
ISP1#showrun
Buildingconfiguration...
Currentconfiguration:
750bytes
!
version12.4
noservicetimestampslogdatetimemsec
noservicetimestampsdebugdatetimemsec
noservicepassword-encryption
!
hostnameISP1
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interfaceFastEthernet0/0
ipaddress192.168.4.2255.255.255.0
duplexauto
speedauto
!
interfaceFastEthernet0/1
noipaddress
duplexauto
speedauto
shutdown
!
interfaceSerial1/0
ipaddress192.168.3.1255.255.255.0
!
interfaceSerial1/1
noipaddress
shutdown
!
interfaceSerial1/2
noipaddress
shutdown
!
interfaceSerial1/3
noipaddress
shutdown
!
interfaceVlan1
noipaddress
shutdown
!
routereigrp100
network192.168.3.0
network192.168.4.0
auto-summary
!
ipclassless
!
!
!
nocdprun
!
!
!
!
!
linecon0
linevty04
login
!
!
!
End
Route2配置:
ISP2#showrun
Buildingconfiguration...
Currentconfiguration:
564bytes
!
version12.4
noservicetimestampslogdatetimemsec
noservicetimestampsdebugdatetimemsec
noservicepassword-encryption
!
hostnameISP2
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interfaceFastEthernet0/0
ipaddress192.168.4.1255.255.255.0
duplexauto
speedauto
!
interfaceFastEthernet0/1
ipaddress192.168.5.254255.255.255.0
duplexauto
speedauto
!
interfaceVlan1
noipaddress
shutdown
!
routereigrp100
network192.168.4.0
network192.168.5.0
auto-summary
!
ipclassless
!
!
!
nocdprun
!
!
!
!
!
linecon0
linevty04
login
!
!
!
end