eNSP

基础

image-20230409163311555

当前位置所作配置

1
display this

清楚配置

1
2
3
4
5
6
7
8
9
10
11
12
13
<R3>reset saved-configuration
输入命令后会称劣出现:
Are you sure? (y/n)[n]:
这时输入y
<R3>reboot
输入命令后会出现:
Info: The system is comparing the configuration, please wait.
Warning: All the configuration will be saved to the next startup configuration.
Continue ? [y/n]:
这时输入n
系统会继续提示:
System will reboot! Continue ? [y/n]:
这时惹宋独输入y,重启

清除端口配置

1
2
3
4
[huawei]interface gigabitethernet 0/0/? (?:表示第几个端口)
[huawei-GigabitEthernet0/0/?]clear configuration interface gigabitethernet 0/0/?
清除该端口的配置后,该端口处于关闭状态,可以用以下命令重新开启。
[huawei-GigabitEthernet0/0/?]undo shutdown

去提醒

1
[Huawei]undo info-center enable 
05-ip地址配置
1
ip address 192.168.1.1 255.255.255.0

改名

1
sysname AR2
06-DHCP地址池
1
2
3
dhcp enable
int g0/0/0
dhcp select interface
07-DNS域名系统

image-20230406200841622

1
dhcp server dns-list 192.168.1.100
08-网关入门

image-20230406200632434

09-静态路由

image-20230406202420122

查路由表

1
display ip routing-table 192.168.3.10

下一跳——去R1

1
ip route-static 192.168.3.0 255.255.255.0 192.168.2.10

下一跳——回R2

1
ip route-static 192.168.1.0 255.255.255.0 192.168.2.1
10-TCP和UDP

Tcp:可靠性高。
适合对文件传输的完整性要求高,但是对延迟不敏感
电子邮件

更新客户端
Udp:速度快

11-划分vlan
1
2
3
4
5
vlan 10
int g0/0/1
port link-type access
port default vlan 10
display vlan
12-Trunk模式

image-20230406211246144

注:交换机根据trunk接口打标签来回包

1
2
port link-type trunk 
port trunk allow-pass vlan all
13-三层交换

注:

用三层交换技术,先用vlan把用户隔离开,再用某种技术,把隔离开用户连起来

隔离:隔离是故障

连通︰是正常通信

用三层配置vlan的ip作为网关

image-20230406214540804

1
2
int vlan 20
ip add 2.2.2.254 255.255.255.0
14-单臂路由

注:用路由器接口分两个子接口配置网关

1
2
3
4
[Huawei]int g0/0/0.10
dot1q termination vid 10
ip address 1.1.1.254 255.255.255.0
arp broadcast enable
15-ACL访问列表控制

image-20230411193401023

1
2
3
4
5
6
7
[Huawei]acl name text
[Huawei-acl-adv-text]rule deny ip source 192.168.10.0 0.0.0.255 destination 192.
168.30.0 0.0.0.255
[Huawei-acl-adv-text]rule permit ip source any destination any
[Huawei-acl-adv-text]q
[Huawei]in g0/0/1
[Huawei-GigabitEthernet0/0/1]traffic-filter inbound acl name text
16-NAT网络地址转换

1
2
3
4
5
[Huawei]acl name neiwang basic
[Huawei-acl-basic-neiwang]rule permit source 192.168.0.0 0.0.255.255

[Huawei]nat address-group 1 64.1.1.2 64.1.1.5
[Huawei]dis acl all

Total quantity of nonempty ACL number is 1

Basic ACL neiwang 2999, 1 rule
Acl’s step is 5
rule 5 permit source 192.168.0.0 0.0.255.255

1
2
 
[Huawei-GigabitEthernet0/0/1]nat outbound 2999 address-group 1

17-服务器发布

tap:静态natimage-20230420195724092

1
2
3
4
5
[ar1]dis this
ip route-static 200.200.200.0 255.255.255.0 119.1.1.2

[ar1-GigabitEthernet0/0/1]dis this
nat server global 119.1.1.123 inside 172.16.0.1
18-telnet

taps:远程控制,本地开启telnet服务

image-20230420201652045

image-20230420201934510

1
2
3
4
5
6
7
[Huawei]user-interface vty 0 4 
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]q
[Huawei]aaa
[Huawei-aaa]local-user test password cipher 123.com
[Huawei-aaa]local-user test privilege level 15
[Huawei-aaa]local-user test service-type telnet

image-20230420204249805

19-中小型网络系统综合实验

image-20230422202409025