前言:
当前我们对“h3c telnet acl”大致比较关心,姐妹们都想要了解一些“h3c telnet acl”的相关资讯。那么小编也在网上搜集了一些有关“h3c telnet acl””的相关内容,希望朋友们能喜欢,各位老铁们快快来学习一下吧!一、拓扑:
二、要求及步骤:
1.按照图示配置IP地址。
【R1】
[R1]interface MP-group 1[R1-MP-group1]ip address 202.100.1.2 30[R1-MP-group1]int s1/0[R1-Serial1/0]ppp mp MP-group 1[R1-Serial1/0]int s2/0[R1-Serial2/0]ppp mp MP-group 1[R1-Serial2/0]quit
【INTERNET】
[INTERNET]interface MP-group 1[INTERNET-MP-group1]ip address 202.100.1.1 30[INTERNET-MP-group1]int s1/0[INTERNET-Serial1/0]ppp mp MP-group 1[INTERNET-Serial1/0]int s2/0[INTERNET-Serial2/0]ppp mp MP-group 1[INTERNET-Serial2/0]quit[INTERNET]interface l[INTERNET]interface LoopBack 0[INTERNET-LoopBack0]ip address 100.1.1.1 32[INTERNET-LoopBack0]quit
2.SW1和SW2之间的直连链路配置链路聚合。
【SW1】
[SW1]interface Bridge-Aggregation 1[SW1-Bridge-Aggregation1]int g1/0/2[SW1-GigabitEthernet1/0/2]port link-aggregation group 1[SW1-GigabitEthernet1/0/2]int g1/0/1[SW1-GigabitEthernet1/0/1]port link-aggregation group 1[SW1-GigabitEthernet1/0/1]quit[SW1]interface Bridge-Aggregation 1[SW1-Bridge-Aggregation1]port link-type trunk[SW1-Bridge-Aggregation1]port trunk permit vlan 10 20 30[SW1-Bridge-Aggregation1]quit
【SW2】
[SW2]interface Bridge-Aggregation 1[SW2-Bridge-Aggregation1]int g1/0/1[SW2-GigabitEthernet1/0/1]port link-aggregation group 1[SW2-GigabitEthernet1/0/1]int g1/0/2[SW2-GigabitEthernet1/0/2]port link-aggregation group 1[SW2-GigabitEthernet1/0/2]quit[SW2]interface Bridge-Aggregation 1[SW2-Bridge-Aggregation1]port link-type trunk[SW2-Bridge-Aggregation1]port trunk permit vlan 10 20 30[SW2-Bridge-Aggregation1]quit
3.公司内部业务网段为vlan10和vlan20;vlan10是市场部,vlan20是技术部,要求对vlan进行命名以便识别;PC1属于vlan10,PC2属于vlan20,vlan30用于SW1和SW2建立OSPF邻居;vlan111为SW1和R1的互联vlan,vlan222为SW2和R2的互联vlan。
【SW1】
[H3C]sy SW1[SW1]vlan 10[SW1-vlan10]name ShiChang[SW1-vlan10]vlan 20[SW1-vlan20]name JiShu[SW1-vlan20]vlan 30[SW1-vlan30]name to_SW2[SW1-vlan30]vlan 111[SW1-vlan111]to_R1[SW1-vlan111]port GigabitEthernet 1/0/4[SW1-vlan111]quit
【SW2】
[H3C]sy SW2[SW2]vlan 10[SW2-vlan10]name ShiChang[SW2-vlan10]vlan 20[SW2-vlan20]name JiShu[SW2-vlan20]vlan 30[SW2-vlan30]name to_SW1[SW2-vlan30]vlan 222[SW2-vlan222]name to_R2[SW2-vlan222]port GigabitEthernet 1/0/4[SW2-vlan222]quit
【SW3】
[H3C]sy SW3[SW3]vlan 10[SW3-vlan10]name ShiChang[SW3-vlan10]port GigabitEthernet 1/0/3[SW3-vlan10]vlan 20[SW3-vlan20]name JiShu[SW3-vlan20]port GigabitEthernet 1/0/4[SW3-vlan20]quit
4.所有交换机相连的端口配置为trunk,允许相应的vlan流量通过。
【SW1】
[SW1]interface GigabitEthernet 1/0/3[SW1-GigabitEthernet1/0/3]port link-type trunk[SW1-GigabitEthernet1/0/3]port trunk permit vlan 10 20[SW1-GigabitEthernet1/0/3]quit
【SW2】
[SW2]interface GigabitEthernet 1/0/3[SW2-GigabitEthernet1/0/3]port link-type trunk[SW2-GigabitEthernet1/0/3]port trunk permit vlan 10 20[SW2-GigabitEthernet1/0/3]quit
【SW3】
[SW3]interface GigabitEthernet 1/0/1[SW3-GigabitEthernet1/0/1]port link-type trunk[SW3-GigabitEthernet1/0/1]port trunk permit vlan 10 20[SW3-GigabitEthernet1/0/1]quit[SW3]interface GigabitEthernet 1/0/2[SW3-GigabitEthernet1/0/2]port link-type trunk[SW3-GigabitEthernet1/0/2]port trunk permit vlan 10 20[SW3-GigabitEthernet1/0/2]qui[SW3-GigabitEthernet1/0/2]quit
5.交换机连接pc的端口配置为边缘端口。
【SW3】
[SW3]interface GigabitEthernet 1/0/3[SW3-GigabitEthernet1/0/3]stp edged-port[SW3-GigabitEthernet1/0/3]quit[SW3]interface GigabitEthernet 1/0/4[SW3-GigabitEthernet1/0/4]stp edged-port[SW3-GigabitEthernet1/0/4]quit
6.在SW1上配置DHCP服务,为vlan10和vlan20的PC动态分配IP地址、网关和DNS地址;要求vlan10的网关是192.168.1.252,vlan20的网关是192.168.2.253.
[SW1]dhcp enable[SW1]dhcp server ip-pool vlan10[SW1-dhcp-pool-vlan10]network 192.168.1.0 mask 255.255.255.0[SW1-dhcp-pool-vlan10]dns-list 8.8.8.8[SW1-dhcp-pool-vlan10]gateway-list 192.168.1.252[SW1-dhcp-pool-vlan10]quit[SW1]dhcp server ip-pool vlan20[SW1-dhcp-pool-vlan20]network 192.168.2.0 mask 255.255.255.0[SW1-dhcp-pool-vlan20]dns-list 8.8.8.8[SW1-dhcp-pool-vlan20]gateway-list 192.168.2.253[SW1-dhcp-pool-vlan20]quit
7.按照图示区域配置OSPF,实现公司内部网络的互通,ABR的环回口宣告进骨干区域;业务网段不允许出现协议报文。
【SW1】
[SW1]ospf router-id 10.1.1.11[SW1-ospf-1]silent-interface Vlan-interface 10[SW1-ospf-1]silent-interface Vlan-interface 20[SW1-ospf-1]area 1[SW1-ospf-1-area-0.0.0.1]network 192.168.1.252 0.0.0.0[SW1-ospf-1-area-0.0.0.1]network 192.168.2.252 0.0.0.0[SW1-ospf-1-area-0.0.0.1]network 10.1.2.1 0.0.0.0[SW1-ospf-1-area-0.0.0.1]network 10.1.1.11 0.0.0.0[SW1-ospf-1-area-0.0.0.1]network 10.0.0.6 0.0.0.0[SW1-ospf-1-area-0.0.0.1]quit[SW1-ospf-1]quit
【SW2】
[SW2]ospf router-id 10.1.1.12[SW2-ospf-1]silent-interface Vlan-interface 10[SW2-ospf-1]silent-interface Vlan-interface 20[SW2-ospf-1]area 1[SW2-ospf-1-area-0.0.0.1]network 192.168.1.253 0.0.0.0[SW2-ospf-1-area-0.0.0.1]network 192.168.2.253 0.0.0.0[SW2-ospf-1-area-0.0.0.1]network 10.1.2.2 0.0.0.0[SW2-ospf-1-area-0.0.0.1]network 10.0.0.10 0.0.0.0[SW2-ospf-1-area-0.0.0.1]network 10.1.1.12 0.0.0.0[SW2-ospf-1-area-0.0.0.1]quit[SW2-ospf-1]quit
【R1】
[R1]ospf router-id 10.1.1.1[R1-ospf-1]area 0[R1-ospf-1-area-0.0.0.0]network 10.0.0.1 0.0.0.0[R1-ospf-1-area-0.0.0.0]network 10.0.0.14 0.0.0.0[R1-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0[R1-ospf-1-area-0.0.0.0]area 1[R1-ospf-1-area-0.0.0.1]network 10.0.0.5 0.0.0.0[R1-ospf-1-area-0.0.0.1]quit[R1-ospf-1]quit
【R2】
[R2]ospf router-id 10.1.1.2[R2-ospf-1]area 0[R2-ospf-1-area-0.0.0.0]network 10.0.0.18 0.0.0.0[R2-ospf-1-area-0.0.0.0]network 10.0.0.2 0.0.0.0[R2-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0[R2-ospf-1-area-0.0.0.0]area 1[R2-ospf-1-area-0.0.0.1]network 10.0.0.9 0.0.0.0[R2-ospf-1]quit
【R3】
[R3]ospf router-id 10.1.1.3[R3-ospf-1]area 0[R3-ospf-1-area-0.0.0.0]network 10.0.0.13 0.0.0.0[R3-ospf-1-area-0.0.0.0]network 10.0.0.17 0.0.0.0[R3-ospf-1-area-0.0.0.0]network 192.168.3.254 0.0.0.0[R3-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0[R3-ospf-1-area-0.0.0.0]quit[R3-ospf-1]quit
【PC1】
8.R1上配置默认路由指向互联网,并引入到OSPF中。
[R1]ip route-static 0.0.0.0 0.0.0.0 202.100.1.1[R1]ospf[R1-ospf-1]default-route-advertise[R1-ospf-1]quit
9.R1通过双绞线连接到互联网,配置PPP-MP,并配置双向的CHAP认证。
【R1】
[R1]local-user abraham class network[R1-luser-network-abraham]password simple 123456[R1-luser-network-abraham]service-type ppp[R1-luser-network-abraham]quit[R1]interface Serial 1/0[R1-Serial1/0]ppp authentication-mode chap[R1-Serial1/0]ppp chap user abraham[R1-Serial1/0]quit[R1]interface Serial 2/0[R1-Serial2/0]ppp authentication-mode chap[R1-Serial2/0]ppp chap user abraham[R1-Serial2/0]quit
【INTERNET】
[INTERNET]local-user abraham class network[INTERNET-luser-network-abraham]password simple 123456[INTERNET-luser-network-abraham]service-type ppp[INTERNET-luser-network-abraham]quit[INTERNET]interface Serial 1/0[INTERNET-Serial1/0]ppp authentication-mode chap[INTERNET-Serial1/0]ppp chap user abraham[INTERNET-Serial1/0]quit[INTERNET]interface Serial 2/0[INTERNET-Serial2/0]ppp authentication-mode chap[INTERNET-Serial2/0]ppp chap user abraham[INTERNET-Serial2/0]quit
手动shutdownMP接口,再undo shutdown,观察MP接口是否up,成功。
10.配置EASY_IP,只有业务网段192.168.1.0/24和192.168.2.0/24的数据可以通过R1访问互联网。
【R1】
[R1]access-list basic 2000[R1-acl-ipv4-basic-2000]rule permit source 192.168.1.0 0.0.0.255[R1-acl-ipv4-basic-2000]rule permit source 192.168.2.0 0.0.0.255[R1-acl-ipv4-basic-2000]quit[R1]interface MP-group 1[R1-MP-group1]nat outbound 2000[R1-MP-group1]quit
【PC1】
【PC3】
11.R1开启telnet远程管理,使用用户abc登录,密码是abc,只允许技术部门(vlan20)远程管理R1设备。
[R1]local-user abc[R1-luser-manage-abc]password simple abc[R1-luser-manage-abc]service-type telnet[R1-luser-manage-abc]authorization-attribute user-role level-15[R1-luser-manage-abc]quit[R1]user-interface vty 0 4[R1-line-vty0-4]authentication-mode scheme[R1-line-vty0-4]user-role level-15[R1-line-vty0-4]quit[R1]access-list basic 2001[R1-acl-ipv4-basic-2001]rule permit source 192.168.2.0 0.0.0.255[R1-acl-ipv4-basic-2001]quit[R1]telnet server acl 2001
标签: #h3c telnet acl