IP地址分配:

PC1

192.168.20.2/24

PC2

172.16.1.3/24

PC3

192.168.30.2/24

PC4

192.168.40.2/24

SwitchA VLAN1

172.16.3.1/24

SwitchA VLAN30

192.168.30.1/24

SwitchB VLAN1

172.16.1.2/24

SwitchB VLAN20

192.168.20.1/24

RouterA F0/0

172.16.1.1/24

RouterA F0/3

172.16.3.2/24

RouterA Serial0/1

172.16.2.1/24

RouterB Serial0/1

172.16.2.2/24

RouterB F0/0

192.168.40.1/24

【实现要求】

第一题

制作五条直通线,一条交叉线。请按拓扑图正确将各设备互连,其中两个路由器使用V35线缆连接。交换机、路由器按要求化分VLAN、设置路由、telnet管理(用户名digital,密码china)

第二题

SwitchB上划分两个VLAN20 VLAN1,并设置相应IP地址。在将SwitchB1-12端口划分到VLAN20,PC1接入SwitchB1端口。将其余端口划分到VLAN1PC2接入SwitchA23端口。VLAN124口连接至RouterAF0/0口。

第三题

SwitchA上划分两个VLAN30VLAN1,并设置相应IP地址。在将SwitchA1-12端口划分到VLAN30,PC3接入SwitchA1端口。将其余端口划分到VLAN1VLAN124口连接至RouterAF0/3口。

第四题

RouterARouterB端口上设置相应的IP地址。通过V35线缆连接至RouterB配置HDLC串口封装协议和DTE端封装时钟64000

RouterB上设置NAT,使PC4可以通过NAT转换访问外部网络

第五题

在交换机和路由器上设置OSPF协议,使pc1pc2pc3能够互相访问。pc4能访问pc1pc2pc3

=====RouterA的配置======

Router_config#hostname RouterA

RouterA_config#interface f0/0
RouterA_config_f0/0#ip address 172.16.1.1 255.255.255.0
RouterA_config_f0/0#interface f0/3
RouterA_config_f0/3#ip address 172.16.3.2 255.255.255.0
RouterA_config_f0/3#interfa s0/1
RouterA_config_s0/1#encapsulation ppp
RouterA_config_s0/1#ip address 172.16.2.1 255.255.255.0
RouterA_config_s0/1#exit
RouterA_config#router ospf 100
RouterA_config_ospf_100#network 172.16.3.0 255.255.255.0 area 0
RouterB_config_ospf_100#network 172.16.2.0 255.255.255.0 area 0

RouterB_config_ospf_100#network 172.16.1.0 255.255.255.0 area 0

=====RouterB的配置======

Router_config#hostname RouterB

RouterB_config#int f0/0
RouterB_config_f0/0#ip add 192.168.40.1 255.255.255.0
RouterB_config_f0/0#int s0/1
RouterB_config_s0/1#encapsulation ppp
RouterB_config_s0/1#physical-layer speed 64000
RouterB_config_s0/1#ip add 172.16.2.2 255.255.255.0
RouterB_config_s0/1#exit
RouterB_config#ip access-list standard 1
Router_config_std_nacl#permit 192.168.40.2 255.255.255.0
Router_config_std_nacl#exit

Router_config#ip nat inside source list 1 interface serial 0/1
Router_config#int f0/0
Router_config_f0/0#ip nat inside
Router_config_f0/0#int s0/1
Router_config_s0/1#ip nat outside
Router_config_s0/1#exit

Router_config#router ospf 200
Router_config_ospf_200#network 192.168.40.0 255.255.255.0 area 0
Router_config_ospf_200#network 172.16.2.0 255.255.255.0 area 0

======SwitchA的配置======

DCRS-5650-28(config)#hostname SwitchA

SwitchA(config)#telnet-server enable

SwitchA(config)#telnet-user digital password 0 china

SwitchA(config)#vlan 30
SwitchA(config-Vlan30)#name vlan30
SwitchA(config-Vlan30)#switchport interface ethernet 0/0/1-12
SwitchA(config-Vlan30)#int vlan 1
SwitchA(config-if-Vlan1)#ip address 172.16.3.1 255.255.255.0
SwitchA(config-if-Vlan1)#int vlan 30
SwitchA(config-if-Vlan30)#ip address 192.168.30.1 255.255.255.0
SwitchA(config-if-Vlan30)#interface ethernet 0/0/24
SwitchA(config-if-Ethernet0/0/24)#switchport mode trunk
SwitchA(config-if-Ethernet0/0/24)#exit
SwitchA(config)#router ospf 300
SwitchA(config-rotuer)#network 172.16.3.0/24 area 0
SwitchA(config-router)#network 192.168.30.0/24 area 0

=====SwitchB的配置=====

DCRS-5650-28(config)#hostname SwitchB

SwitchB(config)#telnet-server enable

SwitchB(config)#telnet-user digital password 0 china

SwitchB(config)#vlan 20
SwitchB(config-Vlan20)#name vlan20
SwitchB(config-Vlan20)#switchport interface ethernet 0/0/1-12
SwitchB(config-Vlan20)#interface vlan 20
SwitchB(config-if-Vlan20)#ip address 192.168.20.1 255.255.255.0
SwitchB(config-if-Vlan20)#interface vlan 1
SwitchB(config-if-Vlan1)#ip address 172.16.1.2 255.255.255.0
SwitchB(config-if-Vlan1)#interface ethernet 0/0/24
SwitchB(config-Ethernet0/0/24)#switchport mode trunk
SwitchB(config-Ethernet0/0/24)#exit
SwitchB(config)#router ospf 400
SwitchB(config-router)#network 172.16.1.0/24 area 0
SwitchB(config-router)#network 192.168.20.0/24 area 0