打印

[原创] 我的一个配置(期末作业2)

我的一个配置(期末作业2)

实 验 内 容 要 求

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


实 验 主 要 步 骤 与 配 置 内 容



R1Router>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
R2Router>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
R2#

L3SWITCHSwitch>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


L2SW1Switch#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#


L2SW2Switch>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#
附件: 您所在的用户组无法下载或查看附件
本帖最近评分记录
男人要永遠感謝在他20多嵗時候曾經陪在他身邊的女人,因爲20多嵗的男人處在一生中的最低點, 沒錢、沒事業,而20多嵗的女人卻是她一生中最燦爛的時候……

TOP

请大家多多指点哈
男人要永遠感謝在他20多嵗時候曾經陪在他身邊的女人,因爲20多嵗的男人處在一生中的最低點, 沒錢、沒事業,而20多嵗的女人卻是她一生中最燦爛的時候……

TOP