顶楼
大 中
小 发表于 2007-7-1 22:48 只看该作者

我的一个配置(期末作业1)
实验内容要求:
1.自己构建网络拓扑结构图,并画出拓扑结构图。
2.要求用一个私有B类地址实现VLSM网络的IP规划。
3.保证路由器以NAT技术实现局域网访问因特网。)
4.实现路由器和交换机自身安全性设置,以及局域网内主机或子网之间安全访问控制策略。
5.各个交换机的VLAN配置,并由一台三层交换机完成各个VLAN之间通信,并要求该三层交换机与路由器相连接,并互联互通。
NAT-R:Router>en
Router#conf t
Router(config)#host NAT-R
NAT-R(config)#service password-encryption
NAT-R(config)#line vty 0 1276
NAT-R(config-line)#password rswzy
NAT-R(config-line)#exit
NAT-R(config)#enable secret level 15 rswzy
NAT-R(config)#enable secret level 14 others
NAT-R(config)#int f0/0
NAT-R(config-if)#no sh
NAT-R(config-if)# ip add 172.31.254.254 255.255.255.252
NAT-R(config-if)#ip access-group 10 in
NAT-R(config-if)#ip nat inside
NAT-R(config-if)#exit
NAT-R(config-if)#int s0/3/0
NAT-R(config-if)#ip add 200.1.1.1 255.255.255.252
NAT-R(config-if)#no sh
NAT-R(config-if)#ip nat outside
NAT-R(config-if)#exit
NAT-R(config)#router ospf 1
NAT-R(config-router)#net 200.1.1.1 0.0.0.255 a 1
NAT-R(config-router)#net 172.31.254.254 0.0.0.3 a 1
NAT-R(config-router)#passive-interface S0/3/0
NAT-R(config-router)#exit
NAT-R(config)#access-list 10 permit 172.16.10.0 0.0.0.255
NAT-R(config)#access-list 10 permit 172.16.20.0 0.0.0.255
NAT-R(config)#access-list 10 permit 172.16.30.0 0.0.0.255
NAT-R(config)#access-list 10 permit 172.16.128.0 0.0.15.255
NAT-R(config)#access-list 10 deny
any
NAT-R(config)#ip nat pool NAT 200.1.1.2 200.1.1.15 netmask 255.255.255.0
NAT-R(config)#ip nat inside source list 10 pool NAT
L3SWITCH:
Switch#conf t
Switch(config)#host L3SWITCH
L3SWITCH(config)#service password-encryption
L3SWITCH(config)#line vty 0 1276
L3SWITCH(config)#password rswzy
L3SWITCH(config)#exit
L3SWITCH (config)#enable secret level 15 rswzy
L3SWITCH (config)#enable secret level 14 others
L3SWITCH(config)#int f0/24
L3SWITCH(config-if)#ip routing
L3SWITCH(config-if)#ip add 172.16.31.253 255.255.255.252
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 ISL
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 ISL
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#vlan 10
L3SWITCH(config-vlan)#exit
L3SWITCH(config)#vlan 20
L3SWITCH(config-vlan)#exit
L3SWITCH(config)#vlan 30
L3SWITCH(config-vlan)#exit
L3SWITCH(config)#vlan 100
L3SWITCH(config-vlan)#exit
L3SWITCH(config)#vlan 128
L3SWITCH(config-vlan)#exit
L3SWITCH(config)#int vlan 10
L3SWITCH(config-if)#ip add 172.16.10.254
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#int vlan 20
L3SWITCH(config-if)#ip add 172.16.20.254
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#int vlan 30
L3SWITCH(config-if)#ip add 172.16.30.254
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#int vlan 100
L3SWITCH(config-if)#ip add 172.16.100.254
L3SWITCH(config-if)#no sh
L3SWITCH(config-if)#exit
L3SWITCH(config)#int vlan 128
L3SWITCH(config-if)#ip add 172.16.143.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 172.31.254.254 0.0.0.3 a 1
L3SWITCH (config-router)#net 172.16.10.254 0.0.0.255 a 1
L3SWITCH (config-router)#net 172.16.20.254 0.0.0.255 a 1
L3SWITCH (config-router)#net 172.16.30.254 0.0.0.255 a 1
L3SWITCH (config-router)#net 172.16.143.254 0.0.15.255 a 1
L3SWITCH (config-router)#exit
L3SWITCH (config)#access-list 100 deny tcp any eq 445 any eq 445
L3SWITCH (config)#access-list 100 deny tcp any eq 135 any eq 135
L3SWITCH (config)#access-list 100 deny tcp any eq 139 any eq 139
L3SWITCH (config)#vlan access-map public
L3SWITCH(config-vlan-access)#match ip address 100
L3SWITCH(config-vlan-access)#action forward
L3SWITCH(config-vlan-access)#exit
L3SWITCH (config)#vlan filter public vlan-list 128
L3SWITCH (config)#access-list 101 deny tcp any eq 445 any eq 445
L3SWITCH (config)#access-list 101 deny tcp any eq 135 any eq 135
L3SWITCH (config)#access-list 101 deny tcp any eq 136 any eq 136
L3SWITCH (config)#access-list 101 deny udp any eq 136 any eq 136
L3SWITCH (config)#access-list 101 deny tcp any eq 137 any eq 137
L3SWITCH (config)#access-list 101 deny udp any eq 137 any eq 137
L3SWITCH (config)#access-list 101 deny tcp any eq 138 any eq 138
L3SWITCH (config)#access-list 101 deny udp any eq 138 any eq 138
L3SWITCH (config)#access-list 101 deny tcp any eq 139 any eq 139
L3SWITCH (config)#vlan access-map secret
L3SWITCH(config-vlan-access)#match ip address 101
L3SWITCH(config-vlan-access)#action forward
L3SWITCH(config-vlan-access)#exit
L3SWITCH (config)#vlan filter secret vlan-list 101
L2SW1:Switch>en
Switch#conf t
Switch(config)#host L2SW1
L2SW1(config)#service password-encryption
L2SW1(config)#line vty 0 1276
L2SW1(config)#password rswzy
L2SW1 (config)#enable secret level 15 rswzy
L2SW1 (config)#enable secret level 14 others
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)#int range FastEthernet 0/1 - 10
L2SW1(config-if-range)#switchport access vlan 100
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 10
L2SW1(config-if-range)#no sh
L2SW1(config-if-range)#exit
L2SW1(config)#int range FastEthernet 0/21- 22
L2SW1(config-if-range)#switchport access vlan 128
L2SW1(config-if-range)#no sh
L2SW1(config-if-range)# end
L2SW1#
L2SW2:Switch>en
Switch#conf t
Switch(config)#host L2SW2
L2SW2(config)#service password-encryption
L2SW2(config)#line vty 0 1276
L2SW2(config)#password rswzy
L2SW2(config)#enable secret level 15 rswzy
L2SW2(config)#enable secret level 14 others
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 20
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 30
L2SW2(config-if-range)#no sh
L2SW2(config-if-range)#exit
L2SW1(config)#int range FastEthernet 0/21- 22
L2SW1(config-if-range)#switchport access vlan 128
L2SW1(config-if-range)#no sh
L2SW2(config-if-range)# end
L2SW2#
[ 本帖最后由 rswzy 于 2007-7-1 22:50 编辑 ]
附件: 您所在的用户组无法下载或查看附件
搜索更多相关主题的帖子:
作业
男人要永遠感謝在他20多嵗時候曾經陪在他身邊的女人,因爲20多嵗的男人處在一生中的最低點, 沒錢、沒事業,而20多嵗的女人卻是她一生中最燦爛的時候……
|