编写一个涵盖ospf协议、rip协议、 stp技术, acl技术,vlan划分,ipv6,eigrp协议,dhcp技术,nat技术, aaa技术,请把此拓扑图将两个左侧pc机连接一个左侧二层交换机,另外两个左侧pc机连接一个左侧二层交换机 ,两个左侧二层交换机与一个左侧三层交换机连接, 左侧三层交换机与左侧路由器连接,左侧路由器与中间路由器连接,中间的路由器与右侧路由器连接,右侧路由器连接一个右侧三层交换机,右侧三层交换机连接两个右侧二层交换机,两个右侧二层交换机各连接两个右侧pc机,写出该地址的地址表,必须实现不同协议的交叉互通,及所有设备进行SSH登录,还要体现二、三层的安全保护,请写出配置命令
时间: 2023-07-15 08:15:37 浏览: 107
思科初级网络工程师CCNA实验练习题合集
首先,这个网络拓扑图中有许多设备,因此我们需要为每个设备分配一个IP地址。 假设我们使用以下IP地址方案:
左侧PC1: 192.168.1.2/24
左侧PC2: 192.168.1.3/24
左侧二层交换机1: 192.168.1.1/24
左侧二层交换机2: 192.168.1.4/24
左侧三层交换机: 192.168.2.1/24
左侧路由器: 192.168.2.2/24
中间路由器: 192.168.3.1/24
右侧路由器: 192.168.4.2/24
右侧三层交换机: 192.168.4.1/24
右侧二层交换机1: 192.168.4.3/24
右侧二层交换机2: 192.168.4.4/24
右侧PC1: 192.168.5.2/24
右侧PC2: 192.168.5.3/24
现在,我们将配置每个设备以实现所需的功能。
左侧二层交换机1和2:
```
enable
configure terminal
hostname L2SW1
interface fastEthernet 0/1
switchport mode access
switchport access vlan 10
spanning-tree portfast
interface fastEthernet 0/2
switchport mode access
switchport access vlan 20
spanning-tree portfast
interface fastEthernet 0/3
switchport mode trunk
switchport trunk native vlan 1
switchport trunk allowed vlan 10,20,30
exit
vlan 10
name PC_VLAN
vlan 20
name SERVER_VLAN
vlan 30
name MANAGEMENT_VLAN
exit
```
左侧三层交换机:
```
enable
configure terminal
hostname L3SW1
interface vlan 10
ip address 192.168.1.1 255.255.255.0
interface vlan 20
ip address 192.168.2.1 255.255.255.0
interface vlan 30
ip address 192.168.3.1 255.255.255.0
interface fastEthernet 0/1
switchport mode trunk
switchport trunk native vlan 1
switchport trunk allowed vlan 20,30
interface fastEthernet 0/2
switchport mode trunk
switchport trunk native vlan 1
switchport trunk allowed vlan 30
interface fastEthernet 0/3
switchport mode access
switchport access vlan 10
spanning-tree portfast
exit
```
左侧路由器:
```
enable
configure terminal
hostname LROUTER
interface gigabitEthernet 0/0
ip address 192.168.2.2 255.255.255.0
ipv6 address 2001:db8:1234::1/64
interface gigabitEthernet 0/1
ip address 10.0.0.1 255.255.255.0
ipv6 address 2001:db8:5678::1/64
exit
ipv6 unicast-routing
ipv6 route ::/0 2001:db8:5678::2
```
中间路由器:
```
enable
configure terminal
hostname MIDROUTER
interface gigabitEthernet 0/0
ip address 10.0.0.2 255.255.255.0
ipv6 address 2001:db8:5678::2/64
interface gigabitEthernet 0/1
ip address 10.0.1.1 255.255.255.0
ipv6 address 2001:db8:abcd::1/64
exit
ipv6 unicast-routing
ipv6 route ::/0 2001:db8:abcd::2
```
右侧路由器:
```
enable
configure terminal
hostname RTR2
interface gigabitEthernet 0/0
ip address 10.0.1.2 255.255.255.0
ipv6 address 2001:db8:abcd::2/64
interface gigabitEthernet 0/1
ip address 192.168.4.2 255.255.255.0
exit
```
右侧三层交换机:
```
enable
configure terminal
hostname R3SW1
interface vlan 10
ip address 192.168.5.1 255.255.255.0
interface vlan 20
ip address 192.168.4.1 255.255.255.0
interface fastEthernet 0/1
switchport mode trunk
switchport trunk native vlan 1
switchport trunk allowed vlan 10,20,30
interface fastEthernet 0/2
switchport mode trunk
switchport trunk native vlan 1
switchport trunk allowed vlan 20,30
exit
```
右侧二层交换机1和2:
```
enable
configure terminal
hostname R2SW1
interface fastEthernet 0/1
switchport mode access
switchport access vlan 10
spanning-tree portfast
interface fastEthernet 0/2
switchport mode access
switchport access vlan 20
spanning-tree portfast
interface fastEthernet 0/3
switchport mode trunk
switchport trunk native vlan 1
switchport trunk allowed vlan 10,20,30
exit
vlan 10
name PC_VLAN
vlan 20
name SERVER_VLAN
vlan 30
name MANAGEMENT_VLAN
exit
```
现在,我们将配置每个设备以实现所需的协议和技术。
OSPF协议:
在左侧三层交换机和左侧路由器之间启用OSPF协议,右侧三层交换机和右侧路由器之间也类似。
左侧三层交换机:
```
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
exit
```
左侧路由器:
```
router ospf 1
network 192.168.2.0 0.0.0.255 area 0
network 10.0.0.0 0.0.0.255 area 0
default-information originate
exit
```
右侧三层交换机:
```
router ospf 1
network 192.168.4.0 0.0.0.255 area 0
network 192.168.5.0 0.0.0.255 area 0
exit
```
右侧路由器:
```
router ospf 1
network 192.168.4.0 0.0.0.255 area 0
network 10.0.1.0 0.0.0.255 area 0
default-information originate
exit
```
RIP协议:
在左侧二层交换机1和右侧二层交换机1上启用RIP协议。
左侧二层交换机1:
```
router rip
network 192.168.1.0
network 192.168.2.0
exit
```
右侧二层交换机1:
```
router rip
network 192.168.4.0
network 192.168.5.0
exit
```
STP技术:
在所有二层交换机上启用STP协议。
左侧二层交换机1和2、右侧二层交换机1和2:
```
spanning-tree mode rapid-pvst
interface range fastEthernet 0/1-3
spanning-tree portfast
```
ACL技术:
在左侧三层交换机上配置ACL以限制来自PC VLAN的ICMP流量。
```
access-list 101 deny icmp any any
access-list 101 permit ip any any
interface vlan 10
ip access-group 101 in
```
VLAN划分:
在左侧二层交换机1和右侧二层交换机1上配置VLAN划分。
IPv6:
在左侧路由器、中间路由器和右侧路由器上启用IPv6功能。
EIGRP协议:
在左侧二层交换机2和右侧二层交换机2上启用EIGRP协议。
DHCP技术:
在左侧三层交换机上启用DHCP服务。
```
ip dhcp pool PC_POOL
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8
interface vlan 10
ip helper-address 192.168.2.2
```
NAT技术:
在左侧路由器上启用NAT服务。
```
ip nat inside source list 1 interface gigabitEthernet 0/1 overload
access-list 1 permit 192.168.1.0 0.0.0.255
```
AAA技术:
在所有设备上启用SSH访问并启用AAA认证。
```
username admin privilege 15 secret PASSWORD
line vty 0 4
transport input ssh
login local
```
阅读全文