1.配置所有設(shè)備主機(jī)名,名稱見“網(wǎng)絡(luò)拓?fù)洹?。啟用所有設(shè)備的ssh服務(wù),用戶名和明文密碼均為admin;配置所有設(shè)備ssh連接超時(shí)為9分鐘,console 連接超時(shí)為30分鐘。
SW1
ssh-server enable
ssh-server timeout 540
exec-timeout 30
SW2
ssh-server enable
ssh-server timeout 540
exec-timeout 30
SW3
ssh-server enable
ssh-server timeout 540
exec-timeout 30
RT1
ip sshd enable
line vty 0 4
exec-timeout 9
!
line console 0
exec-timeout 30
!
RT2
ip sshd enable?
line vty 0 4
exec-timeout 9
!
line console 0
exec-timeout 30
!
AC1
ssh-server enable?
2.配置所有設(shè)備的時(shí)區(qū)為GMT+08:00。調(diào)整 SW1時(shí)間為實(shí)際時(shí)間,SW1配置為ntp server,其他設(shè)備為ntp client,請求報(bào)文時(shí)間間隔 1分鐘,用SW1Loopback1 IPv6 地址作為ntp server 地址。
SW1
clock timezone GMT add 8 0
clock set 時(shí):分:秒 年:月:日
ntp enable
ntp-service refclock-master 1
SW2
clock timezone GMT add 8 0
ntp enable
ntp syn-interval 60
ntp server 2001:10:10:1::1
SW3
clock timezone GMT add 8 0
ntp enable
ntp syn-interval 60
ntp server 2001:10:10:1::1
RT1
time-zone GMT 8 0
ntp query-interval 60
ntp server 2001:10:10:1::1
RT2
time-zone GMT 8 0
ntp query-interval 60
ntp server 2001:10:10:1::1
FW1
clock zone GMT 8 0
ntp enable
ntp query-interval 1
ntp max-adjustment 0
ntp server 2001:10:10:1::1
FW2
clock zone GMT 8 0
ntp enable
ntp query-interval 1
ntp max-adjustment 0
ntp server 2001:10:10:1::1
AC1
clock timezone GMT add 8 0
ntp enable
ntp syn-interval 60
ntp server 2001:10:10:1::1
3.SW2配置DHCPv4和DHCPv6,分別為總公司產(chǎn)品1段、總公司產(chǎn)品2段、分公司Vlan130、分公司Vlan140和分公司Vlan150分配地址。IPv4地址池名稱分別為Poolv4-Vlan11、Poolv4-Vlan21、Poolv4-Vlan130、Poolv4-Vlan140、Poolv4-Vlan150,排除網(wǎng)關(guān),DNS為10.1.210.101和10.1.220.101。IPv6地址池名稱分別為Poolv6-Vlan11、Poolv6-Vlan21、Poolv6-Vlan130、Poolv6-Vlan140、Poolv6-Vlan150,IPv6地址池用網(wǎng)絡(luò)前綴表示,排除網(wǎng)關(guān),DNS為2400:3200::1。PC1保留地址10.1.11.9和2001:10:1:11::9,PC2保留地址10.1.21.9和2001:10:1:21::9,AP1保留地址10.1.130.9和2001:10:1:130::9。SW1、AC1中繼地址為SW2 Loopback1地址,SW1啟用DHCPv4和DHCPv6 snooping,如果E1/0/1連接dhcpv4服務(wù)器,則關(guān)閉該端口,恢復(fù)時(shí)間為10分鐘。
SW2
ip dhcp pool Poolv4-Vlan11
network-address 10.1.11.0 255.255.255.0
default-router 10.1.11.1
dns-server 10.1.210.101 10.1.220.101
!
ip dhcp pool Poolv4-Vlan21
network-address 10.1.21.0 255.255.255.0
default-router 10.1.21.1
dns-server 10.1.210.101 10.1.220.101
!
ip dhcp pool Poolv4-Vlan130
network-address 10.1.130.0 255.255.255.0
default-router 10.1.130.1
dns-server 10.1.210.101 10.1.220.101
!
ip dhcp pool Poolv4-Vlan140
network-address 10.1.140.0 255.255.255.0
default-router 10.1.140.1
dns-server 10.1.210.101 10.1.220.101
!
ip dhcp pool Poolv4-Vlan150
network-address 10.1.150.0 255.255.255.0
default-router 10.1.150.1
dns-server 10.1.210.101 10.1.220.101
!
排除網(wǎng)關(guān)
ip dhcp excluded-address 10.1.11.1
ip dhcp excluded-address 10.1.21.1
ip dhcp excluded-address 10.1.130.1
ip dhcp excluded-address 10.1.140.1
ip dhcp excluded-address 10.1.150.1
!
ip dhcp pool AP1
host 10.1.130.9 255.255.255.0
hardware-address 00-03-0f-ea-eb-90 AP的物理地址
dns-server 10.1.210.101 10.1.220.101
!
ip dhcp pool PC1
host 10.1.11.9 255.255.255.0
hardware-address 00-03-0f-ea-eb-90 PC1的物理地址
dns-server 10.1.210.101 10.1.220.101
!
ip dhcp pool PC2
host 10.1.21.9 255.255.255.0
hardware-address 00-03-0f-ea-eb-90 PC2物理地址
dns-server 10.1.210.101 10.1.220.101
!
ipv6 dhcp pool Poolv6-Vlan11
?network-address 2001:10:1:11:: 64 地址池網(wǎng)絡(luò)前綴
?static-binding 2001:10:1:11::9 00-03-0f-ea-eb-90 PC1的物理地址
?excluded-address 2001:10:1:11::1 排除網(wǎng)關(guān)
?dns-server 2400:3200::1
!
ipv6 dhcp pool Poolv6-Vlan21
?network-address 2001:10:1:21:: 64 地址池網(wǎng)絡(luò)前綴
?static-binding 2001:10:1:21::9 00-03-0f-ea-eb-90 PC2物理地址
?excluded-address 2001:10:1:21::1 排除網(wǎng)關(guān)
?dns-server 2400:3200::1
!
ipv6 dhcp pool Poolv6-Vlan130
?network-address 2001:10:1:130:: 64 地址池網(wǎng)絡(luò)前綴
?static-binding 2001:10:1:130::9 00-03-0f-ea-eb-90 AP1物理地址
?excluded-address 2001:10:1:130::1 排除網(wǎng)關(guān)
?dns-server 2400:3200::1
!
ipv6 dhcp pool Poolv6-Vlan140
?network-address 2001:10:1:140:: 64 地址池網(wǎng)絡(luò)前綴
?excluded-address 2001:10:1:140::1 排除網(wǎng)關(guān)
?dns-server 2400:3200::1
!
ipv6 dhcp pool Poolv6-Vlan150
?network-address 2001:10:1:150:: 64 地址池網(wǎng)絡(luò)前綴
?excluded-address 2001:10:1:150::1 排除網(wǎng)關(guān)
?dns-server 2400:3200::1
SW1
Ser dhcp
Ser dhcpv6
ip forward-protocol udp bootps
ip dhcp snooping enable
Int e1/0/1
ip dhcp snooping action shutdown recovery 600
Int vlan 10
ipv6 nd managed-config-flag
ipv6 nd other-config-flag
ip helper-address 10.1.2.1
ipv6 dhcp relay destination 2001:10:1:2::1
AC1
Ser dhcp
Ser dhcpv6
ip forward-protocol udp bootps
Int vlan 130
ipv6 nd managed-config-flag
ipv6 nd other-config-flag
ip helper-address 10.1.2.1
ipv6 dhcp relay destination 2001:10:1:2::1
Int vlan 140
ipv6 nd managed-config-flag
ipv6 nd other-config-flag
ip helper-address 10.1.2.1
ipv6 dhcp relay destination 2001:10:1:2::1
Int vlan 150
ipv6 nd managed-config-flag
ipv6 nd other-config-flag
ip helper-address 10.1.2.1
ipv6 dhcp relay destination 2001:10:1:2::1
?
4.(1)SW1、SW2、SW3、RT1、RT2、FW1 之間 OSPFv2 和 OSPFv3 協(xié)議,process 1,area 0,分別發(fā)布 Loopback1 地址路由和產(chǎn)品路由,F(xiàn)W1 通告 type1默認(rèn)路由。
SW1,SW2
router ospf 1
router-id 10.4.1.1(10.4.2.1)
network 10.4.255.14(10.4.255.22) 255.255.255.252?area 0
network 10.4.255.5(10.4.255.9) 255.255.255.252?area 0
Network10.4.255.1(10.4.255.2) 255.255.255.252?area 0
network 10.4.1.1(10.4.2.1)?255.255.255.252 area 0
exit
interface lo1
ipv6 router ospf tag 1 area 0
exit
int vlan 1019
ipv6 router ospf tag 1 area 0
exit
int vlan 1020
ipv6 router ospf tag 1 area 0
exit
int vlan 1023
ipv6 router ospf tag 1 area 0
Exit
SW3
router ospf 1
router-id 10.4.3.1
network 10.4.255.6 255.255.255.252?area 0
network 10.4.255.10 255.255.255.252 area 0
exit
interface lo1
ipv6 router ospf tag 1 area 0
exit
int vlan 1019
ipv6 router ospf tag 1 area 0
exit
int vlan 1020
ipv6 router ospf tag 1 area 0
Exit
RT1
router ospf 1
router-id 10.4.5.1
network 10.4.255.33?255.255.255.252 area 0
network 10.4.255.18?255.255.255.252 area 0
network 10.4.255.21?255.255.255.255 area 0
network 10.4.255.37?255.255.255.255 area 0
network 10.4.255.41?255.255.255.255 area 0
exi
int lo1
ipv6 ospf 1 area 0
int g0/0
ipv6 ospf 1 area 0
int g0/1
ipv6 ospf 1 area 0
int g0/2
ipv6 ospf 1 area 0
int s1/0
ipv6 ospf 1 area 0
int s1/1
ipv6 ospf 1 area 0
RT2
router ospf 1
router-id 10.13.6.2
network 10.4.255.34?255.255.255.252 area 0
network 10.4.255.42?255.255.255.252 area 0
network 10.4.255.38?255.255.255.252 area 0
int lo1
ipv6 ospf 1 area 0
int g0/0
ipv6 ospf 1 area 0
int s1/0
ipv6 ospf 1 area 0
int s1/1
ipv6 ospf 1 area 0
FW1:
ip vrouter trust-vr
ip route 0.0.0.0/0 200.200.200.1
router ospf
router-id 10.4.7.1
network 10.4.255.39/30 area 0
network 10.4.255.17/30 area 0
network 10.4.7.1 area 0
default-information originate type 2
exit
exit
ip vrouter trust-vr
ipv6 router ospf router-id 10.4.7.1
exit
exit
interface loopback1
ipv6 ospf area 0
exit
interface ethernet0/1
ipv6 ospf area 0
exit
interface ethernet0/2
ipv6 ospf area 0
exi
(2)RT2 與 AC1 之間運(yùn)行 OSPFv2 協(xié)議,process 1,area 1 nssa no summary;AC1 發(fā)布 Loopback1 地址路由、管理、產(chǎn)品和營銷路由用 prefix-list 重發(fā)布 Loopback3,prefix-list 名稱AC1-Loopback3-IPv4。
RT1
router ospf 1
netw 10.4.255.21 255.255.255.252 area 1
area 1 nass no-summary
Exi
AC1
router ospf 1
network 10.4.4.1/32 area 1
network 10.4.4.2/32 area 1
network 10.4.4.3/32area 1
network 10.4.255.46/30 area 1
area 1 nssa no-summary
exi
Int lo3
exi
ip prefix-list AC1-Loopback3-IPv4?permit 10.4.4.3/32
ip prefix-list AC1-Loopback3-IPv4?permit any
route-map loopback3 permit 10
match ip address prefix-list loopback3
exit
route-map loopback3 permit 1
exi
router ospf 1
redistribute connected route-map loopback3
exit
(4)修改 ospf cost 為 100,實(shí)現(xiàn) SW1 分別與 RT2、FW2 之間 IPv4 和 IPv6 互訪流量優(yōu)先通過 SW1-SW2-RT1 鏈路轉(zhuǎn)發(fā),SW2 訪問Internet IPv4 和 IPv6 流量優(yōu)先通過 SW2-SW1-FW1 鏈路轉(zhuǎn)發(fā)。
SW1
router ospf 1
interface e1/0/19
ip ospf cost 100
Exit
ip access-list extended IPV4_ACL
permit ip any any
Exi
RT1
route-map IPV4_ROUTE_MAP permit 10
match ip address IPV4_ACL
set ip next-hop <SW2的IP地址>
interface GigabitEthernet0/1文章來源:http://www.zghlxwxcb.cn/news/detail-785193.html
??ip policy route-map IPV4_ROUTE_MAP
ipv6 access-list IPV6_ACL
permit ipv6 any any
route-map IPV6_ROUTE_MAP permit 10
match ipv6 address IPV6_ACL
set ipv6 next-hop <SW2的IPv6地址>
interface GigabitEthernet0/1
ipv6 policy route-map IPV6_ROUTE_MAP文章來源地址http://www.zghlxwxcb.cn/news/detail-785193.html
RT1
ip access-list extended IPV4_ACL
permit ip any any
Exi
route-map IPV4_ROUTE_MAP permit 10
match ip address IPV4_ACL
set ip next-hop <SW1的IP地址>
interface GigabitEthernet0/1
ip policy route-map IPV4_ROUTE_MAP
ipv6 access-list IPV6_ACL
permit ipv6 any any
route-map IPV6_ROUTE_MAP permit 10
match ipv6 address IPV6_ACL
set ipv6 next-hop <SW1的IPv6地址>
interface GigabitEthernet0/1
ipv6 policy route-map IPV6_ROUTE_MAP
到了這里,關(guān)于zz016網(wǎng)絡(luò)建設(shè)與運(yùn)維正式賽卷(路由)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!