院/系: 网络工程系 课程名称:《网络设备配置与管理》
班级 |
网络工程2004级4班 |
姓名 |
万真一 |
学号 |
2004032176 |
实验室号 |
6306 |
日期 |
2007年7月3日 |
组号 |
5 |
计算机号 |
|
实验名称 |
网络设备配置与管理 综合实验 |
得分
情况 |
一 |
二 |
三 |
四 |
五 |
六 |
成绩评定 |
|
|
|
|
|
|
|
实 验 内 容 要 求 |
1. PC 1属于vlan2,PC 2、 PC 3同属vlan3,且vlan2与vlan3局域网主机ip地址不属于同一网段。要求自行进行ip规划,并在二层交换机及三层交换机之上做相关配置,实现PC 1与PC 2、PC 3互通,PC 2与PC 3的互通。
2. 对PC 1所接的交换机端口进行安全配置,绑定PC 1的ip以及mac地址。
3. 其他IP地址规划要求:三层交换机与路由器R1相连的接口以及R1接口(同一网段)、R1串口以及R2串口(同一网段)、R2 F0/1口、服务器PC 4的IP地址(同一网段),请自行规划。
4. 在三层交换机、R1、R2上做相应的路由配置,实现PC 1、PC 2、PC3对服务器PC 4的互通。
5. 在R2上设置标准IP ACL,拒绝PC1访问PC4,而PC2与PC3能够访问到PC4。 |
实 验 拓 扑 以 及 IP 地 址 规 划 |
Vlan 2 IP段:192.168.1.0 /24 网关IP:192.168.1.254 /24 Vlan IP:192.168.1.253 /24
Vlan 3 IP段:192.168.2.0 /24 网关IP:192.168.2.254 /24 Vlan IP:192.168.2.253 /24
服务区 IP段:172.16.1.0 /24 网关IP:172.16.1.254 /24 Vlan IP:172.16.1.253 /24
两路由直连区 IP:R1 S0/3/0:192.168.100.1/30 R2 S0/3/0:192.168.100.2/30
R1与3550直连区IP:R1 F0/1:192.168. 0.1/30 Cisco3550 F0/24:192.168. 0.2/30
|
R1:
Router>en
Router#conf t
Router(config)#host R1
R1(config)#ip classless
R1(config)#no ip domain-lookup
R1(config)#int f0/1
R1(config-if)#no sh
R1(config-if)# ip add 192.168.0.1 255.255.255.0
R1(config-if)#exit
R1(config-if)#int s0/3/0
R1(config-if)#ip add 192.168.100.1 255.255.255.252
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#net 192.168.0.0 0.0.0.255 a 1
R1(config-router)#net 192.168.100.0 0.0.0.3 a 1
R1(config-router)#exit
R2:
Router>en
Router#conf t
Router(config)#host R2
R2(config)#ip classless
R2(config)#no ip domain-lookup
R2(config)#int f0/1
R2(config-if)#ip add 172.16.1.254 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R1(config)#int s0/3/0
R1(config-if)#ip add 192.168.100.2 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no sh
R2(config-if)#exit
R2(config)#access-list 10 deny host 192.168.1.1
R2(config)#access-list 10 permit any
R2(config)#int s0/3/0
R2(config-if)# ip access-group 10 in
R2(config)#router ospf 1
R2(config-router)#net 172.16.1.0 0.0.0.255 a 1
R2(config-router)#net 192.168.100.0 0.0.0.3 a 1
R2(config-router)#end
Router#
L3SWITCH:
Switch>en
Switch#conf t
Switch(config)#host L3SWITCH
L3SWITCH(config)#ip routing
L3SWITCH(config)#int f0/24
L3SWITCH(config-if)#ip add 192.168.0.2 255.255.255.0
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#int f0/23
L3SWITCH(config-if)#switchport mode trunk
L3SWITCH(config-if)# switchport runk encapsulation dot.1q
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#int f0/22
L3SWITCH(config-if)#switchport mode trunk
L3SWITCH(config-if)#switchport runk encapsulation dot.1q
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#vlan 2
L3SWITCH(config-vlan)#exit
L3SWITCH(config)#vlan 3
L3SWITCH(config-vlan)#exit
L3SWITCH(config)#int vlan 2
L3SWITCH(config-if)#ip add 192.168.1.254
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#int vlan 3
L3SWITCH(config-if)#ip add 192.168.2.254
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#vtp mode server
L3SWITCH(config)#vtp domain cuit
L3SWITCH (config)#router ospf 1
L3SWITCH (config-router)#net 192.168.1.0 0.0.0.255 a 1
L3SWITCH (config-router)#net 192.168.2.0 0.0.0.255 a 1
L3SWITCH (config-router)#net 192.168.0.0 0.0.0.3 a 1
L3SWITCH (config-router)#exit
L2SW1:
Switch#conf t
Switch(config)#host L2SW1
L2SW1(config)#int f0/24
L2SW1(config-if)#switchport mode trunk
L2SW1(config-if)#no sh
L2SW1(config-if)#exit
L2SW1(config)#vtp mode client
L2SW1(config)#vtp domain cuit
L2SW1 (config)mac access-list extended mac 10
#定义一个MAC地址访问控制列表并且命名该列表名为MAC10
L2SW1(config)permit host 0009.6bc4.d4bf any
#定义MAC地址为0009.6bc4.d4bf的主机可以访问任意主机
L2SW1(config)permit any host 0009.6bc4.d4bf
#定义所有主机可以访问MAC地址为0009.6bc4.d4bf的主机
L2SW1(config)ip access-list extended ip10
#定义一个IP地址访问控制列表并且命名该列表名为IP10
L2SW1 (config)permit 192.168.1.1 0.0.0.0 any
#定义IP地址为192.168.1.1的主机可以访问任意主机
L2SW1(config)permit any 192.168.1.1 0.0.0.0
#定义所有主机可以访问IP地址为192.168.1.1的主机
L2SW1(config-if )interface Fa0/1
#进入配置具体端口的模式
L2SW1(config-if )mac access-group mac 10 in
#在该端口上应用名为MAC10的访问列表(即前面我们定义的访问策略)
L2SW1(config-if )ip access-group ip 10 in
L2SW1(config-if)#exit
L2SW1(config)#int range FastEthernet 0/1 - 10
L2SW1(config-if-range)#switchport access vlan 2
L2SW1(config-if-range)#no sh
L2SW1(config-if-range)#exit
L2SW1(config)#int range FastEthernet 0/11 - 20
L2SW1(config-if-range)#switchport access vlan 3
L2SW1(config-if-range)#no sh
L2SW1(config-if-range)#end
L2SW1#
L2SW2:
Switch>en
Switch#conf t
Switch(config)#host L2SW2
L2SW2(config)#int f0/24
L2SW2(config-if)#switchport mode trunk
L2SW2(config-if)#no sh
L2SW2(config-if)#exit
L2SW2(config)#vtp mode client
L2SW2(config)#vtp domain cuit
L2SW2(config)#int range FastEthernet 0/1 - 10
L2SW2(config-if-range)#switchport access vlan 2
L2SW2(config-if-range)#no sh
L2SW2(config-if-range)#exit
L2SW2(config)#int range FastEthernet 0/11 - 20
L2SW2(config-if-range)#switchport access vlan 3
L2SW2(config-if-range)#no sh
L2SW2(config-if-range)# end
L2SW2#
完整文档